Prev: 52377 Up: Map Next: 52507
52379: Draws Deposit Cashboxes
Used by the routines at Prep_Display_Phase and 51943.
52379 LD A,(54364) Converts CashboxReference_Inactive into cash deposit box flag address (e.g. "1" becomes DoorDeposited_01 and so on).
52382 LD L,A
52383 LD H,0
52385 LD DE,52364
52388 ADD HL,DE
52389 LD IX,53605 A=Door_Cash_Action_01.
52393 LD A,(IX+8)
52396 OR (HL)
52397 LD (HL),A
52398 INC HL
52399 LD IX,53619 A=Door_Cash_Action_02.
52403 LD A,(IX+8)
52406 OR (HL)
52407 LD (HL),A
52408 INC HL
52409 LD IX,53633 A=Door_Cash_Action_03.
52413 LD A,(IX+8)
52416 OR (HL)
52417 LD (HL),A
52418 LD DE,52377 DE=DoorDeposited_01_06.
52421 LD HL,52365 HL=DoorDeposited_01.
52424 LD A,(DE) Fetch the flag for DoorDeposited_01_06.
52425 OR (HL) Run a logical OR against the contents of HL.
52426 LD (HL),A Writes this back into HL (setting the flag).
52427 INC HL
52428 INC DE Move onto DoorDeposited_07_12.
52429 LD A,(DE) Fetch the flag for DoorDeposited_07_12.
52430 OR (HL) Run a logical OR against the contents of HL.
52431 LD (HL),A Writes this back into HL (setting the flag).
52432 CALL Draw_GameCashboxes
Cashboxescomplete 52435 LD DE,52365 Points to the cashbox flags (beginning at DoorDeposited_01).
52438 LD HL,51840 Write 0 to Cashboxes_Completed_Flag.
52441 LD (HL),0
52443 LD B,12 Testing against all 12 cashboxes.
Cashboxescomplete_Loop 52445 LD A,(DE) Fetch the cashbox flag, return if its zero.
52446 AND A
52447 RET Z
52448 INC DE Move onto the next cashbox (loop back to Cashboxescomplete_Loop) or continue once all 12 are checked.
52449 DJNZ Cashboxescomplete_Loop
52451 LD (HL),A Write A (1) to Cashboxes_Completed_Flag.
52452 RET
Draw_GameCashbox 52453 ADD A,A Determines whether to send EmptyBox_Image or DollarBox_Image to Copy_Routine.
52454 ADD A,L
52455 LD L,A
52456 LD DE,65400
52459 LD A,(IX+0)
52462 AND A
52463 JR Z,52468
52465 LD DE,65432
52468 LD BC,4098
52471 CALL Copy_Routine
52474 RET Return.
Draws all the cashboxes in two blocks of 6.
Draw_GameCashboxes 52475 LD IX,52365 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.
52479 LD HL,16415
52482 LD A,1
52484 CALL Draw_GameCashboxes_Skip
52487 LD HL,16421
Draw_GameCashboxes_Skip 52490 LD B,6
Draw_GameCashboxes_Loop 52492 PUSH BC
52493 PUSH HL
52494 PUSH AF
52495 CALL Draw_GameCashbox
52498 POP AF
52499 POP HL
52500 POP BC
52501 INC IX
52503 INC A
52504 DJNZ Draw_GameCashboxes_Loop
52506 RET Return.
Prev: 52377 Up: Map Next: 52507