Prev: E117 Up: Map Next: E1B4
E18C: Handle Sparkle
Handler for the object types 72 and 73 the sparkle that shows where a bubble has burst (see Handle_Bubble). The counter in byte 08 goes down on each call and the sprite id alternates between 72 and 73 with it. The sparkle is removed (and erased) when the counter reaches zero, and at once if Sabreman is not in the room.
Input
IX Object record
Handle_Sparkle E18C CALL StoreEntity Save the state of the sparkle.
E18F LD A,($8F1C) Fetch the room x of Sabreman.
E192 CP (IX+$02) Jump to Remove_Unseen_Weapon to remove the sparkle if it is in a different room x.
E195 JP NZ,Remove_Unseen_Weapon
E198 LD A,($8F1E) Fetch the room y of Sabreman.
E19B CP (IX+$04) Jump to Remove_Unseen_Weapon to remove the sparkle if it is in a different room y.
E19E JP NZ,Remove_Unseen_Weapon
E1A1 DEC (IX+$08) Decrease the counter and jump to Remove_Thrown_Weapon to remove and erase the sparkle when it reaches zero.
E1A4 JP Z,Remove_Thrown_Weapon
E1A7 LD A,(IX+$08) Fetch the counter.
E1AA AND %00000001 Keep only bit 0.
E1AC ADD A,$72 Add 72 to make the sprite id.
E1AE LD (IX+$00),A Store the sprite id.
E1B1 JP Update_Object_Sprite Jump to Update_Object_Sprite.
Prev: E117 Up: Map Next: E1B4