Clean up move anim doc
This commit is contained in:
parent
68dc68907b
commit
dc3c2b72f2
9 changed files with 101 additions and 100 deletions
|
@ -9,8 +9,6 @@
|
|||
|
||||
.section script_data, "aw", %progbits
|
||||
|
||||
@ TODO: Clarify createsprite battler argument
|
||||
|
||||
.align 2
|
||||
gMovesWithQuietBGM::
|
||||
.2byte MOVE_SING, MOVE_PERISH_SONG, MOVE_GRASS_WHISTLE, 0xFFFF
|
||||
|
@ -845,10 +843,10 @@ Move_TWINEEDLE:
|
|||
createsprite gLinearStingerSpriteTemplate, ANIM_TARGET, 2, 20, 12, 10, 12, 20
|
||||
delay 20
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 5, 1
|
||||
createsprite gSpikeHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -4, 1, 3
|
||||
createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -4, 1, 3
|
||||
loopsewithpan SE_W030, SOUND_PAN_TARGET, 5, 2
|
||||
delay 1
|
||||
createsprite gSpikeHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 10, 12, 1, 3
|
||||
createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 10, 12, 1, 3
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_TARGET
|
||||
blendoff
|
||||
|
@ -1312,9 +1310,9 @@ Move_SPIKE_CANNON:
|
|||
createsprite gLinearStingerSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 0, 0, 20
|
||||
createsprite gLinearStingerSpriteTemplate, ANIM_ATTACKER, 2, 26, 8, 8, 8, 20
|
||||
waitforvisualfinish
|
||||
createsprite gSpikeHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, 1, 2
|
||||
createsprite gSpikeHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2
|
||||
createsprite gSpikeHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, 1, 2
|
||||
createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, 1, 2
|
||||
createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2
|
||||
createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, 1, 2
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 7, 1
|
||||
loopsewithpan SE_W030, SOUND_PAN_TARGET, 5, 3
|
||||
waitforvisualfinish
|
||||
|
@ -3398,20 +3396,20 @@ ExtremeSpeedContinue:
|
|||
loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 3
|
||||
waitforvisualfinish
|
||||
delay 1
|
||||
createvisualtask AnimTask_ExtremeSpeedMoveTarget, 2
|
||||
createvisualtask AnimTask_SetAttackerInvisibleWaitForSignal, 2
|
||||
monbg ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
delay 18
|
||||
createvisualtask AnimTask_ExtremeSpeedImpact, 2
|
||||
delay 2
|
||||
playsewithpan SE_W004, SOUND_PAN_TARGET
|
||||
createsprite gExtremeSpeedHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, -12, 3
|
||||
createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, -12, 3
|
||||
delay 10
|
||||
playsewithpan SE_W004, SOUND_PAN_TARGET
|
||||
createsprite gExtremeSpeedHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 12, 3
|
||||
createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 12, 3
|
||||
delay 10
|
||||
playsewithpan SE_W233B, SOUND_PAN_TARGET
|
||||
createsprite gExtremeSpeedHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 0, 3
|
||||
createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 0, 3
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_SpeedDust, 2
|
||||
delay 10
|
||||
|
@ -5161,7 +5159,7 @@ Move_FAINT_ATTACK:
|
|||
clearmonbg ANIM_ATTACKER
|
||||
invisible ANIM_ATTACKER
|
||||
delay 1
|
||||
createvisualtask AnimTask_ExtremeSpeedMoveTarget, 2
|
||||
createvisualtask AnimTask_SetAttackerInvisibleWaitForSignal, 2
|
||||
setalpha 12, 8
|
||||
monbg ANIM_TARGET
|
||||
delay 1
|
||||
|
@ -8759,10 +8757,10 @@ Move_REVENGE:
|
|||
unloadspritegfx ANIM_TAG_PURPLE_SWIPE
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 10, 1
|
||||
createsprite gRevengeHitSplatSpriteTemplate, ANIM_TARGET, 3, -10, -8, ANIM_TARGET, 1, 8
|
||||
createsprite gPersistHitSplatSpriteTemplate, ANIM_TARGET, 3, -10, -8, ANIM_TARGET, 1, 8
|
||||
playsewithpan SE_W233B, SOUND_PAN_TARGET
|
||||
delay 8
|
||||
createsprite gRevengeHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, 8, ANIM_TARGET, 1, 8
|
||||
createsprite gPersistHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, 8, ANIM_TARGET, 1, 8
|
||||
playsewithpan SE_W025B, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_TARGET
|
||||
|
|
|
@ -228,7 +228,7 @@ void AnimParticleBurst(struct Sprite *);
|
|||
void AnimWaterPulseRing(struct Sprite *sprite);
|
||||
|
||||
// flying.c
|
||||
void sub_810E2C8(struct Sprite *sprite);
|
||||
void DestroyAnimSpriteAfterTimer(struct Sprite *sprite);
|
||||
|
||||
// smokescreen.c
|
||||
u8 SmokescreenImpact(s16 x, s16 y, u8 a3);
|
||||
|
|
|
@ -3568,7 +3568,7 @@ static void AnimYawnCloud_Step(struct Sprite *sprite)
|
|||
// arg 0: ?
|
||||
// arg 1: initial x pixel offset
|
||||
// arg 2: initial y pixel offset
|
||||
// arg 3: ?
|
||||
// arg 3: time until destroyed
|
||||
static void AnimSmokeBallEscapeCloud(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
|
@ -3578,7 +3578,7 @@ static void AnimSmokeBallEscapeCloud(struct Sprite *sprite)
|
|||
|
||||
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;
|
||||
sprite->callback = DestroyAnimSpriteAfterTimer;
|
||||
}
|
||||
|
||||
static void sub_815D8D8(u8 taskId)
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
// this file's functions
|
||||
static void sub_8158B98(u8 taskId);
|
||||
static void sub_8158C04(u8 taskId);
|
||||
static void sub_8158D08(u8 taskId);
|
||||
static void sub_8158FF4(u8 taskId);
|
||||
static void sub_815913C(u8 taskId);
|
||||
static void sub_8159308(u8 taskId);
|
||||
static void SoundTask_LoopSEAdjustPanning_Step(u8 taskId);
|
||||
static void SoundTask_PlayDoubleCry_Step(u8 taskId);
|
||||
static void SoundTask_PlayCryWithEcho_Step(u8 taskId);
|
||||
static void SoundTask_AdjustPanningVar_Step(u8 taskId);
|
||||
|
||||
// task start
|
||||
void sub_8158B30(u8 taskId)
|
||||
|
@ -97,11 +97,11 @@ void SoundTask_LoopSEAdjustPanning(u8 taskId)
|
|||
gTasks[taskId].data[11] = sourcePan;
|
||||
gTasks[taskId].data[12] = r9;
|
||||
|
||||
gTasks[taskId].func = sub_8158D08;
|
||||
sub_8158D08(taskId);
|
||||
gTasks[taskId].func = SoundTask_LoopSEAdjustPanning_Step;
|
||||
SoundTask_LoopSEAdjustPanning_Step(taskId);
|
||||
}
|
||||
|
||||
static void sub_8158D08(u8 taskId)
|
||||
static void SoundTask_LoopSEAdjustPanning_Step(u8 taskId)
|
||||
{
|
||||
if (gTasks[taskId].data[12]++ == gTasks[taskId].data[6])
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ void SoundTask_PlayDoubleCry(u8 taskId)
|
|||
else
|
||||
PlayCry3(species, pan, 7);
|
||||
|
||||
gTasks[taskId].func = sub_8158FF4;
|
||||
gTasks[taskId].func = SoundTask_PlayDoubleCry_Step;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ void SoundTask_PlayDoubleCry(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static void sub_8158FF4(u8 taskId)
|
||||
static void SoundTask_PlayDoubleCry_Step(u8 taskId)
|
||||
{
|
||||
u16 species = gTasks[taskId].data[1];
|
||||
s8 pan = gTasks[taskId].data[2];
|
||||
|
@ -292,12 +292,12 @@ void SoundTask_PlayCryWithEcho(u8 taskId)
|
|||
gTasks[taskId].data[2] = pan;
|
||||
|
||||
if (species != SPECIES_NONE)
|
||||
gTasks[taskId].func = sub_815913C;
|
||||
gTasks[taskId].func = SoundTask_PlayCryWithEcho_Step;
|
||||
else
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
static void sub_815913C(u8 taskId)
|
||||
static void SoundTask_PlayCryWithEcho_Step(u8 taskId)
|
||||
{
|
||||
u16 species = gTasks[taskId].data[1];
|
||||
s8 pan = gTasks[taskId].data[2];
|
||||
|
@ -369,11 +369,11 @@ void SoundTask_AdjustPanningVar(u8 taskId)
|
|||
gTasks[taskId].data[10] = 0;
|
||||
gTasks[taskId].data[11] = sourcePan;
|
||||
|
||||
gTasks[taskId].func = sub_8159308;
|
||||
sub_8159308(taskId);
|
||||
gTasks[taskId].func = SoundTask_AdjustPanningVar_Step;
|
||||
SoundTask_AdjustPanningVar_Step(taskId);
|
||||
}
|
||||
|
||||
void sub_8159308(u8 taskId)
|
||||
static void SoundTask_AdjustPanningVar_Step(u8 taskId)
|
||||
{
|
||||
u16 panIncrement = gTasks[taskId].data[3];
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ extern const struct OamData gOamData_AffineOff_ObjBlend_64x64;
|
|||
|
||||
// This file's functions.
|
||||
static void sub_80A9DB4(u8 taskId);
|
||||
static void sub_80A9FD0(u8 taskId);
|
||||
static void sub_80AA020(u8 taskId);
|
||||
static void sub_80AA0D0(u8 taskId);
|
||||
static void sub_80AA124(u8 taskId);
|
||||
static void AnimTask_FrozenIceCube_Step1(u8 taskId);
|
||||
static void AnimTask_FrozenIceCube_Step2(u8 taskId);
|
||||
static void AnimTask_FrozenIceCube_Step3(u8 taskId);
|
||||
static void AnimTask_FrozenIceCube_Step4(u8 taskId);
|
||||
static void Task_DoStatusAnimation(u8 taskId);
|
||||
static void sub_80A9E44(struct Sprite *sprite);
|
||||
static void sub_80A9E78(struct Sprite *sprite);
|
||||
|
@ -42,6 +42,7 @@ static const union AnimCmd *const sSpriteAnimTable_853EDF8[] =
|
|||
sSpriteAnim_853EDE4
|
||||
};
|
||||
|
||||
// Unused
|
||||
const struct SpriteTemplate gUnknown_0853EDFC =
|
||||
{
|
||||
.tileTag = ANIM_TAG_ORB,
|
||||
|
@ -53,6 +54,7 @@ const struct SpriteTemplate gUnknown_0853EDFC =
|
|||
.callback = sub_80A8AEC,
|
||||
};
|
||||
|
||||
// Unused
|
||||
const struct SpriteTemplate gUnknown_0853EE14 =
|
||||
{
|
||||
.tileTag = ANIM_TAG_ORB,
|
||||
|
@ -64,15 +66,15 @@ const struct SpriteTemplate gUnknown_0853EE14 =
|
|||
.callback = sub_80A8A6C,
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_853EE2C[] =
|
||||
static const union AnimCmd sAnim_WeatherBallNormal[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 3),
|
||||
ANIMCMD_JUMP(0)
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sSpriteAnimTable_853EE34[] =
|
||||
static const union AnimCmd *const sAnims_WeatherBallNormal[] =
|
||||
{
|
||||
sSpriteAnim_853EE2C
|
||||
sAnim_WeatherBallNormal
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gWeatherBallUpSpriteTemplate =
|
||||
|
@ -80,7 +82,7 @@ const struct SpriteTemplate gWeatherBallUpSpriteTemplate =
|
|||
.tileTag = ANIM_TAG_WEATHER_BALL,
|
||||
.paletteTag = ANIM_TAG_WEATHER_BALL,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sSpriteAnimTable_853EE34,
|
||||
.anims = sAnims_WeatherBallNormal,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimWeatherBallUp,
|
||||
|
@ -91,7 +93,7 @@ const struct SpriteTemplate gWeatherBallNormalDownSpriteTemplate =
|
|||
.tileTag = ANIM_TAG_WEATHER_BALL,
|
||||
.paletteTag = ANIM_TAG_WEATHER_BALL,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sSpriteAnimTable_853EE34,
|
||||
.anims = sAnims_WeatherBallNormal,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimWeatherBallDown,
|
||||
|
@ -123,6 +125,7 @@ const struct SpriteTemplate gSpinningSparkleSpriteTemplate =
|
|||
.callback = AnimSpinningSparkle,
|
||||
};
|
||||
|
||||
// Unused
|
||||
const struct SpriteTemplate gUnknown_0853EE9C =
|
||||
{
|
||||
.tileTag = ANIM_TAG_MONSTER_FOOT,
|
||||
|
@ -159,6 +162,7 @@ static const union AnimCmd *const sSpriteAnimTable_853EECC[] =
|
|||
sSpriteAnim_853EEC4
|
||||
};
|
||||
|
||||
// Unused
|
||||
const struct SpriteTemplate gUnknown_0853EED8 =
|
||||
{
|
||||
.tileTag = ANIM_TAG_IMPACT,
|
||||
|
@ -204,7 +208,7 @@ const struct SpriteTemplate gUnknown_0853EF18 =
|
|||
.callback = sub_80A8A6C,
|
||||
};
|
||||
|
||||
static const struct Subsprite gUnknown_0853EF30[] =
|
||||
static const struct Subsprite sFrozenIceCubeSubsprites[] =
|
||||
{
|
||||
{
|
||||
.x = -16,
|
||||
|
@ -240,9 +244,9 @@ static const struct Subsprite gUnknown_0853EF30[] =
|
|||
},
|
||||
};
|
||||
|
||||
static const struct SubspriteTable gUnknown_0853EF40[] =
|
||||
static const struct SubspriteTable sFrozenIceCubeSubspriteTable[] =
|
||||
{
|
||||
{ARRAY_COUNT(gUnknown_0853EF30), gUnknown_0853EF30},
|
||||
{ARRAY_COUNT(sFrozenIceCubeSubsprites), sFrozenIceCubeSubsprites},
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gFrozenIceCubeSpriteTemplate =
|
||||
|
@ -267,7 +271,7 @@ static const struct SpriteTemplate gUnknown_0853EF60 =
|
|||
.callback = sub_80A9E44,
|
||||
};
|
||||
|
||||
// code
|
||||
// Unused
|
||||
u8 sub_80A9C70(u8 battlerId, bool8 b)
|
||||
{
|
||||
u8 battlerSpriteId = gBattlerSpriteIds[battlerId];
|
||||
|
@ -389,17 +393,17 @@ void AnimTask_FrozenIceCube(u8 taskId)
|
|||
spriteId = CreateSprite(&gFrozenIceCubeSpriteTemplate, x, y, 4);
|
||||
if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == 0xFFFF)
|
||||
gSprites[spriteId].invisible = TRUE;
|
||||
SetSubspriteTables(&gSprites[spriteId], gUnknown_0853EF40);
|
||||
SetSubspriteTables(&gSprites[spriteId], sFrozenIceCubeSubspriteTable);
|
||||
gTasks[taskId].data[15] = spriteId;
|
||||
gTasks[taskId].func = sub_80A9FD0;
|
||||
gTasks[taskId].func = AnimTask_FrozenIceCube_Step1;
|
||||
}
|
||||
|
||||
static void sub_80A9FD0(u8 taskId)
|
||||
static void AnimTask_FrozenIceCube_Step1(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[1]++;
|
||||
if (gTasks[taskId].data[1] == 10)
|
||||
{
|
||||
gTasks[taskId].func = sub_80AA020;
|
||||
gTasks[taskId].func = AnimTask_FrozenIceCube_Step2;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
}
|
||||
else
|
||||
|
@ -410,7 +414,7 @@ static void sub_80A9FD0(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static void sub_80AA020(u8 taskId)
|
||||
static void AnimTask_FrozenIceCube_Step2(u8 taskId)
|
||||
{
|
||||
u8 palIndex = IndexOfSpritePaletteTag(ANIM_TAG_ICE_CUBE);
|
||||
|
||||
|
@ -436,19 +440,19 @@ static void sub_80AA020(u8 taskId)
|
|||
if (gTasks[taskId].data[4] == 2)
|
||||
{
|
||||
gTasks[taskId].data[1] = 9;
|
||||
gTasks[taskId].func = sub_80AA0D0;
|
||||
gTasks[taskId].func = AnimTask_FrozenIceCube_Step3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80AA0D0(u8 taskId)
|
||||
static void AnimTask_FrozenIceCube_Step3(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[1]--;
|
||||
if (gTasks[taskId].data[1] == -1)
|
||||
{
|
||||
gTasks[taskId].func = sub_80AA124;
|
||||
gTasks[taskId].func = AnimTask_FrozenIceCube_Step4;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
}
|
||||
else
|
||||
|
@ -459,7 +463,7 @@ static void sub_80AA0D0(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static void sub_80AA124(u8 taskId)
|
||||
static void AnimTask_FrozenIceCube_Step4(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[1]++;
|
||||
if (gTasks[taskId].data[1] == 37)
|
||||
|
|
|
@ -25,18 +25,18 @@ static EWRAM_DATA struct AnimStatsChangeData *sAnimStatsChangeData = {0};
|
|||
|
||||
static void StartBlendAnimSpriteColor(u8, u32);
|
||||
static void AnimTask_BlendSpriteColor_Step2(u8);
|
||||
static void sub_81169A0(u8);
|
||||
static void sub_81169F8(u8);
|
||||
static void sub_8116AD0(struct Sprite*);
|
||||
static void sub_8116D64(u8);
|
||||
static void AnimTask_HardwarePaletteFade_Step(u8);
|
||||
static void AnimTask_TraceMonBlended_Step(u8);
|
||||
static void AnimMonTrace(struct Sprite*);
|
||||
static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8);
|
||||
static void sub_8116F04(u8);
|
||||
static void sub_81170EC(u8);
|
||||
static void sub_81172EC(u8);
|
||||
static void sub_8117500(u8);
|
||||
static void AnimTask_Flash_Step(u8);
|
||||
static void sub_81175C4(u32, u16);
|
||||
static void sub_81176D8(u8);
|
||||
static void AnimTask_UpdateSlidingBg(u8);
|
||||
static void sub_8117A60(u8);
|
||||
static void ExtremSpeedMoveTarget_Step(u8);
|
||||
static void AnimTask_WaitAndRestoreVisibility(u8);
|
||||
|
||||
const u16 gUnknown_08597418 = RGB(31, 31, 31);
|
||||
|
||||
|
@ -202,10 +202,10 @@ void AnimTask_HardwarePaletteFade(u8 taskId)
|
|||
gBattleAnimArgs[3],
|
||||
gBattleAnimArgs[4]);
|
||||
|
||||
gTasks[taskId].func = sub_81169A0;
|
||||
gTasks[taskId].func = AnimTask_HardwarePaletteFade_Step;
|
||||
}
|
||||
|
||||
static void sub_81169A0(u8 taskId)
|
||||
static void AnimTask_HardwarePaletteFade_Step(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
|
@ -222,10 +222,10 @@ void AnimTask_TraceMonBlended(u8 taskId)
|
|||
task->data[3] = gBattleAnimArgs[2];
|
||||
task->data[4] = gBattleAnimArgs[3];
|
||||
task->data[5] = 0;
|
||||
task->func = sub_81169F8;
|
||||
task->func = AnimTask_TraceMonBlended_Step;
|
||||
}
|
||||
|
||||
static void sub_81169F8(u8 taskId)
|
||||
static void AnimTask_TraceMonBlended_Step(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
|
@ -244,7 +244,7 @@ static void sub_81169F8(u8 taskId)
|
|||
gSprites[task->data[6]].data[0] = task->data[3];
|
||||
gSprites[task->data[6]].data[1] = taskId;
|
||||
gSprites[task->data[6]].data[2] = 5;
|
||||
gSprites[task->data[6]].callback = sub_8116AD0;
|
||||
gSprites[task->data[6]].callback = AnimMonTrace;
|
||||
task->data[5]++;
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ static void sub_81169F8(u8 taskId)
|
|||
}
|
||||
}
|
||||
|
||||
static void sub_8116AD0(struct Sprite *sprite)
|
||||
static void AnimMonTrace(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0])
|
||||
{
|
||||
|
@ -339,10 +339,10 @@ void AnimTask_DrawFallingWhiteLinesOnAttacker(u8 taskId)
|
|||
gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32;
|
||||
gTasks[taskId].data[0] = newSpriteId;
|
||||
gTasks[taskId].data[6] = var0;
|
||||
gTasks[taskId].func = sub_8116D64;
|
||||
gTasks[taskId].func = AnimTask_DrawFallingWhiteLinesOnAttacker_Step;
|
||||
}
|
||||
|
||||
static void sub_8116D64(u8 taskId)
|
||||
static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8 taskId)
|
||||
{
|
||||
struct BattleAnimBgData unknownStruct;
|
||||
struct Sprite *sprite;
|
||||
|
@ -613,10 +613,10 @@ void AnimTask_Flash(u8 taskId)
|
|||
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
gTasks[taskId].func = sub_8117500;
|
||||
gTasks[taskId].func = AnimTask_Flash_Step;
|
||||
}
|
||||
|
||||
static void sub_8117500(u8 taskId)
|
||||
static void AnimTask_Flash_Step(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
@ -706,7 +706,7 @@ void AnimTask_StartSlidingBg(u8 taskId)
|
|||
u8 newTaskId;
|
||||
|
||||
sub_80A6DAC(0);
|
||||
newTaskId = CreateTask(sub_81176D8, 5);
|
||||
newTaskId = CreateTask(AnimTask_UpdateSlidingBg, 5);
|
||||
if (gBattleAnimArgs[2] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||
|
@ -720,7 +720,7 @@ void AnimTask_StartSlidingBg(u8 taskId)
|
|||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
static void sub_81176D8(u8 taskId)
|
||||
static void AnimTask_UpdateSlidingBg(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[10] += gTasks[taskId].data[1];
|
||||
gTasks[taskId].data[11] += gTasks[taskId].data[2];
|
||||
|
@ -1041,8 +1041,7 @@ void AnimTask_SetAnimAttackerAndTargetForEffectAtk(u8 taskId)
|
|||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
// TODO: Rename. Also used by Faint Attack
|
||||
void AnimTask_ExtremeSpeedMoveTarget(u8 taskId)
|
||||
void AnimTask_SetAttackerInvisibleWaitForSignal(u8 taskId)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
|
@ -1052,12 +1051,12 @@ void AnimTask_ExtremeSpeedMoveTarget(u8 taskId)
|
|||
{
|
||||
gTasks[taskId].data[0] = gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible;
|
||||
gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = TRUE;
|
||||
gTasks[taskId].func = ExtremSpeedMoveTarget_Step;
|
||||
gTasks[taskId].func = AnimTask_WaitAndRestoreVisibility;
|
||||
gAnimVisualTaskCount--;
|
||||
}
|
||||
}
|
||||
|
||||
static void ExtremSpeedMoveTarget_Step(u8 taskId)
|
||||
static void AnimTask_WaitAndRestoreVisibility(u8 taskId)
|
||||
{
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == 0x1000)
|
||||
{
|
||||
|
|
|
@ -566,7 +566,7 @@ static void AnimSparkElectricity(struct Sprite *sprite)
|
|||
gOamMatrices[matrixNum].c = -sineVal;
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
sprite->callback = sub_810E2C8;
|
||||
sprite->callback = DestroyAnimSpriteAfterTimer;
|
||||
}
|
||||
|
||||
static void AnimZapCannonSpark(struct Sprite *sprite)
|
||||
|
|
|
@ -534,7 +534,7 @@ static void AnimFlyBallAttack_Step(struct Sprite *sprite)
|
|||
}
|
||||
}
|
||||
|
||||
void sub_810E2C8(struct Sprite *sprite)
|
||||
void DestroyAnimSpriteAfterTimer(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0]-- <= 0)
|
||||
{
|
||||
|
@ -899,7 +899,7 @@ static void sub_810E520(struct Sprite *sprite)
|
|||
if (sprite->pos1.y + sprite->pos2.y >= data->unkE_1)
|
||||
{
|
||||
sprite->data[0] = 0;
|
||||
sprite->callback = sub_810E2C8;
|
||||
sprite->callback = DestroyAnimSpriteAfterTimer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
42
src/normal.c
42
src/normal.c
|
@ -16,10 +16,11 @@ static void sub_81159B4(struct Sprite *);
|
|||
static void AnimShakeMonOrBattleTerrain(struct Sprite *);
|
||||
static void AnimShakeMonOrBattleTerrain_Step(struct Sprite *);
|
||||
static void AnimShakeMonOrBattleTerrain_UpdateCoordOffsetEnabled(void);
|
||||
static void AnimBasicHitSplat(struct Sprite *);
|
||||
static void sub_8116420(struct Sprite *);
|
||||
static void AnimHitSplatBasic(struct Sprite *);
|
||||
static void AnimHitSplatPersistent(struct Sprite *);
|
||||
static void AnimHitSplatHandleInvert(struct Sprite *);
|
||||
static void AnimHitSplatRandom(struct Sprite *);
|
||||
static void AnimExtremeSpeedHitSplat(struct Sprite *);
|
||||
static void AnimHitSplatOnMonEdge(struct Sprite *);
|
||||
static void AnimCrossImpact(struct Sprite *);
|
||||
static void AnimFlashingHitSplat(struct Sprite *);
|
||||
static void AnimFlashingHitSplat_Step(struct Sprite *);
|
||||
|
@ -33,7 +34,6 @@ static void AnimTask_BlendColorCycleByTagLoop(u8);
|
|||
static void AnimTask_FlashAnimTagWithColor_Step1(u8);
|
||||
static void AnimTask_FlashAnimTagWithColor_Step2(u8);
|
||||
static void AnimTask_ShakeBattleTerrain_Step(u8);
|
||||
static void sub_81163D0(struct Sprite *);
|
||||
|
||||
static const union AnimCmd sAnim_ConfusionDuck_0[] =
|
||||
{
|
||||
|
@ -173,11 +173,10 @@ const struct SpriteTemplate gBasicHitSplatSpriteTemplate =
|
|||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_HitSplat,
|
||||
.callback = AnimBasicHitSplat,
|
||||
.callback = AnimHitSplatBasic,
|
||||
};
|
||||
|
||||
// TODO: Needs generic descriptive name, what distinguishes this hit splat
|
||||
const struct SpriteTemplate gSpikeHitSplatSpriteTemplate =
|
||||
const struct SpriteTemplate gHandleInvertHitSplatSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_IMPACT,
|
||||
.paletteTag = ANIM_TAG_IMPACT,
|
||||
|
@ -185,7 +184,7 @@ const struct SpriteTemplate gSpikeHitSplatSpriteTemplate =
|
|||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_HitSplat,
|
||||
.callback = sub_8116420,
|
||||
.callback = AnimHitSplatHandleInvert,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gWaterHitSplatSpriteTemplate =
|
||||
|
@ -196,7 +195,7 @@ const struct SpriteTemplate gWaterHitSplatSpriteTemplate =
|
|||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_HitSplat,
|
||||
.callback = AnimBasicHitSplat,
|
||||
.callback = AnimHitSplatBasic,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gRandomPosHitSplatSpriteTemplate =
|
||||
|
@ -210,8 +209,7 @@ const struct SpriteTemplate gRandomPosHitSplatSpriteTemplate =
|
|||
.callback = AnimHitSplatRandom,
|
||||
};
|
||||
|
||||
// TODO: Needs generic descriptive name, what distinguishes this hit splat
|
||||
const struct SpriteTemplate gExtremeSpeedHitSplatSpriteTemplate =
|
||||
const struct SpriteTemplate gMonEdgeHitSplatSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_IMPACT,
|
||||
.paletteTag = ANIM_TAG_IMPACT,
|
||||
|
@ -219,7 +217,7 @@ const struct SpriteTemplate gExtremeSpeedHitSplatSpriteTemplate =
|
|||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_HitSplat,
|
||||
.callback = AnimExtremeSpeedHitSplat,
|
||||
.callback = AnimHitSplatOnMonEdge,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gCrossImpactSpriteTemplate =
|
||||
|
@ -244,8 +242,7 @@ const struct SpriteTemplate gFlashingHitSplatSpriteTemplate =
|
|||
.callback = AnimFlashingHitSplat,
|
||||
};
|
||||
|
||||
// TODO: Needs generic descriptive name, what distinguishes this hit splat
|
||||
const struct SpriteTemplate gRevengeHitSplatSpriteTemplate =
|
||||
const struct SpriteTemplate gPersistHitSplatSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_IMPACT,
|
||||
.paletteTag = ANIM_TAG_IMPACT,
|
||||
|
@ -253,7 +250,7 @@ const struct SpriteTemplate gRevengeHitSplatSpriteTemplate =
|
|||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_HitSplat,
|
||||
.callback = sub_81163D0,
|
||||
.callback = AnimHitSplatPersistent,
|
||||
};
|
||||
|
||||
// Moves a spinning duck around the mon's head.
|
||||
|
@ -929,7 +926,7 @@ static void AnimTask_ShakeBattleTerrain_Step(u8 taskId)
|
|||
#undef tTimer
|
||||
#undef tShakeDelay
|
||||
|
||||
static void AnimBasicHitSplat(struct Sprite *sprite)
|
||||
static void AnimHitSplatBasic(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||
|
@ -941,7 +938,8 @@ static void AnimBasicHitSplat(struct Sprite *sprite)
|
|||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
static void sub_81163D0(struct Sprite *sprite)
|
||||
// Same as basic hit splat but takes a length of time to persist for (arg4)
|
||||
static void AnimHitSplatPersistent(struct Sprite *sprite)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||
|
@ -951,15 +949,17 @@ static void sub_81163D0(struct Sprite *sprite)
|
|||
|
||||
sprite->data[0] = gBattleAnimArgs[4];
|
||||
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||
StoreSpriteCallbackInData6(sprite, sub_810E2C8);
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSpriteAfterTimer);
|
||||
}
|
||||
|
||||
static void sub_8116420(struct Sprite *sprite)
|
||||
// For paired hit splats whose position is inverted when used by the opponent on the player.
|
||||
// Used by Twineedle and Spike Cannon
|
||||
static void AnimHitSplatHandleInvert(struct Sprite *sprite)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER && !IsContest())
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
|
||||
AnimBasicHitSplat(sprite);
|
||||
AnimHitSplatBasic(sprite);
|
||||
}
|
||||
|
||||
static void AnimHitSplatRandom(struct Sprite *sprite)
|
||||
|
@ -980,7 +980,7 @@ static void AnimHitSplatRandom(struct Sprite *sprite)
|
|||
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||
}
|
||||
|
||||
static void AnimExtremeSpeedHitSplat(struct Sprite *sprite)
|
||||
static void AnimHitSplatOnMonEdge(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
||||
sprite->pos1.x = gSprites[sprite->data[0]].pos1.x + gSprites[sprite->data[0]].pos2.x;
|
||||
|
|
Loading…
Reference in a new issue