![]() |
Routines |
| Prev: D727 | Up: Map | Next: D76C |
|
The routine for objects of type 03, the bonuses that restore the player's health. 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 health is made full.
|
||||
|
Vanish if the player is too far away.
|
||||
| UpdateHealthBonus | D74C | LD C,$04 | Set the distance to 04 cells and check whether the bonus is that close to the player. | |
| D74E | CALL CheckPlayerClose | |||
| D751 | JR C,UpdateHealthBonus_Close | Jump to UpdateHealthBonus_Close if it is. | ||
| D753 | LD (IX+$00),$00 | Remove the bonus, because the player is too far away, and return. | ||
| D757 | RET | |||
|
Restore the player's health when the bonus is touched.
|
||||
| UpdateHealthBonus_Close | D758 | CALL CheckPlayerCollision | Return if the bonus is not touching the player. | |
| D75B | RET NC | |||
| D75C | LD (IX+$00),$0C | Turn the bonus into a burst. | ||
| D760 | LD A,$03 | Give the player full health. | ||
| D762 | LD ($BBF3),A | |||
| D765 | LD HL,$0207 | Start the health bonus sound, which is sound effect 02 and has seven notes. | ||
| D768 | LD ($BBF9),HL | |||
| D76B | RET | Return. | ||
| Prev: D727 | Up: Map | Next: D76C |