diff options
author | yenatch <yenatch@gmail.com> | 2015-11-13 00:44:06 -0500 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2015-11-13 00:44:06 -0500 |
commit | 9c5473e965520f672640daf4ee76622640e0de15 (patch) | |
tree | 33d513a05a026cb6c094eb7ee73ad52ee36d0888 /battle/anim_commands.asm | |
parent | 1c1fe276ca59726bb0008c60006c6b48cd093573 (diff) | |
parent | 40802da3cf27a453f62c8c4b712e876b06a9d834 (diff) |
Merge pull request #326 from PikalaxALT/master
Reopen #325
Diffstat (limited to 'battle/anim_commands.asm')
-rw-r--r-- | battle/anim_commands.asm | 348 |
1 files changed, 175 insertions, 173 deletions
diff --git a/battle/anim_commands.asm b/battle/anim_commands.asm index 82d5eab62..fed2c9236 100644 --- a/battle/anim_commands.asm +++ b/battle/anim_commands.asm @@ -40,7 +40,7 @@ _PlayBattleAnim: ; cc0e4 push af ld [hl], c - call Functioncc11c + call BattleAnimRunScript pop af ld [hVBlank], a @@ -55,17 +55,17 @@ _PlayBattleAnim: ; cc0e4 ret ; cc11c -Functioncc11c: ; cc11c +BattleAnimRunScript: ; cc11c ld a, [FXAnimIDHi] and a - jr nz, .asm_cc156 + jr nz, .hi_byte callba CheckBattleScene - jr c, .asm_cc141 + jr c, .disabled call BattleAnimClearHud - call Functioncc163 + call RunBattleAnimScript call BattleAnimAssignPals call BattleAnimRequestPals @@ -76,31 +76,31 @@ Functioncc11c: ; cc11c call BattleAnimDelayFrame call BattleAnimRestoreHuds -.asm_cc141 +.disabled ld a, [wcfca] and a - jr z, .asm_cc15f + jr z, .done ld l, a ld h, 0 - ld de, $10e + ld de, ANIM_MISS add hl, de ld a, l ld [FXAnimIDLo], a ld a, h ld [FXAnimIDHi], a -.asm_cc156 +.hi_byte call WaitSFX call Functioncc881 - call Functioncc163 + call RunBattleAnimScript -.asm_cc15f +.done call Functioncc8f6 ret ; cc163 -Functioncc163: ; cc163 +RunBattleAnimScript: ; cc163 call Functioncc8d3 @@ -168,8 +168,8 @@ BattleAnimRestoreHuds: ; cc1bb ld [rSVBK], a ld hl, UpdateBattleHuds - ld a, $f - rst FarCall + ld a, BANK(UpdatePlayerHUD) + rst FarCall ; Why the heck is this a callab? pop af ld [rSVBK], a @@ -257,11 +257,11 @@ Functioncc23d: ; cc23d ld a, [BattleAnimFlags] bit 3, a - jr z, .asm_cc254 + jr z, .skip ld hl, Sprites + 3 ld c, (SpritesEnd - Sprites) / 4 -.asm_cc249 +.loop ld a, [hl] and $f0 ld [hli], a @@ -269,71 +269,71 @@ rept 3 inc hl endr dec c - jr nz, .asm_cc249 + jr nz, .loop ret -.asm_cc254 +.skip ld hl, Sprites ld c, SpritesEnd - Sprites xor a -.asm_cc25a +.loop2 ld [hli], a dec c - jr nz, .asm_cc25a + jr nz, .loop2 ret ; cc25f Functioncc25f: ; cc25f - call Functioncc267 + call .CheckTimer ret nc - call Functioncc275 + call .RunScript ret ; cc267 -Functioncc267: ; cc267 +.CheckTimer: ; cc267 ld a, [BattleAnimDuration] and a - jr z, .asm_cc273 + jr z, .done dec a ld [BattleAnimDuration], a and a ret -.asm_cc273 +.done scf ret ; cc275 -Functioncc275: ; cc275 - +.RunScript: ; cc275 +.loop call GetBattleAnimByte cp $ff - jr nz, .asm_cc286 + jr nz, .not_done_with_anim ; Return from a subroutine. ld hl, BattleAnimFlags bit 1, [hl] - jr nz, .asm_cc28e + jr nz, .do_anim set 0, [hl] ret -.asm_cc286 +.not_done_with_anim cp $d0 - jr nc, .asm_cc28e + jr nc, .do_anim ld [BattleAnimDuration], a ret -.asm_cc28e - call Functioncc293 +.do_anim + call .DoCommand - jr Functioncc275 + jr .loop ; cc293 -Functioncc293: ; cc293 +.DoCommand: ; cc293 ; Execute battle animation command in [BattleAnimByte]. ld a, [BattleAnimByte] sub $d0 @@ -353,54 +353,54 @@ endr BattleAnimCommands:: ; cc2a4 (33:42a4) - dw BattleAnimCmd_D0 - dw BattleAnimCmd_D1 - dw BattleAnimCmd_D2 - dw BattleAnimCmd_D3 - dw BattleAnimCmd_D4 - dw BattleAnimCmd_D5 - dw BattleAnimCmd_D6 - dw BattleAnimCmd_D7 - dw BattleAnimCmd_D8 - dw BattleAnimCmd_D9 - dw BattleAnimCmd_DA - dw BattleAnimCmd_DB - dw BattleAnimCmd_DC - dw BattleAnimCmd_DD - dw BattleAnimCmd_DE - dw BattleAnimCmd_DF - dw BattleAnimCmd_E0 - dw BattleAnimCmd_E1 - dw BattleAnimCmd_E2 - dw BattleAnimCmd_E3 - dw BattleAnimCmd_E4 - dw BattleAnimCmd_E5 - dw BattleAnimCmd_E6 + dw BattleAnimCmd_Obj + dw BattleAnimCmd_1GFX + dw BattleAnimCmd_2GFX + dw BattleAnimCmd_3GFX + dw BattleAnimCmd_4GFX + dw BattleAnimCmd_5GFX + dw BattleAnimCmd_IncObj + dw BattleAnimCmd_SetObj + dw BattleAnimCmd_IncBGEffect + dw BattleAnimCmd_EnemyFeetObj + dw BattleAnimCmd_PlayerHeadObj + dw BattleAnimCmd_CheckPokeball + dw BattleAnimCmd_Transform + dw BattleAnimCmd_RaiseSub + dw BattleAnimCmd_DropSub + dw BattleAnimCmd_ResetObp0 + dw BattleAnimCmd_Sound + dw BattleAnimCmd_Cry + dw BattleAnimCmd_MinimizeOpp + dw BattleAnimCmd_OAMOn + dw BattleAnimCmd_OAMOff + dw BattleAnimCmd_ClearObjs + dw BattleAnimCmd_BeatUp dw BattleAnimCmd_E7 - dw BattleAnimCmd_E8 - dw BattleAnimCmd_E9 - dw BattleAnimCmd_EA - dw BattleAnimCmd_EB - dw BattleAnimCmd_EC - dw BattleAnimCmd_ED - dw BattleAnimCmd_EE - dw BattleAnimCmd_EF - dw BattleAnimCmd_F0 - dw BattleAnimCmd_F1 - dw BattleAnimCmd_F2 - dw BattleAnimCmd_F3 - dw BattleAnimCmd_F4 + dw BattleAnimCmd_UpdateActorPic + dw BattleAnimCmd_Minimize + dw BattleAnimCmd_EA ; dummy + dw BattleAnimCmd_EB ; dummy + dw BattleAnimCmd_EC ; dummy + dw BattleAnimCmd_ED ; dummy + dw BattleAnimCmd_JumpAnd + dw BattleAnimCmd_JumpUntil + dw BattleAnimCmd_BGEffect + dw BattleAnimCmd_BGP + dw BattleAnimCmd_OBP0 + dw BattleAnimCmd_OBP1 + dw BattleAnimCmd_ClearSprites dw BattleAnimCmd_F5 dw BattleAnimCmd_F6 dw BattleAnimCmd_F7 - dw BattleAnimCmd_F8 - dw BattleAnimCmd_F9 - dw BattleAnimCmd_FA - dw BattleAnimCmd_FB - dw BattleAnimCmd_FC - dw BattleAnimCmd_FD - dw BattleAnimCmd_FE - dw BattleAnimCmd_FF + dw BattleAnimCmd_JumpIf + dw BattleAnimCmd_SetVar + dw BattleAnimCmd_IncVar + dw BattleAnimCmd_JumpVar + dw BattleAnimCmd_Jump + dw BattleAnimCmd_Loop + dw BattleAnimCmd_Call + dw BattleAnimCmd_Ret BattleAnimCmd_EA: @@ -409,7 +409,7 @@ BattleAnimCmd_EC: BattleAnimCmd_ED: ; cc304 (33:4304) ret -BattleAnimCmd_FF: ; cc305 (33:4305) +BattleAnimCmd_Ret: ; cc305 (33:4305) ld hl, BattleAnimFlags res 1, [hl] ld hl, BattleAnimParent @@ -422,7 +422,7 @@ BattleAnimCmd_FF: ; cc305 (33:4305) ld [hl], d ret -BattleAnimCmd_FE: ; cc317 (33:4317) +BattleAnimCmd_Call: ; cc317 (33:4317) call GetBattleAnimByte ld e, a call GetBattleAnimByte @@ -445,7 +445,7 @@ BattleAnimCmd_FE: ; cc317 (33:4317) set 1, [hl] ret -BattleAnimCmd_FC: ; cc339 (33:4339) +BattleAnimCmd_Jump: ; cc339 (33:4339) call GetBattleAnimByte ld e, a call GetBattleAnimByte @@ -456,7 +456,7 @@ BattleAnimCmd_FC: ; cc339 (33:4339) ld [hl], d ret -BattleAnimCmd_FD: ; cc348 (33:4348) +BattleAnimCmd_Loop: ; cc348 (33:4348) call GetBattleAnimByte ld hl, BattleAnimFlags bit 2, [hl] @@ -497,8 +497,8 @@ endr ld [hl], e ret -BattleAnimCmd_EF: ; cc383 (33:4383) - ld hl, wc689 +BattleAnimCmd_JumpUntil: ; cc383 (33:4383) + ld hl, wKickCounter ld a, [hl] and a jr z, .asm_cc39a @@ -527,17 +527,17 @@ endr ld [hl], e ret -BattleAnimCmd_F9: ; cc3a6 (33:43a6) +BattleAnimCmd_SetVar: ; cc3a6 (33:43a6) call GetBattleAnimByte ld [BattleAnimVar], a ret -BattleAnimCmd_FA: ; cc3ad (33:43ad) +BattleAnimCmd_IncVar: ; cc3ad (33:43ad) ld hl, BattleAnimVar inc [hl] ret -BattleAnimCmd_FB: ; cc3b2 (33:43b2) +BattleAnimCmd_JumpVar: ; cc3b2 (33:43b2) call GetBattleAnimByte ld hl, BattleAnimVar cp [hl] @@ -566,9 +566,9 @@ endr ld [hl], d ret -BattleAnimCmd_F8: ; cc3d6 (33:43d6) +BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6) call GetBattleAnimByte - ld hl, wc689 + ld hl, wKickCounter cp [hl] jr z, .jump @@ -595,10 +595,10 @@ endr ld [hl], d ret -BattleAnimCmd_EE: ; cc3fa (33:43fa) +BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa) call GetBattleAnimByte ld e, a - ld a, [wc689] + ld a, [wKickCounter] and e jr nz, .jump @@ -624,7 +624,7 @@ endr ld [hl], d ret -BattleAnimCmd_D0: ; cc41f (33:441f) +BattleAnimCmd_Obj: ; cc41f (33:441f) call GetBattleAnimByte ld [BattleAnimTemps], a call GetBattleAnimByte @@ -636,7 +636,7 @@ BattleAnimCmd_D0: ; cc41f (33:441f) call Functioncc9a1 ret -BattleAnimCmd_F0: ; cc43b (33:443b) +BattleAnimCmd_BGEffect: ; cc43b (33:443b) call GetBattleAnimByte ld [BattleAnimTemps], a call GetBattleAnimByte @@ -648,23 +648,23 @@ BattleAnimCmd_F0: ; cc43b (33:443b) call Functionccb4f ret -BattleAnimCmd_F1: ; cc457 (33:4457) +BattleAnimCmd_BGP: ; cc457 (33:4457) call GetBattleAnimByte ld [wcfc7], a ret -BattleAnimCmd_F2: ; cc45e (33:445e) +BattleAnimCmd_OBP0: ; cc45e (33:445e) call GetBattleAnimByte ld [wcfc8], a ret -BattleAnimCmd_F3: ; cc465 (33:4465) +BattleAnimCmd_OBP1: ; cc465 (33:4465) call GetBattleAnimByte ld [wcfc9], a ret -BattleAnimCmd_DF: ; cc46c (33:446c) - ld a, [hSGB] ; $ff00+$e7 +BattleAnimCmd_ResetObp0: ; cc46c (33:446c) + ld a, [hSGB] and a ld a, $e0 jr z, .asm_cc475 @@ -673,7 +673,7 @@ BattleAnimCmd_DF: ; cc46c (33:446c) ld [wcfc8], a ret -BattleAnimCmd_E5: ; cc479 (33:4479) +BattleAnimCmd_ClearObjs: ; cc479 (33:4479) ld hl, OTPartyMon3HP ld a, $a0 .asm_cc47e @@ -683,11 +683,11 @@ BattleAnimCmd_E5: ; cc479 (33:4479) jr nz, .asm_cc47e ret -BattleAnimCmd_D1: -BattleAnimCmd_D2: -BattleAnimCmd_D3: -BattleAnimCmd_D4: -BattleAnimCmd_D5: ; cc485 (33:4485) +BattleAnimCmd_1GFX: +BattleAnimCmd_2GFX: +BattleAnimCmd_3GFX: +BattleAnimCmd_4GFX: +BattleAnimCmd_5GFX: ; cc485 (33:4485) ld a, [BattleAnimByte] and $f ld c, a @@ -722,7 +722,7 @@ endr jr nz, .asm_cc492 ret -BattleAnimCmd_D6: ; cc4c0 (33:44c0) +BattleAnimCmd_IncObj: ; cc4c0 (33:44c0) call GetBattleAnimByte ld e, $a ld bc, OTPartyMon3HP @@ -746,7 +746,7 @@ BattleAnimCmd_D6: ; cc4c0 (33:44c0) inc [hl] ret -BattleAnimCmd_D8: ; cc4e3 (33:44e3) +BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3) call GetBattleAnimByte ld e, $5 ld bc, ActiveBGEffects @@ -770,7 +770,7 @@ BattleAnimCmd_D8: ; cc4e3 (33:44e3) inc [hl] ret -BattleAnimCmd_D7: ; cc506 (33:4506) +BattleAnimCmd_SetObj: ; cc506 (33:4506) call GetBattleAnimByte ld e, $a ld bc, OTPartyMon3HP @@ -795,7 +795,7 @@ BattleAnimCmd_D7: ; cc506 (33:4506) ld [hl], a ret -BattleAnimCmd_D9: ; cc52c (33:452c) +BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c) ld hl, w5_d300 .asm_cc52f @@ -851,7 +851,7 @@ Functioncc561: ; cc561 (33:4561) jr nz, Functioncc561 ret -BattleAnimCmd_DA: ; cc57e (33:457e) +BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e) ld hl, w5_d300 .asm_cc581 @@ -907,7 +907,7 @@ Functioncc5b3: ; cc5b3 (33:45b3) jr nz, Functioncc5b3 ret -BattleAnimCmd_DB: ; cc5d0 (33:45d0) +BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0) callab GetPokeBallWobble ld a, c ld [BattleAnimVar], a @@ -916,15 +916,15 @@ BattleAnimCmd_DB: ; cc5d0 (33:45d0) BattleAnimCmd_E7: ; cc5db (33:45db) ret -BattleAnimCmd_DC: ; cc5dc (33:45dc) - ld a, [rSVBK] ; $ff00+$70 +BattleAnimCmd_Transform: ; cc5dc (33:45dc) + ld a, [rSVBK] push af ld a, 1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ld a, [CurPartySpecies] ; CurPartySpecies push af - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr z, .player @@ -948,13 +948,13 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc) pop af ld [CurPartySpecies], a ; CurPartySpecies pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret -BattleAnimCmd_E8: ; cc622 (33:4622) +BattleAnimCmd_UpdateActorPic: ; cc622 (33:4622) ld de, VTiles0 tile $00 - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr z, .player @@ -971,12 +971,12 @@ BattleAnimCmd_E8: ; cc622 (33:4622) call Request2bpp ret -BattleAnimCmd_DD: ; cc640 (33:4640) +BattleAnimCmd_RaiseSub: ; cc640 (33:4640) - ld a, [rSVBK] ; $ff00+$70 + ld a, [rSVBK] push af ld a, 1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a xor a call GetSRAMBank @@ -992,7 +992,7 @@ GetSubstitutePic: ; cc64c or b jr nz, .loop - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr z, .player @@ -1037,7 +1037,7 @@ GetSubstitutePic: ; cc64c .done call CloseSRAM pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret CopyMonsterSpriteTile: ; cc6c6 (33:46c6) @@ -1046,18 +1046,18 @@ CopyMonsterSpriteTile: ; cc6c6 (33:46c6) call FarCopyBytes ret -BattleAnimCmd_E2: ; cc6cf (33:46cf) - ld a, [rSVBK] ; $ff00+$70 +BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf) + ld a, [rSVBK] push af ld a, $1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a xor a call GetSRAMBank call GetMinimizePic call Request2bpp call CloseSRAM pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret GetMinimizePic: ; cc6e7 (33:46e7) @@ -1071,7 +1071,7 @@ GetMinimizePic: ; cc6e7 (33:46e7) or b jr nz, .loop - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr z, .player @@ -1102,11 +1102,11 @@ MinimizePic: ; cc725 INCBIN "gfx/battle/minimize.2bpp" ; cc735 -BattleAnimCmd_E9: ; cc735 (33:4735) - ld a, [rSVBK] ; $ff00+$70 +BattleAnimCmd_Minimize: ; cc735 (33:4735) + ld a, [rSVBK] push af ld a, $1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a xor a call GetSRAMBank call GetMinimizePic @@ -1114,18 +1114,18 @@ BattleAnimCmd_E9: ; cc735 (33:4735) call Request2bpp call CloseSRAM pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret -BattleAnimCmd_DE: ; cc750 (33:4750) - ld a, [rSVBK] ; $ff00+$70 +BattleAnimCmd_DropSub: ; cc750 (33:4750) + ld a, [rSVBK] push af ld a, $1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ld a, [CurPartySpecies] ; CurPartySpecies push af - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr z, .player @@ -1139,21 +1139,21 @@ BattleAnimCmd_DE: ; cc750 (33:4750) pop af ld [CurPartySpecies], a ; CurPartySpecies pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret -BattleAnimCmd_E6: ; cc776 (33:4776) - ld a, [rSVBK] ; $ff00+$70 +BattleAnimCmd_BeatUp: ; cc776 (33:4776) + ld a, [rSVBK] push af ld a, $1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ld a, [CurPartySpecies] ; CurPartySpecies push af - ld a, [wc689] + ld a, [wKickCounter] ld [CurPartySpecies], a ; CurPartySpecies - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr z, .player @@ -1175,20 +1175,20 @@ BattleAnimCmd_E6: ; cc776 (33:4776) ld b, $1 call GetSGBLayout pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret -BattleAnimCmd_E3: ; cc7bb (33:47bb) +BattleAnimCmd_OAMOn: ; cc7bb (33:47bb) xor a - ld [hOAMUpdate], a ; $ff00+$d8 + ld [hOAMUpdate], a ret -BattleAnimCmd_E4: ; cc7bf (33:47bf) +BattleAnimCmd_OAMOff: ; cc7bf (33:47bf) ld a, $1 - ld [hOAMUpdate], a ; $ff00+$d8 + ld [hOAMUpdate], a ret -BattleAnimCmd_F4: ; cc7c4 (33:47c4) +BattleAnimCmd_ClearSprites: ; cc7c4 (33:47c4) ld hl, BattleAnimFlags set 3, [hl] ret @@ -1202,7 +1202,7 @@ BattleAnimCmd_F6: ; cc7cb (33:47cb) BattleAnimCmd_F7: ; cc7cc (33:47cc) ret -BattleAnimCmd_E0: ; cc7cd (33:47cd) +BattleAnimCmd_Sound: ; cc7cd (33:47cd) call GetBattleAnimByte ld e, a srl a @@ -1232,7 +1232,7 @@ Datacc7f8: ; cc7f8 ; cc7fc Functioncc7fc: ; cc7fc (33:47fc) - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr nz, .enemy @@ -1244,7 +1244,7 @@ Functioncc7fc: ; cc7fc (33:47fc) xor 1 ret -BattleAnimCmd_E1: ; cc807 (33:4807) +BattleAnimCmd_Cry: ; cc807 (33:4807) call GetBattleAnimByte and 3 ld e, a @@ -1254,12 +1254,12 @@ rept 4 add hl, de endr - ld a, [rSVBK] ; $ff00+$70 + ld a, [rSVBK] push af ld a, 1 - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a - ld a, [hBattleTurn] ; $ff00+$e4 + ld a, [hBattleTurn] and a jr nz, .enemy @@ -1316,7 +1316,7 @@ endr .done pop af - ld [rSVBK], a ; $ff00+$70 + ld [rSVBK], a ret ; cc871 (33:4871) @@ -1332,11 +1332,11 @@ Datacc871: ; cc871 Functioncc881: ; cc881 ld a, [wcfca] cp $1 - jr z, .asm_cc88b + jr z, .okay cp $4 ret nz -.asm_cc88b +.okay ld a, [TypeModifier] and $7f ret z @@ -1358,41 +1358,43 @@ Functioncc881: ; cc881 BattleAnimAssignPals: ; cc8a4 ld a, [hCGB] and a - jr nz, .asm_cc8be + jr nz, .cgb ld a, [hSGB] and a - ld a, $e0 - jr z, .asm_cc8b2 - ld a, $f0 + ld a, %11100000 + jr z, .sgb + ld a, %11110000 -.asm_cc8b2 +.sgb ld [wcfc8], a - ld a, $e4 + ld a, %11100100 ld [wcfc7], a ld [wcfc9], a ret -.asm_cc8be - ld a, $e4 +.cgb + ld a, %11100100 ld [wcfc7], a ld [wcfc8], a ld [wcfc9], a call DmgToCgbBGPals - ld de, $e4e4 + lb de, %11100100, %11100100 call DmgToCgbObjPals ret ; cc8d3 Functioncc8d3: ; cc8d3 +; Clear animation block ld hl, LYOverrides - ld bc, $0354 -.asm_cc8d9 + ld bc, wBattleAnimEnd - LYOverrides +.loop ld [hl], $0 inc hl dec bc ld a, c or b - jr nz, .asm_cc8d9 + jr nz, .loop + ld hl, FXAnimIDLo ld e, [hl] inc hl @@ -1401,7 +1403,7 @@ Functioncc8d3: ; cc8d3 rept 2 add hl, de endr - call Function3ae1 + call GetBattleAnimPointer call BattleAnimAssignPals call BattleAnimDelayFrame ret @@ -1409,12 +1411,12 @@ endr Functioncc8f6: ; cc8f6 call WaitTop - ld a, $e4 + ld a, %11100100 ld [wcfc7], a ld [wcfc8], a ld [wcfc9], a call DmgToCgbBGPals - ld de, $e4e4 + lb de, %11100100, %11100100 call DmgToCgbObjPals xor a ld [hSCX], a @@ -1435,7 +1437,7 @@ Functioncc91a: ; cc91a ld a, $5 ld [rSVBK], a ld hl, BGPals - ld de, Unkn1Pals + ld de, wMapPals ld a, [rBGP] ld b, a ld c, $7 |