From fb2d1591c1698e1553601c64da389a48f48b3cd1 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Mon, 31 Dec 2018 11:01:37 -0600 Subject: [PATCH] Document more battle anim effects --- data/battle_anim_scripts.s | 196 ++++---- graphics/battle_anims/sprites/effect.pal | 27 -- include/battle_anim.h | 3 +- include/graphics.h | 6 +- src/battle_anim_80A5C6C.c | 2 +- src/battle_anim_8170478.c | 2 +- src/battle_anim_effects_3.c | 548 +++++++++++++---------- src/battle_anim_utility_funcs.c | 7 +- src/graphics.c | 6 +- 9 files changed, 431 insertions(+), 366 deletions(-) delete mode 100644 graphics/battle_anims/sprites/effect.pal diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index ef16a15e8..e7a7e89b6 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1252,12 +1252,12 @@ Move_REVERSAL: createvisualtask sub_8115A04, 2, 31, 3, 2, 0, 10, RGB_WHITE delay 10 playsewithpan SE_W179, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_85CE5D8, ANIM_ATTACKER, 2, 26, 0 - createsprite gBattleAnimSpriteTemplate_85CE5D8, ANIM_ATTACKER, 2, 26, 42 - createsprite gBattleAnimSpriteTemplate_85CE5D8, ANIM_ATTACKER, 2, 26, 84 - createsprite gBattleAnimSpriteTemplate_85CE5D8, ANIM_ATTACKER, 2, 26, 126 - createsprite gBattleAnimSpriteTemplate_85CE5D8, ANIM_ATTACKER, 2, 26, 168 - createsprite gBattleAnimSpriteTemplate_85CE5D8, ANIM_ATTACKER, 2, 26, 210 + createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 0 + createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 42 + createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 84 + createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 126 + createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 168 + createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 210 waitforvisualfinish delay 20 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 @@ -1751,7 +1751,7 @@ Frustration_Strong: createsprite gAngerMarkSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, -28 waitforvisualfinish delay 5 - createvisualtask sub_815C3A8, 5 + createvisualtask AnimTask_StrongFrustrationGrowAndShrink, 5 delay 7 playsewithpan SE_W004, SOUND_PAN_TARGET createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 8, 1, 1 @@ -1785,7 +1785,7 @@ Frustration_Medium: createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 6, 1 goto Frustration_Continue Frustration_Weak: - createsprite gUnknown_085CE4D0, ANIM_ATTACKER, 2, 20, -28 + createsprite gWeakFrustrationAngerMarkSpriteTemplate, ANIM_ATTACKER, 2, 20, -28 waitforvisualfinish delay 10 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 10, 2 @@ -1815,26 +1815,26 @@ Move_SAFEGUARD: Move_PAIN_SPLIT: loadspritegfx ANIM_TAG_PAIN_SPLIT - createsprite gUnknown_085CE590, ANIM_ATTACKER, 2, -8, -42, 0 - createsprite gUnknown_085CE590, ANIM_TARGET, 2, -8, -42, 1 + createsprite gPainSplitProjectileSpriteTemplate, ANIM_ATTACKER, 2, -8, -42, ANIM_ATTACKER + createsprite gPainSplitProjectileSpriteTemplate, ANIM_TARGET, 2, -8, -42, ANIM_TARGET delay 10 playsewithpan SE_W207B, 0 - createvisualtask sub_815CA20, 2, 0, 0 - createvisualtask sub_815CA20, 2, 1, 0 + createvisualtask AnimTask_PainSplitMovement, 2, ANIM_ATTACKER, 0 + createvisualtask AnimTask_PainSplitMovement, 2, ANIM_TARGET, 0 waitforvisualfinish - createsprite gUnknown_085CE590, ANIM_ATTACKER, 2, -24, -42, 0 - createsprite gUnknown_085CE590, ANIM_TARGET, 2, -24, -42, 1 + createsprite gPainSplitProjectileSpriteTemplate, ANIM_ATTACKER, 2, -24, -42, ANIM_ATTACKER + createsprite gPainSplitProjectileSpriteTemplate, ANIM_TARGET, 2, -24, -42, ANIM_TARGET delay 10 playsewithpan SE_W207B, 0 - createvisualtask sub_815CA20, 2, 0, 1 - createvisualtask sub_815CA20, 2, 1, 1 + createvisualtask AnimTask_PainSplitMovement, 2, ANIM_ATTACKER, 1 + createvisualtask AnimTask_PainSplitMovement, 2, ANIM_TARGET, 1 waitforvisualfinish - createsprite gUnknown_085CE590, ANIM_ATTACKER, 2, 8, -42, 0 - createsprite gUnknown_085CE590, ANIM_TARGET, 2, 8, -42, 1 + createsprite gPainSplitProjectileSpriteTemplate, ANIM_ATTACKER, 2, 8, -42, ANIM_ATTACKER + createsprite gPainSplitProjectileSpriteTemplate, ANIM_TARGET, 2, 8, -42, ANIM_TARGET delay 10 playsewithpan SE_W207B, 0 - createvisualtask sub_815CA20, 2, 0, 2 - createvisualtask sub_815CA20, 2, 1, 2 + createvisualtask AnimTask_PainSplitMovement, 2, ANIM_ATTACKER, 2 + createvisualtask AnimTask_PainSplitMovement, 2, ANIM_TARGET, 2 end Move_VICE_GRIP: @@ -2888,7 +2888,7 @@ Move_KINESIS: Move_GLARE: loadspritegfx ANIM_TAG_SMALL_RED_EYE loadspritegfx ANIM_TAG_EYE_SPARKLE - createvisualtask sub_815E114, 5, 0 + createvisualtask AnimTask_GlareEyeDots, 5, 0 playsewithpan SE_W060B, SOUND_PAN_ATTACKER waitforvisualfinish createvisualtask sub_8116620, 5, 1, 0, 0, 16, RGB_BLACK @@ -2905,7 +2905,7 @@ Move_GLARE: Move_BARRAGE: loadspritegfx ANIM_TAG_RED_BALL - createvisualtask sub_815E47C, 3 + createvisualtask AnimTask_BarrageBall, 3 playsewithpan SE_W207, SOUND_PAN_ATTACKER delay 24 createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 8, 1, 40, 1 @@ -2996,7 +2996,7 @@ Move_SPLASH: Move_ACID_ARMOR: monbg ANIM_ATTACKER setalpha 15, 0 - createvisualtask sub_815D240, 2, 0 + createvisualtask AnimTask_AcidArmor, 2, ANIM_ATTACKER playsewithpan SE_W151, SOUND_PAN_ATTACKER waitforvisualfinish blendoff @@ -3096,7 +3096,7 @@ Move_FLAIL: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 - createvisualtask sub_815C770, 2, 0 + createvisualtask AnimTask_FlailMovement, 2, ANIM_ATTACKER loopsewithpan SE_W029, SOUND_PAN_ATTACKER, 8, 2 waitforvisualfinish createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 3 @@ -3219,7 +3219,7 @@ EndureEffect: Move_CHARM: loadspritegfx ANIM_TAG_MAGENTA_HEART - createvisualtask sub_815C478, 5, 0, 2, 0 + createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 0 createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 0, 20 playsewithpan SE_W204, SOUND_PAN_ATTACKER delay 15 @@ -3529,18 +3529,18 @@ Move_MEMENTO: Move_FACADE: loadspritegfx ANIM_TAG_SWEAT_DROP - createvisualtask sub_815DCA4, 2, 0, 3 - createvisualtask sub_815DF0C, 2, 0, 72 + createvisualtask AnimTask_SquishAndSweatDroplets, 2, ANIM_ATTACKER, 3 + createvisualtask AnimTask_FacadeColorBlend, 2, ANIM_ATTACKER, 72 loopsewithpan SE_W207, SOUND_PAN_ATTACKER, 24, 3 end Move_SMELLING_SALT: loadspritegfx ANIM_TAG_TAG_HAND loadspritegfx ANIM_TAG_SMELLINGSALT_EFFECT - createsprite gUnknown_085CE864, ANIM_TARGET, 2, 1, 0, 2 - createsprite gUnknown_085CE864, ANIM_TARGET, 2, 1, 1, 2 + createsprite gSmellingSaltsHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 2 + createsprite gSmellingSaltsHandSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 1, 2 delay 32 - createvisualtask AnimTask_SmellingSaltSquish, 3, ANIM_TARGET, 2 + createvisualtask AnimTask_SmellingSaltsSquish, 3, ANIM_TARGET, 2 loopsewithpan SE_W003, SOUND_PAN_TARGET, 12, 2 waitforvisualfinish delay 4 @@ -3633,18 +3633,18 @@ Move_HELPING_HAND: Move_ASSIST: loadspritegfx ANIM_TAG_PAW_PRINT - createsprite gUnknown_085CE804, ANIM_ATTACKER, 50, 112, -16, 140, 128, 36 + createsprite gAssistPawprintSpriteTemplate, ANIM_ATTACKER, 50, 112, -16, 140, 128, 36 delay 2 - createsprite gUnknown_085CE804, ANIM_ATTACKER, 50, 208, 128, -16, 48, 36 + createsprite gAssistPawprintSpriteTemplate, ANIM_ATTACKER, 50, 208, 128, -16, 48, 36 playsewithpan SE_W010, 0 delay 2 - createsprite gUnknown_085CE804, ANIM_ATTACKER, 50, -16, 112, 256, -16, 36 + createsprite gAssistPawprintSpriteTemplate, ANIM_ATTACKER, 50, -16, 112, 256, -16, 36 playsewithpan SE_W010, 0 delay 2 - createsprite gUnknown_085CE804, ANIM_ATTACKER, 50, 108, 128, 84, -16, 36 + createsprite gAssistPawprintSpriteTemplate, ANIM_ATTACKER, 50, 108, 128, 84, -16, 36 playsewithpan SE_W010, 0 delay 2 - createsprite gUnknown_085CE804, ANIM_ATTACKER, 50, -16, 56, 256, 56, 36 + createsprite gAssistPawprintSpriteTemplate, ANIM_ATTACKER, 50, -16, 56, 256, 56, 36 playsewithpan SE_W010, 0 end @@ -3764,24 +3764,24 @@ BrickBreakShatteredWall: Move_YAWN: loadspritegfx ANIM_TAG_PINK_CLOUD - createvisualtask sub_815D64C, 2, 0 + createvisualtask AnimTask_DeepInhale, 2, ANIM_ATTACKER playsewithpan SE_W281, SOUND_PAN_ATTACKER waitforvisualfinish - createsprite gUnknown_085CE68C, ANIM_TARGET, 5, 2 + createsprite gYawnCloudSpriteTemplate, ANIM_TARGET, 5, 2 playsewithpan SE_W255, SOUND_PAN_ATTACKER delay 4 - createsprite gUnknown_085CE68C, ANIM_TARGET, 5, 1 + createsprite gYawnCloudSpriteTemplate, ANIM_TARGET, 5, 1 delay 4 - createsprite gUnknown_085CE68C, ANIM_TARGET, 5, 0 + createsprite gYawnCloudSpriteTemplate, ANIM_TARGET, 5, 0 waitforvisualfinish - createvisualtask sub_815D64C, 2, 1 + createvisualtask AnimTask_DeepInhale, 2, ANIM_TARGET playsewithpan SE_W281, SOUND_PAN_TARGET end Move_ENDEAVOR: loadspritegfx ANIM_TAG_SWEAT_DROP loadspritegfx ANIM_TAG_IMPACT - createvisualtask sub_815DCA4, 2, 0, 2 + createvisualtask AnimTask_SquishAndSweatDroplets, 2, ANIM_ATTACKER, 2 loopsewithpan SE_W039, SOUND_PAN_ATTACKER, 24, 2 createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB(31, 21, 0), 12, 1, 2 delay 6 @@ -4171,7 +4171,7 @@ Move_FAKE_TEARS: loadspritegfx ANIM_TAG_MUSIC_NOTES createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SMALL_BUBBLES, 0, 4, 4, RGB(12, 11, 31) waitforvisualfinish - createvisualtask sub_815C478, 5, 0, 2, 1 + createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 1 loopsewithpan SE_W039, SOUND_PAN_ATTACKER, 12, 4 delay 8 createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 0 @@ -4275,7 +4275,7 @@ Move_TICKLE: delay 20 createvisualtask AnimTask_SwayMon, 3, 0, 6, 1280, 3, ANIM_ATTACKER delay 12 - createvisualtask sub_815C478, 3, 1, 6, 2 + createvisualtask AnimTask_RockMonBackAndForth, 3, ANIM_TARGET, 6, 2 loopsewithpan SE_W039, SOUND_PAN_TARGET, 8, 8 waitforvisualfinish end @@ -4371,7 +4371,7 @@ Move_BLOCK: Move_HOWL: loadspritegfx ANIM_TAG_NOISE_LINE - createvisualtask sub_815D64C, 2, 0 + createvisualtask AnimTask_DeepInhale, 2, 0 delay 12 call RoarEffect createvisualtask sub_8158D8C, 2, 0, 3 @@ -4392,7 +4392,7 @@ Move_BULK_UP: Move_COVET: loadspritegfx ANIM_TAG_MAGENTA_HEART loadspritegfx ANIM_TAG_ITEM_BAG - createvisualtask sub_815C478, 5, 0, 2, 0 + createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 0 createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 0, 20 playsewithpan SE_W204, SOUND_PAN_ATTACKER delay 15 @@ -4973,13 +4973,13 @@ Move_ROAR: end RoarEffect: - createsprite gUnknown_085CE7D4, ANIM_ATTACKER, 2, 24, -8, 0 - createsprite gUnknown_085CE7D4, ANIM_ATTACKER, 2, 24, 0, 2 - createsprite gUnknown_085CE7D4, ANIM_ATTACKER, 2, 24, 8, 1 + createsprite gRoarNoiseLineSpriteTemplate, ANIM_ATTACKER, 2, 24, -8, 0 + createsprite gRoarNoiseLineSpriteTemplate, ANIM_ATTACKER, 2, 24, 0, 2 + createsprite gRoarNoiseLineSpriteTemplate, ANIM_ATTACKER, 2, 24, 8, 1 delay 15 - createsprite gUnknown_085CE7D4, ANIM_ATTACKER, 2, 24, -8, 0 - createsprite gUnknown_085CE7D4, ANIM_ATTACKER, 2, 24, 0, 2 - createsprite gUnknown_085CE7D4, ANIM_ATTACKER, 2, 24, 8, 1 + createsprite gRoarNoiseLineSpriteTemplate, ANIM_ATTACKER, 2, 24, -8, 0 + createsprite gRoarNoiseLineSpriteTemplate, ANIM_ATTACKER, 2, 24, 0, 2 + createsprite gRoarNoiseLineSpriteTemplate, ANIM_ATTACKER, 2, 24, 8, 1 return Move_GROWL: @@ -8312,38 +8312,38 @@ MorningSun1: Move_SWEET_SCENT: loadspritegfx ANIM_TAG_PINK_PETAL playsewithpan SE_W230, SOUND_PAN_ATTACKER - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 100, 0, 100 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 100, 0, 100 delay 25 setpan 0 call SweetScentEffect - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 55, 0 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 55, 0 setpan SOUND_PAN_TARGET createvisualtask sub_8115A04, 2, 20, 1, 5, 5, 13, RGB(31, 21, 21) call SweetScentEffect waitforvisualfinish end SweetScentEffect: - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 70, 1, 64 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 70, 1, 64 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 60, 0, 64 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 60, 0, 64 delay 5 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 80, 1, 64 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 80, 1, 64 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 58, 0, 120 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 58, 0, 120 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 100, 0, 120 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 100, 0, 120 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 90, 0, 64 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 90, 0, 64 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 48, 0, 64 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 48, 0, 64 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 95, 1, 80 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 95, 1, 80 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 100, 0, 120 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 100, 0, 120 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 75, 1, 64 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 75, 1, 64 delay 2 - createsprite gUnknown_085CE544, ANIM_ATTACKER, 2, 85, 0, 120 + createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 85, 0, 120 delay 2 return @@ -8404,32 +8404,32 @@ Move_FLATTER: createvisualtask sub_815ABEC, 2 createvisualtask sub_8116960, 2, 248, 3, 0, 10, 0 waitforvisualfinish - createsprite gUnknown_085CE5C0, ANIM_TARGET, 2, 0, -8, 80 + createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80 delay 0 createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 5, 2, ANIM_TARGET delay 10 createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 5, 2, ANIM_TARGET delay 0 createvisualtask sub_8159210, 5, 229, SOUND_PAN_ATTACKER - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 - call Flatter1 + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti + call CreateFlatterConfetti delay 5 createvisualtask sub_8159210, 5, 229, SOUND_PAN_TARGET waitforvisualfinish @@ -8437,9 +8437,9 @@ Move_FLATTER: waitforvisualfinish createvisualtask sub_815AC8C, 2 end -Flatter1: - createsprite gUnknown_085CE5A8, ANIM_ATTACKER, 40, 0 - createsprite gUnknown_085CE5A8, ANIM_ATTACKER, 40, 1 +CreateFlatterConfetti: + createsprite gFlatterConfettiSpriteTemplate, ANIM_ATTACKER, 40, ANIM_ATTACKER + createsprite gFlatterConfettiSpriteTemplate, ANIM_ATTACKER, 40, ANIM_TARGET return Move_ROLE_PLAY: @@ -8449,7 +8449,7 @@ Move_ROLE_PLAY: waitforvisualfinish playsewithpan SE_W161, SOUND_PAN_ATTACKER waitplaysewithpan SE_W197, SOUND_PAN_ATTACKER, 30 - createvisualtask sub_815CED8, 2 + createvisualtask AnimTask_RolePlaySilhouette, 2 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER createvisualtask sub_8116620, 10, 4, 2, 16, 0, RGB_WHITE @@ -10450,31 +10450,31 @@ General_SmokeballEscape: setalpha 12, 4 delay 0 playsewithpan SE_BOWA2, SOUND_PAN_TARGET - createsprite gUnknown_085CE734, ANIM_TARGET, 0, 0, 32, 28, 30 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_TARGET, 0, 0, 32, 28, 30 delay 4 playsewithpan SE_BOWA2, SOUND_PAN_TARGET - createsprite gUnknown_085CE734, ANIM_ATTACKER, 127, 2, 12, 20, 30 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 127, 2, 12, 20, 30 delay 12 playsewithpan SE_BOWA2, SOUND_PAN_TARGET - createsprite gUnknown_085CE734, ANIM_ATTACKER, 126, 2, -28, 4, 30 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 126, 2, -28, 4, 30 delay 12 playsewithpan SE_BOWA2, SOUND_PAN_TARGET - createsprite gUnknown_085CE734, ANIM_ATTACKER, 124, 2, 14, -20, 30 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 124, 2, 14, -20, 30 delay 4 playsewithpan SE_BOWA2, SOUND_PAN_TARGET createvisualtask sub_81136E8, 2, 2 - createsprite gUnknown_085CE734, ANIM_ATTACKER, 123, 3, 4, 4, 30 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 123, 3, 4, 4, 30 delay 14 playsewithpan SE_BOWA2, SOUND_PAN_TARGET - createsprite gUnknown_085CE734, ANIM_ATTACKER, 122, 3, -14, 18, 46 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 122, 3, -14, 18, 46 delay 0 - createsprite gUnknown_085CE734, ANIM_ATTACKER, 121, 3, 14, -14, 46 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 121, 3, 14, -14, 46 delay 0 - createsprite gUnknown_085CE734, ANIM_ATTACKER, 120, 3, -12, -10, 46 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 120, 3, -12, -10, 46 delay 0 - createsprite gUnknown_085CE734, ANIM_ATTACKER, 119, 3, 14, 14, 46 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 119, 3, 14, 14, 46 delay 0 - createsprite gUnknown_085CE734, ANIM_ATTACKER, 118, 3, 0, 0, 46 + createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 118, 3, 0, 0, 46 waitforvisualfinish clearmonbg ANIM_ATTACKER invisible ANIM_ATTACKER diff --git a/graphics/battle_anims/sprites/effect.pal b/graphics/battle_anims/sprites/effect.pal deleted file mode 100644 index 3dcf4cff6..000000000 --- a/graphics/battle_anims/sprites/effect.pal +++ /dev/null @@ -1,27 +0,0 @@ -JASC-PAL -0100 -24 -230 205 8 -230 172 41 -222 148 65 -222 115 90 -213 82 123 -213 57 148 -205 24 172 -205 0 205 -205 0 189 -205 0 164 -205 0 131 -205 0 106 -213 0 82 -213 0 49 -213 0 24 -222 0 0 -222 8 0 -222 41 0 -222 74 0 -222 98 0 -230 131 0 -230 156 0 -230 189 0 -238 222 0 diff --git a/include/battle_anim.h b/include/battle_anim.h index 4723fb0d5..713bf6fce 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -147,8 +147,7 @@ void sub_80A78AC(struct Sprite *sprite); void sub_80A6BFC(struct UnknownAnimStruct2 *unk, u8 unused); u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10); void sub_80A749C(struct Sprite *sprite); -void sub_80A6814(u8 taskId); -void sub_80A6DEC(struct Sprite *sprite); +void DestroyAnimVisualTaskAndDisableBlend(u8 taskId); void DestroySpriteAndFreeResources_(struct Sprite *sprite); void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); diff --git a/include/graphics.h b/include/graphics.h index 8a54ba536..ad2b39260 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4630,9 +4630,9 @@ extern const u32 gBattleAnimSpritePalette_241[]; extern const u32 gBattleAnimSpritePalette_242[]; extern const u32 gBattleAnimSpritePalette_243[]; extern const u32 gBattleAnimSpritePalette_244[]; -extern const u32 gUnknown_08C2DC68[]; -extern const u32 gUnknown_08C2DDA4[]; -extern const u32 gUnknown_08C2DDC4[]; +extern const u32 gCureBubblesGfx[]; +extern const u32 gCureBubblesPal[]; +extern const u32 gCureBubblesTilemap[]; extern const u32 gBattleAnimSpritePalette_245[]; extern const u32 gBattleAnimSpritePalette_248[]; extern const u32 gBattleAnimSpritePalette_249[]; diff --git a/src/battle_anim_80A5C6C.c b/src/battle_anim_80A5C6C.c index 92815b56c..0800e67a0 100644 --- a/src/battle_anim_80A5C6C.c +++ b/src/battle_anim_80A5C6C.c @@ -703,7 +703,7 @@ void sub_80A67F4(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_80A6814(u8 taskId) +void DestroyAnimVisualTaskAndDisableBlend(u8 taskId) { SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); diff --git a/src/battle_anim_8170478.c b/src/battle_anim_8170478.c index 5b7a4ec1c..7d899fb09 100755 --- a/src/battle_anim_8170478.c +++ b/src/battle_anim_8170478.c @@ -428,7 +428,7 @@ void unref_sub_8170478(u8 taskId) sub_80A6B30(&unknownStruct); sub_80A6D48(unknownStruct.bgId, gUnknown_08C2EA9C); sub_80A6CC0(unknownStruct.bgId, gUnknown_08C2EA50, unknownStruct.tilesOffset); - LoadCompressedPalette(gUnknown_08C2DDA4, unknownStruct.unk8 << 4, 32); + LoadCompressedPalette(gCureBubblesPal, unknownStruct.unk8 << 4, 32); gBattle_BG1_X = -gSprites[spriteId3].pos1.x + 32; gBattle_BG1_Y = -gSprites[spriteId3].pos1.y - 32; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 018cc48e4..a8b7d6d6a 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -49,19 +49,19 @@ void sub_815B49C(struct Sprite *); void AnimMiniTwinklingStar(struct Sprite *); void sub_815B70C(struct Sprite *); void sub_815BE04(struct Sprite *); -void sub_815C400(struct Sprite *); -void sub_815C6B0(struct Sprite *); -void sub_815C95C(struct Sprite *); -void sub_815CB88(struct Sprite *); -void sub_815CC94(struct Sprite *); -void sub_815CDB4(struct Sprite *); -void sub_815D7B4(struct Sprite *); -void sub_815D870(struct Sprite *); +void AnimWeakFrustrationAngerMark(struct Sprite *); +void AnimSweetScentPetal(struct Sprite *); +void AnimPainSplitProjectile(struct Sprite *); +void AnimFlatterConfetti(struct Sprite *); +void AnimFlatterSpotlight(struct Sprite *); +void AnimReversalOrb(struct Sprite *); +void AnimYawnCloud(struct Sprite *); +void AnimSmokeBallEscapeCloud(struct Sprite *); void sub_815DEBC(struct Sprite *); -void sub_815E01C(struct Sprite *); -void sub_815E404(struct Sprite *); -void sub_815E444(struct Sprite *); -void sub_815E6D8(struct Sprite *); +void AnimRoarNoiseLine(struct Sprite *); +void AnimGlareEyeDot(struct Sprite *); +void AnimAssistPawprint(struct Sprite *); +void AnimSmellingSaltsHand(struct Sprite *); void AnimSmellingSaltExclamation(struct Sprite *); void AnimHelpingHandClap(struct Sprite *); void AnimForesightMagnifyingGlass(struct Sprite *); @@ -94,25 +94,26 @@ static void sub_815B5D0(struct Sprite *); static void sub_815BF44(struct Sprite *); static void sub_815BFF4(struct Sprite *); static void sub_815C050(struct Sprite *); -static void sub_815C548(u8); -static void sub_815C700(struct Sprite *); -static void sub_815C7C4(u8); -static void sub_815CC34(struct Sprite *); -static void sub_815CD0C(struct Sprite *); -static void sub_815CDFC(struct Sprite *); -static void sub_815D1BC(u8); -static void sub_815D398(u8); -static void sub_815D694(u8); -static void sub_815D804(struct Sprite *); -static void sub_815DD48(u8); -static void sub_815DDE0(u8, bool8); -static void sub_815DF64(u8); -static void sub_815E0DC(struct Sprite *); -static void sub_815E20C(u8); -static void sub_815E34C(s16, s16, s16, s16, u8, u8, s16 *, s16 *); -static void sub_815E5CC(u8); +static void AnimTask_RockMonBackAndForthStep(u8); +static void AnimSweetScentPetalStep(struct Sprite *); +static void AnimTask_FlailMovementStep(u8); +static void AnimFlatterConfettiStep(struct Sprite *); +static void AnimFlatterSpotlightStep(struct Sprite *); +static void AnimReversalOrbStep(struct Sprite *); +static void AnimTask_RolePlaySilhouetteStep1(u8); +static void AnimTask_RolePlaySilhouetteStep2(u8); +static void AnimTask_AcidArmorStep(u8); +static void AnimTask_DeepInhaleStep(u8); +static void AnimYawnCloudStep(struct Sprite *); +static void AnimTask_SquishAndSweatDropletsStep(u8); +static void CreateSweatDroplets(u8, bool8); +static void AnimTask_FacadeColorBlendStep(u8); +static void AnimRoarNoiseLineStep(struct Sprite *); +static void AnimTask_GlareEyeDotsStep(u8); +static void GetGlareEyeDotCoords(s16, s16, s16, s16, u8, u8, s16 *, s16 *); +static void AnimTask_BarrageBallStep(u8); static void sub_815E784(struct Sprite *); -static void AnimTask_SmellingSaltSquishStep(u8); +static void AnimTask_SmellingSaltsSquishStep(u8); static void AnimSmellingSaltExclamationStep(struct Sprite *); static void AnimHelpingHandClapStep(struct Sprite *); static void AnimTask_HelpingHandAttackerMovementStep(u8); @@ -653,7 +654,7 @@ const u8 gUnknown_085CE4A8[] = 50, }; -const union AffineAnimCmd gUnknown_085CE4B0[] = +const union AffineAnimCmd gStrongFrustrationAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0, -15, 0, 7), AFFINEANIMCMD_FRAME(0, 15, 0, 7), @@ -661,7 +662,7 @@ const union AffineAnimCmd gUnknown_085CE4B0[] = AFFINEANIMCMD_END, }; -const struct SpriteTemplate gUnknown_085CE4D0 = +const struct SpriteTemplate gWeakFrustrationAngerMarkSpriteTemplate = { .tileTag = ANIM_TAG_ANGER, .paletteTag = ANIM_TAG_ANGER, @@ -669,10 +670,10 @@ const struct SpriteTemplate gUnknown_085CE4D0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815C400, + .callback = AnimWeakFrustrationAngerMark, }; -const union AnimCmd gUnknown_085CE4E8[] = +const union AnimCmd gSweetScentPetalAnimCmds1[] = { ANIMCMD_FRAME(0, 8), ANIMCMD_FRAME(1, 8), @@ -685,7 +686,7 @@ const union AnimCmd gUnknown_085CE4E8[] = ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_085CE50C[] = +const union AnimCmd gSweetScentPetalAnimCmds2[] = { ANIMCMD_FRAME(0, 8, .hFlip = TRUE), ANIMCMD_FRAME(1, 8, .hFlip = TRUE), @@ -698,33 +699,33 @@ const union AnimCmd gUnknown_085CE50C[] = ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_085CE530[] = +const union AnimCmd gSweetScentPetalAnimCmds3[] = { ANIMCMD_FRAME(0, 8), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085CE538[] = +const union AnimCmd *const gSweetScentPetalAnimCmdTable[] = { - gUnknown_085CE4E8, - gUnknown_085CE50C, - gUnknown_085CE530, + gSweetScentPetalAnimCmds1, + gSweetScentPetalAnimCmds2, + gSweetScentPetalAnimCmds3, }; -const struct SpriteTemplate gUnknown_085CE544 = +const struct SpriteTemplate gSweetScentPetalSpriteTemplate = { .tileTag = ANIM_TAG_PINK_PETAL, .paletteTag = ANIM_TAG_PINK_PETAL, .oam = &gUnknown_08524904, - .anims = gUnknown_085CE538, + .anims = gSweetScentPetalAnimCmdTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815C6B0, + .callback = AnimSweetScentPetal, }; const u16 gUnknown_085CE55C[] = INCBIN_U16("graphics/unknown/unknown_85CE55C.gbapal"); -const union AnimCmd gUnknown_085CE57C[] = +const union AnimCmd gPainSplitAnimCmds[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(4, 9), @@ -732,23 +733,23 @@ const union AnimCmd gUnknown_085CE57C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085CE58C[] = +const union AnimCmd *const gPainSplitAnimCmdTable[] = { - gUnknown_085CE57C, + gPainSplitAnimCmds, }; -const struct SpriteTemplate gUnknown_085CE590 = +const struct SpriteTemplate gPainSplitProjectileSpriteTemplate = { .tileTag = ANIM_TAG_PAIN_SPLIT, .paletteTag = ANIM_TAG_PAIN_SPLIT, .oam = &gUnknown_0852490C, - .anims = gUnknown_085CE58C, + .anims = gPainSplitAnimCmdTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815C95C, + .callback = AnimPainSplitProjectile, }; -const struct SpriteTemplate gUnknown_085CE5A8 = +const struct SpriteTemplate gFlatterConfettiSpriteTemplate = { .tileTag = ANIM_TAG_CONFETTI, .paletteTag = ANIM_TAG_CONFETTI, @@ -756,10 +757,10 @@ const struct SpriteTemplate gUnknown_085CE5A8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815CB88, + .callback = AnimFlatterConfetti, }; -const struct SpriteTemplate gUnknown_085CE5C0 = +const struct SpriteTemplate gFlatterSpotlightSpriteTemplate = { .tileTag = ANIM_TAG_SPOTLIGHT, .paletteTag = ANIM_TAG_SPOTLIGHT, @@ -767,10 +768,10 @@ const struct SpriteTemplate gUnknown_085CE5C0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_085CE224, - .callback = sub_815CC94, + .callback = AnimFlatterSpotlight, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85CE5D8 = +const struct SpriteTemplate gReversalOrbSpriteTemplate = { .tileTag = ANIM_TAG_BLUE_ORB, .paletteTag = ANIM_TAG_BLUE_ORB, @@ -778,10 +779,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_85CE5D8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815CDB4, + .callback = AnimReversalOrb, }; -const union AffineAnimCmd gUnknown_085CE5F0[] = +const union AffineAnimCmd gDeepInhaleAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(16, 0, 0, 4), AFFINEANIMCMD_FRAME(0, -3, 0, 16), @@ -791,7 +792,7 @@ const union AffineAnimCmd gUnknown_085CE5F0[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085CE620[] = +const union AffineAnimCmd gYawnCloudAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), AFFINEANIMCMD_FRAME(-8, -8, 0, 8), @@ -799,7 +800,7 @@ const union AffineAnimCmd gUnknown_085CE620[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_085CE640[] = +const union AffineAnimCmd gYawnCloudAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0xC0, 0xC0, 0, 0), AFFINEANIMCMD_FRAME(8, 8, 0, 8), @@ -807,7 +808,7 @@ const union AffineAnimCmd gUnknown_085CE640[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_085CE660[] = +const union AffineAnimCmd gYawnCloudAffineAnimCmds3[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(8, 8, 0, 8), @@ -815,25 +816,25 @@ const union AffineAnimCmd gUnknown_085CE660[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_085CE680[] = +const union AffineAnimCmd *const gYawnCloudAffineAnimTable[] = { - gUnknown_085CE620, - gUnknown_085CE640, - gUnknown_085CE660, + gYawnCloudAffineAnimCmds1, + gYawnCloudAffineAnimCmds2, + gYawnCloudAffineAnimCmds3, }; -const struct SpriteTemplate gUnknown_085CE68C = +const struct SpriteTemplate gYawnCloudSpriteTemplate = { .tileTag = ANIM_TAG_PINK_CLOUD, .paletteTag = ANIM_TAG_PINK_CLOUD, .oam = &gUnknown_08524974, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085CE680, - .callback = sub_815D7B4, + .affineAnims = gYawnCloudAffineAnimTable, + .callback = AnimYawnCloud, }; -const union AffineAnimCmd gUnknown_085CE6A4[] = +const union AffineAnimCmd gSmokeBallEscapeCloudAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), AFFINEANIMCMD_FRAME(-4, -6, 0, 16), @@ -841,7 +842,7 @@ const union AffineAnimCmd gUnknown_085CE6A4[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_085CE6C4[] = +const union AffineAnimCmd gSmokeBallEscapeCloudAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0xC0, 0xC0, 0, 0), AFFINEANIMCMD_FRAME(4, 6, 0, 16), @@ -849,7 +850,7 @@ const union AffineAnimCmd gUnknown_085CE6C4[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_085CE6E4[] = +const union AffineAnimCmd gSmokeBallEscapeCloudAffineAnimCmds3[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(4, 6, 0, 16), @@ -857,7 +858,7 @@ const union AffineAnimCmd gUnknown_085CE6E4[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_085CE704[] = +const union AffineAnimCmd gSmokeBallEscapeCloudAffineAnimCmds4[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(8, 10, 0, 30), @@ -865,26 +866,26 @@ const union AffineAnimCmd gUnknown_085CE704[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_085CE724[] = +const union AffineAnimCmd *const gSmokeBallEscapeCloudAffineAnimTable[] = { - gUnknown_085CE6A4, - gUnknown_085CE6C4, - gUnknown_085CE6E4, - gUnknown_085CE704, + gSmokeBallEscapeCloudAffineAnimCmds1, + gSmokeBallEscapeCloudAffineAnimCmds2, + gSmokeBallEscapeCloudAffineAnimCmds3, + gSmokeBallEscapeCloudAffineAnimCmds4, }; -const struct SpriteTemplate gUnknown_085CE734 = +const struct SpriteTemplate gSmokeBallEscapeCloudSpriteTemplate = { .tileTag = ANIM_TAG_PINK_CLOUD, .paletteTag = ANIM_TAG_PINK_CLOUD, .oam = &gUnknown_085249D4, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085CE724, - .callback = sub_815D870, + .affineAnims = gSmokeBallEscapeCloudAffineAnimTable, + .callback = AnimSmokeBallEscapeCloud, }; -const union AffineAnimCmd gUnknown_085CE74C[] = +const union AffineAnimCmd gFacadeSquishAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(-16, 16, 0, 6), AFFINEANIMCMD_FRAME(16, -16, 0, 12), @@ -892,7 +893,7 @@ const union AffineAnimCmd gUnknown_085CE74C[] = AFFINEANIMCMD_END, }; -const struct SpriteTemplate gUnknown_085CE76C = +const struct SpriteTemplate gFacadeSweatDrop = { .tileTag = ANIM_TAG_SWEAT_DROP, .paletteTag = ANIM_TAG_SWEAT_DROP, @@ -903,40 +904,65 @@ const struct SpriteTemplate gUnknown_085CE76C = .callback = sub_815DEBC, }; -const u16 gUnknown_085CE784[] = INCBIN_U16("graphics/battle_anims/sprites/effect.gbapal"); +const u16 gFacadeBlendColors[] = { + RGB(28, 25, 1), + RGB(28, 21, 5), + RGB(27, 18, 8), + RGB(27, 14, 11), + RGB(26, 10, 15), + RGB(26, 7, 18), + RGB(25, 3, 21), + RGB(25, 0, 25), + RGB(25, 0, 23), + RGB(25, 0, 20), + RGB(25, 0, 16), + RGB(25, 0, 13), + RGB(26, 0, 10), + RGB(26, 0, 6), + RGB(26, 0, 3), + RGB(27, 0, 0), + RGB(27, 1, 0), + RGB(27, 5, 0), + RGB(27, 9, 0), + RGB(27, 12, 0), + RGB(28, 16, 0), + RGB(28, 19, 0), + RGB(28, 23, 0), + RGB(29, 27, 0), +}; -const union AnimCmd gUnknown_085CE7B4[] = +const union AnimCmd gRoarNoiseLineAnimCmds1[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(16, 3), ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_085CE7C0[] = +const union AnimCmd gRoarNoiseLineAnimCmds2[] = { ANIMCMD_FRAME(32, 3), ANIMCMD_FRAME(48, 3), ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085CE7CC[] = +const union AnimCmd *const gRoarNoiseLineAnimTable[] = { - gUnknown_085CE7B4, - gUnknown_085CE7C0, + gRoarNoiseLineAnimCmds1, + gRoarNoiseLineAnimCmds2, }; -const struct SpriteTemplate gUnknown_085CE7D4 = +const struct SpriteTemplate gRoarNoiseLineSpriteTemplate = { .tileTag = ANIM_TAG_NOISE_LINE, .paletteTag = ANIM_TAG_NOISE_LINE, .oam = &gUnknown_08524914, - .anims = gUnknown_085CE7CC, + .anims = gRoarNoiseLineAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815E01C, + .callback = AnimRoarNoiseLine, }; -const struct SpriteTemplate gUnknown_085CE7EC = +const struct SpriteTemplate gGlareEyeDotSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_RED_EYE, .paletteTag = ANIM_TAG_SMALL_RED_EYE, @@ -944,10 +970,10 @@ const struct SpriteTemplate gUnknown_085CE7EC = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815E404, + .callback = AnimGlareEyeDot, }; -const struct SpriteTemplate gUnknown_085CE804 = +const struct SpriteTemplate gAssistPawprintSpriteTemplate = { .tileTag = ANIM_TAG_PAW_PRINT, .paletteTag = ANIM_TAG_PAW_PRINT, @@ -955,40 +981,40 @@ const struct SpriteTemplate gUnknown_085CE804 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815E444, + .callback = AnimAssistPawprint, }; -const union AffineAnimCmd gUnknown_085CE81C[] = +const union AffineAnimCmd gBarrageBallAffineAnimCmds1[] = { AFFINEANIMCMD_FRAME(0, 0, -4, 24), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085CE82C[] = +const union AffineAnimCmd gBarrageBallAffineAnimCmds2[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, -64, 0), AFFINEANIMCMD_FRAME(0, 0, 4, 24), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085CE844[] = +const union AffineAnimCmd *const gBarrageBallAffineAnimTable[] = { - gUnknown_085CE81C, - gUnknown_085CE82C, + gBarrageBallAffineAnimCmds1, + gBarrageBallAffineAnimCmds2, }; -const struct SpriteTemplate gUnknown_085CE84C = +const struct SpriteTemplate gBarrageBallSpriteTemplate = { .tileTag = ANIM_TAG_RED_BALL, .paletteTag = ANIM_TAG_RED_BALL, .oam = &gUnknown_08524974, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085CE844, + .affineAnims = gBarrageBallAffineAnimTable, .callback = SpriteCallbackDummy, }; -const struct SpriteTemplate gUnknown_085CE864 = +const struct SpriteTemplate gSmellingSaltsHandSpriteTemplate = { .tileTag = ANIM_TAG_TAG_HAND, .paletteTag = ANIM_TAG_TAG_HAND, @@ -996,10 +1022,10 @@ const struct SpriteTemplate gUnknown_085CE864 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_815E6D8, + .callback = AnimSmellingSaltsHand, }; -const union AffineAnimCmd gSmellingSaltSquishAffineAnimCmds[] = +const union AffineAnimCmd gSmellingSaltsSquishAffineAnimCmds[] = { AFFINEANIMCMD_FRAME(0, -16, 0, 6), AFFINEANIMCMD_FRAME(0, 16, 0, 6), @@ -2643,11 +2669,13 @@ void sub_815C0A4(u8 taskId) } } -void sub_815C3A8(u8 taskId) +// Briefly vertically grows and shrinks the attacking mon's sprite. +// No args. +void AnimTask_StrongFrustrationGrowAndShrink(u8 taskId) { if (gTasks[taskId].data[0] == 0) { - PrepareAffineAnimInTaskData(&gTasks[taskId], GetAnimBattlerSpriteId(0), gUnknown_085CE4B0); + PrepareAffineAnimInTaskData(&gTasks[taskId], GetAnimBattlerSpriteId(ANIM_ATTACKER), gStrongFrustrationAffineAnimCmds); gTasks[taskId].data[0]++; } else @@ -2657,7 +2685,10 @@ void sub_815C3A8(u8 taskId) } } -void sub_815C400(struct Sprite *sprite) +// Animates an anger mark near the mon's head. +// arg 0: initial x pixel offset +// arg 1: initial y pixel offset +void AnimWeakFrustrationAngerMark(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -2680,7 +2711,11 @@ void sub_815C400(struct Sprite *sprite) } } -void sub_815C478(u8 taskId) +// Rocks the mon back and forth. This is done on a pivot so it is done via rotation. +// arg 0: which battler +// arg 1: number of rocks +// arg 2: rotation speed increase +void AnimTask_RockMonBackAndForth(u8 taskId) { u8 side; struct Task *task = &gTasks[taskId]; @@ -2705,7 +2740,7 @@ void sub_815C478(u8 taskId) task->data[6] = gBattleAnimArgs[1] - 1; task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); - if (!gBattleAnimArgs[0]) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) side = GetBattlerSide(gBattleAnimAttacker); else side = GetBattlerSide(gBattleAnimTarget); @@ -2717,10 +2752,10 @@ void sub_815C478(u8 taskId) } PrepareBattlerSpriteForRotScale(task->data[15], ST_OAM_OBJ_NORMAL); - task->func = sub_815C548; + task->func = AnimTask_RockMonBackAndForthStep; } -static void sub_815C548(u8 taskId) +static void AnimTask_RockMonBackAndForthStep(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -2774,7 +2809,11 @@ static void sub_815C548(u8 taskId) } } -void sub_815C6B0(struct Sprite *sprite) +// Floats a petal across the screen towards the target mon's side. +// arg 0: initial y pixel offset +// arg 1: sprite anim num +// arg 2: unused +void AnimSweetScentPetal(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { @@ -2789,10 +2828,10 @@ void sub_815C6B0(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[2]; StartSpriteAnim(sprite, gBattleAnimArgs[1]); - sprite->callback = sub_815C700; + sprite->callback = AnimSweetScentPetalStep; } -static void sub_815C700(struct Sprite *sprite) +static void AnimSweetScentPetalStep(struct Sprite *sprite) { sprite->data[0] += 3; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) @@ -2817,7 +2856,9 @@ static void sub_815C700(struct Sprite *sprite) } } -void sub_815C770(u8 taskId) +// Moves the mon sprite in a flailing back-and-forth motion. +// arg 0: which battler +void AnimTask_FlailMovement(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -2831,10 +2872,10 @@ void sub_815C770(u8 taskId) task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareBattlerSpriteForRotScale(task->data[15], ST_OAM_OBJ_NORMAL); - task->func = sub_815C7C4; + task->func = AnimTask_FlailMovementStep; } -static void sub_815C7C4(u8 taskId) +static void AnimTask_FlailMovementStep(u8 taskId) { int temp; struct Task *task = &gTasks[taskId]; @@ -2905,14 +2946,18 @@ static void sub_815C7C4(u8 taskId) } } -void sub_815C95C(struct Sprite *sprite) +// Makes a spark-like projectile fall on top of the mon. +// arg 0: initial x pixel offset +// arg 1: initial y pixel offset +// arg 2: which battler +void AnimPainSplitProjectile(struct Sprite *sprite) { if (!sprite->data[0]) { - if (!gBattleAnimArgs[2]) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) { - sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); } sprite->pos1.x += gBattleAnimArgs[0]; @@ -2939,13 +2984,16 @@ void sub_815C95C(struct Sprite *sprite) } } -void sub_815CA20(u8 taskId) +// Performs one of several affine transformations on the mon sprite. +// arg 0: which battler +// arg 1: which transformation +void AnimTask_PainSplitMovement(u8 taskId) { u8 spriteId; if (gTasks[taskId].data[0] == 0) { - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) gTasks[taskId].data[11] = gBattleAnimAttacker; else gTasks[taskId].data[11] = gBattleAnimTarget; @@ -2996,7 +3044,9 @@ void sub_815CA20(u8 taskId) } } -void sub_815CB88(struct Sprite *sprite) +// Move a piece of confetti in a slightly-random speed across the screen. +// arg 0: which battler the confetti starts from +void AnimFlatterConfetti(struct Sprite *sprite) { u8 tileOffset; int rand1; @@ -3018,16 +3068,16 @@ void sub_815CB88(struct Sprite *sprite) sprite->data[1] = 0x480 - rand2; sprite->data[2] = gBattleAnimArgs[0]; - if (sprite->data[2] == 0) + if (sprite->data[2] == ANIM_ATTACKER) sprite->pos1.x = -8; else sprite->pos1.x = 248; sprite->pos1.y = 104; - sprite->callback = sub_815CC34; + sprite->callback = AnimFlatterConfettiStep; } -static void sub_815CC34(struct Sprite *sprite) +static void AnimFlatterConfettiStep(struct Sprite *sprite) { if (sprite->data[2] == 0) { @@ -3049,7 +3099,11 @@ static void sub_815CC34(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_815CC94(struct Sprite *sprite) +// Uses a spotlight sprite as a light mask to illuminate the target mon. The spotlight grows and shrinks. +// arg 0: initial x pixel offset +// arg 1: initial y pixel offset +// arg 2: duration of fully-opened spotlight +void AnimFlatterSpotlight(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR | WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ); SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJWIN_ON); @@ -3062,10 +3116,10 @@ void sub_815CC94(struct Sprite *sprite) InitSpritePosToAnimTarget(sprite, FALSE); sprite->oam.objMode = ST_OAM_OBJ_WINDOW; sprite->invisible = 1; - sprite->callback = sub_815CD0C; + sprite->callback = AnimFlatterSpotlightStep; } -static void sub_815CD0C(struct Sprite *sprite) +static void AnimFlatterSpotlightStep(struct Sprite *sprite) { switch (sprite->data[1]) { @@ -3090,23 +3144,26 @@ static void sub_815CD0C(struct Sprite *sprite) break; case 3: SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR | WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR); - SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) ^ DISPCNT_OBJWIN_ON); + SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) ^ DISPCNT_OBJWIN_ON); DestroyAnimSprite(sprite); break; } } -void sub_815CDB4(struct Sprite *sprite) +// Spins an orb around the attacking mon, while its path radius grows and shrinks. +// arg 0: duration +// arg 1: initial wave offset +void AnimReversalOrb(struct Sprite *sprite) { - sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = gBattleAnimArgs[1]; - sprite->callback = sub_815CDFC; + sprite->callback = AnimReversalOrbStep; sprite->callback(sprite); } -static void sub_815CDFC(struct Sprite *sprite) +static void AnimReversalOrbStep(struct Sprite *sprite) { sprite->pos2.x = Sin(sprite->data[1], sprite->data[2] >> 8); sprite->pos2.y = Cos(sprite->data[1], sprite->data[3] >> 8); @@ -3138,9 +3195,8 @@ static void sub_815CDFC(struct Sprite *sprite) } } -extern void sub_815D160(u8); - -void sub_815CED8(u8 taskId) +// Copies the target mon's sprite, and makes a white silhouette that shrinks away. +void AnimTask_RolePlaySilhouette(u8 taskId) { u8 isBackPic; u32 personality; @@ -3211,16 +3267,16 @@ void sub_815CED8(u8 taskId) gSprites[spriteId].oam.priority = priority; gSprites[spriteId].oam.objMode = ST_OAM_OBJ_BLEND; - FillPalette(RGB(31, 31, 31), (gSprites[spriteId].oam.paletteNum << 4) + 0x100, 32); + FillPalette(RGB_WHITE, (gSprites[spriteId].oam.paletteNum << 4) + 0x100, 32); gSprites[spriteId].oam.priority = priority; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[1], 16 - gTasks[taskId].data[1])); gTasks[taskId].data[0] = spriteId; - gTasks[taskId].func = sub_815D160; + gTasks[taskId].func = AnimTask_RolePlaySilhouetteStep1; } -void sub_815D160(u8 taskId) +static void AnimTask_RolePlaySilhouetteStep1(u8 taskId) { if (gTasks[taskId].data[10]++ > 1) { @@ -3231,12 +3287,12 @@ void sub_815D160(u8 taskId) { gTasks[taskId].data[10] = 256; gTasks[taskId].data[11] = 256; - gTasks[taskId].func = sub_815D1BC; + gTasks[taskId].func = AnimTask_RolePlaySilhouetteStep2; } } } -static void sub_815D1BC(u8 taskId) +static void AnimTask_RolePlaySilhouetteStep2(u8 taskId) { u8 spriteId = gTasks[taskId].data[0]; gTasks[taskId].data[10] -= 16; @@ -3247,11 +3303,13 @@ static void sub_815D1BC(u8 taskId) { sub_80A749C(&gSprites[spriteId]); DestroySpriteAndFreeResources_(&gSprites[spriteId]); - gTasks[taskId].func = sub_80A6814; + gTasks[taskId].func = DestroyAnimVisualTaskAndDisableBlend; } } -void sub_815D240(u8 taskId) +// Performs a wavy transformation on the mon's sprite, and fades out. +// arg 0: which battler +void AnimTask_AcidArmor(u8 taskId) { u8 battler; u16 bgX, bgY; @@ -3259,7 +3317,7 @@ void sub_815D240(u8 taskId) struct ScanlineEffectParams scanlineParams; struct Task *task = &gTasks[taskId]; - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) battler = gBattleAnimAttacker; else battler = gBattleAnimTarget; @@ -3310,10 +3368,10 @@ void sub_815D240(u8 taskId) scanlineParams.initState = 1; scanlineParams.unused9 = 0; ScanlineEffect_SetParams(scanlineParams); - task->func = sub_815D398; + task->func = AnimTask_AcidArmorStep; } -static void sub_815D398(u8 taskId) +static void AnimTask_AcidArmorStep(u8 taskId) { struct Task *task; s16 var1; @@ -3427,16 +3485,18 @@ static void sub_815D398(u8 taskId) } } -void sub_815D64C(u8 taskId) +// Runs an affine animation that makes it look like the mon is inhaling deeply. +// arg 0: which battler +void AnimTask_DeepInhale(u8 taskId) { struct Task *task = &gTasks[taskId]; task->data[0] = 0; task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); - PrepareAffineAnimInTaskData(&gTasks[taskId], task->data[15], gUnknown_085CE5F0); - task->func = sub_815D694; + PrepareAffineAnimInTaskData(&gTasks[taskId], task->data[15], gDeepInhaleAffineAnimCmds); + task->func = AnimTask_DeepInhaleStep; } -static void sub_815D694(u8 taskId) +static void AnimTask_DeepInhaleStep(u8 taskId) { u16 var0; @@ -3465,17 +3525,17 @@ static void sub_815D694(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_815D72C(struct Sprite *sprite, s16 b, s16 c, s16 d, s16 e, u16 f) +static void InitYawnCloudPosition(struct Sprite *sprite, s16 startX, s16 startY, s16 destX, s16 destY, u16 duration) { - sprite->pos1.x = b; - sprite->pos1.y = c; - sprite->data[4] = b << 4; - sprite->data[5] = c << 4; - sprite->data[6] = ((d - b) << 4) / f; - sprite->data[7] = ((e - c) << 4) / f; + sprite->pos1.x = startX; + sprite->pos1.y = startY; + sprite->data[4] = startX << 4; + sprite->data[5] = startY << 4; + sprite->data[6] = ((destX - startX) << 4) / duration; + sprite->data[7] = ((destY - startY) << 4) / duration; } -void sub_815D794(struct Sprite *sprite) +static void UpdateYawnCloudPosition(struct Sprite *sprite) { sprite->data[4] += sprite->data[6]; sprite->data[5] += sprite->data[7]; @@ -3483,25 +3543,27 @@ void sub_815D794(struct Sprite *sprite) sprite->pos1.y = sprite->data[5] >> 4; } -void sub_815D7B4(struct Sprite *sprite) +// Drifts a cloud in a wavy path towards the target mon. +// arg 0: which affine anim +void AnimYawnCloud(struct Sprite *sprite) { - s16 x = sprite->pos1.x; - s16 y = sprite->pos1.y; + s16 destX = sprite->pos1.x; + s16 destY = sprite->pos1.y; SetSpriteCoordsToAnimAttackerCoords(sprite); StartSpriteAffineAnim(sprite, gBattleAnimArgs[0]); - sub_815D72C(sprite, sprite->pos1.x, sprite->pos1.y, x, y, 64); + InitYawnCloudPosition(sprite, sprite->pos1.x, sprite->pos1.y, destX, destY, 64); sprite->data[0] = 0; - sprite->callback = sub_815D804; + sprite->callback = AnimYawnCloudStep; } -static void sub_815D804(struct Sprite *sprite) +static void AnimYawnCloudStep(struct Sprite *sprite) { int index; sprite->data[0]++; index = (sprite->data[0] * 8) & 0xFF; - sub_815D794(sprite); + UpdateYawnCloudPosition(sprite); sprite->pos2.y = Sin(index, 8); if (sprite->data[0] > 58) { @@ -3516,15 +3578,20 @@ static void sub_815D804(struct Sprite *sprite) } } -void sub_815D870(struct Sprite *sprite) +// Animates a cloud coming from the smoke ball. +// arg 0: ? +// arg 1: initial x pixel offset +// arg 2: initial y pixel offset +// arg 3: ? +void AnimSmokeBallEscapeCloud(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[3]; StartSpriteAffineAnim(sprite, gBattleAnimArgs[0]); if (GetBattlerSide(gBattleAnimTarget) != B_SIDE_PLAYER) gBattleAnimArgs[1] = -gBattleAnimArgs[1]; - sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[1]; - sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; sprite->callback = sub_810E2C8; } @@ -3665,7 +3732,10 @@ void sub_815DB90(u8 taskId) gTasks[taskId].func = sub_815DA20; } -void sub_815DCA4(u8 taskId) +// Squishes the mon vertically and emits sweat droplets a few times. +// arg 0: battler +// arg 1: num squishes +void AnimTask_SquishAndSweatDroplets(u8 taskId) { u8 battler; struct Task *task = &gTasks[taskId]; @@ -3677,31 +3747,32 @@ void sub_815DCA4(u8 taskId) task->data[1] = 0; task->data[2] = 0; task->data[3] = gBattleAnimArgs[1]; - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) battler = gBattleAnimAttacker; else battler = gBattleAnimTarget; - task->data[4] = GetBattlerSpriteCoord(battler, 0); - task->data[5] = GetBattlerSpriteCoord(battler, 1); + task->data[4] = GetBattlerSpriteCoord(battler, BATTLER_COORD_X); + task->data[5] = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y); task->data[6] = GetBattlerSpriteSubpriority(battler); task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); - PrepareAffineAnimInTaskData(task, task->data[15], gUnknown_085CE74C); - task->func = sub_815DD48; + PrepareAffineAnimInTaskData(task, task->data[15], gFacadeSquishAffineAnimCmds); + task->func = AnimTask_SquishAndSweatDropletsStep; } -static void sub_815DD48(u8 taskId) +static void AnimTask_SquishAndSweatDropletsStep(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: - if (++task->data[1] == 6) - sub_815DDE0(taskId, TRUE); + task->data[1]++; + if (task->data[1] == 6) + CreateSweatDroplets(taskId, TRUE); if (task->data[1] == 18) - sub_815DDE0(taskId, FALSE); + CreateSweatDroplets(taskId, FALSE); if (!RunAffineAnimFromTaskData(task)) { @@ -3712,7 +3783,7 @@ static void sub_815DD48(u8 taskId) else { task->data[1] = 0; - PrepareAffineAnimInTaskData(task, task->data[15], gUnknown_085CE74C); + PrepareAffineAnimInTaskData(task, task->data[15], gFacadeSquishAffineAnimCmds); } } break; @@ -3723,7 +3794,7 @@ static void sub_815DD48(u8 taskId) } } -static void sub_815DDE0(u8 taskId, bool8 arg1) +static void CreateSweatDroplets(u8 taskId, bool8 arg1) { u8 i; s8 xOffset, yOffset; @@ -3752,7 +3823,7 @@ static void sub_815DDE0(u8 taskId, bool8 arg1) for (i = 0; i < 4; i++) { - u8 spriteId = CreateSprite(&gUnknown_085CE76C, xCoords[i], yCoords[i & 1], task->data[6] - 5); + u8 spriteId = CreateSprite(&gFacadeSweatDrop, xCoords[i], yCoords[i & 1], task->data[6] - 5); if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[0] = 0; @@ -3776,7 +3847,10 @@ void sub_815DEBC(struct Sprite *sprite) } } -void sub_815DF0C(u8 taskId) +// Blends the mon sprite's color with a rotating set of colors. +// arg 0: battler +// arg 1: duration +void AnimTask_FacadeColorBlend(u8 taskId) { u8 spriteId; @@ -3784,14 +3858,14 @@ void sub_815DF0C(u8 taskId) gTasks[taskId].data[1] = gBattleAnimArgs[1]; spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); gTasks[taskId].data[2] = 0x100 + gSprites[spriteId].oam.paletteNum * 16; - gTasks[taskId].func = sub_815DF64; + gTasks[taskId].func = AnimTask_FacadeColorBlendStep; } -static void sub_815DF64(u8 taskId) +static void AnimTask_FacadeColorBlendStep(u8 taskId) { if (gTasks[taskId].data[1]) { - BlendPalette(gTasks[taskId].data[2], 16, 8, gUnknown_085CE784[gTasks[taskId].data[0]]); + BlendPalette(gTasks[taskId].data[2], 16, 8, gFacadeBlendColors[gTasks[taskId].data[0]]); if (++gTasks[taskId].data[0] > 23) gTasks[taskId].data[0] = 0; @@ -3815,33 +3889,37 @@ void sub_815DFCC(u8 taskId) 10, 2, 30, - gUnknown_08C2DC68, - gUnknown_08C2DDC4, - gUnknown_08C2DDA4); + gCureBubblesGfx, + gCureBubblesTilemap, + gCureBubblesPal); } -void sub_815E01C(struct Sprite *sprite) +// Moves a noise line from the mon. +// arg 0: initial x pixel offset +// arg 1: initial y pixel offset +// arg 2: which direction (0 = upward, 1 = downward, 2 = horizontal) +void AnimRoarNoiseLine(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; - sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[0]; - sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[1]; + sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X) + gBattleAnimArgs[0]; + sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y) + gBattleAnimArgs[1]; if (gBattleAnimArgs[2] == 0) { - sprite->data[0] = 640; - sprite->data[1] = -640; + sprite->data[0] = 0x280; + sprite->data[1] = -0x280; } else if (gBattleAnimArgs[2] == 1) { sprite->vFlip = 1; - sprite->data[0] = 640; - sprite->data[1] = 640; + sprite->data[0] = 0x280; + sprite->data[1] = 0x280; } else { StartSpriteAnim(sprite, 1); - sprite->data[0] = 640; + sprite->data[0] = 0x280; } if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -3850,10 +3928,10 @@ void sub_815E01C(struct Sprite *sprite) sprite->hFlip = 1; } - sprite->callback = sub_815E0DC; + sprite->callback = AnimRoarNoiseLineStep; } -static void sub_815E0DC(struct Sprite *sprite) +static void AnimRoarNoiseLineStep(struct Sprite *sprite) { sprite->data[6] += sprite->data[0]; sprite->data[7] += sprite->data[1]; @@ -3863,7 +3941,9 @@ static void sub_815E0DC(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_815E114(u8 taskId) +// Makes a series of dots in a trail from the attacker to the target. +// arg 0: unused +void AnimTask_GlareEyeDots(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -3881,17 +3961,17 @@ void sub_815E114(u8 taskId) } if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) - task->data[11] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; + task->data[11] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; else - task->data[11] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) - GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; + task->data[11] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) - GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; - task->data[12] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) - GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; - task->data[13] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - task->data[14] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); - task->func = sub_815E20C; + task->data[12] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) - GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; + task->data[13] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + task->data[14] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); + task->func = AnimTask_GlareEyeDotsStep; } -static void sub_815E20C(u8 taskId) +static void AnimTask_GlareEyeDotsStep(u8 taskId) { u8 i; s16 x, y; @@ -3903,7 +3983,7 @@ static void sub_815E20C(u8 taskId) if (++task->data[1] > 3) { task->data[1] = 0; - sub_815E34C( + GetGlareEyeDotCoords( task->data[11], task->data[12], task->data[13], @@ -3915,7 +3995,7 @@ static void sub_815E20C(u8 taskId) for (i = 0; i < 2; i++) { - u8 spriteId = CreateSprite(&gUnknown_085CE7EC, x, y, 35); + u8 spriteId = CreateSprite(&gGlareEyeDotSpriteTemplate, x, y, 35); if (spriteId != MAX_SPRITES) { if (task->data[7] == 0) @@ -3959,7 +4039,7 @@ static void sub_815E20C(u8 taskId) } } -static void sub_815E34C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4, u8 arg5, s16 *x, s16 *y) +static void GetGlareEyeDotCoords(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4, u8 arg5, s16 *x, s16 *y) { int x2; int y2; @@ -3985,7 +4065,7 @@ static void sub_815E34C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4, u8 arg5 *y = y2 >> 8; } -void sub_815E404(struct Sprite *sprite) +void AnimGlareEyeDot(struct Sprite *sprite) { if (++sprite->data[0] > 36) { @@ -3994,7 +4074,13 @@ void sub_815E404(struct Sprite *sprite) } } -void sub_815E444(struct Sprite *sprite) +// Moves a pawprint in a straight line. +// arg 0: initial x position +// arg 1: initial y position +// arg 2: destination x position +// arg 3: destination y position +// arg 4: duration +void AnimAssistPawprint(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = gBattleAnimArgs[1]; @@ -4005,15 +4091,17 @@ void sub_815E444(struct Sprite *sprite) sprite->callback = InitAndRunAnimFastLinearTranslation; } -void sub_815E47C(u8 taskId) +// Moves a ball in an arc twoards the target, and rotates the ball while arcing. +// No args. +void AnimTask_BarrageBall(u8 taskId) { struct Task *task = &gTasks[taskId]; - task->data[11] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); - task->data[12] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); - task->data[13] = GetBattlerSpriteCoord(gBattleAnimTarget, 2); - task->data[14] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_HEIGHT) / 4; - task->data[15] = CreateSprite(&gUnknown_085CE84C, task->data[11], task->data[12], GetBattlerSpriteSubpriority(gBattleAnimTarget) - 5); + task->data[11] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); + task->data[12] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); + task->data[13] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); + task->data[14] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_HEIGHT) / 4; + task->data[15] = CreateSprite(&gBarrageBallSpriteTemplate, task->data[11], task->data[12], GetBattlerSpriteSubpriority(gBattleAnimTarget) - 5); if (task->data[15] != MAX_SPRITES) { gSprites[task->data[15]].data[0] = 16; @@ -4024,7 +4112,7 @@ void sub_815E47C(u8 taskId) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) StartSpriteAffineAnim(&gSprites[task->data[15]], 1); - task->func = sub_815E5CC; + task->func = AnimTask_BarrageBallStep; } else { @@ -4032,7 +4120,7 @@ void sub_815E47C(u8 taskId) } } -static void sub_815E5CC(u8 taskId) +static void AnimTask_BarrageBallStep(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -4075,11 +4163,15 @@ static void sub_815E5CC(u8 taskId) } } -void sub_815E6D8(struct Sprite *sprite) +// Moves a hand back and forth in a squishing motion. +// arg 0: which battler +// arg 1: horizontal flip +// arg 2: num squishes +void AnimSmellingSaltsHand(struct Sprite *sprite) { u8 battler; - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) battler = gBattleAnimAttacker; else battler = gBattleAnimTarget; @@ -4150,7 +4242,7 @@ static void sub_815E784(struct Sprite *sprite) // Squishes the mon horizontally a few times. // arg 0: which mon // arg 1: number of squishes -void AnimTask_SmellingSaltSquish(u8 taskId) +void AnimTask_SmellingSaltsSquish(u8 taskId) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { @@ -4160,12 +4252,12 @@ void AnimTask_SmellingSaltSquish(u8 taskId) { gTasks[taskId].data[0] = gBattleAnimArgs[1]; gTasks[taskId].data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); - PrepareAffineAnimInTaskData(&gTasks[taskId], gTasks[taskId].data[15], gSmellingSaltSquishAffineAnimCmds); - gTasks[taskId].func = AnimTask_SmellingSaltSquishStep; + PrepareAffineAnimInTaskData(&gTasks[taskId], gTasks[taskId].data[15], gSmellingSaltsSquishAffineAnimCmds); + gTasks[taskId].func = AnimTask_SmellingSaltsSquishStep; } } -static void AnimTask_SmellingSaltSquishStep(u8 taskId) +static void AnimTask_SmellingSaltsSquishStep(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -4183,7 +4275,7 @@ static void AnimTask_SmellingSaltSquishStep(u8 taskId) gSprites[task->data[15]].pos2.x = 0; if (--task->data[0]) { - PrepareAffineAnimInTaskData(&gTasks[taskId], gTasks[taskId].data[15], gSmellingSaltSquishAffineAnimCmds); + PrepareAffineAnimInTaskData(&gTasks[taskId], gTasks[taskId].data[15], gSmellingSaltsSquishAffineAnimCmds); task->data[1] = 0; task->data[2] = 0; } diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index c9d9bb99c..3fb366d36 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -767,7 +767,8 @@ void sub_81177E4(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *arg8, const u32 *arg9, const u32 *palette) + +void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u8 *gfx, const u8 *tilemap, const u16 *palette) { u16 species; u8 spriteId, spriteId2; @@ -818,8 +819,8 @@ void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, spriteId2 = sub_80A89C8(battler2, gBattlerSpriteIds[battler2], species); sub_80A6B30(&unknownStruct); - sub_80A6D60(&unknownStruct, arg9, 0); - sub_80A6CC0(unknownStruct.bgId, arg8, unknownStruct.tilesOffset); + sub_80A6D60(&unknownStruct, tilemap, 0); + sub_80A6CC0(unknownStruct.bgId, gfx, unknownStruct.tilesOffset); LoadCompressedPalette(palette, unknownStruct.unk8 << 4, 32); gBattle_BG1_X = 0; diff --git a/src/graphics.c b/src/graphics.c index b2de074bc..39b248212 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -897,9 +897,9 @@ const u32 gBattleStatMask6_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat6 const u32 gBattleStatMask7_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat7.gbapal.lz"); const u32 gBattleStatMask8_Pal[] = INCBIN_U32("graphics/battle_anims/masks/stat8.gbapal.lz"); -const u32 gUnknown_08C2DC68[] = INCBIN_U32("graphics/battle_anims/masks/cure_bubbles.4bpp.lz"); -const u32 gUnknown_08C2DDA4[] = INCBIN_U32("graphics/battle_anims/masks/cure_bubbles.gbapal.lz"); -const u32 gUnknown_08C2DDC4[] = INCBIN_U32("graphics/battle_anims/masks/cure_bubbles.bin.lz"); +const u32 gCureBubblesGfx[] = INCBIN_U8("graphics/battle_anims/masks/cure_bubbles.4bpp.lz"); +const u32 gCureBubblesPal[] = INCBIN_U16("graphics/battle_anims/masks/cure_bubbles.gbapal.lz"); +const u32 gCureBubblesTilemap[] = INCBIN_U8("graphics/battle_anims/masks/cure_bubbles.bin.lz"); const u32 gBattleAnimSpritePalette_245[] = INCBIN_U32("graphics/battle_anims/sprites/245.gbapal.lz"); const u32 gBattleAnimSpriteSheet_245[] = INCBIN_U32("graphics/battle_anims/sprites/245.4bpp.lz");