Prev: E8A0 Up: Map Next: E8D5
E8C0: Decrease Maroc's vertical movement speed
Used by the routine at E895.
Input
C Maroc's vertical movement speed (stored at EB05)
When control keys are released, Maroc will slow down, eventually coming to a stop if no keys are pressed..
E8C0 LD A,C Get Maroc's horizontal movement speed
E8C1 CP $00 Is he moving up or down?
E8C3 JR Z,$E8D2 If not, skip to next routine
E8C5 SRA A Calculate 1/4 of Maroc's current speed
E8C7 SRA A
E8C9 NEG This value will be added to the speed, so NEG will ensure adjustment is subtracted
E8CB CP $00 Check if this means Maroc has stopped moving up/down
E8CD JR NZ,$E8D1
E8CF LD C,$00 ...If so, set speed offset to zero
E8D1 ADD A,C ...Otherwise, reduce current speed by 1/4
This entry point is used by the routine at E8A0.
E8D2 LD ($EB05),A Store Maroc's adjusted vertical movement speed
Prev: E8A0 Up: Map Next: E8D5