Prev: F6DC Up: Map Next: F73A
F6EC: Room logic : The Bank
F6EC LD A,($EDC5) Get the number of letters put in the safe + 1
F6EF CP $06 Are all letters there?
F6F1 JR NZ,$F6FF Jump forward if not.
If we've got all 5 letters, flash them.
F6F3 LD A,($F6DB) Toggle the display state between 0 and 1.
F6F6 XOR $01
F6F8 LD ($F6DB),A
F6FB JR Z,$F716 If the display state is 0, there's nothing to do here.
F6FD LD A,$06 Set the number of letters + 1 back to 6.
F6FF DEC A Decrement by 1 to get the actual number of letters.
F700 JR Z,$F716 If there are no letters to draw, then there's nothing to do here.
F702 LD B,A Put the number of letters to draw in B.
F703 LD HL,$F6D1 Point HL at the first letter.
F706 LD DE,$4800 Set the initial position on row 48.
F709 LD E,(HL) Get the column from the buffer.
F70A INC HL Move to the next position in the buffer.
F70B LD ($A838),DE Set the position for the drawing routine.
F70F LD A,(HL) Get the object ID to print.
F710 INC HL Move to the next position in the buffer.
F711 CALL $A83D Draw the graphic.
F714 DJNZ $F709 Loop while there are more letters.
F716 LD A,($EDC5) Get the number of letters + 1.
F719 CP $06 Have we got all six.
F71B RET Z If so, there's nothing to do here.
As long as the safe isn't cracked yet, put the moving objects on screen.
F71C LD A,$06 Moving objects decrease endurance by 6.
F71E LD ($F26E),A
F721 LD IX,$F6DC Point IX at the movement table. (F6DC)
F725 LD B,$04 4 objects to draw.
F727 PUSH BC Remember the object count in BC.
F728 LD BC,$F2F7 Point DE at the bounds table. (F2F7)
F72B CALL $EF35 Update the next moving object.
F72E LD A,$76 Set the object ID to the pound symbol.
F730 CALL $A8A0 Put the object in the sprite buffer.
F733 CALL $E329 Check for collision detection.
F736 POP BC Restore the object count in BC.
F737 DJNZ $F727 Loop while there are more objects to draw.
F739 RET Return.
Prev: F6DC Up: Map Next: F73A