F0BF: Room Event : Invaders
Handler_Invaders |
F0BF |
LD A,(Flag_LaserGun) |
|
F0C2 |
OR A |
|
F0C3 |
JR Z,Handler_Invaders_1 |
|
F0C5 |
LD A,(Pocket1) |
|
F0C8 |
CP $0D |
|
F0CA |
JR Z,Handler_Invaders_0 |
|
F0CC |
LD A,(Pocket2) |
|
F0CF |
CP $0D |
|
F0D1 |
JR NZ,Handler_Invaders_1 |
Handler_Invaders_0 |
F0D3 |
LD C,$30 |
|
F0D5 |
JR Handler_Invaders_3 |
Handler_Invaders_1 |
F0D7 |
LD A,(ObjSlot19) |
|
F0DA |
CP $0D |
|
F0DC |
JR NZ,Handler_Invaders_2 |
|
F0DE |
LD A,(Flag_LaserGun) |
|
F0E1 |
OR A |
|
F0E2 |
JR NZ,Handler_Invaders_0 |
Handler_Invaders_2 |
F0E4 |
LD C,$70 |
Handler_Invaders_3 |
F0E6 |
LD A,(Flag_BaddyInit) |
|
F0E9 |
OR A |
|
F0EA |
JR NZ,Handler_Invaders_5 |
|
F0EC |
LD A,$01 |
|
F0EE |
LD (Flag_BaddyInit),A |
|
F0F1 |
PUSH BC |
|
F0F2 |
LD HL,Invader_Init |
|
F0F5 |
LD DE,Invader1 |
|
F0F8 |
LD BC,$0012 |
|
F0FB |
LDIR |
|
F0FD |
POP BC |
|
F0FE |
LD B,$06 |
|
F100 |
LD IX,Invader1 |
Handler_Invaders_4 |
F104 |
LD L,(IX+$00) |
|
F107 |
LD A,(IX+$02) |
|
F10A |
ADD A,C |
|
F10B |
LD H,A |
|
F10C |
INC IX |
|
F10E |
INC IX |
|
F110 |
INC IX |
|
F112 |
LD A,(Invaders_bitmap) |
|
F115 |
LD (BitmapX),HL |
|
F118 |
CALL Bitmap16Draw |
|
F11B |
DJNZ Handler_Invaders_4 |
|
F11D |
RET |
Handler_Invaders_5 |
F11E |
LD A,(Invaders_bitmap) |
|
F121 |
INC A |
|
F122 |
CP $9B |
|
F124 |
JR NZ,Handler_Invaders_6 |
|
F126 |
LD A,$99 |
Handler_Invaders_6 |
F128 |
LD E,A |
|
F129 |
LD B,$06 |
|
F12B |
LD IX,Invader1 |
Handler_Invaders_7 |
F12F |
LD L,(IX+$00) |
|
F132 |
LD A,(IX+$02) |
|
F135 |
LD D,(IX+$01) |
|
F138 |
INC IX |
|
F13A |
INC IX |
|
F13C |
INC IX |
|
F13E |
ADD A,C |
|
F13F |
LD H,A |
|
F140 |
LD A,L |
|
F141 |
CP $32 |
|
F143 |
JR NZ,Handler_Invaders_9 |
Handler_Invaders_8 |
F145 |
LD A,D |
|
F146 |
NEG |
|
F148 |
LD D,A |
|
F149 |
LD (IX-$02),D |
|
F14C |
JR Handler_Invaders_10 |
Handler_Invaders_9 |
F14E |
CP $E8 |
|
F150 |
JR Z,Handler_Invaders_8 |
Handler_Invaders_10 |
F152 |
LD (BitmapX),HL |
|
F155 |
LD A,(Invaders_bitmap) |
|
F158 |
CALL Bitmap16Draw |
|
F15B |
LD A,L |
|
F15C |
ADD A,D |
|
F15D |
LD (IX-$03),A |
|
F160 |
LD (BitmapX),A |
|
F163 |
LD A,E |
|
F164 |
CALL Bitmap16Draw |
|
F167 |
PUSH BC |
|
F168 |
PUSH DE |
|
F169 |
LD B,$03 |
|
F16B |
CALL Wally_HitTest |
|
F16E |
POP DE |
|
F16F |
POP BC |
|
F170 |
DJNZ Handler_Invaders_7 |
|
F172 |
LD A,E |
|
F173 |
LD (Invaders_bitmap),A |
|
F176 |
RET |