Prev: 9D9D Up: Map Next: 9DDE
9DC0: Update Sparkle Entity
Updates an entity of the type 0D. Field 23 counts down the number of frames that the entity lasts for. It plays a buzz on every frame and flips bit 0 of its frame.
Input
IX The entity
UpdateSparkleEntity 9DC0 CALL PlayTinyBuzz Call PlayTinyBuzz to play a buzz.
9DC3 DEC (IX+$23) Decrease field 23 of the entity by one.
9DC6 JR NZ,UpdateSparkleEntity_Flip Jump to UpdateSparkleEntity_Flip if it is not zero.
9DC8 LD (IX+$00),$00 Set the type of the entity to 00 to free it.
9DCC SET 7,(IX+$01) Set bit 7 of the frame of the entity, to hide it.
9DD0 JP UpdateEntity_Done Jump to UpdateEntity_Done.
UpdateSparkleEntity_Flip 9DD3 LD A,(IX+$01) Fetch the frame of the entity.
9DD6 XOR %00000001 Flip bit 0.
9DD8 LD (IX+$01),A Store it.
9DDB JP UpdateEntity_Project Jump to UpdateEntity_Project to carry on updating the entity.
Prev: 9D9D Up: Map Next: 9DDE