![]() |
Routines |
| Prev: 55050 | Up: Map | Next: 55116 |
|
The routine for objects of type 2, the bonuses that make the player move faster. A bonus vanishes when the player is more than four cells away. When the player touches it, the bonus turns into a burst and the player's speed is raised for 255 frames.
|
||||
|
Vanish if the player is too far away.
|
||||
| UpdateSpeedBonus | 55079 | LD C,4 | Set the distance to 4 cells and check whether the bonus is that close to the player. | |
| 55081 | CALL CheckPlayerClose | |||
| 55084 | JR C,UpdateSpeedBonus_Close | Jump to UpdateSpeedBonus_Close if it is. | ||
| 55086 | LD (IX+0),0 | Remove the bonus, because the player is too far away, and return. | ||
| 55090 | RET | |||
|
Raise the player's speed when the bonus is touched.
|
||||
| UpdateSpeedBonus_Close | 55091 | CALL CheckPlayerCollision | Return if the bonus is not touching the player. | |
| 55094 | RET NC | |||
| 55095 | LD (IX+0),12 | Turn the bonus into a burst. | ||
| 55099 | LD A,255 | Make the speed bonus last for 255 frames. | ||
| 55101 | LD (48117),A | |||
| 55104 | LD A,18 | Raise the player's top speed to 18. | ||
| 55106 | LD (48062),A | |||
| 55109 | LD HL,261 | Start the speed bonus sound, which is sound effect 1 and has five notes. | ||
| 55112 | LD (48121),HL | |||
| 55115 | RET | Return. | ||
| Prev: 55050 | Up: Map | Next: 55116 |