AAC6: Routine at AAC6
move_helicopter |
AAC6 |
LD A,($A224) |
|
AAC9 |
AND A |
|
AACA |
RET Z |
|
AACB |
LD A,$00 |
|
AACD |
CP $61 |
|
AACF |
JR Z,move_helicopter_0 |
|
AAD1 |
SUB $02 |
|
AAD3 |
LD ($AACC),A |
move_helicopter_0 |
AAD6 |
LD C,A |
|
AAD7 |
LD A,$00 |
|
AAD9 |
INC A |
|
AADA |
AND $03 |
|
AADC |
LD ($AAD8),A |
|
AADF |
LD A,$01 |
|
AAE1 |
JR NZ,move_helicopter_1 |
|
AAE3 |
NEG |
|
AAE5 |
LD ($AAE0),A |
move_helicopter_1 |
AAE8 |
ADD A,$00 |
|
AAEA |
LD ($AAE9),A |
|
AAED |
ADD A,C |
|
AAEE |
LD ($AA5B),A |
|
AAF1 |
LD HL,($A26C) |
|
AAF4 |
LD D,H |
|
AAF5 |
LD E,L |
|
AAF6 |
LD BC,$0000 |
|
AAF9 |
AND A |
|
AAFA |
SBC HL,BC |
|
AAFC |
LD ($AAF7),DE |
|
AB00 |
LD DE,($AA95) |
|
AB04 |
ADD HL,DE |
|
AB05 |
PUSH HL |
|
AB06 |
LD DE,$0070 |
|
AB09 |
LD B,$00 |
|
AB0B |
AND A |
|
AB0C |
SBC HL,DE |
|
AB0E |
POP HL |
|
AB0F |
JR Z,move_helicopter_5 |
|
AB11 |
LD A,$08 |
|
AB13 |
PUSH AF |
|
AB14 |
JP M,move_helicopter_2 |
|
AB17 |
DEC B |
|
AB18 |
NEG |
move_helicopter_2 |
AB1A |
LD C,A |
|
AB1B |
ADD HL,BC |
|
AB1C |
PUSH HL |
|
AB1D |
AND A |
|
AB1E |
SBC HL,DE |
|
AB20 |
POP HL |
|
AB21 |
JP M,move_helicopter_3 |
|
AB24 |
POP AF |
|
AB25 |
JP P,move_helicopter_5 |
|
AB28 |
JR move_helicopter_4 |
move_helicopter_3 |
AB2A |
POP AF |
|
AB2B |
JP M,move_helicopter_5 |
move_helicopter_4 |
AB2E |
EX DE,HL |
move_helicopter_5 |
AB2F |
LD ($AA95),HL |
|
AB32 |
RET |