Move battle start animation functions to its own file

This commit is contained in:
PikalaxALT
2015-10-19 10:23:58 -04:00
parent 52605b764a
commit 0a244e043c
24 changed files with 1350 additions and 1673 deletions

View File

@@ -198,14 +198,14 @@ GetJoypad:: ; 984
.updateauto
; An input of $ff will end the stream.
ld a, [hli]
cp a, $ff
cp a, -1
jr z, .stopauto
ld b, a
; A duration of $ff will end the stream indefinitely.
ld a, [hli]
ld [AutoInputLength], a
cp a, $ff
cp a, -1
jr nz, .next
; The current input is overwritten.
@@ -362,17 +362,20 @@ Functiona80:: ; a80
push af
xor a
ld [hConnectionStripLength], a
ld a, $6
ld a, 6
ld [hConnectedMapWidth], a
.asm_a8d
.loop
push hl
hlcoord 18, 17
call Functionb06
pop hl
call JoyTextDelay
ld a, [hJoyLast]
and $3
jr z, .asm_a8d
and A_BUTTON | B_BUTTON
jr z, .loop
pop af
ld [hConnectedMapWidth], a
pop af
@@ -381,67 +384,69 @@ Functiona80:: ; a80
; aa5
Functionaa5:: ; aa5
.loop
call JoyTextDelay
ld a, [hJoyLast]
and A_BUTTON | B_BUTTON
jr z, Functionaa5
jr z, .loop
ret
; aaf
KeepTextOpen:: ; aaf
ld a, [InLinkBattle]
ld a, [wLinkMode]
and a
jr nz, .asm_ac1
call Functionac6
jr nz, .link
call .wait_input
push de
ld de, SFX_READ_TEXT_2
call PlaySFX
pop de
ret
.asm_ac1
.link
ld c, 65
jp DelayFrames
; ac6
Functionac6:: ; ac6
.wait_input: ; ac6
ld a, [hOAMUpdate]
push af
ld a, $1
ld [hOAMUpdate], a
ld a, [InputType]
or a
jr z, .asm_ad9
callba Function1de28a
.asm_ad9
call Functionaf5
jr z, .input_wait_loop
callba _DudeAutoInput_A
.input_wait_loop
call .blink_cursor
call JoyTextDelay
ld a, [hJoyPressed]
and $3
jr nz, .asm_af1
and A_BUTTON | B_BUTTON
jr nz, .received_input
call RTC
ld a, $1
ld [hBGMapMode], a
call DelayFrame
jr .asm_ad9
jr .input_wait_loop
.asm_af1
.received_input
pop af
ld [hOAMUpdate], a
ret
; af5
Functionaf5:: ; af5
.blink_cursor: ; af5
ld a, [$ff9b]
and $10
jr z, .asm_aff
ld a, $ee
jr .asm_b02
and %00010000 ; bit 4, a
jr z, .cursor_off
ld a, "▼"
jr .load_cursor_state
.asm_aff
.cursor_off
ld a, [TileMap + 17 + 17 * SCREEN_WIDTH]
.asm_b02
.load_cursor_state
ld [TileMap + 18 + 17 * SCREEN_WIDTH], a
ret
; b06
@@ -450,7 +455,7 @@ Functionb06:: ; b06
push bc
ld a, [hl]
ld b, a
ld a, $ee
ld a, "▼"
cp b
pop bc
jr nz, .asm_b27
@@ -462,11 +467,11 @@ Functionb06:: ; b06
dec a
ld [hConnectedMapWidth], a
ret nz
ld a, $7a
ld a, "─"
ld [hl], a
ld a, $ff
ld a, -1
ld [hConnectionStripLength], a
ld a, $6
ld a, 6
ld [hConnectedMapWidth], a
ret