Prev: 9C3B Up: Map Next: 9D0F
9C76: Handle Rex dead - Resume or finish game
Used by the routines at 9AC5 and 9E52.
9C76 LD A,($A063) Decrement Rex lives
9C79 DEC A
9C7A LD ($A063),A
9C7D CP $FF Jump forward if Rex has no more lives
9C7F JP Z,$9CBF
9C82 CALL $99BB Draw lives in HUD
9C85 LD A,($A059) Set the x-position of respawn
9C88 LD ($A0B6),A
9C8B LD A,($A05A) Set the y-poistion of respawn
9C8E LD ($A0B7),A
9C91 XOR A
9C92 LD ($A0B3),A Not used
9C95 LD ($A049),A Set shield inactive
9C98 LD ($A0BB),A Set face direction to right
9C9B LD ($A0BD),A Set Rex not jumping
9C9E LD ($A091),A Reset falling y-speed
9CA1 LD ($A0BC),A Set Rex not falling
9CA4 LD ($A055),A Set Rex alive
9CA7 CALL $9D1F Configure data for Rex teleporting when game resume
9CAA LD A,($A05B) If current room equals to respawn room jump to draw shield power
9CAD LD HL,$A0B8
9CB0 CP (HL)
9CB1 JP Z,$9CBB
9CB4 LD ($A0B8),A Set the new current room
9CB7 POP BC Restore BC
9CB8 JP $9583 Jump to the main loop for the game
9CBB CALL $99FA Draw shield power on HUD
9CBE RET
no more lives
9CBF LD DE,($A03E) Set A08B the final score. Final score will be the value initialised on A08B if this value is greater than the actual score on A03E
9CC3 LD HL,($A08B)
9CC6 AND A
9CC7 SBC HL,DE
9CC9 JP NC,$9CD0
9CCC LD ($A08B),DE
9CD0 LD IX,$AAED Show GAME OVER windows
9CD4 LD B,$01
9CD6 CALL $A13E
9CD9 LD IX,$AAFA Show HI SCORE windows
9CDD LD B,$01
9CDF CALL $A13E
9CE2 LD IX,$AB0E Show HUMANS KILLED windows
9CE6 LD B,$01
9CE8 CALL $A13E
9CEB LD HL,($A089) Convert humans killed valur into a list of charcodes
9CEE CALL $A402
9CF1 LD E,$1B Draw the number of humans killed
9CF3 LD L,$80
9CF5 LD B,$05
9CF7 CALL $A3C8
9CFA LD HL,($A08B) Convert the score into a list of charcodes
9CFD CALL $A402
9D00 LD E,$14 Draw the score into the windows
9D02 LD L,$60
9D04 LD B,$05
9D06 CALL $A3C8
9D09 CALL $97EA Reset sound data and wait for FIRE key press
9D0C JP $9498 Jump to init game
Prev: 9C3B Up: Map Next: 9D0F