Prev: CC99 Up: Map Next: CD1B
CC9B: Draws Deposit Cashboxes
Used by the routines at Prep_Display_Phase and CAE7.
CC9B LD A,($D45C) Converts CashboxReference_Inactive into cash deposit box flag address (e.g. "01" becomes DoorDeposited_01 and so on).
CC9E LD L,A
CC9F LD H,$00
CCA1 LD DE,$CC8C
CCA4 ADD HL,DE
CCA5 LD IX,$D165 A=Door_Cash_Action_01.
CCA9 LD A,(IX+$08)
CCAC OR (HL)
CCAD LD (HL),A
CCAE INC HL
CCAF LD IX,$D173 A=Door_Cash_Action_02.
CCB3 LD A,(IX+$08)
CCB6 OR (HL)
CCB7 LD (HL),A
CCB8 INC HL
CCB9 LD IX,$D181 A=Door_Cash_Action_03.
CCBD LD A,(IX+$08)
CCC0 OR (HL)
CCC1 LD (HL),A
CCC2 LD DE,$CC99 DE=DoorDeposited_01_06.
CCC5 LD HL,$CC8D HL=DoorDeposited_01.
CCC8 LD A,(DE) Fetch the flag for DoorDeposited_01_06.
CCC9 OR (HL) Run a logical OR against the contents of HL.
CCCA LD (HL),A Writes this back into HL (setting the flag).
CCCB INC HL
CCCC INC DE Move onto DoorDeposited_07_12.
CCCD LD A,(DE) Fetch the flag for DoorDeposited_07_12.
CCCE OR (HL) Run a logical OR against the contents of HL.
CCCF LD (HL),A Writes this back into HL (setting the flag).
CCD0 CALL Draw_GameCashboxes
Cashboxescomplete CCD3 LD DE,$CC8D Points to the cashbox flags (beginning at DoorDeposited_01).
CCD6 LD HL,$CA80 Write 00 to Cashboxes_Completed_Flag.
CCD9 LD (HL),$00
CCDB LD B,$0C Testing against all 12 cashboxes.
Cashboxescomplete_Loop CCDD LD A,(DE) Fetch the cashbox flag, return if its zero.
CCDE AND A
CCDF RET Z
CCE0 INC DE Move onto the next cashbox (loop back to Cashboxescomplete_Loop) or continue once all 12 are checked.
CCE1 DJNZ Cashboxescomplete_Loop
CCE3 LD (HL),A Write A (01) to Cashboxes_Completed_Flag.
CCE4 RET
Draw_GameCashbox CCE5 ADD A,A Determines whether to send EmptyBox_Image or DollarBox_Image to Copy_Routine.
CCE6 ADD A,L
CCE7 LD L,A
CCE8 LD DE,$FF78
CCEB LD A,(IX+$00)
CCEE AND A
CCEF JR Z,$CCF4
CCF1 LD DE,$FF98
CCF4 LD BC,$1002
CCF7 CALL Copy_Routine
CCFA RET Return.
Draws all the cashboxes in two blocks of 6.
Draw_GameCashboxes CCFB LD IX,$CC8D The statuses for the cashboxes begin at DoorDeposited_01. This routine processes them in two blocks of 6 (as they appear. The first block is displayed at $401F, after processing the subroutine returns and continues for the next six blocks, just altering the screen location to $4025.
CCFF LD HL,$401F
CD02 LD A,$01
CD04 CALL Draw_GameCashboxes_Skip
CD07 LD HL,$4025
Draw_GameCashboxes_Skip CD0A LD B,$06
Draw_GameCashboxes_Loop CD0C PUSH BC
CD0D PUSH HL
CD0E PUSH AF
CD0F CALL Draw_GameCashbox
CD12 POP AF
CD13 POP HL
CD14 POP BC
CD15 INC IX
CD17 INC A
CD18 DJNZ Draw_GameCashboxes_Loop
CD1A RET Return.
Prev: CC99 Up: Map Next: CD1B