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,
};
const struct SpriteTemplate gUnknown_08592ADC =
const struct SpriteTemplate gProtectSpriteTemplate =
{
.tileTag = 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);
if (gSprites[spriteId].invisible)
@ -3627,7 +3627,7 @@ static void AnimFlyingParticleStep(struct Sprite* sprite)
DestroySpriteAndMatrix(sprite);
}
void sub_81007C4(u8 taskId)
void AnimTask_CycleMagicalLeafPal(u8 taskId)
{
struct Task* task = &gTasks[taskId];
switch (task->data[0])

View File

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

View File

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

View File

@ -589,7 +589,7 @@ static void sub_80D5B48(struct Sprite *sprite)
u8 spriteId;
u8 battlerId;
sprite->invisible = TRUE;
if (!gBattleAnimArgs[0])
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
{
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;
switch (gBattleAnimArgs[0])
{
case 0:
case 1:
case ANIM_ATTACKER:
case ANIM_TARGET:
spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
break;
case 2:
case ANIM_ATK_PARTNER:
if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
{
DestroyAnimVisualTask(taskId);
@ -715,7 +716,7 @@ void sub_80D5DB0(u8 taskId)
}
spriteId = gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)];
break;
case 3:
case ANIM_DEF_PARTNER:
if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget)))
{
DestroyAnimVisualTask(taskId);

View File

@ -2329,7 +2329,10 @@ void AnimSpinningSparkle(struct Sprite *sprite)
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 dest;

View File

@ -245,7 +245,7 @@ static const struct SubspriteTable gUnknown_0853EF40[] =
{ARRAY_COUNT(gUnknown_0853EF30), gUnknown_0853EF30},
};
static const struct SpriteTemplate gUnknown_0853EF48 =
static const struct SpriteTemplate gFrozenIceCubeSpriteTemplate =
{
.tileTag = 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 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) - 36;
@ -386,7 +386,7 @@ void sub_80A9EF4(u8 taskId)
x -= 6;
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
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)
gSprites[spriteId].invisible = TRUE;
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_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]);
selectedPalettes |= sub_80A76C4((gBattleAnimArgs[0] >> 7) & 1,

View File

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

View File

@ -395,7 +395,7 @@ static void sub_8113B90(struct Sprite *sprite)
DestroySpriteAndMatrix(sprite);
}
void sub_8113BAC(u8 taskId)
void AnimTask_MoveAttackerMementoShadow(u8 taskId)
{
struct ScanlineEffectParams scanlineParams;
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 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;
MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE);

View File

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

View File

@ -5,7 +5,7 @@
#include "constants/songs.h"
#include "sound.h"
static void sub_810A1A8(struct Sprite *);
static void AnimLightning(struct Sprite *);
static void sub_810A1F8(struct Sprite *);
static void sub_810A214(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_810AC8C(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 sub_810AD98(struct Sprite *);
static void sub_810ADF8(struct Sprite *);
static bool8 sub_810B154(struct Task *task, u8 taskId);
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 void sub_810B51C(struct Sprite *);
static bool8 sub_810B614(struct Task *task, u8 taskId);
@ -52,7 +52,7 @@ const union AnimCmd *const gUnknown_085956BC[] =
gUnknown_085956A4,
};
const struct SpriteTemplate gUnknown_085956C0 =
const struct SpriteTemplate gLightningSpriteTemplate =
{
.tileTag = ANIM_TAG_LIGHTNING,
.paletteTag = ANIM_TAG_LIGHTNING,
@ -60,7 +60,7 @@ const struct SpriteTemplate gUnknown_085956C0 =
.anims = gUnknown_085956BC,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810A1A8,
.callback = AnimLightning,
};
const union AffineAnimCmd gUnknown_085956D8[] =
@ -331,7 +331,7 @@ const union AffineAnimCmd *const gUnknown_08595950[] =
gUnknown_08595930,
};
const struct SpriteTemplate gGrowingElectricOrbSpriteTemplate =
const struct SpriteTemplate gGrowingChargeOrbSpriteTemplate =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -339,7 +339,7 @@ const struct SpriteTemplate gGrowingElectricOrbSpriteTemplate =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_08595950,
.callback = AnimGrowingElectricOrb,
.callback = AnimGrowingChargeOrb,
};
const union AnimCmd gUnknown_08595974[] =
@ -432,7 +432,7 @@ const struct SpriteTemplate gUnknown_08595A00 =
.callback = sub_810B1F0,
};
const struct SpriteTemplate gUnknown_08595A18 =
const struct SpriteTemplate gGrowingShockWaveOrbSpriteTemplate =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -440,10 +440,10 @@ const struct SpriteTemplate gUnknown_08595A18 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_08595950,
.callback = sub_810B23C,
.callback = AnimGrowingShockWaveOrb,
};
const struct SpriteTemplate gUnknown_08595A30 =
const struct SpriteTemplate gShockWaveProgressingBoltSpriteTemplate =
{
.tileTag = ANIM_TAG_SPARK,
.paletteTag = ANIM_TAG_SPARK,
@ -454,7 +454,7 @@ const struct SpriteTemplate gUnknown_08595A30 =
.callback = sub_810B51C,
};
static void sub_810A1A8(struct Sprite *sprite)
static void AnimLightning(struct Sprite *sprite)
{
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
sprite->pos1.x -= gBattleAnimArgs[0];
@ -883,8 +883,7 @@ static void sub_810ACC0(struct Sprite *sprite)
sprite->callback = sub_810AC8C;
}
// The growing orb for Charge
static void AnimGrowingElectricOrb(struct Sprite *sprite)
static void AnimGrowingChargeOrb(struct Sprite *sprite)
{
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])
{
@ -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];
@ -1217,7 +1217,7 @@ void sub_810B29C(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)
{
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];
@ -1296,7 +1296,7 @@ void sub_810B55C(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)
{

View File

@ -96,7 +96,7 @@ const union AnimCmd *const gUnknown_08595E60[] =
gUnknown_08595E4C,
};
const struct SpriteTemplate gUnknown_08595E68 =
const struct SpriteTemplate gKarateChopSpriteTemplate =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
@ -151,7 +151,7 @@ const struct SpriteTemplate gCrossChopHandSpriteTemplate =
.callback = AnimCrossChopHand,
};
const struct SpriteTemplate gUnknown_08595EE0 =
const struct SpriteTemplate gSlidingKickSpriteTemplate =
{
.tileTag = ANIM_TAG_HANDS_AND_FEET,
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
@ -342,7 +342,7 @@ const union AnimCmd *const gUnknown_0859607C[] =
gUnknown_0859606C,
};
const struct SpriteTemplate gUnknown_08596088 =
const struct SpriteTemplate gRevengeSmallScratchSpriteTemplate =
{
.tileTag = ANIM_TAG_PURPLE_SCRATCH,
.paletteTag = ANIM_TAG_PURPLE_SCRATCH,
@ -381,7 +381,7 @@ const union AnimCmd *const gUnknown_085960C4[] =
gUnknown_085960B8,
};
const struct SpriteTemplate gUnknown_085960D0 =
const struct SpriteTemplate gRevengeBigScratchSpriteTemplate =
{
.tileTag = 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];

View File

@ -128,7 +128,7 @@ const union AffineAnimCmd *const gUnknown_085953F4[] =
gUnknown_085953DC,
};
const struct SpriteTemplate gUnknown_085953F8 =
const struct SpriteTemplate gLargeFlameSpriteTemplate =
{
.tileTag = ANIM_TAG_FIRE,
.paletteTag = ANIM_TAG_FIRE,
@ -139,7 +139,7 @@ const struct SpriteTemplate gUnknown_085953F8 =
.callback = sub_8108FBC,
};
const struct SpriteTemplate gUnknown_08595410 =
const struct SpriteTemplate gLargeFlameScatterSpriteTemplate =
{
.tileTag = 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_810F004(struct Sprite *);
void sub_810F018(struct Sprite *);
void sub_810F084(struct Sprite *);
static void AnimSkyAttackBird(struct Sprite *);
void sub_810F140(struct Sprite *);
static void sub_810DE98(struct Sprite *);
static void sub_810DF18(u8);
@ -335,7 +335,7 @@ const struct SpriteTemplate gUnknown_085964FC =
.callback = sub_810F004,
};
const struct SpriteTemplate gUnknown_08596514 =
const struct SpriteTemplate gSkyAttackBirdSpriteTemplate =
{
.tileTag = ANIM_TAG_BIRD,
.paletteTag = ANIM_TAG_BIRD,
@ -343,7 +343,7 @@ const struct SpriteTemplate gUnknown_08596514 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.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;
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 InitAnimShadowBall(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_8111D78(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_8112ACC(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_8112D10(u8 taskId);
static void AnimGrudgeFlame(struct Sprite *);
@ -113,7 +113,7 @@ const union AnimCmd *const gUnknown_08596D88[] =
gUnknown_08596D70,
};
const struct SpriteTemplate gUnknown_08596D8C =
const struct SpriteTemplate gLickSpriteTemplate =
{
.tileTag = ANIM_TAG_LICK,
.paletteTag = ANIM_TAG_LICK,
@ -121,7 +121,7 @@ const struct SpriteTemplate gUnknown_08596D8C =
.anims = gUnknown_08596D88,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8111B9C,
.callback = AnimLick,
};
const union AffineAnimCmd gUnknown_08596DA4[] =
@ -165,10 +165,10 @@ const struct SpriteTemplate gCurseGhostSpriteTemplate =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8112B78,
.callback = AnimGhostStatusSprite,
};
const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E00 =
const struct SpriteTemplate gNightmareDevilSpriteTemplate =
{
.tileTag = ANIM_TAG_DEVIL,
.paletteTag = ANIM_TAG_DEVIL,
@ -176,7 +176,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E00 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8112B78,
.callback = AnimGhostStatusSprite,
};
const union AnimCmd gUnknown_08596E18[] =
@ -336,12 +336,13 @@ static void sub_8111814(struct Sprite *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;
SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL));
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0x10));
spriteId = GetAnimBattlerSpriteId(0);
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_BLEND);
SetSpriteRotScale(spriteId, 128, 128, 0);
gSprites[spriteId].invisible = FALSE;
@ -377,7 +378,7 @@ static void sub_811196C(u8 taskId)
return;
}
spriteId = GetAnimBattlerSpriteId(0);
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gTasks[taskId].data[0] += 8;
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);
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;
task = &gTasks[taskId];
task->data[0] = CloneBattlerSpriteWithBlend(1);
task->data[0] = CloneBattlerSpriteWithBlend(ANIM_TARGET);
if (task->data[0] < 0)
{
DestroyAnimVisualTask(taskId);
@ -610,7 +612,7 @@ static void sub_8111E78(u8 taskId)
}
else
{
task->data[0] = CloneBattlerSpriteWithBlend(1);
task->data[0] = CloneBattlerSpriteWithBlend(ANIM_TARGET);
if (task->data[0] < 0)
{
FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON);
@ -626,7 +628,7 @@ static void sub_8111E78(u8 taskId)
task->data[1] = 0;
task->data[2] = 0;
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;
if (position == 1) {
u16 mask = DISPCNT_BG1_ON;
@ -712,7 +714,7 @@ static void sub_8112170(u8 taskId)
{
case 0:
gScanlineEffect.state = 3;
task->data[14] = GetAnimBattlerSpriteId(1);
task->data[14] = GetAnimBattlerSpriteId(ANIM_TARGET);
if (rank == 1)
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON);
else
@ -1120,7 +1122,7 @@ static void sub_8112B44(struct Sprite *sprite)
DestroyAnimSprite(sprite);
}
static void sub_8112B78(struct Sprite *sprite)
static void AnimGhostStatusSprite(struct Sprite *sprite)
{
u16 coeffB;
u16 coeffA;

View File

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

View File

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

View File

@ -209,6 +209,7 @@ const struct SpriteTemplate gRandomPosHitSplatSpriteTemplate =
.callback = AnimHitSplatRandom,
};
// TODO: Needs generic descriptive name, what distinguishes this hit splat
const struct SpriteTemplate gExtremeSpeedHitSplatSpriteTemplate =
{
.tileTag = ANIM_TAG_IMPACT,
@ -242,7 +243,8 @@ const struct SpriteTemplate gFlashingHitSplatSpriteTemplate =
.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,
.paletteTag = ANIM_TAG_IMPACT,
@ -413,7 +415,7 @@ void sub_81159B4(struct Sprite *sprite)
sprite->callback(sprite);
}
// Task data for AnimTask_BlendCycleMonColor
// Task data for AnimTask_BlendColorCycle
#define tPalSelector data[0] // arg0
#define tDelay data[1] // arg1
#define tNumBlends data[2] // arg2
@ -422,9 +424,9 @@ void sub_81159B4(struct Sprite *sprite)
#define tBlendColor data[5] // arg5
#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
void AnimTask_BlendCycleMonColor(u8 taskId)
void AnimTask_BlendColorCycle(u8 taskId)
{
gTasks[taskId].tPalSelector = gBattleAnimArgs[0];
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].data[1] = gBattleAnimArgs[1];
gTasks[taskId].data[2] = gBattleAnimArgs[2];
gTasks[taskId].data[3] = gBattleAnimArgs[3];
gTasks[taskId].data[8] = gBattleAnimArgs[3];
gTasks[taskId].tXOffset = gBattleAnimArgs[0];
gTasks[taskId].tYOffset = gBattleAnimArgs[1];
gTasks[taskId].tNumShakes = gBattleAnimArgs[2];
gTasks[taskId].tTimer = gBattleAnimArgs[3];
gTasks[taskId].tShakeDelay = gBattleAnimArgs[3];
gBattle_BG3_X = gBattleAnimArgs[0];
gBattle_BG3_Y = gBattleAnimArgs[1];
gTasks[taskId].func = sub_81162F8;
@ -869,20 +883,20 @@ void sub_81162A4(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])
gBattle_BG3_X = -gTasks[taskId].data[0];
if (gBattle_BG3_X == gTasks[taskId].tXOffset)
gBattle_BG3_X = -gTasks[taskId].tXOffset;
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;
else
gBattle_BG3_Y = -gTasks[taskId].data[1];
gBattle_BG3_Y = -gTasks[taskId].tYOffset;
gTasks[taskId].data[3] = gTasks[taskId].data[8];
if (--gTasks[taskId].data[2] == 0)
gTasks[taskId].tTimer = gTasks[taskId].tShakeDelay;
if (--gTasks[taskId].tNumShakes == 0)
{
gBattle_BG3_X = 0;
gBattle_BG3_Y = 0;
@ -891,10 +905,16 @@ static void sub_81162F8(u8 taskId)
}
else
{
gTasks[taskId].data[3]--;
gTasks[taskId].tTimer--;
}
}
#undef tXOffset
#undef tYOffset
#undef tNumShakes
#undef tTimer
#undef tShakeDelay
static void AnimBasicHitSplat(struct Sprite *sprite)
{
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);

View File

@ -9,12 +9,12 @@
#include "constants/songs.h"
static void AnimDefensiveWall(struct Sprite *);
void sub_810F58C(struct Sprite *);
static void AnimWallSparkle(struct Sprite *);
void sub_810F634(struct Sprite *);
static void AnimQuestionMark(struct Sprite *);
void sub_810FBA8(struct Sprite *);
static void AnimRedX(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_810F3C8(struct Sprite *);
static void sub_810F400(struct Sprite *);
@ -41,7 +41,7 @@ const union AffineAnimCmd *const gUnknown_08596544[] =
gUnknown_0859652C,
};
const struct SpriteTemplate gUnknown_08596548 =
const struct SpriteTemplate gPsychUpSpiralSpriteTemplate =
{
.tileTag = ANIM_TAG_SPIRAL,
.paletteTag = ANIM_TAG_SPIRAL,
@ -52,7 +52,7 @@ const struct SpriteTemplate gUnknown_08596548 =
.callback = AnimSpriteOnMonPos,
};
const struct SpriteTemplate gUnknown_08596560 =
const struct SpriteTemplate gLightScreenWallSpriteTemplate =
{
.tileTag = ANIM_TAG_GREEN_LIGHT_WALL,
.paletteTag = ANIM_TAG_GREEN_LIGHT_WALL,
@ -63,7 +63,7 @@ const struct SpriteTemplate gUnknown_08596560 =
.callback = AnimDefensiveWall,
};
const struct SpriteTemplate gUnknown_08596578 =
const struct SpriteTemplate gReflectWallSpriteTemplate =
{
.tileTag = ANIM_TAG_BLUE_LIGHT_WALL,
.paletteTag = ANIM_TAG_BLUE_LIGHT_WALL,
@ -74,7 +74,7 @@ const struct SpriteTemplate gUnknown_08596578 =
.callback = AnimDefensiveWall,
};
const struct SpriteTemplate gUnknown_08596590 =
const struct SpriteTemplate gMirrorCoatWallSpriteTemplate =
{
.tileTag = ANIM_TAG_RED_LIGHT_WALL,
.paletteTag = ANIM_TAG_RED_LIGHT_WALL,
@ -96,7 +96,7 @@ const struct SpriteTemplate gBarrierWallSpriteTemplate =
.callback = AnimDefensiveWall,
};
const struct SpriteTemplate gUnknown_085965C0 =
const struct SpriteTemplate gMagicCoatWallSpriteTemplate =
{
.tileTag = ANIM_TAG_ORANGE_LIGHT_WALL,
.paletteTag = ANIM_TAG_ORANGE_LIGHT_WALL,
@ -122,7 +122,7 @@ const union AnimCmd *const gUnknown_085965F0[] =
gUnknown_085965D8,
};
const struct SpriteTemplate gUnknown_085965F4 =
const struct SpriteTemplate gReflectSparkleSpriteTemplate =
{
.tileTag = ANIM_TAG_SPARKLE_4,
.paletteTag = ANIM_TAG_SPARKLE_4,
@ -130,7 +130,7 @@ const struct SpriteTemplate gUnknown_085965F4 =
.anims = gUnknown_085965F0,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810F58C,
.callback = AnimWallSparkle,
};
const union AnimCmd gUnknown_0859660C[] =
@ -147,7 +147,7 @@ const union AnimCmd *const gUnknown_08596620[] =
gUnknown_0859660C,
};
const struct SpriteTemplate gUnknown_08596624 =
const struct SpriteTemplate gSpecialScreenSparkleSpriteTemplate =
{
.tileTag = ANIM_TAG_SPARKLE_3,
.paletteTag = ANIM_TAG_SPARKLE_3,
@ -155,7 +155,7 @@ const struct SpriteTemplate gUnknown_08596624 =
.anims = gUnknown_08596620,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810F58C,
.callback = AnimWallSparkle,
};
const struct SpriteTemplate gGoldRingSpriteTemplate =
@ -215,7 +215,7 @@ const union AnimCmd *const gUnknown_085966D4[] =
gUnknown_08596694,
};
const struct SpriteTemplate gUnknown_085966DC =
const struct SpriteTemplate gBentSpoonSpriteTemplate =
{
.tileTag = ANIM_TAG_BENT_SPOON,
.paletteTag = ANIM_TAG_BENT_SPOON,
@ -294,15 +294,15 @@ const struct SpriteTemplate gUnknown_08596794 =
.callback = SpriteCallbackDummy,
};
const struct SpriteTemplate gUnknown_085967AC =
const struct SpriteTemplate gRedXSpriteTemplate =
{
.tileTag = 10250,
.paletteTag = 10250,
.tileTag = ANIM_TAG_X_SIGN,
.paletteTag = ANIM_TAG_X_SIGN,
.oam = &gOamData_AffineOff_ObjNormal_64x64,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_810FBA8,
.callback = AnimRedX,
};
const union AffineAnimCmd gUnknown_085967C4[] =
@ -370,7 +370,7 @@ const union AffineAnimCmd *const gUnknown_08596894[] =
gUnknown_0859687C,
};
const struct SpriteTemplate gUnknown_08596898 =
const struct SpriteTemplate gLusterPurgeCircleSpriteTemplate =
{
.tileTag = 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,
};
const struct SpriteTemplate gUnknown_08596920 =
const struct SpriteTemplate gPsychoBoostOrbSpriteTemplate =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
.paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -416,7 +416,7 @@ const struct SpriteTemplate gUnknown_08596920 =
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_08596918,
.callback = sub_8110240,
.callback = AnimPsychoBoost,
};
// 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;
}
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)
{
@ -602,7 +603,7 @@ void sub_810F58C(struct Sprite *sprite)
}
else
{
if (gBattleAnimArgs[2] == 0)
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, respectMonPicOffsets);
else
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];
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
@ -845,9 +846,9 @@ static void sub_810FB60(struct Sprite *sprite)
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.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
@ -857,13 +858,13 @@ void sub_810FBA8(struct Sprite *sprite)
sprite->callback = sub_810FB60;
}
void sub_810FBF0(u8 taskId)
void AnimTask_SkillSwap(u8 taskId)
{
struct Task *task = &gTasks[taskId];
if (IsContest())
{
if (gBattleAnimArgs[0] == 1)
if (gBattleAnimArgs[0] == ANIM_TARGET)
{
task->data[10] = -10;
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])
{

View File

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

View File

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