![]() |
Routines |
| Prev: AEEF | Up: Map | Next: AFC1 |
|
Used by the routine at GamePlay_Start.
Adds an acceleration to the velocity of the player in both directions and limits the result to the top speed (see LimitPlayerVelocity).
|
||||||||||||
| AcceleratePlayer | AFAC | LD A,E | Fetch the X acceleration. | |||||||||
| AFAD | ADD A,(IX+$06) | Add the X velocity of the player. | ||||||||||
| AFB0 | CALL LimitPlayerVelocity | Limit the X velocity. | ||||||||||
| AFB3 | LD (IX+$06),A | Set the new X velocity of the player. | ||||||||||
| AFB6 | LD A,D | Fetch the Y acceleration. | ||||||||||
| AFB7 | ADD A,(IX+$07) | Add the Y velocity of the player. | ||||||||||
| AFBA | CALL LimitPlayerVelocity | Limit the Y velocity. | ||||||||||
| AFBD | LD (IX+$07),A | Set the new Y velocity of the player. | ||||||||||
| AFC0 | RET | Return. | ||||||||||
| Prev: AEEF | Up: Map | Next: AFC1 |