Prev: CC62 Up: Map Next: CC77
CC63: Start the death sequence when the gauge shows empty
Used by the routine at update_fuel_gauge.
Reached from update_fuel_gauge when the gauge is up to date. With the ship alive and the gauge showing empty ($BE), the death byte is set to 1 the next time the low seven bits of the pass counter are zero: up to 128 passes (about six seconds) of grace after the fuel runs out.
Input
B The level shown
check_fuel_empty CC63 LD A,(death_count) Already dying: nothing.
CC66 AND A
CC67 RET NZ
CC68 LD A,B Not empty: nothing.
CC69 CP $BE
CC6B RET NZ
CC6C LD A,(pass_counter) Wait for the pass counter.
CC6F AND $7F
CC71 RET NZ
CC72 INC A Death byte 1.
CC73 LD (death_count),A
CC76 RET
Prev: CC62 Up: Map Next: CC77