From e9675bdd246deff42524cc202e4519041d49dd69 Mon Sep 17 00:00:00 2001 From: Sewef Date: Sun, 20 Oct 2019 16:22:53 +0200 Subject: [PATCH] battle_anims_effects_2 --- data/battle_anim_scripts.s | 10 +++---- include/battle_anim.h | 2 +- src/battle_anim_effects_1.c | 4 +-- src/battle_anim_effects_2.c | 54 ++++++++++++++++++------------------- src/battle_anim_effects_3.c | 6 ++--- src/battle_anim_mons.c | 2 +- src/poison.c | 2 +- src/psychic.c | 4 +-- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 5998aa5d3..ec57c723f 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -2895,7 +2895,7 @@ Move_GLARE: waitforvisualfinish createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 - createvisualtask sub_81064F8, 5 + createvisualtask AnimTask_ScaryFace, 5 playsewithpan SE_W043, SOUND_PAN_ATTACKER delay 2 createvisualtask sub_810A094, 3, 20, 1, 0 @@ -3434,19 +3434,19 @@ Move_UPROAR: loadspritegfx ANIM_TAG_JAGGED_MUSIC_NOTE loadspritegfx ANIM_TAG_THIN_RING monbg ANIM_DEF_PARTNER - createvisualtask sub_8106D90, 2, 0 + createvisualtask AnimTask_UproarDistortion, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 29, -12, 0 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -12, -29, 1 delay 16 - createvisualtask sub_8106D90, 2, 0 + createvisualtask AnimTask_UproarDistortion, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 12, -29, 1 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -29, -12, 0 delay 16 - createvisualtask sub_8106D90, 2, 0 + createvisualtask AnimTask_UproarDistortion, 2, 0 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 playsewithpan SE_W253, SOUND_PAN_ATTACKER createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, -24, 1 @@ -7763,7 +7763,7 @@ Move_SCARY_FACE: waitforvisualfinish delay 10 playsewithpan SE_W043, SOUND_PAN_ATTACKER - createvisualtask sub_81064F8, 5 + createvisualtask AnimTask_ScaryFace, 5 delay 13 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 diff --git a/include/battle_anim.h b/include/battle_anim.h index 69a1073ba..503e23df2 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -141,7 +141,7 @@ bool8 AnimFastTranslateLinear(struct Sprite *sprite); void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite); void TranslateMonSpriteLinear(struct Sprite *sprite); void TranslateSpriteLinear(struct Sprite *sprite); -void AnimSparklingParticle(struct Sprite *sprite); +void AnimSpriteOnMonPos(struct Sprite *sprite); void sub_80A7000(struct Sprite *sprite); void TranslateSpriteInCircleOverDuration(struct Sprite *sprite); void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2); diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 91d4eec00..1efa860d3 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -1713,7 +1713,7 @@ const struct SpriteTemplate gOctazookaSmokeSpriteTemplate = .anims = gOctazookaAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AnimCmd gConversionAnimCmds[] = @@ -1839,7 +1839,7 @@ const struct SpriteTemplate gHealingBlueStarSpriteTemplate = .anims = gHealingBlueStarAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gHornHitSpriteTemplate = diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 29acbbcfd..c08d4ba4f 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -96,14 +96,14 @@ static void FakeOutStep2(u8); static void AnimRedHeartProjectile_Step(struct Sprite *); static void AnimRedHeartRising_Step(struct Sprite *); static void HeartsBackground_Step(u8); -static void sub_81065EC(u8); +static void ScaryFace_Step(u8); static void AnimOrbitFastStep(struct Sprite *); static void AnimOrbitScatterStep(struct Sprite *); -static void sub_8106D5C(struct Sprite *); -static void sub_8106DD4(u8); -static void sub_8106EC8(struct Sprite *); -static void sub_8107018(struct Sprite *); -static void sub_810703C(struct Sprite *); +static void AnimMovmentWaves_Step(struct Sprite *); +static void UproarDistortion_Step(u8); +static void AnimJaggedMusicNote_Step(struct Sprite *); +static void AnimPerishSongMusicNote_Step1(struct Sprite *); +static void AnimPerishSongMusicNote_Step2(struct Sprite *); // Unused const struct SpriteTemplate gUnknown_08593264 = @@ -200,7 +200,7 @@ const struct SpriteTemplate gUnknown_08593304 = .anims = gUnknown_085932E4, .images = NULL, .affineAnims = gUnknown_08593300, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AnimCmd gKinesisZapEnergyAnimCmds[] = @@ -657,7 +657,7 @@ const struct SpriteTemplate gExplosionSpriteTemplate = .anims = gExplosionAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds1[] = @@ -744,7 +744,7 @@ const struct SpriteTemplate gThinRingExpandingSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gThingRingExpandingAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gThingRingShrinkingAffineAnimCmds[] = @@ -767,7 +767,7 @@ const struct SpriteTemplate gThingRingShrinkingSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gThingRingShrinkingAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gBlendThinRingExpandingSpriteTemplate = @@ -874,7 +874,7 @@ const struct SpriteTemplate gBellSpriteTemplate = .anims = gBellAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const u16 gMusicNotePaletteTagsTable[] = @@ -2560,7 +2560,7 @@ void AnimBlendThinRing(struct Sprite *sprite) gBattleAnimArgs[0] = sp0 - r4; } - sprite->callback = AnimSparklingParticle; + sprite->callback = AnimSpriteOnMonPos; sprite->callback(sprite); } @@ -2667,7 +2667,7 @@ void AnimUproarRing(struct Sprite *sprite) } StartSpriteAffineAnim(sprite, 1); - sprite->callback = AnimSparklingParticle; + sprite->callback = AnimSpriteOnMonPos; sprite->callback(sprite); } @@ -3305,7 +3305,7 @@ static void HeartsBackground_Step(u8 taskId) } } -void sub_81064F8(u8 taskId) +void AnimTask_ScaryFace(u8 taskId) { struct BattleAnimBgData animBg; @@ -3330,10 +3330,10 @@ void sub_81064F8(u8 taskId) AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C249F8, animBg.tilesOffset); LoadCompressedPalette(gUnknown_08C249D0, animBg.paletteId * 16, 32); - gTasks[taskId].func = sub_81065EC; + gTasks[taskId].func = ScaryFace_Step; } -static void sub_81065EC(u8 taskId) +static void ScaryFace_Step(u8 taskId) { struct BattleAnimBgData animBg; @@ -3627,11 +3627,11 @@ void AnimMovmentWaves(struct Sprite *sprite) sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[1]; StartSpriteAnim(sprite, sprite->data[1]); - sprite->callback = sub_8106D5C; + sprite->callback = AnimMovmentWaves_Step; } } -static void sub_8106D5C(struct Sprite *sprite) +static void AnimMovmentWaves_Step(struct Sprite *sprite) { if (sprite->animEnded) { @@ -3642,15 +3642,15 @@ static void sub_8106D5C(struct Sprite *sprite) } } -void sub_8106D90(u8 taskId) +void AnimTask_UproarDistortion(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareAffineAnimInTaskData(&gTasks[taskId], spriteId, gUnknown_08593B98); - gTasks[taskId].func = sub_8106DD4; + gTasks[taskId].func = UproarDistortion_Step; } -static void sub_8106DD4(u8 taskId) +static void UproarDistortion_Step(u8 taskId) { if (!RunAffineAnimFromTaskData(&gTasks[taskId])) DestroyAnimVisualTask(taskId); @@ -3681,10 +3681,10 @@ void AnimJaggedMusicNote(struct Sprite *sprite) sprite->data[4] = var1 >> 3; sprite->oam.tileNum += gBattleAnimArgs[3] * 16; - sprite->callback = sub_8106EC8; + sprite->callback = AnimJaggedMusicNote_Step; } -static void sub_8106EC8(struct Sprite *sprite) +static void AnimJaggedMusicNote_Step(struct Sprite *sprite) { sprite->data[1] += sprite->data[3]; sprite->data[2] += sprite->data[4]; @@ -3739,7 +3739,7 @@ void AnimPerishSongMusicNote(struct Sprite *sprite) if (sprite->data[0] > sprite->data[5]) { - sprite->callback = sub_8107018; + sprite->callback = AnimPerishSongMusicNote_Step1; sprite->data[0] = 0; SetSpritePrimaryCoordsFromSecondaryCoords(sprite); @@ -3751,16 +3751,16 @@ void AnimPerishSongMusicNote(struct Sprite *sprite) } } -static void sub_8107018(struct Sprite *sprite) +static void AnimPerishSongMusicNote_Step1(struct Sprite *sprite) { if (++sprite->data[0] > 10) { sprite->data[0] = 0; - sprite->callback = sub_810703C; + sprite->callback = AnimPerishSongMusicNote_Step2; } } -static void sub_810703C(struct Sprite *sprite) +static void AnimPerishSongMusicNote_Step2(struct Sprite *sprite) { sprite->data[3] += sprite->data[2]; sprite->pos2.y = sprite->data[3]; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 1c24ecbce..772ef6182 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -144,7 +144,7 @@ const struct SpriteTemplate gUnknown_085CE020 = .anims = gUnknown_085CE01C, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_085CE038 = @@ -190,7 +190,7 @@ const struct SpriteTemplate gUnknown_085CE07C = .anims = gUnknown_085CE078, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_085CE094 = @@ -502,7 +502,7 @@ const struct SpriteTemplate gUnknown_085CE338 = .anims = gUnknown_085CE334, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gUnknown_085CE350[] = diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 64b65ce08..ea5184c53 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -1456,7 +1456,7 @@ static u8 GetBattlerAtPosition_(u8 position) return GetBattlerAtPosition(position); } -void AnimSparklingParticle(struct Sprite *sprite) +void AnimSpriteOnMonPos(struct Sprite *sprite) { bool8 var; diff --git a/src/poison.c b/src/poison.c index 055f4c42a..42e7d6a58 100644 --- a/src/poison.c +++ b/src/poison.c @@ -37,7 +37,7 @@ const struct SpriteTemplate gUnknown_08596134 = .anims = gUnknown_08596130, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AnimCmd gUnknown_0859614C[] = diff --git a/src/psychic.c b/src/psychic.c index 11efc7a37..7ad8e14cb 100644 --- a/src/psychic.c +++ b/src/psychic.c @@ -49,7 +49,7 @@ const struct SpriteTemplate gUnknown_08596548 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_08596544, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const struct SpriteTemplate gUnknown_08596560 = @@ -378,7 +378,7 @@ const struct SpriteTemplate gUnknown_08596898 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gUnknown_08596894, - .callback = AnimSparklingParticle, + .callback = AnimSpriteOnMonPos, }; const union AffineAnimCmd gUnknown_085968B0[] =