Prev: 59552 Up: Map Next: 59605
59584: Decrease Maroc's vertical movement speed
Used by the routine at 59541.
Input
C Maroc's vertical movement speed (stored at 60165)
When control keys are released, Maroc will slow down, eventually coming to a stop if no keys are pressed..
59584 LD A,C Get Maroc's horizontal movement speed
59585 CP 0 Is he moving up or down?
59587 JR Z,59602 If not, skip to next routine
59589 SRA A Calculate 1/4 of Maroc's current speed
59591 SRA A
59593 NEG This value will be added to the speed, so NEG will ensure adjustment is subtracted
59595 CP 0 Check if this means Maroc has stopped moving up/down
59597 JR NZ,59601
59599 LD C,0 ...If so, set speed offset to zero
59601 ADD A,C ...Otherwise, reduce current speed by 1/4
This entry point is used by the routine at 59552.
59602 LD (60165),A Store Maroc's adjusted vertical movement speed
Prev: 59552 Up: Map Next: 59605