![]() |
Routines |
| Prev: 50160 | Up: Map | Next: 50214 |
|
Sends the player to the room to the north if it has gone past the north edge of the room. The y position is set to 255, which PlacePlayerAtDoor takes as the sign that the player has come out of the north and puts it at the south side of the new room.
|
||||||||||
|
Leave if past the north edge.
|
||||||||||
| LeaveRoomToNorth | 50187 | POP HL | Restore HL from the stack. | |||||||
| 50188 | LD A,H | Copy H to A. | ||||||||
| 50189 | ADD A,128 | Add 128. | ||||||||
| 50191 | LD H,A | Copy it to H. | ||||||||
| 50192 | LD A,(IX+2) | Fetch the y position of the player. | ||||||||
| 50195 | ADD A,(IX+10) | Add the speed along the y axis. | ||||||||
| 50198 | SUB (IX+5) | Subtract the depth of the player. | ||||||||
| 50201 | CP H | Return if the player is still in the room. | ||||||||
| 50202 | RET C | |||||||||
| 50203 | LD (IX+2),255 | Write 255 to the y position. | ||||||||
| 50207 | LD A,(IX+8) | Fetch the room number. | ||||||||
| 50210 | ADD A,16 | Add 16. | ||||||||
| 50212 | JR ChangeRoom | Jump to ChangeRoom. | ||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: 50160 | Up: Map | Next: 50214 |