battle_anims_effects_2

This commit is contained in:
Sewef 2019-10-20 16:22:53 +02:00 committed by huderlem
parent def7a4a18a
commit e9675bdd24
8 changed files with 42 additions and 42 deletions

View File

@ -2895,7 +2895,7 @@ Move_GLARE:
waitforvisualfinish waitforvisualfinish
createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8
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 playsewithpan SE_W043, SOUND_PAN_ATTACKER
delay 2 delay 2
createvisualtask sub_810A094, 3, 20, 1, 0 createvisualtask sub_810A094, 3, 20, 1, 0
@ -3434,19 +3434,19 @@ Move_UPROAR:
loadspritegfx ANIM_TAG_JAGGED_MUSIC_NOTE loadspritegfx ANIM_TAG_JAGGED_MUSIC_NOTE
loadspritegfx ANIM_TAG_THIN_RING loadspritegfx ANIM_TAG_THIN_RING
monbg ANIM_DEF_PARTNER 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 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8
playsewithpan SE_W253, SOUND_PAN_ATTACKER playsewithpan SE_W253, SOUND_PAN_ATTACKER
createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 29, -12, 0 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 29, -12, 0
createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -12, -29, 1 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -12, -29, 1
delay 16 delay 16
createvisualtask sub_8106D90, 2, 0 createvisualtask AnimTask_UproarDistortion, 2, 0
createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8
playsewithpan SE_W253, SOUND_PAN_ATTACKER playsewithpan SE_W253, SOUND_PAN_ATTACKER
createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 12, -29, 1 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 12, -29, 1
createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -29, -12, 0 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, -29, -12, 0
delay 16 delay 16
createvisualtask sub_8106D90, 2, 0 createvisualtask AnimTask_UproarDistortion, 2, 0
createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8 createsprite gUproarRingSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 0, 31, 8
playsewithpan SE_W253, SOUND_PAN_ATTACKER playsewithpan SE_W253, SOUND_PAN_ATTACKER
createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, -24, 1 createsprite gJaggedMusicNoteSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, -24, 1
@ -7763,7 +7763,7 @@ Move_SCARY_FACE:
waitforvisualfinish waitforvisualfinish
delay 10 delay 10
playsewithpan SE_W043, SOUND_PAN_ATTACKER playsewithpan SE_W043, SOUND_PAN_ATTACKER
createvisualtask sub_81064F8, 5 createvisualtask AnimTask_ScaryFace, 5
delay 13 delay 13
createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8
createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8

View File

@ -141,7 +141,7 @@ bool8 AnimFastTranslateLinear(struct Sprite *sprite);
void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite); void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite);
void TranslateMonSpriteLinear(struct Sprite *sprite); void TranslateMonSpriteLinear(struct Sprite *sprite);
void TranslateSpriteLinear(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 sub_80A7000(struct Sprite *sprite);
void TranslateSpriteInCircleOverDuration(struct Sprite *sprite); void TranslateSpriteInCircleOverDuration(struct Sprite *sprite);
void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2); void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2);

View File

@ -1713,7 +1713,7 @@ const struct SpriteTemplate gOctazookaSmokeSpriteTemplate =
.anims = gOctazookaAnimTable, .anims = gOctazookaAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AnimCmd gConversionAnimCmds[] = const union AnimCmd gConversionAnimCmds[] =
@ -1839,7 +1839,7 @@ const struct SpriteTemplate gHealingBlueStarSpriteTemplate =
.anims = gHealingBlueStarAnimTable, .anims = gHealingBlueStarAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const struct SpriteTemplate gHornHitSpriteTemplate = const struct SpriteTemplate gHornHitSpriteTemplate =

View File

@ -96,14 +96,14 @@ static void FakeOutStep2(u8);
static void AnimRedHeartProjectile_Step(struct Sprite *); static void AnimRedHeartProjectile_Step(struct Sprite *);
static void AnimRedHeartRising_Step(struct Sprite *); static void AnimRedHeartRising_Step(struct Sprite *);
static void HeartsBackground_Step(u8); static void HeartsBackground_Step(u8);
static void sub_81065EC(u8); static void ScaryFace_Step(u8);
static void AnimOrbitFastStep(struct Sprite *); static void AnimOrbitFastStep(struct Sprite *);
static void AnimOrbitScatterStep(struct Sprite *); static void AnimOrbitScatterStep(struct Sprite *);
static void sub_8106D5C(struct Sprite *); static void AnimMovmentWaves_Step(struct Sprite *);
static void sub_8106DD4(u8); static void UproarDistortion_Step(u8);
static void sub_8106EC8(struct Sprite *); static void AnimJaggedMusicNote_Step(struct Sprite *);
static void sub_8107018(struct Sprite *); static void AnimPerishSongMusicNote_Step1(struct Sprite *);
static void sub_810703C(struct Sprite *); static void AnimPerishSongMusicNote_Step2(struct Sprite *);
// Unused // Unused
const struct SpriteTemplate gUnknown_08593264 = const struct SpriteTemplate gUnknown_08593264 =
@ -200,7 +200,7 @@ const struct SpriteTemplate gUnknown_08593304 =
.anims = gUnknown_085932E4, .anims = gUnknown_085932E4,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08593300, .affineAnims = gUnknown_08593300,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AnimCmd gKinesisZapEnergyAnimCmds[] = const union AnimCmd gKinesisZapEnergyAnimCmds[] =
@ -657,7 +657,7 @@ const struct SpriteTemplate gExplosionSpriteTemplate =
.anims = gExplosionAnimTable, .anims = gExplosionAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds1[] = const union AffineAnimCmd gSoftBoiledEggAffineAnimCmds1[] =
@ -744,7 +744,7 @@ const struct SpriteTemplate gThinRingExpandingSpriteTemplate =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gThingRingExpandingAffineAnimTable, .affineAnims = gThingRingExpandingAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AffineAnimCmd gThingRingShrinkingAffineAnimCmds[] = const union AffineAnimCmd gThingRingShrinkingAffineAnimCmds[] =
@ -767,7 +767,7 @@ const struct SpriteTemplate gThingRingShrinkingSpriteTemplate =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gThingRingShrinkingAffineAnimTable, .affineAnims = gThingRingShrinkingAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const struct SpriteTemplate gBlendThinRingExpandingSpriteTemplate = const struct SpriteTemplate gBlendThinRingExpandingSpriteTemplate =
@ -874,7 +874,7 @@ const struct SpriteTemplate gBellSpriteTemplate =
.anims = gBellAnimTable, .anims = gBellAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const u16 gMusicNotePaletteTagsTable[] = const u16 gMusicNotePaletteTagsTable[] =
@ -2560,7 +2560,7 @@ void AnimBlendThinRing(struct Sprite *sprite)
gBattleAnimArgs[0] = sp0 - r4; gBattleAnimArgs[0] = sp0 - r4;
} }
sprite->callback = AnimSparklingParticle; sprite->callback = AnimSpriteOnMonPos;
sprite->callback(sprite); sprite->callback(sprite);
} }
@ -2667,7 +2667,7 @@ void AnimUproarRing(struct Sprite *sprite)
} }
StartSpriteAffineAnim(sprite, 1); StartSpriteAffineAnim(sprite, 1);
sprite->callback = AnimSparklingParticle; sprite->callback = AnimSpriteOnMonPos;
sprite->callback(sprite); 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; struct BattleAnimBgData animBg;
@ -3330,10 +3330,10 @@ void sub_81064F8(u8 taskId)
AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C249F8, animBg.tilesOffset); AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C249F8, animBg.tilesOffset);
LoadCompressedPalette(gUnknown_08C249D0, animBg.paletteId * 16, 32); 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; struct BattleAnimBgData animBg;
@ -3627,11 +3627,11 @@ void AnimMovmentWaves(struct Sprite *sprite)
sprite->data[0] = gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[2];
sprite->data[1] = gBattleAnimArgs[1]; sprite->data[1] = gBattleAnimArgs[1];
StartSpriteAnim(sprite, sprite->data[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) 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]); u8 spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
PrepareAffineAnimInTaskData(&gTasks[taskId], spriteId, gUnknown_08593B98); 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])) if (!RunAffineAnimFromTaskData(&gTasks[taskId]))
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
@ -3681,10 +3681,10 @@ void AnimJaggedMusicNote(struct Sprite *sprite)
sprite->data[4] = var1 >> 3; sprite->data[4] = var1 >> 3;
sprite->oam.tileNum += gBattleAnimArgs[3] * 16; 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[1] += sprite->data[3];
sprite->data[2] += sprite->data[4]; sprite->data[2] += sprite->data[4];
@ -3739,7 +3739,7 @@ void AnimPerishSongMusicNote(struct Sprite *sprite)
if (sprite->data[0] > sprite->data[5]) if (sprite->data[0] > sprite->data[5])
{ {
sprite->callback = sub_8107018; sprite->callback = AnimPerishSongMusicNote_Step1;
sprite->data[0] = 0; sprite->data[0] = 0;
SetSpritePrimaryCoordsFromSecondaryCoords(sprite); 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) if (++sprite->data[0] > 10)
{ {
sprite->data[0] = 0; 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->data[3] += sprite->data[2];
sprite->pos2.y = sprite->data[3]; sprite->pos2.y = sprite->data[3];

View File

@ -144,7 +144,7 @@ const struct SpriteTemplate gUnknown_085CE020 =
.anims = gUnknown_085CE01C, .anims = gUnknown_085CE01C,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const struct SpriteTemplate gUnknown_085CE038 = const struct SpriteTemplate gUnknown_085CE038 =
@ -190,7 +190,7 @@ const struct SpriteTemplate gUnknown_085CE07C =
.anims = gUnknown_085CE078, .anims = gUnknown_085CE078,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const struct SpriteTemplate gUnknown_085CE094 = const struct SpriteTemplate gUnknown_085CE094 =
@ -502,7 +502,7 @@ const struct SpriteTemplate gUnknown_085CE338 =
.anims = gUnknown_085CE334, .anims = gUnknown_085CE334,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AffineAnimCmd gUnknown_085CE350[] = const union AffineAnimCmd gUnknown_085CE350[] =

View File

@ -1456,7 +1456,7 @@ static u8 GetBattlerAtPosition_(u8 position)
return GetBattlerAtPosition(position); return GetBattlerAtPosition(position);
} }
void AnimSparklingParticle(struct Sprite *sprite) void AnimSpriteOnMonPos(struct Sprite *sprite)
{ {
bool8 var; bool8 var;

View File

@ -37,7 +37,7 @@ const struct SpriteTemplate gUnknown_08596134 =
.anims = gUnknown_08596130, .anims = gUnknown_08596130,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AnimCmd gUnknown_0859614C[] = const union AnimCmd gUnknown_0859614C[] =

View File

@ -49,7 +49,7 @@ const struct SpriteTemplate gUnknown_08596548 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08596544, .affineAnims = gUnknown_08596544,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const struct SpriteTemplate gUnknown_08596560 = const struct SpriteTemplate gUnknown_08596560 =
@ -378,7 +378,7 @@ const struct SpriteTemplate gUnknown_08596898 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08596894, .affineAnims = gUnknown_08596894,
.callback = AnimSparklingParticle, .callback = AnimSpriteOnMonPos,
}; };
const union AffineAnimCmd gUnknown_085968B0[] = const union AffineAnimCmd gUnknown_085968B0[] =