![]() |
Routines |
| Prev: 44972 | Up: Map | Next: 45008 |
|
Used by the routine at AcceleratePlayer.
Limits a velocity to the top speed of the player, which depends on the colour of the player. The top speed is 32 for red (INK:RED, PAPER:BLACK (BRIGHT)), 64 for cyan (INK:CYAN, PAPER:BLACK (BRIGHT)) and 48 otherwise. The velocity may be negative.
|
||||||||||||||
| LimitPlayerVelocity | 44993 | PUSH AF | Stash the velocity on the stack. | |||||||||||
| 44994 | LD A,(IX+5) | Fetch the colour of the player. | ||||||||||||
| 44997 | CP 66 | Jump to SetSlowSpeedLimit if the player is red (INK:RED, PAPER:BLACK (BRIGHT)), which slows the player. | ||||||||||||
| 44999 | JR Z,SetSlowSpeedLimit | |||||||||||||
| 45001 | CP 69 | Jump to SetFastSpeedLimit if the player is cyan (INK:CYAN, PAPER:BLACK (BRIGHT)), which speeds the player up. | ||||||||||||
| 45003 | JR Z,SetFastSpeedLimit | |||||||||||||
| 45005 | LD B,48 | Set the normal maximum speed in B to 48. | ||||||||||||
|
This entry point is used by the routines at SetSlowSpeedLimit and SetFastSpeedLimit.
|
||||||||||||||
| LimitPlayerVelocity_Restore | 45007 | POP AF | Restore the velocity from the stack. | |||||||||||
| Prev: 44972 | Up: Map | Next: 45008 |