![]() |
Routines |
| Prev: 51373 | Up: Map | Next: 51447 |
|
Used by the routine at HandleNearArch.
Gives the player a small push towards the middle of a door, when it is standing in front of it. The push is along x or y, depending on the direction that the player is facing and the type of the door. That way the player does not have to line up exactly to go through.
|
||||||||
|
Return unless the player is in front of the door.
|
||||||||
| NudgeObjectsToArch | 51410 | LD HL,3855 | Set the size of the box in front of the door in HL to 15 along both x and y. | |||||
| 51413 | LD IY,42863 | Start with the first object record, ObjectsTable, which is the legs of the player. | ||||||
| 51417 | LD A,(IY+0) | Return if the legs are not in use. | ||||||
| 51420 | AND A | |||||||
| 51421 | RET Z | |||||||
| 51422 | BIT 3,(IY+7) | Return if the player cannot open doors. | ||||||
| 51426 | RET Z | |||||||
| 51427 | CALL TestNearTo | Return if the player is not in front of the door. | ||||||
| 51430 | RET NC | |||||||
|
Push towards the middle of the door.
|
||||||||
| 51431 | LD BC,51447 | Take the table of routines for type 8, DoorPushRoutines. | ||||||
| 51434 | BIT 3,(IX+0) | Jump to SetPlayerSpeed_JumpByFacing to run the routine for the direction if the door is type 8. | ||||||
| 51438 | JP NZ,SetPlayerSpeed_JumpByFacing | |||||||
| 51441 | LD BC,51455 | Take the table of routines for type 6, DoorPushRoutines_Type06. | ||||||
| 51444 | JP SetPlayerSpeed_JumpByFacing | Jump to SetPlayerSpeed_JumpByFacing to run the routine for the direction. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 51373 | Up: Map | Next: 51447 |