Prev: 62A2 Up: Map Next: 62D6
62A3: Blow the safe up
Used by the routine at CF77.
62A3 LD BC,$0304 Size of the safe (3x4).
62A6 LD DE,$130A Position of the safe (13 0A).
62A9 LD HL,$62A2 Get the frame count. (62A2)
62AC LD A,(HL)
62AD CP $50 It it 50 yet?
62AF RET Z Return if so.
62B0 INC (HL) Increase the frame count.
62B1 LD A,(HL) Is it 50 now?
62B2 CP $50
62B4 JP Z,$E897 If so, remove the safe from screen.
62B7 CP $40 Is the frame count less than 28?
62B9 JR NC,$62C4 Jump forward if not.
Flash the safe colours.
62BB AND $02 Otherwise take the last two bits, double them and add 6 to get an attribute colour.
62BD SRL A
62BF ADD A,$06
62C1 JP $E8BA Fill with this attribute.
Draw the exploding safe.
62C4 SUB $40 Decrease A by 40.
62C6 PUSH BC Remember BC.
62C7 LD C,A Put this in BC.
62C8 LD B,$00
62CA LD HL,$6292 Add the offset to the graphic table. (6292)
62CD ADD HL,BC
62CE LD A,(HL) Get the graphic ID.
62CF CALL $F3D3 Get the address of the UDG.
62D2 POP BC Restore BC.
62D3 JP $E84E Draw the UDG.
Prev: 62A2 Up: Map Next: 62D6