Prev: 62D8 Up: Map Next: 631F
6307: Transition Room Right
Used by the routine at MovePercyRight.
Percy has gone past the right edge so transition into the next room.
Input
IX Pointer to Percy's state data
TransitionRoomRight 6307 PUSH AF Stash AF on the stack.
6308 LD A,($5FC5) A=*CurrentRoom.
If the current room is 0B (the last room), wrap to room 01.
630B CP $0B Jump to TransitionRoomRight_SetRoom if this isn't room 0B.
630D JR NZ,TransitionRoomRight_SetRoom
630F XOR A A=00 (will become 01 after increment).
TransitionRoomRight_SetRoom 6310 LD (IX+$00),$00 Write 00 to reset *IX+00 (Percy's X to left edge).
6314 INC A Increment room number.
6315 LD ($5FC5),A Write A to *CurrentRoom.
6318 CALL PopulateRoomBuffer Call PopulateRoomBuffer to draw the new room.
631B POP AF Restore AF from the stack.
631C POP AF Discard two stack values.
631D POP AF
631E RET Return.
Prev: 62D8 Up: Map Next: 631F