Prev: 6307 Up: Map Next: 6338
631F: Transition Room Left
Used by the routine at MovePercyLeft.
Percy has gone past the left edge so transition into the previous room.
Input
IX Pointer to Percy's state data
TransitionRoomLeft 631F PUSH AF Stash AF on the stack.
6320 LD A,($5FC5) A=*CurrentRoom.
If the current room is room 01 wrap around to room 0B.
6323 CP $01 Jump to TransitionRoomLeft_SetRoom if this isn't room 01.
6325 JR NZ,TransitionRoomLeft_SetRoom
6327 LD A,$0C Set A to room 0C (will become 0B after decrement).
TransitionRoomLeft_SetRoom 6329 LD (IX+$00),$EE Write EE to *IX+00 (reset Percy's X to right edge).
632D DEC A Decrement room number.
632E LD ($5FC5),A Write A to *CurrentRoom.
6331 POP AF Restore AF from the stack.
6332 CALL PopulateRoomBuffer Call PopulateRoomBuffer to draw the new room.
6335 POP AF Discard two stack values.
6336 POP AF
6337 RET Return.
Prev: 6307 Up: Map Next: 6338