Prev: 9D2D Up: Map Next: 9E05
9D68: Handle Rex dead - Resume or finish game
Used by the routines at 9BA7 and 9FEB.
9D68 XOR A Set FINAL BOSS alive
9D69 LD ($A268),A
9D6C LD A,($A1FC) Decrement Rex lives
9D6F DEC A
9D70 LD ($A1FC),A
9D73 CP $FF Jump forward if Rex has no more lives
9D75 JP Z,$9DB5
9D78 CALL $98D9 Draw lives in HUD
9D7B LD A,($A1F2) Set the x-position of respawn
9D7E LD ($A24F),A
9D81 LD A,($A1F3) Set the y-position of respawn
9D84 LD ($A250),A
9D87 XOR A
9D88 LD ($A24C),A Not used
9D8B LD ($A1E2),A Set shield inactive
9D8E LD ($A254),A Set face direction to right
9D91 LD ($A256),A Set Rex not jumping
9D94 LD ($A22A),A Reset falling y-speed
9D97 LD ($A255),A Set Rex not falling
9D9A LD ($A1EE),A Set Rex alive
9D9D CALL $9E15 Configure data for Rex teleporting when game resume
9DA0 LD A,($A1F4) If current room equals to respawn room jump to draw shield power
9DA3 LD HL,$A251
9DA6 CP (HL)
9DA7 JP Z,$9DB1
9DAA LD ($A251),A Set the new current room
9DAD POP BC Restore BC
9DAE JP $9585 Jump to the main loop for the game
9DB1 CALL $9918 Draw shield power on HUD
9DB4 RET
no more lives
9DB5 LD DE,($A1D7) Set A224 the final score. Final score will be the value initialised on A224 if this value is greater than the actual score on A1D7
9DB9 LD HL,($A224)
9DBC AND A
9DBD SBC HL,DE
9DBF JP NC,$9DC6
9DC2 LD ($A224),DE
9DC6 LD IX,$AB31 Show GAME OVER windows
9DCA LD B,$01
9DCC CALL $A2E6
9DCF LD IX,$AB3E Show HI SCORE windows
9DD3 LD B,$01
9DD5 CALL $A2E6
9DD8 LD IX,$AB52 Show BIO GROWTHS KILLED windows
9DDC LD B,$01
9DDE CALL $A2E6
9DE1 LD HL,($A222) Convert BIO GROWTHS KILLED value into a list of charcodes
9DE4 CALL $A5AA
9DE7 LD E,$1E Draw the number of BIO GROWTHS KILLED
9DE9 LD L,$80
9DEB LD B,$05
9DED CALL $A570
9DF0 LD HL,($A224) Convert the score into a list of charcodes
9DF3 CALL $A5AA
9DF6 LD E,$12 Draw the score into the windows
9DF8 LD L,$60
9DFA LD B,$05
9DFC CALL $A570
9DFF CALL $97D2 Reset sound data and wait for FIRE key press
9E02 JP $948E Jump to init game
Prev: 9D2D Up: Map Next: 9E05