Prev: C2E8 Up: Map Next: C302
C2EC: Lose Life
Used by the routine at RunGame.
Puts the player back at the start of the game, with the object records of the legs and the body being copied from the records at PlayerRecords, and takes away a life. When there are no lives left the game is over.
LoseLife C2EC LD HL,$C3FF Take the records, PlayerRecords.
C2EF LD DE,$A76F Take the first object record, ObjectsTable.
C2F2 PUSH DE Take the first record, using the stack.
C2F3 POP IX
C2F5 LD BC,$0040 Set the number of bytes to copy in BC to 40, which is two records.
C2F8 LDIR Copy the records.
C2FA LD HL,$A721 Take the number of lives, Lives.
C2FD DEC (HL) Take one away.
C2FE JP M,ShowGameOverScreen Jump to ShowGameOverScreen to show the game over screen if the lives have run out.
C301 RET Return.
View the equivalent code in;
Prev: C2E8 Up: Map Next: C302