EFF4: Room Event : Ghost
Handler_Ghosts |
EFF4 |
LD A,(Flag_BaddyInit) |
|
EFF7 |
OR A |
|
EFF8 |
JR NZ,Handler_Ghosts_0 |
|
EFFA |
LD A,$01 |
|
EFFC |
LD (Flag_BaddyInit),A |
|
EFFF |
LD HL,$A064 |
|
F002 |
LD (Ghost1),HL |
|
F005 |
LD (BitmapX),HL |
|
F008 |
LD A,(Ghost_Bitmap) |
|
F00B |
CALL Bitmap16Draw |
|
F00E |
LD HL,$50DC |
|
F011 |
LD (Ghost2),HL |
|
F014 |
LD (BitmapX),HL |
|
F017 |
CALL Bitmap16Draw |
|
F01A |
LD HL,$3A30 |
|
F01D |
LD (Ghost3),HL |
|
F020 |
LD (BitmapX),HL |
|
F023 |
CALL Bitmap16Draw |
|
F026 |
RET |
Handler_Ghosts_0 |
F027 |
LD A,(Ghost_Bitmap) |
|
F02A |
INC A |
|
F02B |
CP $BF |
|
F02D |
JR NZ,Handler_Ghosts_1 |
|
F02F |
LD A,$BB |
Handler_Ghosts_1 |
F031 |
LD C,A |
|
F032 |
LD IX,Ghost1 |
|
F036 |
LD B,$03 |
Handler_Ghosts_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,Handler_Ghosts_4 |
Handler_Ghosts_3 |
F051 |
LD A,E |
|
F052 |
NEG |
|
F054 |
LD E,A |
|
F055 |
JR Handler_Ghosts_5 |
Handler_Ghosts_4 |
F057 |
CP $E8 |
|
F059 |
JR Z,Handler_Ghosts_3 |
Handler_Ghosts_5 |
F05B |
LD A,H |
|
F05C |
CP $30 |
|
F05E |
JR NZ,Handler_Ghosts_7 |
Handler_Ghosts_6 |
F060 |
LD A,D |
|
F061 |
NEG |
|
F063 |
LD D,A |
|
F064 |
JR Handler_Ghosts_8 |
Handler_Ghosts_7 |
F066 |
CP $A8 |
|
F068 |
JR Z,Handler_Ghosts_6 |
Handler_Ghosts_8 |
F06A |
LD (BitmapX),HL |
|
F06D |
LD A,(Ghost_Bitmap) |
|
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 Handler_Ghosts_2 |
|
F095 |
LD A,C |
|
F096 |
LD (Ghost_Bitmap),A |
|
F099 |
RET |