![]() |
Routines |
| Prev: 89ED | Up: Map | Next: 8A2F |
|
Used by the routine at HandlerHunchback.
Called when a boss has touched the player. It takes 10 (at TakeEnergyFromPlayer) or 08 (at TakeEnergyFromPlayer_Small) from PlayerEnergy. The chicken is then redrawn by DrawChicken, which returns to the caller. If the player did not have enough energy then the return address is discarded and LoseLife is used to take a life.
|
||||||||
| TakeEnergyFromPlayer | 8A15 | LD A,($5E28) | Fetch the energy of the player from PlayerEnergy. | |||||
| 8A18 | SUB $10 | Take 10 off the energy of the player. | ||||||
| 8A1A | JR C,TakeEnergyFromPlayer_Dead | Jump to TakeEnergyFromPlayer_Dead if the player has run out of energy. | ||||||
| 8A1C | JR TakeEnergyFromPlayer_Update | Jump to TakeEnergyFromPlayer_Update to update the energy of the player. | ||||||
|
This entry point is used by the routines at HandlerMummy, HandlerDracula, HandlerFrankenstein and HandlerDevil.
|
||||||||
| TakeEnergyFromPlayer_Small | 8A1E | LD A,($5E28) | Fetch the energy of the player from PlayerEnergy. | |||||
| 8A21 | SUB $08 | Take 08 off the energy of the player. | ||||||
| 8A23 | JR C,TakeEnergyFromPlayer_Dead | Jump to TakeEnergyFromPlayer_Dead if the player has run out of energy. | ||||||
| TakeEnergyFromPlayer_Update | 8A25 | LD ($5E28),A | Update the energy of the player in PlayerEnergy. | |||||
| 8A28 | JP DrawChicken | Jump to DrawChicken to update the roast chicken. | ||||||
| TakeEnergyFromPlayer_Dead | 8A2B | POP HL | Discard the return address. | |||||
| 8A2C | JP LoseLife | Jump to LoseLife to take a life from the player. | ||||||
| Prev: 89ED | Up: Map | Next: 8A2F |