Prev: 8EC6 Up: Map Next: 8EF2
8ED0: Stop the game when time or either energy runs out
Used by the routine at PLAY.
At the end of the fourth frame after this one -- PLAY counts the 5 down once in this frame -- so the last message is seen. Seen in play for the time.
CHECK_GAME_OVER 8ED0 LD HL,PLAYER_ENERGY_LOW Either energy at zero...
8ED3 LD A,(HL)
8ED4 AND A
8ED5 JR Z,CHECK_GAME_OVER_0
8ED7 LD L,$34
8ED9 LD A,(HL)
8EDA AND A
8EDB JR Z,CHECK_GAME_OVER_0
8EDD LD L,$36 ...or the time.
8EDF LD A,(HL)
8EE0 INC HL
8EE1 OR (HL)
8EE2 RET NZ
CHECK_GAME_OVER_0 8EE3 LD A,(FRAMES_LEFT) Only once.
8EE6 CP $FF
8EE8 RET NZ
8EE9 LD A,$05 Five, counted down from the end of this frame.
8EEB LD (FRAMES_LEFT),A
8EEE LD (TIME_TICKS),A
8EF1 RET
Prev: 8EC6 Up: Map Next: 8EF2