Prev: EFE7 Up: Map Next: F0BF
EFF4: Routine at EFF4
Used by the routine at Update_Room00.
Input
Output
_eff4 EFF4 LD A,(Flag_BaddyInit)
EFF7 OR A
EFF8 JR NZ,_eff4_0
EFFA LD A,$01
EFFC LD (Flag_BaddyInit),A
EFFF LD HL,$A064
F002 LD ($EFE7),HL
F005 LD (BitmapX),HL
F008 LD A,($EFF3)
F00B CALL Bitmap16Draw
F00E LD HL,$50DC
F011 LD ($EFEB),HL
F014 LD (BitmapX),HL
F017 CALL Bitmap16Draw
F01A LD HL,$3A30
F01D LD ($EFEF),HL
F020 LD (BitmapX),HL
F023 CALL Bitmap16Draw
F026 RET
_eff4_0 F027 LD A,($EFF3)
F02A INC A
F02B CP $BF
F02D JR NZ,_eff4_1
F02F LD A,$BB
_eff4_1 F031 LD C,A
F032 LD IX,$EFE7
F036 LD B,$03
_eff4_2 F038 LD L,(IX+$00)
F03B LD H,(IX+$01)
F03E LD E,(IX+$02)
F041 LD D,(IX+$03)
F044 INC IX
F046 INC IX
F048 INC IX
F04A INC IX
F04C LD A,L
F04D CP $08
F04F JR NZ,_eff4_4
_eff4_3 F051 LD A,E
F052 NEG
F054 LD E,A
F055 JR _eff4_5
_eff4_4 F057 CP $E8
F059 JR Z,_eff4_3
_eff4_5 F05B LD A,H
F05C CP $30
F05E JR NZ,_eff4_7
_eff4_6 F060 LD A,D
F061 NEG
F063 LD D,A
F064 JR _eff4_8
_eff4_7 F066 CP $A8
F068 JR Z,_eff4_6
_eff4_8 F06A LD (BitmapX),HL
F06D LD A,($EFF3)
F070 CALL Bitmap16Draw
F073 LD A,L
F074 ADD A,E
F075 LD L,A
F076 LD A,H
F077 ADD A,D
F078 LD H,A
F079 LD (BitmapX),HL
F07C LD A,C
F07D CALL Bitmap16Draw
F080 LD (IX-$01),D
F083 LD (IX-$02),E
F086 LD (IX-$03),H
F089 LD (IX-$04),L
F08C PUSH BC
F08D LD B,$01
F08F CALL Wally_HitTest
F092 POP BC
F093 DJNZ _eff4_2
F095 LD A,C
F096 LD ($EFF3),A
F099 RET
F09A CALL C,$00FE
F09D CALL NZ,$00FE
F0A0 XOR H
F0A1 CP $00
F0A3 CALL C,$18FE
F0A6 CALL NZ,$18FE
F0A9 XOR H
F0AA CP $18
F0AC CALL C,$00FE
F0AF CALL NZ,$00FE
F0B2 XOR H
F0B3 CP $00
F0B5 CALL C,$18FE
F0B8 CALL NZ,$18FE
F0BB XOR H
F0BC CP $18
F0BE SBC A,C
Prev: EFE7 Up: Map Next: F0BF