![]() |
Routines |
| Prev: 5FE9 | Up: Map | Next: 62A2 |
|
Used by the routine at MainGameLoop.
Move Percy left. Checks screen boundary and handles room transitions.
|
||||||||||
| MovePercyLeft | 6280 | LD A,$01 | Write 01 to *PercyFacingDirection (Percy is facing left). | |||||||
| 6282 | LD ($5FA5),A | |||||||||
|
If *CarryingWormFlag is set, apply an extra boundary check.
|
||||||||||
| 6285 | LD A,($5FAA) | Jump to MovePercyLeft_Apply if *CarryingWormFlag is set. | ||||||||
| 6288 | OR A | |||||||||
| 6289 | JR Z,MovePercyLeft_Apply | |||||||||
| 628B | LD A,(IX+$00) | Load A with Percy's X position (*IX+00) - 05. | ||||||||
| 628E | SUB $05 | |||||||||
|
If Percy has gone past the left edge transition into the previous room.
|
||||||||||
| 6290 | JP C,TransitionRoomLeft | Jump to TransitionRoomLeft if Percy's new position is less than 00 (transition to the previous room). | ||||||||
| 6293 | SUB D | Subtract the movement speed from Percy's X position. | ||||||||
| 6294 | JP C,TransitionRoomLeft | Jump to TransitionRoomLeft if Percy's new position is less than 00 (transition to the previous room). | ||||||||
| MovePercyLeft_Apply | 6297 | LD A,(IX+$00) | Load A with Percy's X position (*IX+00) - the number of pixels to move (from D). | |||||||
| 629A | SUB D | |||||||||
|
If Percy has gone past the left edge transition into the previous room.
|
||||||||||
| 629B | JP C,TransitionRoomLeft | Jump to TransitionRoomLeft if Percy's new position is less than 00 (transition to the previous room). | ||||||||
| 629E | LD (IX+$00),A | Write Percy's updated X screen position back to *IX+00. | ||||||||
| 62A1 | RET | Return. | ||||||||
| Prev: 5FE9 | Up: Map | Next: 62A2 |