Prev: AFA3 Up: Map Next: B00B
AFC4: Routine at AFC4
Used by the routines at Handler_Move_Characters and B09F.
AFC4 LD (IY+$37),$01 Write 01 to *IY+37.
AFC8 LD A,(IY+$0F) E=current room ID (*IY+0F).
AFCB LD E,A
AFCC LD D,$00 D=00.
AFCE LD HL,$AFA3 HL=Table_RoomPlatforms+DE.
AFD1 ADD HL,DE
AFD2 LD A,(HL) E=*HL*02.
AFD3 ADD A,A
AFD4 LD E,A
AFD5 LD HL,$AF8F HL=Table_PlatformData+DE.
AFD8 ADD HL,DE
AFD9 LD E,(HL)
AFDA INC HL
AFDB LD D,(HL)
AFDC EX DE,HL
AFDD LD A,(IY+$0A)
AFE0 CP $98
AFE2 JR Z,$B006
AFE4 ADD A,$20
AFE6 LD B,A
AFE7 LD A,(HL)
AFE8 CP $FF
AFEA RET Z
AFEB CP B
AFEC JR Z,$AFF3
AFEE INC HL
AFEF INC HL
AFF0 INC HL
AFF1 JR $AFE7 Jump to AFE7.
AFF3 INC HL
AFF4 LD A,(IY+$05)
AFF7 ADD A,$08
AFF9 SRL A
AFFB SRL A
AFFD SRL A
AFFF CP (HL)
B000 JR C,$AFEF
B002 INC HL
B003 CP (HL)
B004 JR NC,$AFF0
B006 LD (IY+$37),$00
B00A RET Return.
Prev: AFA3 Up: Map Next: B00B