Routines |
Prev: 59488 | Up: Map | Next: 59541 |
Used by the routine at 59474.
|
||||||||
When left/right control keys are released, Maroc will slow his horizontal movement, eventually coming to a stop.
|
||||||||
59520 | LD A,C | Get Maroc's horizontal movement speed | ||||||
59521 | CP 0 | Is he moving left or right? | ||||||
59523 | JR Z,59541 | If Maroc is not moving horizontally left or right, skip to next routine | ||||||
59525 | SRA A | Calculate 1/4 of Maroc's current speed | ||||||
59527 | SRA A | |||||||
59529 | NEG | This value will be added to the speed, so NEG will ensure the adjustment is subtracted | ||||||
59531 | CP 0 | Check if this means Maroc has stopped moving left/right | ||||||
59533 | JR NZ,59537 | |||||||
59535 | LD C,0 | ...If so, set speed offset to zero | ||||||
59537 | ADD A,C | ...Otherwise, reduce current speed by 1/4 | ||||||
This entry point is used by the routine at 59488.
|
||||||||
59538 | LD (60164),A | Store Maroc's adjusted horizontal movement speed |
Prev: 59488 | Up: Map | Next: 59541 |