![]() |
Routines |
| Prev: 29305 | Up: Map | Next: 29347 |
|
The handler for the custard (IDs 4 and 5), which bounces around the play area diagonally. It is moved by MoveBouncingActor. While the custard is still entering from the right of the screen (a horizontal co-ordinate of 200 or more) it can't hit Charlie or be hit, and it is given a random vertical speed.
|
||||||||
| HandleCustard | 29313 | CALL StoreEntity | Record the position of the sprite using StoreEntity. | |||||
| 29316 | LD HL,24347 | Point HL at ActorsInPlay. | ||||||
| 29319 | INC (HL) | Increase the number of actors in play by one. | ||||||
| 29320 | LD A,(IX+1) | Fetch the horizontal co-ordinate. | ||||||
| 29323 | CP 200 | Jump to SetCustardVerticalSpeed if the custard is still entering from the right. | ||||||
| 29325 | JR NC,SetCustardVerticalSpeed | |||||||
| 29327 | CALL TestCharlieCollision | Test whether the custard has hit Charlie using TestCharlieCollision. | ||||||
| 29330 | DEC E | Has Charlie been hit (is E now zero)? | ||||||
| 29331 | JP Z,LoseHat | Jump to LoseHat if Charlie has been hit. | ||||||
| 29334 | CALL TestFlourCollision | Test whether a flour shot has hit the custard using TestFlourCollision. | ||||||
| 29337 | BIT 7,(IX+0) | Jump to HandleHitActor if the custard has been hit. | ||||||
| 29341 | JR NZ,HandleHitActor | |||||||
| 29343 | LD (IX+3),70 | Set the actor colour to 70 (yellow). | ||||||
| Prev: 29305 | Up: Map | Next: 29347 |