![]() |
Routines |
| Prev: 9CBA | Up: Map | Next: 9D8D |
|
Updates an entity of the type 07 which is made by StartBurst. It plays two clicks, and when it reaches frame 07 it hides itself and frees its slot.
|
||||||||
| UpdateBurstEntity | 9D67 | LD A,($5F9A) | Fetch the low byte of the seed from RandomNumber_Seed. | |||||
| 9D6A | AND %00011111 | Use bits 0-4. | ||||||
| 9D6C | ADD A,$50 | Add 50 to make the length of the clicks. | ||||||
| 9D6E | LD B,A | Set the length of the clicks in B. | ||||||
| 9D6F | CALL PlayClick | Call PlayClick to play a click. | ||||||
| 9D72 | CALL PlayClick | Call PlayClick to play a click. | ||||||
| 9D75 | LD A,(IX+$01) | Fetch the frame of the entity. | ||||||
| 9D78 | AND %00011111 | Keep the number of the frame. | ||||||
| 9D7A | CP $07 | Jump to UpdateEntity_Project to carry on updating the entity unless it is 07. | ||||||
| 9D7C | JP NZ,UpdateEntity_Project | |||||||
| 9D7F | LD (IX+$01),$80 | Set the frame of the entity to 80 to hide it. | ||||||
| 9D83 | CALL SetEntitySize | Call SetEntitySize to set the sprite of the entity. | ||||||
| 9D86 | LD (IX+$00),$00 | Set the type of the entity to 00 to free it. | ||||||
| 9D8A | JP UpdateEntity_Done | Jump to UpdateEntity_Done. | ||||||
| Prev: 9CBA | Up: Map | Next: 9D8D |