Prev: CEF0 Up: Map Next: CFC9
CF77: Special actions on room 1B (safe room)
CF77 LD HL,$CED4 Draw the rainbow lifts (CED4).
CF7A CALL $CEF0
CF7D CALL $62A3 Blow the safe up.
CF80 LD A,($62A2) Get the frame count. (62A2)
CF83 CP $50 Is it 50?
CF85 JR NZ,$CFB5 Jump forward if it is.
CF87 LD A,($C872) Get Dan's Y co-ordinate. (C872)
CF8A CP $3E Is it 3E?
CF8C RET NZ Return if is isn't.
CF8D LD A,($C873) Get Dan's X co-ordinate. (C873)
CF90 CP $15 Is it 15?
CF92 RET NZ Return if it isn't.
CF93 LD A,($C875) Get Dan's frame count. (C875)
CF96 CP $05 Is it 5?
CF98 RET NZ Return if it isn't.
CF99 LD A,($C87E) Get some flags.
CF9C BIT 0,A Is the safe still locked?
CF9E RET NZ Return if not.
Dan is next to the safe and it's locked. Can it be blown up?
CF9F LD A,($C878) Get the number of dynamite sticks. (C878)
CFA2 CP $08 Has Dan got all 8?
CFA4 RET NZ Return if not.
Dan's got all 8 dynamite sticks, so blow the safe up!
CFA5 XOR A Start at frame 0. (62A2)
CFA6 LD ($62A2),A
CFA9 LD HL,$C87E Set that the safe has been blown up.
CFAC SET 0,(HL)
CFAE LD HL,$6E0E Play the "blown the safe door" tune and return.
CFB1 CALL $DB0B
CFB4 RET
The safe is being blown up or has been blown up.
CFB5 CP $40 Is the frame count 28?
CFB7 RET NZ Return if it is.
CFB8 LD A,($C86C) Otherwise check the number of lives.
CFBB CP $1A Are there more than 1A?
CFBD JP NC,$0000 If so, somebody's been hacking or there's a bug, so reset the system.
CFC0 LD A,($C873) Get Dan's X co-ordinate.
CFC3 CP $17 Is it greater than 17?
CFC5 RET NC Return if it is.
CFC6 JP $CD8A Otherwise Dan got caught in the blast range - oops - so lose a life.
Prev: CEF0 Up: Map Next: CFC9