Prev: 39531 Up: Map Next: 39655
39572: OxygenCheckRedraw — oxygen alarms + the bottom status line
Fire msg #26 when the oxygen counter reads exactly "0500"; jump to Endgame_OxygenOut when the borrow has eaten past the digits (the air ran out); otherwise redraw the bottom-right status line — "TOOH: nnnn" (the oxygen counter), or "TIME: m:ss" while the self-destruct is armed.
Used by the routines at 31577, 32816, 38784 and 39531.
39572 LD HL,(38374) high digits = "05"...
39575 LD A,L
39576 CP 48
39578 JR NZ,39601
39580 LD A,H
39581 CP 53
39583 JR NZ,39601
39585 LD HL,(38376) ...and low digits = "00"?
39588 LD A,48
39590 CP L
39591 JR NZ,39601
39593 CP H
39594 JR NZ,39601
39596 LD A,26 msg #26 "Oxygen status CRITICAL"
39598 CALL 37176
39601 LD A,(38373) did the borrow ripple past the
39604 CP 32 digits (oxygen fully exhausted)?
39606 JP NZ,44277 yes: Endgame_OxygenOut
39609 LD A,(31252) no status line over the
39612 CP 2 Indicate Location list
39614 RET Z (modes 2/3)
39615 CP 3
39617 RET Z
39618 LD HL,20598 draw at screen row 19, col 22:
39621 LD (31257),HL
39624 LD DE,38368 "TOOH: nnnn" — unless the
39627 LD HL,31253 self-destruct is armed:
39630 BIT 0,(HL)
39632 JR Z,39637
39634 LD DE,38358 then "TIME: m:ss"
39637 LD B,10 blit the 10 characters
39639 PUSH BC
39640 PUSH DE
39641 CALL 31369
39644 POP DE
39645 POP BC
39646 INC DE
39647 LD HL,31257 one column right each time
39650 INC (HL)
39651 DJNZ 39639
39653 RET
39654 RET
Prev: 39531 Up: Map Next: 39655