![]() |
Routines |
| Prev: 25304 | Up: Map | Next: 25375 |
|
Used by the routine at MovePercyRight.
Percy has gone past the right edge so transition into the next room.
|
||||||||
| TransitionRoomRight | 25351 | PUSH AF | Stash AF on the stack. | |||||
| 25352 | LD A,(24517) | A=*CurrentRoom. | ||||||
|
If the current room is 11 (the last room), wrap to room 1.
|
||||||||
| 25355 | CP 11 | Jump to TransitionRoomRight_SetRoom if this isn't room 11. | ||||||
| 25357 | JR NZ,TransitionRoomRight_SetRoom | |||||||
| 25359 | XOR A | A=0 (will become 1 after increment). | ||||||
| TransitionRoomRight_SetRoom | 25360 | LD (IX+0),0 | Write 0 to reset *IX+0 (Percy's X to left edge). | |||||
| 25364 | INC A | Increment room number. | ||||||
| 25365 | LD (24517),A | Write A to *CurrentRoom. | ||||||
| 25368 | CALL PopulateRoomBuffer | Call PopulateRoomBuffer to draw the new room. | ||||||
| 25371 | POP AF | Restore AF from the stack. | ||||||
| 25372 | POP AF | Discard two stack values. | ||||||
| 25373 | POP AF | |||||||
| 25374 | RET | Return. | ||||||
| Prev: 25304 | Up: Map | Next: 25375 |