2014-02-01 17:26:39 -08:00
|
|
|
Function1b1e:: ; 1b1e
|
2013-11-26 03:44:05 -08:00
|
|
|
ld [$d003], a
|
|
|
|
xor a
|
|
|
|
ld [DefaultFlypoint], a
|
|
|
|
ld a, $0
|
|
|
|
ld [$d004], a
|
|
|
|
ld a, $7
|
|
|
|
ld [StartFlypoint], a
|
|
|
|
ld a, $d0
|
|
|
|
ld [EndFlypoint], a
|
|
|
|
ret
|
|
|
|
; 1b35
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1b35:: ; 1b35
|
2013-11-26 03:44:05 -08:00
|
|
|
ld a, [DefaultFlypoint]
|
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
dec a
|
|
|
|
ld [DefaultFlypoint], a
|
|
|
|
ret
|
|
|
|
; 1b3f
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1b3f:: ; 1b3f
|
2013-11-26 03:44:05 -08:00
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
ld hl, DefaultFlypoint
|
|
|
|
ld e, [hl]
|
|
|
|
inc [hl]
|
|
|
|
ld d, 0
|
|
|
|
ld hl, MovementBuffer
|
|
|
|
add hl, de
|
|
|
|
ld [hl], a
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
; 1b50
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1b50:: ; 1b50
|
2013-11-26 03:44:05 -08:00
|
|
|
push af
|
|
|
|
ld a, c
|
|
|
|
and a
|
|
|
|
jr nz, .asm_1b57
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_1b57
|
|
|
|
pop af
|
|
|
|
.asm_1b58
|
|
|
|
call Function1b3f
|
|
|
|
dec c
|
|
|
|
jr nz, .asm_1b58
|
|
|
|
ret
|
|
|
|
; 1b5f
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1b5f:: ; 1b5f
|
2013-11-26 03:44:05 -08:00
|
|
|
push af
|
|
|
|
ld a, b
|
|
|
|
sub d
|
|
|
|
ld h, $2
|
|
|
|
jr nc, .asm_1b6a
|
|
|
|
dec a
|
|
|
|
cpl
|
|
|
|
ld h, $3
|
|
|
|
|
|
|
|
.asm_1b6a
|
|
|
|
ld d, a
|
|
|
|
ld a, c
|
|
|
|
sub e
|
|
|
|
ld l, $1
|
|
|
|
jr nc, .asm_1b75
|
|
|
|
dec a
|
|
|
|
cpl
|
|
|
|
ld l, $0
|
|
|
|
|
|
|
|
.asm_1b75
|
|
|
|
ld e, a
|
|
|
|
cp d
|
|
|
|
jr nc, .asm_1b7f
|
|
|
|
ld a, h
|
|
|
|
ld h, l
|
|
|
|
ld l, a
|
|
|
|
ld a, d
|
|
|
|
ld d, e
|
|
|
|
ld e, a
|
|
|
|
|
|
|
|
.asm_1b7f
|
|
|
|
pop af
|
|
|
|
ld b, a
|
|
|
|
ld a, h
|
|
|
|
call Function1b92
|
|
|
|
ld c, d
|
|
|
|
call Function1b50
|
|
|
|
ld a, l
|
|
|
|
call Function1b92
|
|
|
|
ld c, e
|
|
|
|
call Function1b50
|
|
|
|
ret
|
|
|
|
; 1b92
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1b92:: ; 1b92
|
2013-11-26 03:44:05 -08:00
|
|
|
push de
|
|
|
|
push hl
|
|
|
|
ld l, b
|
|
|
|
ld h, 0
|
|
|
|
add hl, hl
|
|
|
|
add hl, hl
|
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
|
|
|
add hl, de
|
|
|
|
ld de, .data_1ba5
|
|
|
|
add hl, de
|
|
|
|
ld a, [hl]
|
|
|
|
pop hl
|
|
|
|
pop de
|
|
|
|
ret
|
|
|
|
; 1ba5
|
|
|
|
|
|
|
|
.data_1ba5
|
|
|
|
db 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
|
|
|
|
; 1bb1
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1bb1:: ; 1bb1
|
2013-11-26 03:44:05 -08:00
|
|
|
push hl
|
|
|
|
push bc
|
|
|
|
ld hl, $cfa1
|
|
|
|
ld b, $8
|
|
|
|
.asm_1bb8
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .asm_1bb8
|
|
|
|
ld a, $1
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hli], a
|
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
; 1bc9
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1bc9:: ; 1bc9
|
2013-11-26 03:44:05 -08:00
|
|
|
callab Function241a8
|
|
|
|
call Function1bdd
|
|
|
|
ret
|
|
|
|
; 1bd3
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1bd3:: ; 1bd3
|
2013-11-26 03:44:05 -08:00
|
|
|
callab Function241ab
|
|
|
|
call Function1bdd
|
|
|
|
ret
|
|
|
|
; 1bdd
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1bdd:: ; 1bdd
|
2013-11-26 03:44:05 -08:00
|
|
|
push bc
|
|
|
|
push af
|
|
|
|
ld a, [$ffa9]
|
|
|
|
and $f0
|
|
|
|
ld b, a
|
|
|
|
ld a, [hJoyPressed]
|
|
|
|
and $f
|
|
|
|
or b
|
|
|
|
ld b, a
|
|
|
|
pop af
|
|
|
|
ld a, b
|
|
|
|
pop bc
|
|
|
|
ret
|
|
|
|
; 1bee
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1bee:: ; 1bee
|
2013-11-26 03:44:05 -08:00
|
|
|
ld hl, $cfac
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld [hl], $ec
|
|
|
|
ret
|
|
|
|
; 1bf7
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1bf7:: ; 1bf7
|
2013-11-26 03:44:05 -08:00
|
|
|
ld hl, $cfac
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld [hl], $7f
|
|
|
|
ret
|
|
|
|
; 1c00
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1c00:: ; 1c00
|
2013-11-26 03:44:05 -08:00
|
|
|
callab Function24374
|
|
|
|
ret
|
|
|
|
; 1c07
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1c07:: ; 0x1c07
|
2013-11-26 03:44:05 -08:00
|
|
|
push af
|
|
|
|
callab Function243e8
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1c10:: ; 0x1c10
|
2013-11-26 03:44:05 -08:00
|
|
|
callab Function2446d
|
|
|
|
ret
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1c17:: ; 0x1c17
|
2013-11-26 03:44:05 -08:00
|
|
|
push af
|
|
|
|
call Function1c07
|
|
|
|
call Function321c
|
|
|
|
call Function1ad2
|
|
|
|
pop af
|
|
|
|
ret
|
|
|
|
|
2014-02-01 17:26:39 -08:00
|
|
|
Function1c23:: ; 0x1c23
|
2013-11-26 03:44:05 -08:00
|
|
|
call Function1cfd
|
|
|
|
call Function1c30
|
|
|
|
call Function1d19
|
|
|
|
call Function1c30
|
|
|
|
ret
|
|
|
|
; 0x1c30
|
|
|
|
|