Prev: 36023 Up: Map Next: 36193
36165: Handle Player Vanishing
The handler for the player (sprite ID 103) while a life is being lost, which is set up by LoseLife. This is the opposite of HandlerPlayerAppearing, with the number of rows at offset 6 starting at the height of the sprite. On three frames out of four the row is drawn again (which erases it) by HandlerPlayerAppearing_DrawRow and the number is decreased. After the last row a tombstone is made by MakeTombstone and the next life is set up by PreparePlayer.
Input
IX The player entity
HandlerPlayerVanishing 36165 LD A,(23672) Fetch FRAMES.
36168 AND %00000011 Keep only bits 0-1.
36170 JR Z,HandlerPlayerAppearing_Colour Jump to HandlerPlayerAppearing_Colour if this is every fourth frame.
36172 DEC (IX+6) Decrease the number of rows at offset 6.
36175 JP M,HandlerPlayerVanishing_Finish Jump to HandlerPlayerVanishing_Finish if all the rows have gone.
36178 LD A,(IX+7) Fetch the sprite ID of the player from offset 7.
36181 CALL FetchSprite Call FetchSprite to get the address of the sprite data.
36184 JP HandlerPlayerAppearing_DrawRow Jump to HandlerPlayerAppearing_DrawRow to draw the row of the sprite.
HandlerPlayerVanishing_Finish 36187 CALL MakeTombstone Call MakeTombstone to make the tombstone.
36190 JP PreparePlayer Jump to PreparePlayer to set up the next life.
Prev: 36023 Up: Map Next: 36193