Prev: D3E2 Up: Map Next: D45C
D3EA: Routine at D3EA
Door_Prep_01 D3EA LD HL,$CE14 Door_Routine_01
D3ED XOR A Sets A=0 and B=$06 (counter).
D3EE LD B,$06
Door_Prep_01_0 D3F0 OR (HL)
D3F1 INC HL
D3F2 DJNZ Door_Prep_01_0
D3F4 AND A
D3F5 POP BC
D3F6 RET NZ
D3F7 PUSH BC
D3F8 LD HL,$D8AC
D3FB INC (HL)
D3FC LD DE,$0400
D3FF CALL Door_Prep_01_1
D402 RET NC
D403 POP AF
D404 POP AF
D405 AND A
D406 RET
Door_Prep_01_1 D407 LD HL,$CA80
D40A LD A,(HL)
D40B AND A
D40C RET Z
D40D LD (HL),$00
D40F SCF
D410 RET
This entry point is used by the routine at CAE7.
Door_Prep_01_2 D411 CALL Door_Prep_01
Door_Prep_01_3 D414 PUSH DE
D415 CALL Controls
D418 LD A,($D301)
D41B AND A
D41C CALL NZ,Door_Prep_01_4
D41F LD A,($D302)
D422 AND A
D423 CALL NZ,Door_Prep_01_6
D426 POP DE
D427 DEC DE
D428 LD A,D
D429 OR E
D42A RET Z
D42B JR Door_Prep_01_3
Door_Prep_01_4 D42D CALL ScreenScroll_Right
D430 LD DE,$0400
D433 LD HL,$D45D
D436 LD A,(HL)
D437 INC A
D438 LD (HL),A
D439 CP $0D
D43B JR C,Door_Prep_01_5
D43D LD (HL),$01
Door_Prep_01_5 D43F CALL ActiveDoors
D442 LD A,($D45D)
D445 LD ($D45C),A
D448 RET
Door_Prep_01_6 D449 CALL $6700
D44C LD DE,$0400
D44F LD HL,$D45D
D452 LD A,(HL)
D453 DEC A
D454 LD (HL),A
D455 AND A
D456 JR NZ,Door_Prep_01_5
D458 LD (HL),$0C
D45A JR Door_Prep_01_5
Prev: D3E2 Up: Map Next: D45C