diff options
author | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2021-02-02 11:55:55 +0000 |
---|---|---|
committer | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2021-02-02 11:55:55 +0000 |
commit | 3dd204220082d85ce5f1c92250f7240e3dc92944 (patch) | |
tree | ff9d0dec04394bfa02b767a80b08cda20e2191e5 /src/engine/home.asm | |
parent | 152fb72933bbe7326d6172f3e2c8659346e8acc7 (diff) |
Document duel animation playing routines
Diffstat (limited to 'src/engine/home.asm')
-rw-r--r-- | src/engine/home.asm | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/engine/home.asm b/src/engine/home.asm index cc16ca3..476f182 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -11115,9 +11115,12 @@ CheckAnyAnimationPlaying: ; 3b52 (0:3b52) pop hl ret +; plays duel animation +; the animations are loaded to a buffer +; and played in order, so they can be stacked ; input: ; - a = animation index -Func_3b6a: ; 3b6a (0:3b6a) +PlayDuelAnimation: ; 3b6a (0:3b6a) ld [wTempAnimation], a ; hold an animation temporarily ldh a, [hBankROM] push af @@ -11126,25 +11129,25 @@ Func_3b6a: ; 3b6a (0:3b6a) push hl push bc push de - ld a, BANK(Func_1ca31) + ld a, BANK(LoadDuelAnimationToBuffer) call BankswitchROM ld a, [wTempAnimation] cp $61 - jr nc, .asm_3b90 + jr nc, .load_buffer - ld hl, wd4ad - ld a, [wd4ac] + ld hl, wDuelAnimBufferSize + ld a, [wDuelAnimBufferCurPos] cp [hl] - jr nz, .asm_3b90 + jr nz, .load_buffer call CheckAnyAnimationPlaying - jr nc, .asm_3b95 + jr nc, .play_anim -.asm_3b90 - call Func_1ca31 +.load_buffer + call LoadDuelAnimationToBuffer jr .done -.asm_3b95 - call Func_1c8ef +.play_anim + call PlayLoadedDuelAnimation jr .done .done |