![]() |
Routines |
| Prev: D70A | Up: Map | Next: D74C |
|
The routine for objects of type 02, 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 FF frames.
|
||||
|
Vanish if the player is too far away.
|
||||
| UpdateSpeedBonus | D727 | LD C,$04 | Set the distance to 04 cells and check whether the bonus is that close to the player. | |
| D729 | CALL CheckPlayerClose | |||
| D72C | JR C,UpdateSpeedBonus_Close | Jump to UpdateSpeedBonus_Close if it is. | ||
| D72E | LD (IX+$00),$00 | Remove the bonus, because the player is too far away, and return. | ||
| D732 | RET | |||
|
Raise the player's speed when the bonus is touched.
|
||||
| UpdateSpeedBonus_Close | D733 | CALL CheckPlayerCollision | Return if the bonus is not touching the player. | |
| D736 | RET NC | |||
| D737 | LD (IX+$00),$0C | Turn the bonus into a burst. | ||
| D73B | LD A,$FF | Make the speed bonus last for FF frames. | ||
| D73D | LD ($BBF5),A | |||
| D740 | LD A,$12 | Raise the player's top speed to 12. | ||
| D742 | LD ($BBBE),A | |||
| D745 | LD HL,$0105 | Start the speed bonus sound, which is sound effect 01 and has five notes. | ||
| D748 | LD ($BBF9),HL | |||
| D74B | RET | Return. | ||
| Prev: D70A | Up: Map | Next: D74C |