![]() |
Routines |
| Prev: 27416 | Up: Map | Next: 27567 |
|
The handler for Charlie as he falls (ID 14), after his hat has gone (see HandleHat). Charlie falls one pixel at a time until his vertical co-ordinate reaches 180. Then the actor ID is changed to 24 which is handled by HandleEndOfLife, and the tune for losing a life is played (unless the tunes are muted).
|
||||||||
| HandleFallingCharlie | 27531 | CALL StoreEntity | Record the position of the sprite using StoreEntity. | |||||
| 27534 | LD A,(IX+2) | Fetch the vertical co-ordinate. | ||||||
| 27537 | ADD A,1 | Add 1 to make Charlie fall by one pixel. | ||||||
| 27539 | CP 180 | Jump to HandleFallingCharlie_Finished if Charlie has fallen far enough. | ||||||
| 27541 | JR NC,HandleFallingCharlie_Finished | |||||||
| 27543 | LD (IX+2),A | Update the vertical co-ordinate. | ||||||
| 27546 | CALL DisplayEntity | Erase the sprite and draw it in its new position using DisplayEntity. | ||||||
| 27549 | JP ColourSprite | Jump to ColourSprite to colour the sprite. | ||||||
| HandleFallingCharlie_Finished | 27552 | LD (IX+0),24 | Write 24 to the actor ID. | |||||
| 27556 | LD A,(24333) | Fetch the sound mute flag. | ||||||
| 27559 | AND A | Are the tunes muted? | ||||||
| 27560 | RET NZ | Return if they are. | ||||||
| 27561 | LD DE,26065 | Point DE at the tune for losing a life (MusicData_LoseLife). | ||||||
| 27564 | JP PlayMusic | Jump to PlayMusic to play the tune. | ||||||
| Prev: 27416 | Up: Map | Next: 27567 |