![]() |
Routines |
| Prev: 28503 | Up: Map | Next: 28580 |
|
The handler for the flour shot (ID 3), which is fired by Charlie (see ControlCharlie_CreateShot). Byte 4 of the actor is the horizontal speed and byte 5 is the vertical speed. The shot moves until it reaches the right, left, bottom or top of the play area, and then it explodes (see ExplodeFlourShot).
|
||||||||
| HandleFlourShot | 28536 | CALL StoreEntity | Record the position of the sprite using StoreEntity. | |||||
| 28539 | LD A,(IX+1) | Fetch the horizontal co-ordinate. | ||||||
| 28542 | ADD A,(IX+4) | Add the horizontal speed. | ||||||
| 28545 | CP 196 | Jump to ExplodeFlourShot if the shot has reached the right edge. | ||||||
| 28547 | JR NC,ExplodeFlourShot | |||||||
| 28549 | CP 1 | Jump to ExplodeFlourShot if the shot has reached the left edge. | ||||||
| 28551 | JR C,ExplodeFlourShot | |||||||
| 28553 | LD C,A | Keep the new horizontal co-ordinate in C. | ||||||
| 28554 | LD A,(IX+2) | Fetch the vertical co-ordinate. | ||||||
| 28557 | ADD A,(IX+5) | Add the vertical speed. | ||||||
| 28560 | CP 168 | Jump to ExplodeFlourShot if the shot has reached the bottom. | ||||||
| 28562 | JR NC,ExplodeFlourShot | |||||||
| 28564 | CP 32 | Jump to ExplodeFlourShot if the shot has reached the top. | ||||||
| 28566 | JR C,ExplodeFlourShot | |||||||
| 28568 | LD (IX+2),A | Update the vertical co-ordinate. | ||||||
| 28571 | LD (IX+1),C | Update the horizontal co-ordinate. | ||||||
| 28574 | CALL DisplayEntity | Erase the sprite and draw it in its new position using DisplayEntity. | ||||||
| 28577 | JP ColourSprite | Jump to ColourSprite to colour the sprite. | ||||||
| Prev: 28503 | Up: Map | Next: 28580 |