Prev: D550 Up: Map Next: D607
D567: Move Dan upwards while jumping
Used by the routines at D08A, D0DC, D123, D16F and D2F0.
D567 EXX
D568 LD DE,($C872)
D56C CALL $E909
D56F LD A,($C875)
D572 CP $02
D574 PUSH AF
D575 JR C,$D57C
D577 CP $04
D579 JR Z,$D57C
D57B INC E
D57C LD A,(DE)
D57D LD B,A
D57E INC E
D57F LD A,(DE)
D580 LD C,A
D581 POP AF
D582 JR Z,$D588
D584 CP $05
D586 JR NZ,$D589
D588 LD C,B
D589 LD HL,$CFD3
D58C BIT 7,B
D58E JP NZ,$DDF4
D591 BIT 7,C
D593 JP NZ,$DDF4
D596 LD D,$06
D598 LD E,(HL)
D599 CALL $D9AA
D59C JR Z,$D5F8
D59E INC HL
D59F DEC D
D5A0 JR NZ,$D598
D5A2 LD A,($C872)
D5A5 AND A
D5A6 JR NZ,$D5B7
D5A8 LD A,$82
D5AA LD ($C872),A
D5AD LD A,($CFCA) Get the current room. (CFCA)
D5B0 ADD A,$08 Add 8 to move up one level.
D5B2 CALL $CBBD
D5B5 EXX
D5B6 RET
D5B7 DEC A
D5B8 DEC A
D5B9 LD ($C872),A
D5BC LD A,($C87F)
D5BF BIT 0,A
D5C1 JR NZ,$D5DA
D5C3 LD A,($C87B) Get the lift flags. (C87B)
D5C6 BIT 2,A Is Dan standing on the lift?
D5C8 JR NZ,$D5DA
D5CA LD A,($CFCB)
D5CD INC A
D5CE CP $35
D5D0 JR NZ,$D5D4
D5D2 LD A,$28
D5D4 LD ($CFCB),A
D5D7 CALL $DB01
D5DA LD HL,$62D6
D5DD LD BC,$0053
D5E0 ADD HL,BC
D5E1 PUSH HL
D5E2 LD BC,$0006
D5E5 AND A
D5E6 SBC HL,BC
D5E8 POP DE
D5E9 LD BC,$004E
D5EC LDDR
D5EE LD DE,($C872)
D5F2 INC HL
D5F3 CALL $D655
D5F6 JR $D605
D5F8 EXX
D5F9 RES 0,B
D5FB RES 4,B
D5FD LD L,$00
D5FF EXX
D600 LD A,$0D
D602 LD ($DBED),A
D605 EXX
D606 RET
Prev: D550 Up: Map Next: D607