![]() |
Routines |
| Prev: C397 | Up: Map | Next: C40B |
|
Sends the player to the room to the east if it has gone past the east edge of the room. The x position is set to FF, which PlacePlayerAtDoor takes as the sign that the player has come out of the east and puts it at the west side of the new room.
|
||||||||||
|
Leave if past the east edge.
|
||||||||||
| LeaveRoomToEast | C3F0 | POP HL | Restore HL from the stack. | |||||||
| C3F1 | LD A,L | Copy L to A. | ||||||||
| C3F2 | ADD A,$80 | Add 80. | ||||||||
| C3F4 | LD L,A | Copy it to L. | ||||||||
| C3F5 | LD A,(IX+$01) | Fetch the x position of the player. | ||||||||
| C3F8 | ADD A,(IX+$09) | Add the speed along the x axis. | ||||||||
| C3FB | SUB (IX+$04) | Subtract the width of the player. | ||||||||
| C3FE | CP L | Return if the player is still in the room. | ||||||||
| C3FF | RET C | |||||||||
| C400 | LD (IX+$01),$FF | Write FF to the x position. | ||||||||
| C404 | LD A,(IX+$08) | Fetch the room number. | ||||||||
| C407 | LD L,A | Copy it to L. | ||||||||
| C408 | INC A | Increment A. | ||||||||
| C409 | JR ChangeRoomEastWest | Jump to ChangeRoomEastWest. | ||||||||
|
View the equivalent code in;
|
||||||||||
| Prev: C397 | Up: Map | Next: C40B |