![]() |
Routines |
| Prev: 6F57 | Up: Map | Next: 6FA4 |
|
The handler for the flour shot (ID 03), which is fired by Charlie (see ControlCharlie_CreateShot). Byte 04 of the actor is the horizontal speed and byte 05 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 | 6F78 | CALL StoreEntity | Record the position of the sprite using StoreEntity. | |||||
| 6F7B | LD A,(IX+$01) | Fetch the horizontal co-ordinate. | ||||||
| 6F7E | ADD A,(IX+$04) | Add the horizontal speed. | ||||||
| 6F81 | CP $C4 | Jump to ExplodeFlourShot if the shot has reached the right edge. | ||||||
| 6F83 | JR NC,ExplodeFlourShot | |||||||
| 6F85 | CP $01 | Jump to ExplodeFlourShot if the shot has reached the left edge. | ||||||
| 6F87 | JR C,ExplodeFlourShot | |||||||
| 6F89 | LD C,A | Keep the new horizontal co-ordinate in C. | ||||||
| 6F8A | LD A,(IX+$02) | Fetch the vertical co-ordinate. | ||||||
| 6F8D | ADD A,(IX+$05) | Add the vertical speed. | ||||||
| 6F90 | CP $A8 | Jump to ExplodeFlourShot if the shot has reached the bottom. | ||||||
| 6F92 | JR NC,ExplodeFlourShot | |||||||
| 6F94 | CP $20 | Jump to ExplodeFlourShot if the shot has reached the top. | ||||||
| 6F96 | JR C,ExplodeFlourShot | |||||||
| 6F98 | LD (IX+$02),A | Update the vertical co-ordinate. | ||||||
| 6F9B | LD (IX+$01),C | Update the horizontal co-ordinate. | ||||||
| 6F9E | CALL DisplayEntity | Erase the sprite and draw it in its new position using DisplayEntity. | ||||||
| 6FA1 | JP ColourSprite | Jump to ColourSprite to colour the sprite. | ||||||
| Prev: 6F57 | Up: Map | Next: 6FA4 |