Prev: D3E2 Up: Map Next: D407
D3EA: Scan the doors to see if they are closed, and take action if so
Used by the routine at D411.
Door_Prep_01 D3EA LD HL,$CE14 Door_Routine_01
D3ED XOR A Sets A=0 to set the zero flag.
D3EE LD B,$06 Loop round six bytes (ie: 3 pointers). If all doors are closed, they will all contain 0000, and the zero flag will be kept.
Door_Prep_01_0 D3F0 OR (HL)
D3F1 INC HL
D3F2 DJNZ Door_Prep_01_0
D3F4 AND A Are all the doors closed?
D3F5 POP BC If not, wind the stack back to do an early return from the calling routine at CAE7.
D3F6 RET NZ
D3F7 PUSH BC Redo the stack.
D3F8 LD HL,$D8AC Change the random number seeds, so things happen differently from here on.
D3FB INC (HL)
D3FC LD DE,$0400 Set up a pause interval (used by the calling routine at D411).
D3FF CALL $D407 Is the phase complete?
D402 RET NC No, so return.
D403 POP AF Wind the stack back to do an early return from the calling routine at Prep_Display_Phase.
D404 POP AF
D405 AND A Clear the carry flag.
D406 RET
Prev: D3E2 Up: Map Next: D407