Document move anims I-S

This commit is contained in:
GriffinR 2020-02-16 17:49:24 -05:00 committed by huderlem
parent 501d0d3c18
commit 1ba12dc050
22 changed files with 933 additions and 905 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1328,7 +1328,7 @@ const struct SpriteTemplate gUnknown_08592AC4 =
.callback = sub_8100E1C, .callback = sub_8100E1C,
}; };
const struct SpriteTemplate gUnknown_08592ADC = const struct SpriteTemplate gProtectSpriteTemplate =
{ {
.tileTag = ANIM_TAG_PROTECT, .tileTag = ANIM_TAG_PROTECT,
.paletteTag = ANIM_TAG_PROTECT, .paletteTag = ANIM_TAG_PROTECT,
@ -2791,7 +2791,7 @@ static void AnimConstrictBindingStep2(struct Sprite* sprite)
} }
} }
void sub_80FF458(u8 taskId) void AnimTask_ShrinkTargetCopy(u8 taskId)
{ {
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
if (gSprites[spriteId].invisible) if (gSprites[spriteId].invisible)
@ -3627,7 +3627,7 @@ static void AnimFlyingParticleStep(struct Sprite* sprite)
DestroySpriteAndMatrix(sprite); DestroySpriteAndMatrix(sprite);
} }
void sub_81007C4(u8 taskId) void AnimTask_CycleMagicalLeafPal(u8 taskId)
{ {
struct Task* task = &gTasks[taskId]; struct Task* task = &gTasks[taskId];
switch (task->data[0]) switch (task->data[0])

View File

@ -78,7 +78,7 @@ static void AnimTask_SplashStep(u8);
static void AnimTask_GrowAndShrinkStep(u8); static void AnimTask_GrowAndShrinkStep(u8);
static void ThrashMoveMonStep(u8); static void ThrashMoveMonStep(u8);
static void ThrashMoveMon(u8); static void ThrashMoveMon(u8);
static void AnimTask_SketchDrawMon(u8); static void AnimTask_SketchDrawMonStep(u8);
static void AnimPencil_Step(struct Sprite *); static void AnimPencil_Step(struct Sprite *);
static void AnimSoftBoiledEgg_Step1(struct Sprite *); static void AnimSoftBoiledEgg_Step1(struct Sprite *);
static void AnimSoftBoiledEgg_Step2(struct Sprite *); static void AnimSoftBoiledEgg_Step2(struct Sprite *);
@ -307,7 +307,7 @@ const union AffineAnimCmd *const gWaterPulseRingAffineAnimTable[] =
gWaterPulseRingAffineAnimCmds, gWaterPulseRingAffineAnimCmds,
}; };
const struct SpriteTemplate gSupersonicWaveSpriteTemplate = const struct SpriteTemplate gSupersonicRingSpriteTemplate =
{ {
.tileTag = ANIM_TAG_GOLD_RING, .tileTag = ANIM_TAG_GOLD_RING,
.paletteTag = ANIM_TAG_GOLD_RING, .paletteTag = ANIM_TAG_GOLD_RING,
@ -318,7 +318,7 @@ const struct SpriteTemplate gSupersonicWaveSpriteTemplate =
.callback = TranslateAnimSpriteToTargetMonLocation, .callback = TranslateAnimSpriteToTargetMonLocation,
}; };
const struct SpriteTemplate gScreechWaveSpriteTemplate = const struct SpriteTemplate gScreechRingSpriteTemplate =
{ {
.tileTag = ANIM_TAG_PURPLE_RING, .tileTag = ANIM_TAG_PURPLE_RING,
.paletteTag = ANIM_TAG_PURPLE_RING, .paletteTag = ANIM_TAG_PURPLE_RING,
@ -2374,7 +2374,7 @@ static void ThrashMoveMon(u8 taskId)
} }
} }
void sub_8104E74(u8 taskId) void AnimTask_SketchDrawMon(u8 taskId)
{ {
struct Task* task = &gTasks[taskId]; struct Task* task = &gTasks[taskId];
struct ScanlineEffectParams params; struct ScanlineEffectParams params;
@ -2412,10 +2412,10 @@ void sub_8104E74(u8 taskId)
params.initState = 1; params.initState = 1;
params.unused9 = 0; params.unused9 = 0;
ScanlineEffect_SetParams(params); ScanlineEffect_SetParams(params);
task->func = AnimTask_SketchDrawMon; task->func = AnimTask_SketchDrawMonStep;
} }
static void AnimTask_SketchDrawMon(u8 taskId) static void AnimTask_SketchDrawMonStep(u8 taskId)
{ {
struct Task* task = &gTasks[taskId]; struct Task* task = &gTasks[taskId];

View File

@ -1522,9 +1522,9 @@ void AnimFang(struct Sprite *sprite)
void AnimTask_IsTargetPlayerSide(u8 taskId) void AnimTask_IsTargetPlayerSide(u8 taskId)
{ {
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT) if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT)
gBattleAnimArgs[7] = 0; gBattleAnimArgs[7] = FALSE;
else else
gBattleAnimArgs[7] = 1; gBattleAnimArgs[7] = TRUE;
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
@ -1532,9 +1532,9 @@ void AnimTask_IsTargetPlayerSide(u8 taskId)
void AnimTask_IsHealingMove(u8 taskId) void AnimTask_IsHealingMove(u8 taskId)
{ {
if (gAnimMoveDmg > 0) if (gAnimMoveDmg > 0)
gBattleAnimArgs[7] = 0; gBattleAnimArgs[7] = FALSE;
else else
gBattleAnimArgs[7] = 1; gBattleAnimArgs[7] = TRUE;
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }

View File

@ -589,7 +589,7 @@ static void sub_80D5B48(struct Sprite *sprite)
u8 spriteId; u8 spriteId;
u8 battlerId; u8 battlerId;
sprite->invisible = TRUE; sprite->invisible = TRUE;
if (!gBattleAnimArgs[0]) if (gBattleAnimArgs[0] == ANIM_ATTACKER)
{ {
battlerId = gBattleAnimAttacker; battlerId = gBattleAnimAttacker;
} }
@ -698,16 +698,17 @@ void AnimTask_WindUpLungePart2(u8 taskId)
} }
} }
void sub_80D5DB0(u8 taskId) // To move a mon off-screen when pushed out by Roar/Whirlwind
void AnimTask_SlideOffScreen(u8 taskId)
{ {
u8 spriteId; u8 spriteId;
switch (gBattleAnimArgs[0]) switch (gBattleAnimArgs[0])
{ {
case 0: case ANIM_ATTACKER:
case 1: case ANIM_TARGET:
spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
break; break;
case 2: case ANIM_ATK_PARTNER:
if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
{ {
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
@ -715,7 +716,7 @@ void sub_80D5DB0(u8 taskId)
} }
spriteId = gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]; spriteId = gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)];
break; break;
case 3: case ANIM_DEF_PARTNER:
if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget))) if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget)))
{ {
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);

View File

@ -2329,7 +2329,10 @@ void AnimSpinningSparkle(struct Sprite *sprite)
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
} }
void sub_80A8BC4(u8 taskId) // Slides attacker to right and back with a cloned trace of the specified color
// arg0: Trace palette blend color
// arg1: Trace palette blend coeff
void AnimTask_AttackerPunchWithTrace(u8 taskId)
{ {
u16 src; u16 src;
u16 dest; u16 dest;

View File

@ -245,7 +245,7 @@ static const struct SubspriteTable gUnknown_0853EF40[] =
{ARRAY_COUNT(gUnknown_0853EF30), gUnknown_0853EF30}, {ARRAY_COUNT(gUnknown_0853EF30), gUnknown_0853EF30},
}; };
static const struct SpriteTemplate gUnknown_0853EF48 = static const struct SpriteTemplate gFrozenIceCubeSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_CUBE, .tileTag = ANIM_TAG_ICE_CUBE,
.paletteTag = ANIM_TAG_ICE_CUBE, .paletteTag = ANIM_TAG_ICE_CUBE,
@ -376,7 +376,7 @@ static void sub_80A9E78(struct Sprite *sprite)
} }
} }
void sub_80A9EF4(u8 taskId) void AnimTask_FrozenIceCube(u8 taskId)
{ {
s16 x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) - 32; s16 x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) - 32;
s16 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) - 36; s16 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) - 36;
@ -386,7 +386,7 @@ void sub_80A9EF4(u8 taskId)
x -= 6; x -= 6;
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
spriteId = CreateSprite(&gUnknown_0853EF48, x, y, 4); spriteId = CreateSprite(&gFrozenIceCubeSpriteTemplate, x, y, 4);
if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == 0xFFFF) if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == 0xFFFF)
gSprites[spriteId].invisible = TRUE; gSprites[spriteId].invisible = TRUE;
SetSubspriteTables(&gSprites[spriteId], gUnknown_0853EF40); SetSubspriteTables(&gSprites[spriteId], gUnknown_0853EF40);

View File

@ -45,7 +45,7 @@ const u16 gUnknown_08597418 = RGB(31, 31, 31);
const u8 gUnknown_0859741A[] = {REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, REG_OFFSET_BG2CNT, REG_OFFSET_BG3CNT}; const u8 gUnknown_0859741A[] = {REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, REG_OFFSET_BG2CNT, REG_OFFSET_BG3CNT};
const u8 gUnknown_0859741E[] = {REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, REG_OFFSET_BG2CNT, REG_OFFSET_BG3CNT}; const u8 gUnknown_0859741E[] = {REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, REG_OFFSET_BG2CNT, REG_OFFSET_BG3CNT};
void AnimTask_BlendMonColor(u8 taskId) void AnimTask_BlendBattleAnimPal(u8 taskId)
{ {
u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gBattleAnimArgs[0]); u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gBattleAnimArgs[0]);
selectedPalettes |= sub_80A76C4((gBattleAnimArgs[0] >> 7) & 1, selectedPalettes |= sub_80A76C4((gBattleAnimArgs[0] >> 7) & 1,

View File

@ -4,8 +4,8 @@
#include "trig.h" #include "trig.h"
#include "constants/rgb.h" #include "constants/rgb.h"
void sub_8110368(struct Sprite *); static void AnimMegahornHorn(struct Sprite *);
void sub_8110438(struct Sprite *); static void AnimLeechLifeNeedle(struct Sprite *);
void AnimTranslateWebThread(struct Sprite *); void AnimTranslateWebThread(struct Sprite *);
void sub_81105B4(struct Sprite *); void sub_81105B4(struct Sprite *);
void sub_811067C(struct Sprite *); void sub_811067C(struct Sprite *);
@ -43,7 +43,7 @@ const union AffineAnimCmd *const gUnknown_08596968[] =
gUnknown_08596958, gUnknown_08596958,
}; };
const struct SpriteTemplate gUnknown_08596974 = const struct SpriteTemplate gMegahornHornSpriteTemplate =
{ {
.tileTag = ANIM_TAG_HORN_HIT_2, .tileTag = ANIM_TAG_HORN_HIT_2,
.paletteTag = ANIM_TAG_HORN_HIT_2, .paletteTag = ANIM_TAG_HORN_HIT_2,
@ -51,7 +51,7 @@ const struct SpriteTemplate gUnknown_08596974 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08596968, .affineAnims = gUnknown_08596968,
.callback = sub_8110368, .callback = AnimMegahornHorn,
}; };
const union AffineAnimCmd gUnknown_0859698C[] = const union AffineAnimCmd gUnknown_0859698C[] =
@ -79,7 +79,7 @@ const union AffineAnimCmd *const gUnknown_085969BC[] =
gUnknown_085969AC, gUnknown_085969AC,
}; };
const struct SpriteTemplate gUnknown_085969C8 = const struct SpriteTemplate gLeechLifeNeedleSpriteTemplate =
{ {
.tileTag = ANIM_TAG_NEEDLE, .tileTag = ANIM_TAG_NEEDLE,
.paletteTag = ANIM_TAG_NEEDLE, .paletteTag = ANIM_TAG_NEEDLE,
@ -87,7 +87,7 @@ const struct SpriteTemplate gUnknown_085969C8 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_085969BC, .affineAnims = gUnknown_085969BC,
.callback = sub_8110438, .callback = AnimLeechLifeNeedle,
}; };
const struct SpriteTemplate gWebThreadSpriteTemplate = const struct SpriteTemplate gWebThreadSpriteTemplate =
@ -195,7 +195,7 @@ const struct SpriteTemplate gUnknown_08596AC8 =
.callback = sub_8110994, .callback = sub_8110994,
}; };
void sub_8110368(struct Sprite *sprite) static void AnimMegahornHorn(struct Sprite *sprite)
{ {
if (IsContest()) if (IsContest())
{ {
@ -223,7 +223,7 @@ void sub_8110368(struct Sprite *sprite)
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
} }
void sub_8110438(struct Sprite *sprite) static void AnimLeechLifeNeedle(struct Sprite *sprite)
{ {
if (IsContest()) if (IsContest())
{ {

View File

@ -395,7 +395,7 @@ static void sub_8113B90(struct Sprite *sprite)
DestroySpriteAndMatrix(sprite); DestroySpriteAndMatrix(sprite);
} }
void sub_8113BAC(u8 taskId) void AnimTask_MoveAttackerMementoShadow(u8 taskId)
{ {
struct ScanlineEffectParams scanlineParams; struct ScanlineEffectParams scanlineParams;
struct BattleAnimBgData animBg; struct BattleAnimBgData animBg;
@ -524,7 +524,7 @@ static void sub_8113D60(u8 taskId)
} }
} }
void sub_8113E78(u8 taskId) void AnimTask_MoveTargetMementoShadow(u8 taskId)
{ {
struct BattleAnimBgData animBg; struct BattleAnimBgData animBg;
struct ScanlineEffectParams scanlineParams; struct ScanlineEffectParams scanlineParams;
@ -770,7 +770,7 @@ static void sub_8114374(u8 priority)
} }
} }
void sub_81143C0(u8 taskId) void AnimTask_InitMementoShadow(u8 taskId)
{ {
u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0; u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0;
MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE); MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE);

View File

@ -5,11 +5,11 @@
#include "trig.h" #include "trig.h"
#include "constants/rgb.h" #include "constants/rgb.h"
void sub_8113064(struct Sprite *); static void AnimOutrageFlame(struct Sprite *);
static void AnimDragonRageFirePlume(struct Sprite *); static void AnimDragonRageFirePlume(struct Sprite *);
static void AnimDragonFireToTarget(struct Sprite *); static void AnimDragonFireToTarget(struct Sprite *);
static void AnimDragonDanceOrb(struct Sprite *); static void AnimDragonDanceOrb(struct Sprite *);
void sub_81135EC(struct Sprite *); static void AnimOverheatFlame(struct Sprite *);
static void sub_81132E0(struct Sprite *); static void sub_81132E0(struct Sprite *);
static void sub_81134B8(u8); static void sub_81134B8(u8);
static void sub_8113574(struct Task *); static void sub_8113574(struct Task *);
@ -32,7 +32,7 @@ const union AnimCmd *const gUnknown_08596E78[] =
gUnknown_08596E60, gUnknown_08596E60,
}; };
const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E7C = const struct SpriteTemplate gOutrageFlameSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SMALL_EMBER, .tileTag = ANIM_TAG_SMALL_EMBER,
.paletteTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER,
@ -40,7 +40,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E7C =
.anims = gUnknown_08596E78, .anims = gUnknown_08596E78,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8113064, .callback = AnimOutrageFlame,
}; };
const union AnimCmd gUnknown_08596E94[] = const union AnimCmd gUnknown_08596E94[] =
@ -176,7 +176,7 @@ const struct SpriteTemplate gDragonDanceOrbSpriteTemplate =
.callback = AnimDragonDanceOrb, .callback = AnimDragonDanceOrb,
}; };
const struct SpriteTemplate gUnknown_08596FB0 = const struct SpriteTemplate gOverheatFlameSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SMALL_EMBER, .tileTag = ANIM_TAG_SMALL_EMBER,
.paletteTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER,
@ -184,10 +184,10 @@ const struct SpriteTemplate gUnknown_08596FB0 =
.anims = gUnknown_08596E78, .anims = gUnknown_08596E78,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81135EC, .callback = AnimOverheatFlame,
}; };
void sub_8113064(struct Sprite *sprite) static void AnimOutrageFlame(struct Sprite *sprite)
{ {
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
@ -207,7 +207,7 @@ void sub_8113064(struct Sprite *sprite)
sprite->data[1] = gBattleAnimArgs[3]; sprite->data[1] = gBattleAnimArgs[3];
sprite->data[3] = gBattleAnimArgs[4]; sprite->data[3] = gBattleAnimArgs[4];
sprite->data[5] = gBattleAnimArgs[5]; sprite->data[5] = gBattleAnimArgs[5];
sprite->invisible = 1; sprite->invisible = TRUE;
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
sprite->callback = TranslateSpriteLinearAndFlicker; sprite->callback = TranslateSpriteLinearAndFlicker;
} }
@ -410,7 +410,7 @@ static void sub_8113574(struct Task *task)
task->data[5] = (task->data[5] + 9) & 0xFF; task->data[5] = (task->data[5] + 9) & 0xFF;
} }
void sub_81135EC(struct Sprite *sprite) static void AnimOverheatFlame(struct Sprite *sprite)
{ {
int r6 = (gBattleAnimArgs[2] * 3) / 5; int r6 = (gBattleAnimArgs[2] * 3) / 5;
int i; int i;

View File

@ -5,7 +5,7 @@
#include "constants/songs.h" #include "constants/songs.h"
#include "sound.h" #include "sound.h"
static void sub_810A1A8(struct Sprite *); static void AnimLightning(struct Sprite *);
static void sub_810A1F8(struct Sprite *); static void sub_810A1F8(struct Sprite *);
static void sub_810A214(struct Sprite *); static void sub_810A214(struct Sprite *);
static void sub_810A258(struct Sprite *); static void sub_810A258(struct Sprite *);
@ -25,13 +25,13 @@ static void sub_810AAB0(struct Sprite *);
static void sub_810AB78(u8 taskId); static void sub_810AB78(u8 taskId);
static void sub_810AC8C(struct Sprite *); static void sub_810AC8C(struct Sprite *);
static void sub_810ACC0(struct Sprite *); static void sub_810ACC0(struct Sprite *);
static void AnimGrowingElectricOrb(struct Sprite *); static void AnimGrowingChargeOrb(struct Sprite *);
static void AnimElectricPuff(struct Sprite *); static void AnimElectricPuff(struct Sprite *);
static void sub_810AD98(struct Sprite *); static void sub_810AD98(struct Sprite *);
static void sub_810ADF8(struct Sprite *); static void sub_810ADF8(struct Sprite *);
static bool8 sub_810B154(struct Task *task, u8 taskId); static bool8 sub_810B154(struct Task *task, u8 taskId);
static void sub_810B1F0(struct Sprite *); static void sub_810B1F0(struct Sprite *);
static void sub_810B23C(struct Sprite *); static void AnimGrowingShockWaveOrb(struct Sprite *);
static bool8 sub_810B430(struct Task *task, u8 taskId); static bool8 sub_810B430(struct Task *task, u8 taskId);
static void sub_810B51C(struct Sprite *); static void sub_810B51C(struct Sprite *);
static bool8 sub_810B614(struct Task *task, u8 taskId); static bool8 sub_810B614(struct Task *task, u8 taskId);
@ -52,7 +52,7 @@ const union AnimCmd *const gUnknown_085956BC[] =
gUnknown_085956A4, gUnknown_085956A4,
}; };
const struct SpriteTemplate gUnknown_085956C0 = const struct SpriteTemplate gLightningSpriteTemplate =
{ {
.tileTag = ANIM_TAG_LIGHTNING, .tileTag = ANIM_TAG_LIGHTNING,
.paletteTag = ANIM_TAG_LIGHTNING, .paletteTag = ANIM_TAG_LIGHTNING,
@ -60,7 +60,7 @@ const struct SpriteTemplate gUnknown_085956C0 =
.anims = gUnknown_085956BC, .anims = gUnknown_085956BC,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810A1A8, .callback = AnimLightning,
}; };
const union AffineAnimCmd gUnknown_085956D8[] = const union AffineAnimCmd gUnknown_085956D8[] =
@ -331,7 +331,7 @@ const union AffineAnimCmd *const gUnknown_08595950[] =
gUnknown_08595930, gUnknown_08595930,
}; };
const struct SpriteTemplate gGrowingElectricOrbSpriteTemplate = const struct SpriteTemplate gGrowingChargeOrbSpriteTemplate =
{ {
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -339,7 +339,7 @@ const struct SpriteTemplate gGrowingElectricOrbSpriteTemplate =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08595950, .affineAnims = gUnknown_08595950,
.callback = AnimGrowingElectricOrb, .callback = AnimGrowingChargeOrb,
}; };
const union AnimCmd gUnknown_08595974[] = const union AnimCmd gUnknown_08595974[] =
@ -432,7 +432,7 @@ const struct SpriteTemplate gUnknown_08595A00 =
.callback = sub_810B1F0, .callback = sub_810B1F0,
}; };
const struct SpriteTemplate gUnknown_08595A18 = const struct SpriteTemplate gGrowingShockWaveOrbSpriteTemplate =
{ {
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -440,10 +440,10 @@ const struct SpriteTemplate gUnknown_08595A18 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08595950, .affineAnims = gUnknown_08595950,
.callback = sub_810B23C, .callback = AnimGrowingShockWaveOrb,
}; };
const struct SpriteTemplate gUnknown_08595A30 = const struct SpriteTemplate gShockWaveProgressingBoltSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SPARK, .tileTag = ANIM_TAG_SPARK,
.paletteTag = ANIM_TAG_SPARK, .paletteTag = ANIM_TAG_SPARK,
@ -454,7 +454,7 @@ const struct SpriteTemplate gUnknown_08595A30 =
.callback = sub_810B51C, .callback = sub_810B51C,
}; };
static void sub_810A1A8(struct Sprite *sprite) static void AnimLightning(struct Sprite *sprite)
{ {
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
sprite->pos1.x -= gBattleAnimArgs[0]; sprite->pos1.x -= gBattleAnimArgs[0];
@ -883,8 +883,7 @@ static void sub_810ACC0(struct Sprite *sprite)
sprite->callback = sub_810AC8C; sprite->callback = sub_810AC8C;
} }
// The growing orb for Charge static void AnimGrowingChargeOrb(struct Sprite *sprite)
static void AnimGrowingElectricOrb(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[0] == ANIM_ATTACKER) if (gBattleAnimArgs[0] == ANIM_ATTACKER)
{ {
@ -1120,7 +1119,7 @@ static void sub_810B1F0(struct Sprite *sprite)
} }
} }
static void sub_810B23C(struct Sprite *sprite) static void AnimGrowingShockWaveOrb(struct Sprite *sprite)
{ {
switch (sprite->data[0]) switch (sprite->data[0])
{ {
@ -1137,7 +1136,8 @@ static void sub_810B23C(struct Sprite *sprite)
} }
} }
void sub_810B29C(u8 taskId) // Thin bolt of electricity that moves up and down toward the target. Used by Shock Wave
void AnimTask_ShockWaveProgressingBolt(u8 taskId)
{ {
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];
@ -1217,7 +1217,7 @@ void sub_810B29C(u8 taskId)
static bool8 sub_810B430(struct Task *task, u8 taskId) static bool8 sub_810B430(struct Task *task, u8 taskId)
{ {
u8 spriteId = CreateSprite(&gUnknown_08595A30, task->data[6], task->data[7], 35); u8 spriteId = CreateSprite(&gShockWaveProgressingBoltSpriteTemplate, task->data[6], task->data[7], 35);
if (spriteId != MAX_SPRITES) if (spriteId != MAX_SPRITES)
{ {
gSprites[spriteId].oam.tileNum += task->data[4]; gSprites[spriteId].oam.tileNum += task->data[4];
@ -1261,7 +1261,7 @@ static void sub_810B51C(struct Sprite *sprite)
} }
} }
void sub_810B55C(u8 taskId) void AnimTask_ShockWaveLightning(u8 taskId)
{ {
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];
@ -1296,7 +1296,7 @@ void sub_810B55C(u8 taskId)
bool8 sub_810B614(struct Task *task, u8 taskId) bool8 sub_810B614(struct Task *task, u8 taskId)
{ {
u8 spriteId = CreateSprite(&gUnknown_085956C0, task->data[13], task->data[14], task->data[12]); u8 spriteId = CreateSprite(&gLightningSpriteTemplate, task->data[13], task->data[14], task->data[12]);
if (spriteId != MAX_SPRITES) if (spriteId != MAX_SPRITES)
{ {

View File

@ -96,7 +96,7 @@ const union AnimCmd *const gUnknown_08595E60[] =
gUnknown_08595E4C, gUnknown_08595E4C,
}; };
const struct SpriteTemplate gUnknown_08595E68 = const struct SpriteTemplate gKarateChopSpriteTemplate =
{ {
.tileTag = ANIM_TAG_HANDS_AND_FEET, .tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET,
@ -151,7 +151,7 @@ const struct SpriteTemplate gCrossChopHandSpriteTemplate =
.callback = AnimCrossChopHand, .callback = AnimCrossChopHand,
}; };
const struct SpriteTemplate gUnknown_08595EE0 = const struct SpriteTemplate gSlidingKickSpriteTemplate =
{ {
.tileTag = ANIM_TAG_HANDS_AND_FEET, .tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET,
@ -342,7 +342,7 @@ const union AnimCmd *const gUnknown_0859607C[] =
gUnknown_0859606C, gUnknown_0859606C,
}; };
const struct SpriteTemplate gUnknown_08596088 = const struct SpriteTemplate gRevengeSmallScratchSpriteTemplate =
{ {
.tileTag = ANIM_TAG_PURPLE_SCRATCH, .tileTag = ANIM_TAG_PURPLE_SCRATCH,
.paletteTag = ANIM_TAG_PURPLE_SCRATCH, .paletteTag = ANIM_TAG_PURPLE_SCRATCH,
@ -381,7 +381,7 @@ const union AnimCmd *const gUnknown_085960C4[] =
gUnknown_085960B8, gUnknown_085960B8,
}; };
const struct SpriteTemplate gUnknown_085960D0 = const struct SpriteTemplate gRevengeBigScratchSpriteTemplate =
{ {
.tileTag = ANIM_TAG_PURPLE_SWIPE, .tileTag = ANIM_TAG_PURPLE_SWIPE,
.paletteTag = ANIM_TAG_PURPLE_SWIPE, .paletteTag = ANIM_TAG_PURPLE_SWIPE,
@ -995,7 +995,7 @@ static void AnimFocusPunchFist(struct Sprite *sprite)
} }
} }
void sub_810DABC(u8 taskId) void AnimTask_MoveSkyUppercutBg(u8 taskId)
{ {
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];

View File

@ -128,7 +128,7 @@ const union AffineAnimCmd *const gUnknown_085953F4[] =
gUnknown_085953DC, gUnknown_085953DC,
}; };
const struct SpriteTemplate gUnknown_085953F8 = const struct SpriteTemplate gLargeFlameSpriteTemplate =
{ {
.tileTag = ANIM_TAG_FIRE, .tileTag = ANIM_TAG_FIRE,
.paletteTag = ANIM_TAG_FIRE, .paletteTag = ANIM_TAG_FIRE,
@ -139,7 +139,7 @@ const struct SpriteTemplate gUnknown_085953F8 =
.callback = sub_8108FBC, .callback = sub_8108FBC,
}; };
const struct SpriteTemplate gUnknown_08595410 = const struct SpriteTemplate gLargeFlameScatterSpriteTemplate =
{ {
.tileTag = ANIM_TAG_FIRE, .tileTag = ANIM_TAG_FIRE,
.paletteTag = ANIM_TAG_FIRE, .paletteTag = ANIM_TAG_FIRE,

View File

@ -28,7 +28,7 @@ static void AnimSprayWaterDroplet(struct Sprite *);
void sub_810EFA8(struct Sprite *); void sub_810EFA8(struct Sprite *);
void sub_810F004(struct Sprite *); void sub_810F004(struct Sprite *);
void sub_810F018(struct Sprite *); void sub_810F018(struct Sprite *);
void sub_810F084(struct Sprite *); static void AnimSkyAttackBird(struct Sprite *);
void sub_810F140(struct Sprite *); void sub_810F140(struct Sprite *);
static void sub_810DE98(struct Sprite *); static void sub_810DE98(struct Sprite *);
static void sub_810DF18(u8); static void sub_810DF18(u8);
@ -335,7 +335,7 @@ const struct SpriteTemplate gUnknown_085964FC =
.callback = sub_810F004, .callback = sub_810F004,
}; };
const struct SpriteTemplate gUnknown_08596514 = const struct SpriteTemplate gSkyAttackBirdSpriteTemplate =
{ {
.tileTag = ANIM_TAG_BIRD, .tileTag = ANIM_TAG_BIRD,
.paletteTag = ANIM_TAG_BIRD, .paletteTag = ANIM_TAG_BIRD,
@ -343,7 +343,7 @@ const struct SpriteTemplate gUnknown_08596514 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810F084, .callback = AnimSkyAttackBird,
}; };
@ -1195,7 +1195,7 @@ void sub_810F018(struct Sprite *sprite)
} }
} }
void sub_810F084(struct Sprite *sprite) static void AnimSkyAttackBird(struct Sprite *sprite)
{ {
u16 rotation; u16 rotation;
s16 posx = sprite->pos1.x; s16 posx = sprite->pos1.x;

View File

@ -20,7 +20,7 @@ static void sub_8111914(u8 taskId);
static void sub_811196C(u8 taskId); static void sub_811196C(u8 taskId);
static void InitAnimShadowBall(struct Sprite *); static void InitAnimShadowBall(struct Sprite *);
static void AnimShadowBallStep(struct Sprite *); static void AnimShadowBallStep(struct Sprite *);
static void sub_8111B9C(struct Sprite *); static void AnimLick(struct Sprite *);
static void sub_8111BB4(struct Sprite *); static void sub_8111BB4(struct Sprite *);
static void sub_8111D78(u8 taskId); static void sub_8111D78(u8 taskId);
static void sub_8111E78(u8 taskId); static void sub_8111E78(u8 taskId);
@ -35,7 +35,7 @@ static void AnimCurseNail(struct Sprite *);
static void sub_8112A4C(struct Sprite *); static void sub_8112A4C(struct Sprite *);
static void sub_8112ACC(struct Sprite *); static void sub_8112ACC(struct Sprite *);
static void sub_8112B44(struct Sprite *); static void sub_8112B44(struct Sprite *);
static void sub_8112B78(struct Sprite *); static void AnimGhostStatusSprite(struct Sprite *);
static void sub_8112C4C(struct Sprite *); static void sub_8112C4C(struct Sprite *);
static void sub_8112D10(u8 taskId); static void sub_8112D10(u8 taskId);
static void AnimGrudgeFlame(struct Sprite *); static void AnimGrudgeFlame(struct Sprite *);
@ -113,7 +113,7 @@ const union AnimCmd *const gUnknown_08596D88[] =
gUnknown_08596D70, gUnknown_08596D70,
}; };
const struct SpriteTemplate gUnknown_08596D8C = const struct SpriteTemplate gLickSpriteTemplate =
{ {
.tileTag = ANIM_TAG_LICK, .tileTag = ANIM_TAG_LICK,
.paletteTag = ANIM_TAG_LICK, .paletteTag = ANIM_TAG_LICK,
@ -121,7 +121,7 @@ const struct SpriteTemplate gUnknown_08596D8C =
.anims = gUnknown_08596D88, .anims = gUnknown_08596D88,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8111B9C, .callback = AnimLick,
}; };
const union AffineAnimCmd gUnknown_08596DA4[] = const union AffineAnimCmd gUnknown_08596DA4[] =
@ -165,10 +165,10 @@ const struct SpriteTemplate gCurseGhostSpriteTemplate =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8112B78, .callback = AnimGhostStatusSprite,
}; };
const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E00 = const struct SpriteTemplate gNightmareDevilSpriteTemplate =
{ {
.tileTag = ANIM_TAG_DEVIL, .tileTag = ANIM_TAG_DEVIL,
.paletteTag = ANIM_TAG_DEVIL, .paletteTag = ANIM_TAG_DEVIL,
@ -176,7 +176,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E00 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8112B78, .callback = AnimGhostStatusSprite,
}; };
const union AnimCmd gUnknown_08596E18[] = const union AnimCmd gUnknown_08596E18[] =
@ -336,12 +336,13 @@ static void sub_8111814(struct Sprite *sprite)
DestroyAnimSprite(sprite); DestroyAnimSprite(sprite);
} }
void sub_811188C(u8 taskId) // Creates a large transparent clone of the attacker centered on their position which shrinks to original size
void AnimTask_NightShadeClone(u8 taskId)
{ {
u8 spriteId; u8 spriteId;
SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL)); SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL));
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0x10)); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0x10));
spriteId = GetAnimBattlerSpriteId(0); spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_BLEND); PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_BLEND);
SetSpriteRotScale(spriteId, 128, 128, 0); SetSpriteRotScale(spriteId, 128, 128, 0);
gSprites[spriteId].invisible = FALSE; gSprites[spriteId].invisible = FALSE;
@ -377,7 +378,7 @@ static void sub_811196C(u8 taskId)
return; return;
} }
spriteId = GetAnimBattlerSpriteId(0); spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gTasks[taskId].data[0] += 8; gTasks[taskId].data[0] += 8;
if (gTasks[taskId].data[0] <= 0xFF) if (gTasks[taskId].data[0] <= 0xFF)
{ {
@ -459,7 +460,7 @@ static void AnimShadowBallStep(struct Sprite *sprite)
} }
} }
static void sub_8111B9C(struct Sprite *sprite) static void AnimLick(struct Sprite *sprite)
{ {
InitSpritePosToAnimTarget(sprite, TRUE); InitSpritePosToAnimTarget(sprite, TRUE);
sprite->callback = sub_8111BB4; sprite->callback = sub_8111BB4;
@ -512,12 +513,13 @@ static void sub_8111BB4(struct Sprite *sprite)
} }
} }
void sub_8111C50(u8 taskId) // Creates a transparent clone of the target which drifts up and away to the side
void AnimTask_NightmareClone(u8 taskId)
{ {
struct Task *task; struct Task *task;
task = &gTasks[taskId]; task = &gTasks[taskId];
task->data[0] = CloneBattlerSpriteWithBlend(1); task->data[0] = CloneBattlerSpriteWithBlend(ANIM_TARGET);
if (task->data[0] < 0) if (task->data[0] < 0)
{ {
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
@ -610,7 +612,7 @@ static void sub_8111E78(u8 taskId)
} }
else else
{ {
task->data[0] = CloneBattlerSpriteWithBlend(1); task->data[0] = CloneBattlerSpriteWithBlend(ANIM_TARGET);
if (task->data[0] < 0) if (task->data[0] < 0)
{ {
FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON); FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON);
@ -626,7 +628,7 @@ static void sub_8111E78(u8 taskId)
task->data[1] = 0; task->data[1] = 0;
task->data[2] = 0; task->data[2] = 0;
task->data[3] = 16; task->data[3] = 16;
task->data[13] = GetAnimBattlerSpriteId(1); task->data[13] = GetAnimBattlerSpriteId(ANIM_TARGET);
task->data[4] = (gSprites[task->data[13]].oam.paletteNum + 16) * 16; task->data[4] = (gSprites[task->data[13]].oam.paletteNum + 16) * 16;
if (position == 1) { if (position == 1) {
u16 mask = DISPCNT_BG1_ON; u16 mask = DISPCNT_BG1_ON;
@ -712,7 +714,7 @@ static void sub_8112170(u8 taskId)
{ {
case 0: case 0:
gScanlineEffect.state = 3; gScanlineEffect.state = 3;
task->data[14] = GetAnimBattlerSpriteId(1); task->data[14] = GetAnimBattlerSpriteId(ANIM_TARGET);
if (rank == 1) if (rank == 1)
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON); ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON);
else else
@ -1120,7 +1122,7 @@ static void sub_8112B44(struct Sprite *sprite)
DestroyAnimSprite(sprite); DestroyAnimSprite(sprite);
} }
static void sub_8112B78(struct Sprite *sprite) static void AnimGhostStatusSprite(struct Sprite *sprite)
{ {
u16 coeffB; u16 coeffB;
u16 coeffA; u16 coeffA;

View File

@ -71,7 +71,7 @@ const struct SpriteTemplate gSpinningBoneSpriteTemplate =
.callback = AnimBoneHitProjectile, .callback = AnimBoneHitProjectile,
}; };
const struct SpriteTemplate gUnknown_085971A8 = const struct SpriteTemplate gSandAttackDirtSpriteTemplate =
{ {
.tileTag = ANIM_TAG_MUD_SAND, .tileTag = ANIM_TAG_MUD_SAND,
.paletteTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND,
@ -93,7 +93,7 @@ const union AnimCmd *const gUnknown_085971C8[] =
gUnknown_085971C0, gUnknown_085971C0,
}; };
const struct SpriteTemplate gUnknown_085971CC = const struct SpriteTemplate gMudSlapMudSpriteTemplate =
{ {
.tileTag = ANIM_TAG_MUD_SAND, .tileTag = ANIM_TAG_MUD_SAND,
.paletteTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND,
@ -104,7 +104,7 @@ const struct SpriteTemplate gUnknown_085971CC =
.callback = AnimDirtScatter, .callback = AnimDirtScatter,
}; };
const struct SpriteTemplate gUnknown_085971E4 = const struct SpriteTemplate gMudsportMudSpriteTemplate =
{ {
.tileTag = ANIM_TAG_MUD_SAND, .tileTag = ANIM_TAG_MUD_SAND,
.paletteTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND,

View File

@ -36,7 +36,7 @@ void AnimWaveFromCenterOfTarget(struct Sprite *);
void InitSwirlingFogAnim(struct Sprite *); void InitSwirlingFogAnim(struct Sprite *);
void AnimSwirlingFogAnim(struct Sprite *); void AnimSwirlingFogAnim(struct Sprite *);
void AnimThrowMistBall(struct Sprite *); void AnimThrowMistBall(struct Sprite *);
void InitPoisonGasCloudAnim(struct Sprite *); static void InitPoisonGasCloudAnim(struct Sprite *);
void MovePoisonGasCloud(struct Sprite *); void MovePoisonGasCloud(struct Sprite *);
void AnimHailBegin(struct Sprite *); void AnimHailBegin(struct Sprite *);
void AnimHailContinue(struct Sprite *); void AnimHailContinue(struct Sprite *);
@ -151,7 +151,7 @@ const union AffineAnimCmd *const gUnknown_08595ACC[] =
gUnknown_08595ABC, gUnknown_08595ABC,
}; };
const struct SpriteTemplate gUnknown_08595AD0 = const struct SpriteTemplate gIceCrystalSpiralInwardLarge =
{ {
.tileTag = ANIM_TAG_ICE_CRYSTALS, .tileTag = ANIM_TAG_ICE_CRYSTALS,
.paletteTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS,
@ -162,7 +162,7 @@ const struct SpriteTemplate gUnknown_08595AD0 =
.callback = AnimIcePunchSwirlingParticle, .callback = AnimIcePunchSwirlingParticle,
}; };
const struct SpriteTemplate gUnknown_08595AE8 = const struct SpriteTemplate gIceCrystalSpiralInwardSmall =
{ {
.tileTag = ANIM_TAG_ICE_CRYSTALS, .tileTag = ANIM_TAG_ICE_CRYSTALS,
.paletteTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS,
@ -184,7 +184,7 @@ const union AffineAnimCmd *const gUnknown_08595B10[] =
gUnknown_08595B00, gUnknown_08595B00,
}; };
const struct SpriteTemplate gUnknown_08595B14 = const struct SpriteTemplate gIceBeamInnerCrystalSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_CRYSTALS, .tileTag = ANIM_TAG_ICE_CRYSTALS,
.paletteTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS,
@ -195,7 +195,7 @@ const struct SpriteTemplate gUnknown_08595B14 =
.callback = AnimIceBeamParticle, .callback = AnimIceBeamParticle,
}; };
const struct SpriteTemplate gUnknown_08595B2C = const struct SpriteTemplate gIceBeamOuterCrystalSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_CRYSTALS, .tileTag = ANIM_TAG_ICE_CRYSTALS,
.paletteTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS,
@ -263,7 +263,7 @@ const struct SpriteTemplate gBlizzardIceCrystalSpriteTemplate =
.callback = AnimMoveParticleBeyondTarget, .callback = AnimMoveParticleBeyondTarget,
}; };
const struct SpriteTemplate gUnknown_08595BC8 = const struct SpriteTemplate gPowderSnowSnowballSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_CRYSTALS, .tileTag = ANIM_TAG_ICE_CRYSTALS,
.paletteTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS,
@ -291,7 +291,7 @@ const union AnimCmd *const gUnknown_08595C00[] =
gUnknown_08595BE0, gUnknown_08595BE0,
}; };
const struct SpriteTemplate gUnknown_08595C04 = const struct SpriteTemplate gIceGroundSpikesSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_SPIKES, .tileTag = ANIM_TAG_ICE_SPIKES,
.paletteTag = ANIM_TAG_ICE_SPIKES, .paletteTag = ANIM_TAG_ICE_SPIKES,
@ -314,7 +314,7 @@ const union AnimCmd *const gUnknown_08595C28[] =
gUnknown_08595C1C, gUnknown_08595C1C,
}; };
const struct SpriteTemplate gUnknown_08595C2C = const struct SpriteTemplate gMistCloudSpriteTemplate =
{ {
.tileTag = ANIM_TAG_MIST_CLOUD, .tileTag = ANIM_TAG_MIST_CLOUD,
.paletteTag = ANIM_TAG_MIST_CLOUD, .paletteTag = ANIM_TAG_MIST_CLOUD,
@ -341,7 +341,7 @@ const u8 gUnknown_08595C5C[] =
0, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 6, 7, 8, 8, 8, 9, 0, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 6, 7, 8, 8, 8, 9,
}; };
const struct SpriteTemplate gUnknown_08595C70 = const struct SpriteTemplate gMistBallSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SMALL_BUBBLES, .tileTag = ANIM_TAG_SMALL_BUBBLES,
.paletteTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES,
@ -357,7 +357,7 @@ const u8 gUnknown_08595C88[] =
0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5,
}; };
const struct SpriteTemplate gUnknown_08595C9C = const struct SpriteTemplate gPoisonGasCloudSpriteTemplate =
{ {
.tileTag = ANIM_TAG_PURPLE_GAS_CLOUD, .tileTag = ANIM_TAG_PURPLE_GAS_CLOUD,
.paletteTag = ANIM_TAG_PURPLE_GAS_CLOUD, .paletteTag = ANIM_TAG_PURPLE_GAS_CLOUD,
@ -500,7 +500,7 @@ const union AffineAnimCmd *const gUnknown_08595DD0[] =
gUnknown_08595DC0, gUnknown_08595DC0,
}; };
const struct SpriteTemplate gUnknown_08595DE4 = const struct SpriteTemplate gIceBallChunkSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_CHUNK, .tileTag = ANIM_TAG_ICE_CHUNK,
.paletteTag = ANIM_TAG_ICE_CHUNK, .paletteTag = ANIM_TAG_ICE_CHUNK,
@ -511,7 +511,7 @@ const struct SpriteTemplate gUnknown_08595DE4 =
.callback = InitIceBallAnim, .callback = InitIceBallAnim,
}; };
const struct SpriteTemplate gUnknown_08595DFC = const struct SpriteTemplate gIceBallImpactShardSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ICE_CRYSTALS, .tileTag = ANIM_TAG_ICE_CRYSTALS,
.paletteTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS,
@ -1183,7 +1183,7 @@ void AnimTask_OverlayFogTiles(u8 taskId)
// arg 5: ??? unknown // arg 5: ??? unknown
// arg 6: ??? unknown // arg 6: ??? unknown
// arg 7: ??? unknown boolean // arg 7: ??? unknown boolean
void InitPoisonGasCloudAnim(struct Sprite *sprite) static void InitPoisonGasCloudAnim(struct Sprite *sprite)
{ {
sprite->data[0] = gBattleAnimArgs[0]; sprite->data[0] = gBattleAnimArgs[0];
@ -1562,8 +1562,7 @@ void AnimIceBallParticle(struct Sprite *sprite)
DestroyAnimSprite(sprite); DestroyAnimSprite(sprite);
} }
// Counter for Ice Ball. void AnimTask_GetIceBallCounter(u8 taskId)
void AnimTask_GetRolloutCounter(u8 taskId)
{ {
u8 arg = gBattleAnimArgs[0]; u8 arg = gBattleAnimArgs[0];

View File

@ -209,6 +209,7 @@ const struct SpriteTemplate gRandomPosHitSplatSpriteTemplate =
.callback = AnimHitSplatRandom, .callback = AnimHitSplatRandom,
}; };
// TODO: Needs generic descriptive name, what distinguishes this hit splat
const struct SpriteTemplate gExtremeSpeedHitSplatSpriteTemplate = const struct SpriteTemplate gExtremeSpeedHitSplatSpriteTemplate =
{ {
.tileTag = ANIM_TAG_IMPACT, .tileTag = ANIM_TAG_IMPACT,
@ -242,7 +243,8 @@ const struct SpriteTemplate gFlashingHitSplatSpriteTemplate =
.callback = AnimFlashingHitSplat, .callback = AnimFlashingHitSplat,
}; };
const struct SpriteTemplate gUnknown_08597400 = // TODO: Needs generic descriptive name, what distinguishes this hit splat
const struct SpriteTemplate gRevengeHitSplatSpriteTemplate =
{ {
.tileTag = ANIM_TAG_IMPACT, .tileTag = ANIM_TAG_IMPACT,
.paletteTag = ANIM_TAG_IMPACT, .paletteTag = ANIM_TAG_IMPACT,
@ -413,7 +415,7 @@ void sub_81159B4(struct Sprite *sprite)
sprite->callback(sprite); sprite->callback(sprite);
} }
// Task data for AnimTask_BlendCycleMonColor // Task data for AnimTask_BlendColorCycle
#define tPalSelector data[0] // arg0 #define tPalSelector data[0] // arg0
#define tDelay data[1] // arg1 #define tDelay data[1] // arg1
#define tNumBlends data[2] // arg2 #define tNumBlends data[2] // arg2
@ -422,9 +424,9 @@ void sub_81159B4(struct Sprite *sprite)
#define tBlendColor data[5] // arg5 #define tBlendColor data[5] // arg5
#define tRestoreBlend data[8] #define tRestoreBlend data[8]
// Blends mon sprite to designated color or back alternately tNumBlends times // Blends mon/screen to designated color or back alternately tNumBlends times
// Many uses of this task only set a tNumBlends of 2, which has the effect of blending to a color and back once // Many uses of this task only set a tNumBlends of 2, which has the effect of blending to a color and back once
void AnimTask_BlendCycleMonColor(u8 taskId) void AnimTask_BlendColorCycle(u8 taskId)
{ {
gTasks[taskId].tPalSelector = gBattleAnimArgs[0]; gTasks[taskId].tPalSelector = gBattleAnimArgs[0];
gTasks[taskId].tDelay = gBattleAnimArgs[1]; gTasks[taskId].tDelay = gBattleAnimArgs[1];
@ -854,13 +856,25 @@ static void sub_81161F4(void)
} }
} }
void sub_81162A4(u8 taskId) // Task data for AnimTask_ShakeBattleTerrain
#define tXOffset data[0]
#define tYOffset data[1]
#define tNumShakes data[2]
#define tTimer data[3]
#define tShakeDelay data[8]
// Can shake battle terrain back and forth on the X or down and back to original pos on Y (cant shake up from orig pos)
// arg0: x offset of shake
// arg1: y offset of shake
// arg2: number of shakes
// arg3: time between shakes
void AnimTask_ShakeBattleTerrain(u8 taskId)
{ {
gTasks[taskId].data[0] = gBattleAnimArgs[0]; gTasks[taskId].tXOffset = gBattleAnimArgs[0];
gTasks[taskId].data[1] = gBattleAnimArgs[1]; gTasks[taskId].tYOffset = gBattleAnimArgs[1];
gTasks[taskId].data[2] = gBattleAnimArgs[2]; gTasks[taskId].tNumShakes = gBattleAnimArgs[2];
gTasks[taskId].data[3] = gBattleAnimArgs[3]; gTasks[taskId].tTimer = gBattleAnimArgs[3];
gTasks[taskId].data[8] = gBattleAnimArgs[3]; gTasks[taskId].tShakeDelay = gBattleAnimArgs[3];
gBattle_BG3_X = gBattleAnimArgs[0]; gBattle_BG3_X = gBattleAnimArgs[0];
gBattle_BG3_Y = gBattleAnimArgs[1]; gBattle_BG3_Y = gBattleAnimArgs[1];
gTasks[taskId].func = sub_81162F8; gTasks[taskId].func = sub_81162F8;
@ -869,20 +883,20 @@ void sub_81162A4(u8 taskId)
static void sub_81162F8(u8 taskId) static void sub_81162F8(u8 taskId)
{ {
if (gTasks[taskId].data[3] == 0) if (gTasks[taskId].tTimer == 0)
{ {
if (gBattle_BG3_X == gTasks[taskId].data[0]) if (gBattle_BG3_X == gTasks[taskId].tXOffset)
gBattle_BG3_X = -gTasks[taskId].data[0]; gBattle_BG3_X = -gTasks[taskId].tXOffset;
else else
gBattle_BG3_X = gTasks[taskId].data[0]; gBattle_BG3_X = gTasks[taskId].tXOffset;
if (gBattle_BG3_Y == -gTasks[taskId].data[1]) if (gBattle_BG3_Y == -gTasks[taskId].tYOffset)
gBattle_BG3_Y = 0; gBattle_BG3_Y = 0;
else else
gBattle_BG3_Y = -gTasks[taskId].data[1]; gBattle_BG3_Y = -gTasks[taskId].tYOffset;
gTasks[taskId].data[3] = gTasks[taskId].data[8]; gTasks[taskId].tTimer = gTasks[taskId].tShakeDelay;
if (--gTasks[taskId].data[2] == 0) if (--gTasks[taskId].tNumShakes == 0)
{ {
gBattle_BG3_X = 0; gBattle_BG3_X = 0;
gBattle_BG3_Y = 0; gBattle_BG3_Y = 0;
@ -891,10 +905,16 @@ static void sub_81162F8(u8 taskId)
} }
else else
{ {
gTasks[taskId].data[3]--; gTasks[taskId].tTimer--;
} }
} }
#undef tXOffset
#undef tYOffset
#undef tNumShakes
#undef tTimer
#undef tShakeDelay
static void AnimBasicHitSplat(struct Sprite *sprite) static void AnimBasicHitSplat(struct Sprite *sprite)
{ {
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);

View File

@ -9,12 +9,12 @@
#include "constants/songs.h" #include "constants/songs.h"
static void AnimDefensiveWall(struct Sprite *); static void AnimDefensiveWall(struct Sprite *);
void sub_810F58C(struct Sprite *); static void AnimWallSparkle(struct Sprite *);
void sub_810F634(struct Sprite *); void sub_810F634(struct Sprite *);
static void AnimQuestionMark(struct Sprite *); static void AnimQuestionMark(struct Sprite *);
void sub_810FBA8(struct Sprite *); static void AnimRedX(struct Sprite *);
void sub_810FDF0(struct Sprite *); void sub_810FDF0(struct Sprite *);
void sub_8110240(struct Sprite *); static void AnimPsychoBoost(struct Sprite *);
static void sub_810F340(struct Sprite *); static void sub_810F340(struct Sprite *);
static void sub_810F3C8(struct Sprite *); static void sub_810F3C8(struct Sprite *);
static void sub_810F400(struct Sprite *); static void sub_810F400(struct Sprite *);
@ -41,7 +41,7 @@ const union AffineAnimCmd *const gUnknown_08596544[] =
gUnknown_0859652C, gUnknown_0859652C,
}; };
const struct SpriteTemplate gUnknown_08596548 = const struct SpriteTemplate gPsychUpSpiralSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SPIRAL, .tileTag = ANIM_TAG_SPIRAL,
.paletteTag = ANIM_TAG_SPIRAL, .paletteTag = ANIM_TAG_SPIRAL,
@ -52,7 +52,7 @@ const struct SpriteTemplate gUnknown_08596548 =
.callback = AnimSpriteOnMonPos, .callback = AnimSpriteOnMonPos,
}; };
const struct SpriteTemplate gUnknown_08596560 = const struct SpriteTemplate gLightScreenWallSpriteTemplate =
{ {
.tileTag = ANIM_TAG_GREEN_LIGHT_WALL, .tileTag = ANIM_TAG_GREEN_LIGHT_WALL,
.paletteTag = ANIM_TAG_GREEN_LIGHT_WALL, .paletteTag = ANIM_TAG_GREEN_LIGHT_WALL,
@ -63,7 +63,7 @@ const struct SpriteTemplate gUnknown_08596560 =
.callback = AnimDefensiveWall, .callback = AnimDefensiveWall,
}; };
const struct SpriteTemplate gUnknown_08596578 = const struct SpriteTemplate gReflectWallSpriteTemplate =
{ {
.tileTag = ANIM_TAG_BLUE_LIGHT_WALL, .tileTag = ANIM_TAG_BLUE_LIGHT_WALL,
.paletteTag = ANIM_TAG_BLUE_LIGHT_WALL, .paletteTag = ANIM_TAG_BLUE_LIGHT_WALL,
@ -74,7 +74,7 @@ const struct SpriteTemplate gUnknown_08596578 =
.callback = AnimDefensiveWall, .callback = AnimDefensiveWall,
}; };
const struct SpriteTemplate gUnknown_08596590 = const struct SpriteTemplate gMirrorCoatWallSpriteTemplate =
{ {
.tileTag = ANIM_TAG_RED_LIGHT_WALL, .tileTag = ANIM_TAG_RED_LIGHT_WALL,
.paletteTag = ANIM_TAG_RED_LIGHT_WALL, .paletteTag = ANIM_TAG_RED_LIGHT_WALL,
@ -96,7 +96,7 @@ const struct SpriteTemplate gBarrierWallSpriteTemplate =
.callback = AnimDefensiveWall, .callback = AnimDefensiveWall,
}; };
const struct SpriteTemplate gUnknown_085965C0 = const struct SpriteTemplate gMagicCoatWallSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ORANGE_LIGHT_WALL, .tileTag = ANIM_TAG_ORANGE_LIGHT_WALL,
.paletteTag = ANIM_TAG_ORANGE_LIGHT_WALL, .paletteTag = ANIM_TAG_ORANGE_LIGHT_WALL,
@ -122,7 +122,7 @@ const union AnimCmd *const gUnknown_085965F0[] =
gUnknown_085965D8, gUnknown_085965D8,
}; };
const struct SpriteTemplate gUnknown_085965F4 = const struct SpriteTemplate gReflectSparkleSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SPARKLE_4, .tileTag = ANIM_TAG_SPARKLE_4,
.paletteTag = ANIM_TAG_SPARKLE_4, .paletteTag = ANIM_TAG_SPARKLE_4,
@ -130,7 +130,7 @@ const struct SpriteTemplate gUnknown_085965F4 =
.anims = gUnknown_085965F0, .anims = gUnknown_085965F0,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810F58C, .callback = AnimWallSparkle,
}; };
const union AnimCmd gUnknown_0859660C[] = const union AnimCmd gUnknown_0859660C[] =
@ -147,7 +147,7 @@ const union AnimCmd *const gUnknown_08596620[] =
gUnknown_0859660C, gUnknown_0859660C,
}; };
const struct SpriteTemplate gUnknown_08596624 = const struct SpriteTemplate gSpecialScreenSparkleSpriteTemplate =
{ {
.tileTag = ANIM_TAG_SPARKLE_3, .tileTag = ANIM_TAG_SPARKLE_3,
.paletteTag = ANIM_TAG_SPARKLE_3, .paletteTag = ANIM_TAG_SPARKLE_3,
@ -155,7 +155,7 @@ const struct SpriteTemplate gUnknown_08596624 =
.anims = gUnknown_08596620, .anims = gUnknown_08596620,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810F58C, .callback = AnimWallSparkle,
}; };
const struct SpriteTemplate gGoldRingSpriteTemplate = const struct SpriteTemplate gGoldRingSpriteTemplate =
@ -215,7 +215,7 @@ const union AnimCmd *const gUnknown_085966D4[] =
gUnknown_08596694, gUnknown_08596694,
}; };
const struct SpriteTemplate gUnknown_085966DC = const struct SpriteTemplate gBentSpoonSpriteTemplate =
{ {
.tileTag = ANIM_TAG_BENT_SPOON, .tileTag = ANIM_TAG_BENT_SPOON,
.paletteTag = ANIM_TAG_BENT_SPOON, .paletteTag = ANIM_TAG_BENT_SPOON,
@ -294,15 +294,15 @@ const struct SpriteTemplate gUnknown_08596794 =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
const struct SpriteTemplate gUnknown_085967AC = const struct SpriteTemplate gRedXSpriteTemplate =
{ {
.tileTag = 10250, .tileTag = ANIM_TAG_X_SIGN,
.paletteTag = 10250, .paletteTag = ANIM_TAG_X_SIGN,
.oam = &gOamData_AffineOff_ObjNormal_64x64, .oam = &gOamData_AffineOff_ObjNormal_64x64,
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810FBA8, .callback = AnimRedX,
}; };
const union AffineAnimCmd gUnknown_085967C4[] = const union AffineAnimCmd gUnknown_085967C4[] =
@ -370,7 +370,7 @@ const union AffineAnimCmd *const gUnknown_08596894[] =
gUnknown_0859687C, gUnknown_0859687C,
}; };
const struct SpriteTemplate gUnknown_08596898 = const struct SpriteTemplate gLusterPurgeCircleSpriteTemplate =
{ {
.tileTag = ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, .tileTag = ANIM_TAG_WHITE_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_WHITE_CIRCLE_OF_LIGHT,
@ -408,7 +408,7 @@ const union AffineAnimCmd *const gUnknown_08596918[] =
gUnknown_08596908, gUnknown_08596908,
}; };
const struct SpriteTemplate gUnknown_08596920 = const struct SpriteTemplate gPsychoBoostOrbSpriteTemplate =
{ {
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -416,7 +416,7 @@ const struct SpriteTemplate gUnknown_08596920 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08596918, .affineAnims = gUnknown_08596918,
.callback = sub_8110240, .callback = AnimPsychoBoost,
}; };
// For the rectangular wall sprite used by Reflect, Mirror Coat, etc // For the rectangular wall sprite used by Reflect, Mirror Coat, etc
@ -578,7 +578,8 @@ static void sub_810F524(struct Sprite *sprite)
sprite->callback = DestroyAnimSprite; sprite->callback = DestroyAnimSprite;
} }
void sub_810F58C(struct Sprite *sprite) // Animates the sparkle that appears during Reflect or Light Screen/Mirror Coat
static void AnimWallSparkle(struct Sprite *sprite)
{ {
if (sprite->data[0] == 0) if (sprite->data[0] == 0)
{ {
@ -602,7 +603,7 @@ void sub_810F58C(struct Sprite *sprite)
} }
else else
{ {
if (gBattleAnimArgs[2] == 0) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, respectMonPicOffsets); InitSpritePosToAnimAttacker(sprite, respectMonPicOffsets);
else else
InitSpritePosToAnimTarget(sprite, respectMonPicOffsets); InitSpritePosToAnimTarget(sprite, respectMonPicOffsets);
@ -687,7 +688,7 @@ static void sub_810F774(struct Sprite *sprite)
} }
} }
void sub_810F7D4(u8 taskId) void AnimTask_MeditateStretchAttacker(u8 taskId)
{ {
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
@ -845,9 +846,9 @@ static void sub_810FB60(struct Sprite *sprite)
sprite->data[1]++; sprite->data[1]++;
} }
void sub_810FBA8(struct Sprite *sprite) static void AnimRedX(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[0] == 0) if (gBattleAnimArgs[0] == ANIM_ATTACKER)
{ {
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
@ -857,13 +858,13 @@ void sub_810FBA8(struct Sprite *sprite)
sprite->callback = sub_810FB60; sprite->callback = sub_810FB60;
} }
void sub_810FBF0(u8 taskId) void AnimTask_SkillSwap(u8 taskId)
{ {
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];
if (IsContest()) if (IsContest())
{ {
if (gBattleAnimArgs[0] == 1) if (gBattleAnimArgs[0] == ANIM_TARGET)
{ {
task->data[10] = -10; task->data[10] = -10;
task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_RIGHT) - 8; task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_RIGHT) - 8;
@ -1116,7 +1117,7 @@ static void sub_8110134(u8 taskId)
} }
} }
void sub_8110240(struct Sprite *sprite) static void AnimPsychoBoost(struct Sprite *sprite)
{ {
switch (sprite->data[0]) switch (sprite->data[0])
{ {

View File

@ -12,21 +12,21 @@
extern const union AnimCmd *const gUnknown_085950E0[]; extern const union AnimCmd *const gUnknown_085950E0[];
extern const union AnimCmd *const gUnknown_085954D0[]; extern const union AnimCmd *const gUnknown_085954D0[];
void sub_81109F0(struct Sprite *); static void AnimFallingRock(struct Sprite *);
void sub_8110AB4(struct Sprite *); static void AnimRockFragment(struct Sprite *);
static void AnimDirtParticleAcrossScreen(struct Sprite *); static void AnimDirtParticleAcrossScreen(struct Sprite *);
void AnimRaiseSprite(struct Sprite *); void AnimRaiseSprite(struct Sprite *);
void sub_81110A4(u8 taskId); void sub_81110A4(u8 taskId);
void sub_811131C(struct Sprite *); static void AnimRolloutParticle(struct Sprite *);
void sub_8111388(struct Sprite *); static void AnimRockTomb(struct Sprite *);
void sub_8111418(struct Sprite *); static void AnimRockBlastRock(struct Sprite *);
void sub_8111444(struct Sprite *); void sub_8111444(struct Sprite *);
void sub_8110B38(struct Sprite *); static void AnimParticleInVortex(struct Sprite *);
static void sub_8110A70(struct Sprite *); static void sub_8110A70(struct Sprite *);
static void sub_8110B80(struct Sprite *sprite); static void sub_8110B80(struct Sprite *sprite);
static void sub_8110CB0(u8 taskId); static void sub_8110CB0(u8 taskId);
static void sub_8111214(struct Task *task); static void sub_8111214(struct Task *task);
static u8 sub_811135C(void); static u8 GetRolloutCounter(void);
static void sub_81113C8(struct Sprite *sprite); static void sub_81113C8(struct Sprite *sprite);
static void sub_811149C(struct Sprite *sprite); static void sub_811149C(struct Sprite *sprite);
@ -55,7 +55,7 @@ const union AnimCmd *const gUnknown_08596AF8[] =
gUnknown_08596AF0, gUnknown_08596AF0,
}; };
const struct SpriteTemplate gUnknown_08596B04 = const struct SpriteTemplate gFallingRockSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ROCKS, .tileTag = ANIM_TAG_ROCKS,
.paletteTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS,
@ -63,10 +63,10 @@ const struct SpriteTemplate gUnknown_08596B04 =
.anims = gUnknown_08596AF8, .anims = gUnknown_08596AF8,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81109F0, .callback = AnimFallingRock,
}; };
const struct SpriteTemplate gUnknown_08596B1C = const struct SpriteTemplate gRockFragmentSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ROCKS, .tileTag = ANIM_TAG_ROCKS,
.paletteTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS,
@ -74,10 +74,10 @@ const struct SpriteTemplate gUnknown_08596B1C =
.anims = gUnknown_08596AF8, .anims = gUnknown_08596AF8,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8110AB4, .callback = AnimRockFragment,
}; };
const struct SpriteTemplate gUnknown_08596B34 = const struct SpriteTemplate gSwirlingDirtSpriteTemplate =
{ {
.tileTag = ANIM_TAG_MUD_SAND, .tileTag = ANIM_TAG_MUD_SAND,
.paletteTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND,
@ -85,7 +85,7 @@ const struct SpriteTemplate gUnknown_08596B34 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8110B38, .callback = AnimParticleInVortex,
}; };
const union AffineAnimCmd gUnknown_08596B4C[] = const union AffineAnimCmd gUnknown_08596B4C[] =
@ -101,7 +101,7 @@ const union AffineAnimCmd *const gUnknown_08596B6C[] =
gUnknown_08596B4C, gUnknown_08596B4C,
}; };
const struct SpriteTemplate gUnknown_08596B70 = const struct SpriteTemplate gWhirlpoolSpriteTemplate =
{ {
.tileTag = ANIM_TAG_WATER_ORB, .tileTag = ANIM_TAG_WATER_ORB,
.paletteTag = ANIM_TAG_WATER_ORB, .paletteTag = ANIM_TAG_WATER_ORB,
@ -109,7 +109,7 @@ const struct SpriteTemplate gUnknown_08596B70 =
.anims = gUnknown_085950E0, .anims = gUnknown_085950E0,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08596B6C, .affineAnims = gUnknown_08596B6C,
.callback = sub_8110B38, .callback = AnimParticleInVortex,
}; };
const struct SpriteTemplate gFireSpinSpriteTemplate = const struct SpriteTemplate gFireSpinSpriteTemplate =
@ -120,10 +120,10 @@ const struct SpriteTemplate gFireSpinSpriteTemplate =
.anims = gUnknown_085954D0, .anims = gUnknown_085954D0,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8110B38, .callback = AnimParticleInVortex,
}; };
const struct SpriteTemplate gFlyingDirtSpriteTemplate = const struct SpriteTemplate gFlyingSandCrescentSpriteTemplate =
{ {
.tileTag = ANIM_TAG_FLYING_DIRT, .tileTag = ANIM_TAG_FLYING_DIRT,
.paletteTag = ANIM_TAG_FLYING_DIRT, .paletteTag = ANIM_TAG_FLYING_DIRT,
@ -210,7 +210,7 @@ const struct SpriteTemplate gAncientPowerRockSpriteTemplate =
.callback = AnimRaiseSprite, .callback = AnimRaiseSprite,
}; };
const struct SpriteTemplate gUnknown_08596C28 = const struct SpriteTemplate gRolloutMudSpriteTemplate =
{ {
.tileTag = ANIM_TAG_MUD_SAND, .tileTag = ANIM_TAG_MUD_SAND,
.paletteTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND,
@ -218,10 +218,10 @@ const struct SpriteTemplate gUnknown_08596C28 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_811131C, .callback = AnimRolloutParticle,
}; };
const struct SpriteTemplate gUnknown_08596C40 = const struct SpriteTemplate gRolloutRockSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ROCKS, .tileTag = ANIM_TAG_ROCKS,
.paletteTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS,
@ -229,10 +229,10 @@ const struct SpriteTemplate gUnknown_08596C40 =
.anims = gDummySpriteAnimTable, .anims = gDummySpriteAnimTable,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_811131C, .callback = AnimRolloutParticle,
}; };
const struct SpriteTemplate gUnknown_08596C58 = const struct SpriteTemplate gRockTombRockSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ROCKS, .tileTag = ANIM_TAG_ROCKS,
.paletteTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS,
@ -240,7 +240,7 @@ const struct SpriteTemplate gUnknown_08596C58 =
.anims = gUnknown_08596BF8, .anims = gUnknown_08596BF8,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8111388, .callback = AnimRockTomb,
}; };
const union AffineAnimCmd gUnknown_08596C70[] = const union AffineAnimCmd gUnknown_08596C70[] =
@ -261,7 +261,7 @@ const union AffineAnimCmd *const gUnknown_08596C90[] =
gUnknown_08596C80, gUnknown_08596C80,
}; };
const struct SpriteTemplate gUnknown_08596C98 = const struct SpriteTemplate gRockBlastRockSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ROCKS, .tileTag = ANIM_TAG_ROCKS,
.paletteTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS,
@ -269,10 +269,10 @@ const struct SpriteTemplate gUnknown_08596C98 =
.anims = gUnknown_08596BF8, .anims = gUnknown_08596BF8,
.images = NULL, .images = NULL,
.affineAnims = gUnknown_08596C90, .affineAnims = gUnknown_08596C90,
.callback = sub_8111418, .callback = AnimRockBlastRock,
}; };
const struct SpriteTemplate gUnknown_08596CB0 = const struct SpriteTemplate gRockScatterSpriteTemplate =
{ {
.tileTag = ANIM_TAG_ROCKS, .tileTag = ANIM_TAG_ROCKS,
.paletteTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS,
@ -305,7 +305,7 @@ const struct SpriteTemplate gUnknown_08596CE0 =
.callback = sub_80A8EE4, .callback = sub_80A8EE4,
}; };
void sub_81109F0(struct Sprite *sprite) static void AnimFallingRock(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[3] != 0) if (gBattleAnimArgs[3] != 0)
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y); SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
@ -343,7 +343,8 @@ static void sub_8110A70(struct Sprite *sprite)
sprite->callback(sprite); sprite->callback(sprite);
} }
void sub_8110AB4(struct Sprite *sprite) // Animates the rock particles that are shown on the impact for Rock Blast / Rock Smash
static void AnimRockFragment(struct Sprite *sprite)
{ {
StartSpriteAnim(sprite, gBattleAnimArgs[5]); StartSpriteAnim(sprite, gBattleAnimArgs[5]);
AnimateSprite(sprite); AnimateSprite(sprite);
@ -369,9 +370,10 @@ void sub_8110AB4(struct Sprite *sprite)
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
} }
void sub_8110B38(struct Sprite *sprite) // Swirls particle in vortex. Used for moves like Fire Spin or Sand Tomb
static void AnimParticleInVortex(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[6] == 0) if (gBattleAnimArgs[6] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, 0);
else else
InitSpritePosToAnimTarget(sprite, FALSE); InitSpritePosToAnimTarget(sprite, FALSE);
@ -563,10 +565,10 @@ void AnimRaiseSprite(struct Sprite *sprite)
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
} }
void sub_8110F74(u8 taskId) void AnimTask_Rollout(u8 taskId)
{ {
u16 var0, var1, var2, var3; u16 var0, var1, var2, var3;
u8 var4; u8 rolloutCounter;
int var5; int var5;
s16 pan1, pan2; s16 pan1, pan2;
struct Task *task; struct Task *task;
@ -581,11 +583,11 @@ void sub_8110F74(u8 taskId)
if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget) if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget)
var3 = var1; var3 = var1;
var4 = sub_811135C(); rolloutCounter = GetRolloutCounter();
if (var4 == 1) if (rolloutCounter == 1)
task->data[8] = 32; task->data[8] = 32;
else else
task->data[8] = 48 - (var4 * 8); task->data[8] = 48 - (rolloutCounter * 8);
task->data[0] = 0; task->data[0] = 0;
task->data[11] = 0; task->data[11] = 0;
@ -610,8 +612,8 @@ void sub_8110F74(u8 taskId)
task->data[13] = pan1; task->data[13] = pan1;
task->data[14] = (pan2 - pan1) / task->data[8]; task->data[14] = (pan2 - pan1) / task->data[8];
task->data[1] = var4; task->data[1] = rolloutCounter;
task->data[15] = GetAnimBattlerSpriteId(0); task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
task->func = sub_81110A4; task->func = sub_81110A4;
} }
@ -684,28 +686,28 @@ void sub_81110A4(u8 taskId)
static void sub_8111214(struct Task *task) static void sub_8111214(struct Task *task)
{ {
const struct SpriteTemplate *spriteTemplate; const struct SpriteTemplate *spriteTemplate;
int var0; int tileOffset;
u16 x, y; u16 x, y;
u8 spriteId; u8 spriteId;
switch (task->data[1]) switch (task->data[1])
{ {
case 1: case 1:
spriteTemplate = &gUnknown_08596C28; spriteTemplate = &gRolloutMudSpriteTemplate;
var0 = 0; tileOffset = 0;
break; break;
case 2: case 2:
case 3: case 3:
spriteTemplate = &gUnknown_08596C40; spriteTemplate = &gRolloutRockSpriteTemplate;
var0 = 80; tileOffset = 80;
break; break;
case 4: case 4:
spriteTemplate = &gUnknown_08596C40; spriteTemplate = &gRolloutRockSpriteTemplate;
var0 = 64; tileOffset = 64;
break; break;
case 5: case 5:
spriteTemplate = &gUnknown_08596C40; spriteTemplate = &gRolloutRockSpriteTemplate;
var0 = 48; tileOffset = 48;
break; break;
default: default:
return; return;
@ -722,7 +724,7 @@ static void sub_8111214(struct Task *task)
gSprites[spriteId].data[2] = ((task->data[12] * 20) + x) + (task->data[1] * 3); gSprites[spriteId].data[2] = ((task->data[12] * 20) + x) + (task->data[1] * 3);
gSprites[spriteId].data[4] = y; gSprites[spriteId].data[4] = y;
gSprites[spriteId].data[5] = -16 - (task->data[1] * 2); gSprites[spriteId].data[5] = -16 - (task->data[1] * 2);
gSprites[spriteId].oam.tileNum += var0; gSprites[spriteId].oam.tileNum += tileOffset;
InitAnimArcTranslation(&gSprites[spriteId]); InitAnimArcTranslation(&gSprites[spriteId]);
task->data[11]++; task->data[11]++;
@ -731,7 +733,7 @@ static void sub_8111214(struct Task *task)
task->data[12] *= -1; task->data[12] *= -1;
} }
void sub_811131C(struct Sprite *sprite) static void AnimRolloutParticle(struct Sprite *sprite)
{ {
if (TranslateAnimHorizontalArc(sprite)) if (TranslateAnimHorizontalArc(sprite))
{ {
@ -743,7 +745,7 @@ void sub_811131C(struct Sprite *sprite)
} }
} }
static u8 sub_811135C(void) static u8 GetRolloutCounter(void)
{ {
u8 retVal = gAnimDisableStructPtr->rolloutTimerStartValue - gAnimDisableStructPtr->rolloutTimer; u8 retVal = gAnimDisableStructPtr->rolloutTimerStartValue - gAnimDisableStructPtr->rolloutTimer;
u8 var0 = retVal - 1; u8 var0 = retVal - 1;
@ -753,7 +755,7 @@ static u8 sub_811135C(void)
return retVal; return retVal;
} }
void sub_8111388(struct Sprite *sprite) static void AnimRockTomb(struct Sprite *sprite)
{ {
StartSpriteAnim(sprite, gBattleAnimArgs[4]); StartSpriteAnim(sprite, gBattleAnimArgs[4]);
@ -786,7 +788,7 @@ static void sub_81113C8(struct Sprite *sprite)
} }
} }
void sub_8111418(struct Sprite *sprite) static void AnimRockBlastRock(struct Sprite *sprite)
{ {
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
StartSpriteAffineAnim(sprite, 1); StartSpriteAffineAnim(sprite, 1);
@ -838,7 +840,7 @@ void sub_811152C(u8 taskId)
{ {
if (gTasks[taskId].data[0] == 0) if (gTasks[taskId].data[0] == 0)
{ {
sub_80A6DAC(0); sub_80A6DAC(FALSE);
gTasks[taskId].data[1] = 200; gTasks[taskId].data[1] = 200;
} }
@ -847,7 +849,7 @@ void sub_811152C(u8 taskId)
if (gTasks[taskId].data[0] == 120) if (gTasks[taskId].data[0] == 120)
{ {
sub_80A6DAC(1); sub_80A6DAC(TRUE);
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
@ -858,7 +860,7 @@ void sub_8111590(u8 taskId)
{ {
if (gTasks[taskId].data[0] == 0) if (gTasks[taskId].data[0] == 0)
{ {
sub_80A6DAC(0); sub_80A6DAC(FALSE);
gTasks[taskId].data[0]++; gTasks[taskId].data[0]++;
gTasks[taskId].data[2] = gBattle_BG3_Y; gTasks[taskId].data[2] = gBattle_BG3_Y;
} }
@ -870,7 +872,7 @@ void sub_8111590(u8 taskId)
if (gBattleAnimArgs[7] == 0xFFF) if (gBattleAnimArgs[7] == 0xFFF)
{ {
gBattle_BG3_Y = 0; gBattle_BG3_Y = 0;
sub_80A6DAC(1); sub_80A6DAC(TRUE);
DestroyAnimVisualTask(taskId); DestroyAnimVisualTask(taskId);
} }
} }

View File

@ -192,7 +192,7 @@ const struct SpriteTemplate gHydroPumpOrbSpriteTemplate =
.callback = AnimToTargetInSinWave, .callback = AnimToTargetInSinWave,
}; };
const struct SpriteTemplate gUnknown_085950FC = const struct SpriteTemplate gMudShotOrbSpriteTemplate =
{ {
.tileTag = ANIM_TAG_BROWN_ORB, .tileTag = ANIM_TAG_BROWN_ORB,
.paletteTag = ANIM_TAG_BROWN_ORB, .paletteTag = ANIM_TAG_BROWN_ORB,
@ -203,7 +203,7 @@ const struct SpriteTemplate gUnknown_085950FC =
.callback = AnimToTargetInSinWave, .callback = AnimToTargetInSinWave,
}; };
const struct SpriteTemplate gUnknown_08595114 = const struct SpriteTemplate gSignalBeamRedOrbSpriteTemplate =
{ {
.tileTag = ANIM_TAG_GLOWY_RED_ORB, .tileTag = ANIM_TAG_GLOWY_RED_ORB,
.paletteTag = ANIM_TAG_GLOWY_RED_ORB, .paletteTag = ANIM_TAG_GLOWY_RED_ORB,
@ -214,7 +214,7 @@ const struct SpriteTemplate gUnknown_08595114 =
.callback = AnimToTargetInSinWave, .callback = AnimToTargetInSinWave,
}; };
const struct SpriteTemplate gUnknown_0859512C = const struct SpriteTemplate gSignalBeamGreenOrbSpriteTemplate =
{ {
.tileTag = ANIM_TAG_GLOWY_GREEN_ORB, .tileTag = ANIM_TAG_GLOWY_GREEN_ORB,
.paletteTag = ANIM_TAG_GLOWY_GREEN_ORB, .paletteTag = ANIM_TAG_GLOWY_GREEN_ORB,
@ -249,7 +249,7 @@ const struct SpriteTemplate gFlamethrowerFlameSpriteTemplate =
.callback = AnimToTargetInSinWave, .callback = AnimToTargetInSinWave,
}; };
const struct SpriteTemplate gUnknown_08595170 = const struct SpriteTemplate gPsywaveRingSpriteTemplate =
{ {
.tileTag = ANIM_TAG_BLUE_RING, .tileTag = ANIM_TAG_BLUE_RING,
.paletteTag = ANIM_TAG_BLUE_RING, .paletteTag = ANIM_TAG_BLUE_RING,