Prev: B6B2 Up: Map Next: B6D2
B6BC: Lose Life
Used by the routine at EndSmoke.
Called when the robot has been destroyed. If there are no lives left then the game is over. Otherwise a life is taken away, the battery is recharged and the robot starts to materialise again.
Input
IX Pointer to the robot (entity 00)
LoseLife B6BC LD A,($961A) This load has no effect, as A is replaced immediately.
B6BF LD A,($968B) Fetch the number of lives left.
B6C2 AND A Test whether there are any.
B6C3 JP Z,EndRound Jump to EndRound if there are none, as the game is over.
B6C6 LD HL,$968B Point HL at Lives.
B6C9 DEC (HL) Take away a life.
B6CA CALL RechargeBattery Recharge the battery and show the number of lives left using RechargeBattery.
B6CD LD (IX+$00),$40 Set the type of the robot to 40, the start of the sequence of sprites that shows it materialising.
B6D1 RET Return.
Prev: B6B2 Up: Map Next: B6D2