Prev: 8CB7 Up: Map Next: 8D61
8D45: Handle Player Vanishing
The handler for the player (sprite ID 67) 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 06 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 8D45 LD A,($5C78) Fetch FRAMES.
8D48 AND %00000011 Keep only bits 0-1.
8D4A JR Z,HandlerPlayerAppearing_Colour Jump to HandlerPlayerAppearing_Colour if this is every fourth frame.
8D4C DEC (IX+$06) Decrease the number of rows at offset 06.
8D4F JP M,HandlerPlayerVanishing_Finish Jump to HandlerPlayerVanishing_Finish if all the rows have gone.
8D52 LD A,(IX+$07) Fetch the sprite ID of the player from offset 07.
8D55 CALL FetchSprite Call FetchSprite to get the address of the sprite data.
8D58 JP HandlerPlayerAppearing_DrawRow Jump to HandlerPlayerAppearing_DrawRow to draw the row of the sprite.
HandlerPlayerVanishing_Finish 8D5B CALL MakeTombstone Call MakeTombstone to make the tombstone.
8D5E JP PreparePlayer Jump to PreparePlayer to set up the next life.
Prev: 8CB7 Up: Map Next: 8D61