![]() |
Routines |
| Prev: 50187 | Up: Map | Next: 50242 |
|
Sends the player to the room to the south if it has gone past the south edge of the room. The y position is set to 0, which PlacePlayerAtDoor takes as the sign that the player has come out of the south and puts it at the north side of the new room.
|
||||||||||
|
Leave if past the south edge.
|
||||||||||
| LeaveRoomToSouth | 50214 | POP HL | Restore HL from the stack. | |||||||
| 50215 | LD A,128 | Set A to 128. | ||||||||
| 50217 | SUB H | Subtract H. | ||||||||
| 50218 | LD H,A | Copy it to H. | ||||||||
| 50219 | LD A,(IX+2) | Fetch the y position of the player. | ||||||||
| 50222 | ADD A,(IX+10) | Add the speed along the y axis. | ||||||||
| 50225 | ADD A,(IX+5) | Add the depth of the player. | ||||||||
| 50228 | CP H | Return if the player is still in the room. | ||||||||
| 50229 | RET NC | |||||||||
| 50230 | LD (IX+2),0 | Write 0 to the y position. | ||||||||
| 50234 | LD A,(IX+8) | Fetch the room number. | ||||||||
| 50237 | SUB 16 | Subtract 16. | ||||||||
| 50239 | JP ChangeRoom | Jump to ChangeRoom. | ||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: 50187 | Up: Map | Next: 50242 |