Prev: 49896 Up: Map Next: 49922
49900: 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 49900 LD HL,50175 Take the records, PlayerRecords.
49903 LD DE,42863 Take the first object record, ObjectsTable.
49906 PUSH DE Take the first record, using the stack.
49907 POP IX
49909 LD BC,64 Set the number of bytes to copy in BC to 64, which is two records.
49912 LDIR Copy the records.
49914 LD HL,42785 Take the number of lives, Lives.
49917 DEC (HL) Take one away.
49918 JP M,ShowGameOverScreen Jump to ShowGameOverScreen to show the game over screen if the lives have run out.
49921 RET Return.
View the equivalent code in;
Prev: 49896 Up: Map Next: 49922