Prev: 25250 Up: Map Next: 25296
25282: Move Percy Up
Used by the routine at MainGameLoop.
Move Percy up. Clamps to Y position 0 at the top of the screen.
Input
IX Pointer to Percy's state data
D Number of pixels to move
MovePercyUp 25282 LD A,(IX+1) Load A with Percy's Y position (*IX+1) - the number of pixels to move (from D).
25285 SUB D
25286 CP 160 Jump to MovePercyUp_Store if Percy's new position is less than 160 (is Percy within the screen boundaries).
25288 JR C,MovePercyUp_Store
Percy is outside of the screen boundaries!
25290 LD A,0 Clamp Percy to Y position 0 (the top of screen).
MovePercyUp_Store 25292 LD (IX+1),A Write Percy's updated Y screen position back to *IX+1.
25295 RET Return.
Prev: 25250 Up: Map Next: 25296