mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 13:53:52 +01:00
Document move anims C-H
This commit is contained in:
parent
faf0ba8662
commit
501d0d3c18
File diff suppressed because it is too large
Load Diff
@ -67,18 +67,18 @@ s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan);
|
|||||||
void sub_80A4720(u16 a, u16 *b, u32 c, u8 d);
|
void sub_80A4720(u16 a, u16 *b, u32 c, u8 d);
|
||||||
void sub_80A477C(bool8);
|
void sub_80A477C(bool8);
|
||||||
|
|
||||||
// battle_intro.s
|
// battle_intro.c
|
||||||
void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value);
|
void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value);
|
||||||
void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *arg5, u16 *arg6, u16 arg7);
|
void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *arg5, u16 *arg6, u16 arg7);
|
||||||
void HandleIntroSlide(u8 terrainId);
|
void HandleIntroSlide(u8 terrainId);
|
||||||
int GetAnimBgAttribute(u8 bgId, u8 attributeId);
|
int GetAnimBgAttribute(u8 bgId, u8 attributeId);
|
||||||
|
|
||||||
// battle_anim_mons.s
|
// battle_anim_mons.c
|
||||||
void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite);
|
void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite);
|
||||||
void sub_80A8AEC(struct Sprite *sprite);
|
void sub_80A8AEC(struct Sprite *sprite);
|
||||||
void sub_80A8A6C(struct Sprite *sprite);
|
void sub_80A8A6C(struct Sprite *sprite);
|
||||||
void sub_80A8E30(struct Sprite *sprite);
|
void sub_80A8E30(struct Sprite *sprite);
|
||||||
void sub_80A8B64(struct Sprite *sprite);
|
void AnimSpinningSparkle(struct Sprite *sprite);
|
||||||
void SetAverageBattlerPositions(u8 battlerId, bool8 respectMonPicOffsets, s16 *x, s16 *y);
|
void SetAverageBattlerPositions(u8 battlerId, bool8 respectMonPicOffsets, s16 *x, s16 *y);
|
||||||
void DestroySpriteAndMatrix(struct Sprite *sprite);
|
void DestroySpriteAndMatrix(struct Sprite *sprite);
|
||||||
void TranslateSpriteLinearFixedPoint(struct Sprite *sprite);
|
void TranslateSpriteLinearFixedPoint(struct Sprite *sprite);
|
||||||
@ -101,7 +101,7 @@ void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2);
|
|||||||
s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2);
|
s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2);
|
||||||
u8 GetBattlerYCoordWithElevation(u8 battlerId);
|
u8 GetBattlerYCoordWithElevation(u8 battlerId);
|
||||||
void WaitAnimForDuration(struct Sprite *sprite);
|
void WaitAnimForDuration(struct Sprite *sprite);
|
||||||
void AnimSnoreZ(struct Sprite *sprite);
|
void AnimTravelDiagonally(struct Sprite *sprite);
|
||||||
void InitAnimLinearTranslation(struct Sprite *sprite);
|
void InitAnimLinearTranslation(struct Sprite *sprite);
|
||||||
void sub_80A6F98(struct Sprite *sprite);
|
void sub_80A6F98(struct Sprite *sprite);
|
||||||
u8 GetBattlerSpriteBGPriority(u8 battlerId);
|
u8 GetBattlerSpriteBGPriority(u8 battlerId);
|
||||||
@ -208,7 +208,7 @@ void sub_80A718C(struct Sprite *sprite);
|
|||||||
void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId);
|
void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId);
|
||||||
|
|
||||||
// ground.c
|
// ground.c
|
||||||
void sub_81152DC(u8 taskId);
|
void AnimTask_HorizontalShake(u8 taskId);
|
||||||
|
|
||||||
// battle_anim_special.c
|
// battle_anim_special.c
|
||||||
void sub_8172EF0(u8 battler, struct Pokemon *mon);
|
void sub_8172EF0(u8 battler, struct Pokemon *mon);
|
||||||
|
@ -393,7 +393,7 @@
|
|||||||
#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist
|
#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist
|
||||||
|
|
||||||
// Most tasks return a value to gBattleAnimArgs[7].
|
// Most tasks return a value to gBattleAnimArgs[7].
|
||||||
#define ARG_RET_ID 0x7
|
#define ARG_RET_ID 7
|
||||||
|
|
||||||
// Trapping Wrap-like moves end turn animation.
|
// Trapping Wrap-like moves end turn animation.
|
||||||
#define TRAP_ANIM_BIND 0
|
#define TRAP_ANIM_BIND 0
|
||||||
|
@ -87,7 +87,7 @@ static void AnimSoftBoiledEgg_Step3_Callback1(struct Sprite *);
|
|||||||
static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *);
|
static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *);
|
||||||
static void AnimSoftBoiledEgg_Step4(struct Sprite *);
|
static void AnimSoftBoiledEgg_Step4(struct Sprite *);
|
||||||
static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *);
|
static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *);
|
||||||
static void StretchAttacker_Step(u8);
|
static void AttackerStretchAndDisappear_Step(u8);
|
||||||
static void ExtremeSpeedImpact_Step(u8);
|
static void ExtremeSpeedImpact_Step(u8);
|
||||||
static void ExtremeSpeedMonReappear_Step(u8);
|
static void ExtremeSpeedMonReappear_Step(u8);
|
||||||
static void SpeedDust_Step1(u8);
|
static void SpeedDust_Step1(u8);
|
||||||
@ -632,7 +632,7 @@ const struct SpriteTemplate gSnoreZSpriteTemplate =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = AnimSnoreZ,
|
.callback = AnimTravelDiagonally,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gExplosionAnimCmds[] =
|
const union AnimCmd gExplosionAnimCmds[] =
|
||||||
@ -877,7 +877,9 @@ const struct SpriteTemplate gBellSpriteTemplate =
|
|||||||
.callback = AnimSpriteOnMonPos,
|
.callback = AnimSpriteOnMonPos,
|
||||||
};
|
};
|
||||||
|
|
||||||
const u16 gMusicNotePaletteTagsTable[] =
|
#define NUM_MUSIC_NOTE_PAL_TAGS 3
|
||||||
|
|
||||||
|
static const u16 sMusicNotePaletteTagsTable[NUM_MUSIC_NOTE_PAL_TAGS] =
|
||||||
{
|
{
|
||||||
ANIM_TAG_MUSIC_NOTES_2,
|
ANIM_TAG_MUSIC_NOTES_2,
|
||||||
ANIM_SPRITES_START - 1,
|
ANIM_SPRITES_START - 1,
|
||||||
@ -2773,22 +2775,23 @@ static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTask_StretchAttacker(u8 taskId)
|
// Used by Extremespeed
|
||||||
|
void AnimTask_AttackerStretchAndDisappear(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task* task = &gTasks[taskId];
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[0] = spriteId;
|
task->data[0] = spriteId;
|
||||||
PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds);
|
PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds);
|
||||||
task->func = StretchAttacker_Step;
|
task->func = AttackerStretchAndDisappear_Step;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void StretchAttacker_Step(u8 taskId)
|
static void AttackerStretchAndDisappear_Step(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task* task = &gTasks[taskId];
|
struct Task* task = &gTasks[taskId];
|
||||||
if (!RunAffineAnimFromTaskData(task))
|
if (!RunAffineAnimFromTaskData(task))
|
||||||
{
|
{
|
||||||
gSprites[task->data[0]].pos2.y = 0;
|
gSprites[task->data[0]].pos2.y = 0;
|
||||||
gSprites[task->data[0]].invisible = 1;
|
gSprites[task->data[0]].invisible = TRUE;
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2998,29 +3001,29 @@ void AnimSpeedDust(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8105CB4(u8 taskId)
|
void AnimTask_LoadMusicNotesPal(u8 taskId)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
u8 paletteNums[3];
|
u8 paletteNums[NUM_MUSIC_NOTE_PAL_TAGS];
|
||||||
|
|
||||||
paletteNums[0] = IndexOfSpritePaletteTag(ANIM_TAG_MUSIC_NOTES_2);
|
paletteNums[0] = IndexOfSpritePaletteTag(ANIM_TAG_MUSIC_NOTES_2);
|
||||||
for (i = 1; i < 3; i++)
|
for (i = 1; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
|
||||||
paletteNums[i] = AllocSpritePalette(ANIM_SPRITES_START - i);
|
paletteNums[i] = AllocSpritePalette(ANIM_SPRITES_START - i);
|
||||||
|
|
||||||
gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000);
|
gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000);
|
||||||
LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->field_17C);
|
LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->field_17C);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
|
||||||
LoadPalette(&gMonSpritesGfxPtr->field_17C[i * 32], (u16)((paletteNums[i] << 4) + 0x100), 32);
|
LoadPalette(&gMonSpritesGfxPtr->field_17C[i * 32], (u16)((paletteNums[i] << 4) + 0x100), 32);
|
||||||
|
|
||||||
FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_17C);
|
FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_17C);
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8105D60(u8 taskId)
|
void AnimTask_FreeMusicNotesPal(u8 taskId)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
|
||||||
FreeSpritePaletteByTag(gMusicNotePaletteTagsTable[i]);
|
FreeSpritePaletteByTag(sMusicNotePaletteTagsTable[i]);
|
||||||
|
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
@ -3031,7 +3034,7 @@ static void SetMusicNotePalette(struct Sprite *sprite, u8 a, u8 b)
|
|||||||
tile = (b & 1);
|
tile = (b & 1);
|
||||||
tile = ((-tile | tile) >> 31) & 32;
|
tile = ((-tile | tile) >> 31) & 32;
|
||||||
sprite->oam.tileNum += tile + (a << 2);
|
sprite->oam.tileNum += tile + (a << 2);
|
||||||
sprite->oam.paletteNum = IndexOfSpritePaletteTag(gMusicNotePaletteTagsTable[b >> 1]);
|
sprite->oam.paletteNum = IndexOfSpritePaletteTag(sMusicNotePaletteTagsTable[b >> 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimHealBellMusicNote(struct Sprite *sprite)
|
void AnimHealBellMusicNote(struct Sprite *sprite)
|
||||||
|
@ -159,7 +159,7 @@ void AnimTask_ShakeMon2(u8 taskId)
|
|||||||
bool8 destroy = FALSE;
|
bool8 destroy = FALSE;
|
||||||
u8 battlerId;
|
u8 battlerId;
|
||||||
|
|
||||||
if (gBattleAnimArgs[0] < 4)
|
if (gBattleAnimArgs[0] < MAX_BATTLERS_COUNT)
|
||||||
{
|
{
|
||||||
spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
||||||
if (spriteId == 0xff)
|
if (spriteId == 0xff)
|
||||||
@ -979,7 +979,7 @@ void sub_80D6308(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80D6388(u8 taskId)
|
void AnimTask_ShakeTargetBasedOnMovePowerOrDmg(u8 taskId)
|
||||||
{
|
{
|
||||||
if (!gBattleAnimArgs[0])
|
if (!gBattleAnimArgs[0])
|
||||||
{
|
{
|
||||||
@ -1010,7 +1010,7 @@ void sub_80D6388(u8 taskId)
|
|||||||
gTasks[taskId].data[12] = 0;
|
gTasks[taskId].data[12] = 0;
|
||||||
gTasks[taskId].data[10] = gBattleAnimArgs[3];
|
gTasks[taskId].data[10] = gBattleAnimArgs[3];
|
||||||
gTasks[taskId].data[11] = gBattleAnimArgs[4];
|
gTasks[taskId].data[11] = gBattleAnimArgs[4];
|
||||||
gTasks[taskId].data[7] = GetAnimBattlerSpriteId(1);
|
gTasks[taskId].data[7] = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||||
gTasks[taskId].data[8] = gSprites[gTasks[taskId].data[7]].pos2.x;
|
gTasks[taskId].data[8] = gSprites[gTasks[taskId].data[7]].pos2.x;
|
||||||
gTasks[taskId].data[9] = gSprites[gTasks[taskId].data[7]].pos2.y;
|
gTasks[taskId].data[9] = gSprites[gTasks[taskId].data[7]].pos2.y;
|
||||||
gTasks[taskId].data[0] = 0;
|
gTasks[taskId].data[0] = 0;
|
||||||
|
@ -1532,7 +1532,7 @@ static void AnimThrowProjectile_Step(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimSnoreZ(struct Sprite *sprite)
|
void AnimTravelDiagonally(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
bool8 r4;
|
bool8 r4;
|
||||||
u8 battlerId, coordType;
|
u8 battlerId, coordType;
|
||||||
@ -1547,7 +1547,7 @@ void AnimSnoreZ(struct Sprite *sprite)
|
|||||||
r4 = FALSE;
|
r4 = FALSE;
|
||||||
coordType = BATTLER_COORD_Y;
|
coordType = BATTLER_COORD_Y;
|
||||||
}
|
}
|
||||||
if (!gBattleAnimArgs[5])
|
if (gBattleAnimArgs[5] == ANIM_ATTACKER)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimAttacker(sprite, r4);
|
InitSpritePosToAnimAttacker(sprite, r4);
|
||||||
battlerId = gBattleAnimAttacker;
|
battlerId = gBattleAnimAttacker;
|
||||||
@ -2316,7 +2316,8 @@ void sub_80A8AEC(struct Sprite *sprite)
|
|||||||
sprite->callback = TranslateSpriteLinearAndFlicker;
|
sprite->callback = TranslateSpriteLinearAndFlicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8B64(struct Sprite *sprite)
|
// Used by Detect/Disable
|
||||||
|
void AnimSpinningSparkle(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
SetSpriteCoordsToAnimAttackerCoords(sprite);
|
SetSpriteCoordsToAnimAttackerCoords(sprite);
|
||||||
if (GetBattlerSide(gBattleAnimAttacker))
|
if (GetBattlerSide(gBattleAnimAttacker))
|
||||||
|
@ -261,7 +261,7 @@ static void sub_8158FF4(u8 taskId)
|
|||||||
}
|
}
|
||||||
// task end
|
// task end
|
||||||
|
|
||||||
void sub_8159078(u8 taskId)
|
void SoundTask_WaitForCry(u8 taskId)
|
||||||
{
|
{
|
||||||
if (gTasks[taskId].data[9] < 2)
|
if (gTasks[taskId].data[9] < 2)
|
||||||
{
|
{
|
||||||
@ -332,7 +332,7 @@ static void sub_815913C(u8 taskId)
|
|||||||
}
|
}
|
||||||
// task end
|
// task end
|
||||||
|
|
||||||
void sub_8159210(u8 taskId)
|
void SoundTask_PlaySE1WithPanning(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 songId = gBattleAnimArgs[0];
|
u16 songId = gBattleAnimArgs[0];
|
||||||
s8 pan = BattleAnimAdjustPanning(gBattleAnimArgs[1]);
|
s8 pan = BattleAnimAdjustPanning(gBattleAnimArgs[1]);
|
||||||
@ -341,7 +341,7 @@ void sub_8159210(u8 taskId)
|
|||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8159244(u8 taskId)
|
void SoundTask_PlaySE2WithPanning(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 songId = gBattleAnimArgs[0];
|
u16 songId = gBattleAnimArgs[0];
|
||||||
s8 pan = BattleAnimAdjustPanning(gBattleAnimArgs[1]);
|
s8 pan = BattleAnimAdjustPanning(gBattleAnimArgs[1]);
|
||||||
|
@ -112,7 +112,7 @@ static const union AnimCmd *const sSpriteAnimTable_853EE80[] =
|
|||||||
sSpriteAnim_853EE68
|
sSpriteAnim_853EE68
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_0853EE84 =
|
const struct SpriteTemplate gSpinningSparkleSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SPARKLE_4,
|
.tileTag = ANIM_TAG_SPARKLE_4,
|
||||||
.paletteTag = ANIM_TAG_SPARKLE_4,
|
.paletteTag = ANIM_TAG_SPARKLE_4,
|
||||||
@ -120,7 +120,7 @@ const struct SpriteTemplate gUnknown_0853EE84 =
|
|||||||
.anims = sSpriteAnimTable_853EE80,
|
.anims = sSpriteAnimTable_853EE80,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_80A8B64,
|
.callback = AnimSpinningSparkle,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_0853EE9C =
|
const struct SpriteTemplate gUnknown_0853EE9C =
|
||||||
|
@ -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 sub_8116620(u8 taskId)
|
void AnimTask_BlendMonColor(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,
|
||||||
@ -193,7 +193,7 @@ static void AnimTask_BlendSpriteColor_Step2(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8116960(u8 taskId)
|
void AnimTask_HardwarePaletteFade(u8 taskId)
|
||||||
{
|
{
|
||||||
BeginHardwarePaletteFade(
|
BeginHardwarePaletteFade(
|
||||||
gBattleAnimArgs[0],
|
gBattleAnimArgs[0],
|
||||||
@ -271,7 +271,8 @@ static void sub_8116AD0(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8116B14(u8 taskId)
|
// Only used by Curse for non-Ghost mons
|
||||||
|
void AnimTask_DrawFallingWhiteLinesOnAttacker(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 species;
|
u16 species;
|
||||||
int spriteId, newSpriteId;
|
int spriteId, newSpriteId;
|
||||||
@ -600,7 +601,7 @@ static void sub_81172EC(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8117494(u8 taskId)
|
void AnimTask_Flash(u8 taskId)
|
||||||
{
|
{
|
||||||
u32 selectedPalettes = sub_80A76C4(1, 1, 1, 1);
|
u32 selectedPalettes = sub_80A76C4(1, 1, 1, 1);
|
||||||
sub_81175C4(selectedPalettes, 0);
|
sub_81175C4(selectedPalettes, 0);
|
||||||
@ -773,7 +774,6 @@ void AnimTask_SetAllBattlersButAttackerInvisiblity(u8 taskId)
|
|||||||
|
|
||||||
#undef tInvisible
|
#undef tInvisible
|
||||||
|
|
||||||
|
|
||||||
void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *gfx, const u32 *tilemap, const u32 *palette)
|
void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *gfx, const u32 *tilemap, const u32 *palette)
|
||||||
{
|
{
|
||||||
u16 species;
|
u16 species;
|
||||||
@ -1005,9 +1005,9 @@ void sub_8117DD8(u8 taskId)
|
|||||||
void AnimTask_IsContest(u8 taskId)
|
void AnimTask_IsContest(u8 taskId)
|
||||||
{
|
{
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
gBattleAnimArgs[7] = 1;
|
gBattleAnimArgs[7] = TRUE;
|
||||||
else
|
else
|
||||||
gBattleAnimArgs[7] = 0;
|
gBattleAnimArgs[7] = FALSE;
|
||||||
|
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
@ -1022,14 +1022,14 @@ void sub_8117E94(u8 taskId)
|
|||||||
void AnimTask_IsTargetSameSide(u8 taskId)
|
void AnimTask_IsTargetSameSide(u8 taskId)
|
||||||
{
|
{
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget))
|
if (GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget))
|
||||||
gBattleAnimArgs[7] = 1;
|
gBattleAnimArgs[7] = TRUE;
|
||||||
else
|
else
|
||||||
gBattleAnimArgs[7] = 0;
|
gBattleAnimArgs[7] = FALSE;
|
||||||
|
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8117F10(u8 taskId)
|
void AnimTask_SetAnimTargetToBattlerTarget(u8 taskId)
|
||||||
{
|
{
|
||||||
gBattleAnimTarget = gBattlerTarget;
|
gBattleAnimTarget = gBattlerTarget;
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
@ -1042,6 +1042,7 @@ void sub_8117F30(u8 taskId)
|
|||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Rename. Also used by Faint Attack
|
||||||
void AnimTask_ExtremeSpeedMoveTarget(u8 taskId)
|
void AnimTask_ExtremeSpeedMoveTarget(u8 taskId)
|
||||||
{
|
{
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
@ -1051,7 +1052,7 @@ void AnimTask_ExtremeSpeedMoveTarget(u8 taskId)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gTasks[taskId].data[0] = gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible;
|
gTasks[taskId].data[0] = gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible;
|
||||||
gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = 1;
|
gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = TRUE;
|
||||||
gTasks[taskId].func = ExtremSpeedMoveTarget_Step;
|
gTasks[taskId].func = ExtremSpeedMoveTarget_Step;
|
||||||
gAnimVisualTaskCount--;
|
gAnimVisualTaskCount--;
|
||||||
}
|
}
|
||||||
|
26
src/dark.c
26
src/dark.c
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
void sub_81138D4(struct Sprite *);
|
void sub_81138D4(struct Sprite *);
|
||||||
static void AnimBite(struct Sprite *);
|
static void AnimBite(struct Sprite *);
|
||||||
void sub_8113A90(struct Sprite *);
|
static void AnimTearDrop(struct Sprite *);
|
||||||
void sub_81144BC(struct Sprite *);
|
static void AnimClawSlash(struct Sprite *);
|
||||||
static void sub_811375C(u8);
|
static void sub_811375C(u8);
|
||||||
static void sub_811381C(u8);
|
static void sub_811381C(u8);
|
||||||
static void sub_8113950(struct Sprite *);
|
static void sub_8113950(struct Sprite *);
|
||||||
@ -138,7 +138,7 @@ const union AffineAnimCmd *const gUnknown_085970E0[] =
|
|||||||
gUnknown_085970C8,
|
gUnknown_085970C8,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085970E8 =
|
const struct SpriteTemplate gTearDropSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_BUBBLES,
|
.tileTag = ANIM_TAG_SMALL_BUBBLES,
|
||||||
.paletteTag = ANIM_TAG_SMALL_BUBBLES,
|
.paletteTag = ANIM_TAG_SMALL_BUBBLES,
|
||||||
@ -146,7 +146,7 @@ const struct SpriteTemplate gUnknown_085970E8 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_085970E0,
|
.affineAnims = gUnknown_085970E0,
|
||||||
.callback = sub_8113A90,
|
.callback = AnimTearDrop,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08597100[] =
|
const union AnimCmd gUnknown_08597100[] =
|
||||||
@ -175,7 +175,7 @@ const union AnimCmd *const gUnknown_08597130[] =
|
|||||||
gUnknown_08597118,
|
gUnknown_08597118,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_8597138 =
|
const struct SpriteTemplate gClawSlashSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_CLAW_SLASH,
|
.tileTag = ANIM_TAG_CLAW_SLASH,
|
||||||
.paletteTag = ANIM_TAG_CLAW_SLASH,
|
.paletteTag = ANIM_TAG_CLAW_SLASH,
|
||||||
@ -183,7 +183,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8597138 =
|
|||||||
.anims = gUnknown_08597130,
|
.anims = gUnknown_08597130,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81144BC,
|
.callback = AnimClawSlash,
|
||||||
};
|
};
|
||||||
|
|
||||||
void AnimTask_AttackerFadeToInvisible(u8 taskId)
|
void AnimTask_AttackerFadeToInvisible(u8 taskId)
|
||||||
@ -214,7 +214,7 @@ static void sub_811375C(u8 taskId)
|
|||||||
gTasks[taskId].data[2] = 0;
|
gTasks[taskId].data[2] = 0;
|
||||||
if (blendA == 16)
|
if (blendA == 16)
|
||||||
{
|
{
|
||||||
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = 1;
|
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = TRUE;
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,12 +342,13 @@ static void sub_8113A58(struct Sprite *sprite)
|
|||||||
DestroySpriteAndMatrix(sprite);
|
DestroySpriteAndMatrix(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8113A90(struct Sprite *sprite)
|
// Launches a tear drop away from the battler. Used by Fake Tears
|
||||||
|
static void AnimTearDrop(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 battler;
|
u8 battler;
|
||||||
s8 xOffset;
|
s8 xOffset;
|
||||||
|
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
|
||||||
battler = gBattleAnimAttacker;
|
battler = gBattleAnimAttacker;
|
||||||
else
|
else
|
||||||
battler = gBattleAnimTarget;
|
battler = gBattleAnimTarget;
|
||||||
@ -773,12 +774,12 @@ void sub_81143C0(u8 taskId)
|
|||||||
{
|
{
|
||||||
u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0;
|
u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0;
|
||||||
MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE);
|
MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE);
|
||||||
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = 0;
|
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = FALSE;
|
||||||
|
|
||||||
if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
|
if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
|
||||||
{
|
{
|
||||||
MoveBattlerSpriteToBG(gBattleAnimAttacker ^ 2, toBG2 ^ 1, TRUE);
|
MoveBattlerSpriteToBG(gBattleAnimAttacker ^ 2, toBG2 ^ 1, TRUE);
|
||||||
gSprites[gBattlerSpriteIds[gBattleAnimAttacker ^ 2]].invisible = 0;
|
gSprites[gBattlerSpriteIds[gBattleAnimAttacker ^ 2]].invisible = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
@ -795,7 +796,8 @@ void sub_8114470(u8 taskId)
|
|||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81144BC(struct Sprite *sprite)
|
// Animates a deep slash from a claw. Used by Metal Claw, Dragon Claw, and Crush Claw
|
||||||
|
static void AnimClawSlash(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->pos1.x += gBattleAnimArgs[0];
|
sprite->pos1.x += gBattleAnimArgs[0];
|
||||||
sprite->pos1.y += gBattleAnimArgs[1];
|
sprite->pos1.y += gBattleAnimArgs[1];
|
||||||
|
28
src/dragon.c
28
src/dragon.c
@ -6,9 +6,9 @@
|
|||||||
#include "constants/rgb.h"
|
#include "constants/rgb.h"
|
||||||
|
|
||||||
void sub_8113064(struct Sprite *);
|
void sub_8113064(struct Sprite *);
|
||||||
void sub_81131B4(struct Sprite *);
|
static void AnimDragonRageFirePlume(struct Sprite *);
|
||||||
void sub_8113224(struct Sprite *);
|
static void AnimDragonFireToTarget(struct Sprite *);
|
||||||
void sub_8113250(struct Sprite *);
|
static void AnimDragonDanceOrb(struct Sprite *);
|
||||||
void sub_81135EC(struct Sprite *);
|
void sub_81135EC(struct Sprite *);
|
||||||
static void sub_81132E0(struct Sprite *);
|
static void sub_81132E0(struct Sprite *);
|
||||||
static void sub_81134B8(u8);
|
static void sub_81134B8(u8);
|
||||||
@ -85,7 +85,7 @@ const union AffineAnimCmd *const gUnknown_08596EEC[] =
|
|||||||
gUnknown_08596ED4,
|
gUnknown_08596ED4,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596EF4 =
|
const struct SpriteTemplate gDragonBreathFireSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||||
@ -93,7 +93,7 @@ const struct SpriteTemplate gUnknown_08596EF4 =
|
|||||||
.anims = gUnknown_08596EB4,
|
.anims = gUnknown_08596EB4,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08596EEC,
|
.affineAnims = gUnknown_08596EEC,
|
||||||
.callback = sub_8113224,
|
.callback = AnimDragonFireToTarget,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08596F0C[] =
|
const union AnimCmd gUnknown_08596F0C[] =
|
||||||
@ -111,7 +111,7 @@ const union AnimCmd *const gUnknown_08596F24[] =
|
|||||||
gUnknown_08596F0C,
|
gUnknown_08596F0C,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596F28 =
|
const struct SpriteTemplate gDragonRageFirePlumeSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_FIRE_PLUME,
|
.tileTag = ANIM_TAG_FIRE_PLUME,
|
||||||
.paletteTag = ANIM_TAG_FIRE_PLUME,
|
.paletteTag = ANIM_TAG_FIRE_PLUME,
|
||||||
@ -119,7 +119,7 @@ const struct SpriteTemplate gUnknown_08596F28 =
|
|||||||
.anims = gUnknown_08596F24,
|
.anims = gUnknown_08596F24,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81131B4,
|
.callback = AnimDragonRageFirePlume,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08596F40[] =
|
const union AnimCmd gUnknown_08596F40[] =
|
||||||
@ -154,7 +154,7 @@ const union AffineAnimCmd *const gUnknown_08596F78[] =
|
|||||||
gUnknown_08596F68,
|
gUnknown_08596F68,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596F80 =
|
const struct SpriteTemplate gDragonRageFireSpitSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||||
@ -162,10 +162,10 @@ const struct SpriteTemplate gUnknown_08596F80 =
|
|||||||
.anims = gUnknown_08596F50,
|
.anims = gUnknown_08596F50,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08596F78,
|
.affineAnims = gUnknown_08596F78,
|
||||||
.callback = sub_8113224,
|
.callback = AnimDragonFireToTarget,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596F98 =
|
const struct SpriteTemplate gDragonDanceOrbSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_HOLLOW_ORB,
|
.tileTag = ANIM_TAG_HOLLOW_ORB,
|
||||||
.paletteTag = ANIM_TAG_HOLLOW_ORB,
|
.paletteTag = ANIM_TAG_HOLLOW_ORB,
|
||||||
@ -173,7 +173,7 @@ const struct SpriteTemplate gUnknown_08596F98 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_8113250,
|
.callback = AnimDragonDanceOrb,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596FB0 =
|
const struct SpriteTemplate gUnknown_08596FB0 =
|
||||||
@ -238,7 +238,7 @@ static void sub_8113100(struct Sprite *sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81131B4(struct Sprite *sprite)
|
static void AnimDragonRageFirePlume(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == 0)
|
||||||
{
|
{
|
||||||
@ -257,7 +257,7 @@ void sub_81131B4(struct Sprite *sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8113224(struct Sprite *sprite)
|
static void AnimDragonFireToTarget(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
StartSpriteAffineAnim(sprite, 1);
|
StartSpriteAffineAnim(sprite, 1);
|
||||||
@ -265,7 +265,7 @@ void sub_8113224(struct Sprite *sprite)
|
|||||||
sub_8113100(sprite);
|
sub_8113100(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8113250(struct Sprite *sprite)
|
static void AnimDragonDanceOrb(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u16 r5;
|
u16 r5;
|
||||||
u16 r0;
|
u16 r0;
|
||||||
|
55
src/fight.c
55
src/fight.c
@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
void unc_080B08A0(struct Sprite *);
|
void unc_080B08A0(struct Sprite *);
|
||||||
void sub_810CE68(struct Sprite *);
|
void sub_810CE68(struct Sprite *);
|
||||||
void sub_810CEB4(struct Sprite *);
|
static void AnimJumpKick(struct Sprite *);
|
||||||
void AnimBasicFistOrFoot(struct Sprite *);
|
static void AnimBasicFistOrFoot(struct Sprite *);
|
||||||
void sub_810CF30(struct Sprite *);
|
static void AnimFistOrFootRandomPos(struct Sprite *);
|
||||||
void sub_810D10C(struct Sprite *);
|
static void AnimCrossChopHand(struct Sprite *);
|
||||||
void sub_810D1B4(struct Sprite *);
|
void sub_810D1B4(struct Sprite *);
|
||||||
void AnimSpinningKickOrPunch(struct Sprite *);
|
static void AnimSpinningKickOrPunch(struct Sprite *);
|
||||||
void AnimStompFoot(struct Sprite *);
|
static void AnimStompFoot(struct Sprite *);
|
||||||
void sub_810D37C(struct Sprite *);
|
static void AnimDizzyPunchDuck(struct Sprite *);
|
||||||
void sub_810D40C(struct Sprite *);
|
void sub_810D40C(struct Sprite *);
|
||||||
void sub_810D4F4(struct Sprite *);
|
void sub_810D4F4(struct Sprite *);
|
||||||
void sub_810D608(struct Sprite *);
|
void sub_810D608(struct Sprite *);
|
||||||
@ -23,7 +23,7 @@ void sub_810D714(struct Sprite *);
|
|||||||
void sub_810D874(struct Sprite *);
|
void sub_810D874(struct Sprite *);
|
||||||
static void AnimArmThrustHit(struct Sprite *);
|
static void AnimArmThrustHit(struct Sprite *);
|
||||||
void sub_810DA10(struct Sprite *);
|
void sub_810DA10(struct Sprite *);
|
||||||
void sub_810DA7C(struct Sprite *);
|
static void AnimFocusPunchFist(struct Sprite *);
|
||||||
static void sub_810D0B8(struct Sprite *);
|
static void sub_810D0B8(struct Sprite *);
|
||||||
static void sub_810D164(struct Sprite *);
|
static void sub_810D164(struct Sprite *);
|
||||||
static void sub_810D240(struct Sprite *);
|
static void sub_810D240(struct Sprite *);
|
||||||
@ -107,7 +107,7 @@ const struct SpriteTemplate gUnknown_08595E68 =
|
|||||||
.callback = sub_810CE68,
|
.callback = sub_810CE68,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595E80 =
|
const struct SpriteTemplate gJumpKickSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
@ -115,7 +115,7 @@ const struct SpriteTemplate gUnknown_08595E80 =
|
|||||||
.anims = gUnknown_08595E54,
|
.anims = gUnknown_08595E54,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810CEB4,
|
.callback = AnimJumpKick,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gFistFootSpriteTemplate =
|
const struct SpriteTemplate gFistFootSpriteTemplate =
|
||||||
@ -129,7 +129,7 @@ const struct SpriteTemplate gFistFootSpriteTemplate =
|
|||||||
.callback = AnimBasicFistOrFoot,
|
.callback = AnimBasicFistOrFoot,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595EB0 =
|
const struct SpriteTemplate gFistFootRandomPosSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
@ -137,10 +137,10 @@ const struct SpriteTemplate gUnknown_08595EB0 =
|
|||||||
.anims = gUnknown_08595E54,
|
.anims = gUnknown_08595E54,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810CF30,
|
.callback = AnimFistOrFootRandomPos,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595EC8 =
|
const struct SpriteTemplate gCrossChopHandSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
@ -148,7 +148,7 @@ const struct SpriteTemplate gUnknown_08595EC8 =
|
|||||||
.anims = gUnknown_08595E60,
|
.anims = gUnknown_08595E60,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810D10C,
|
.callback = AnimCrossChopHand,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595EE0 =
|
const struct SpriteTemplate gUnknown_08595EE0 =
|
||||||
@ -220,7 +220,7 @@ const struct SpriteTemplate gUnknown_08595F60 =
|
|||||||
.callback = AnimStompFoot,
|
.callback = AnimStompFoot,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595F78 =
|
const struct SpriteTemplate gDizzyPunchDuckSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_DUCK,
|
.tileTag = ANIM_TAG_DUCK,
|
||||||
.paletteTag = ANIM_TAG_DUCK,
|
.paletteTag = ANIM_TAG_DUCK,
|
||||||
@ -228,7 +228,7 @@ const struct SpriteTemplate gUnknown_08595F78 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810D37C,
|
.callback = AnimDizzyPunchDuck,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595F90 =
|
const struct SpriteTemplate gUnknown_08595F90 =
|
||||||
@ -404,7 +404,7 @@ const union AffineAnimCmd *const gUnknown_08596100[] =
|
|||||||
gUnknown_085960E8,
|
gUnknown_085960E8,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596104 =
|
const struct SpriteTemplate gFocusPunchFistSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||||
@ -412,7 +412,7 @@ const struct SpriteTemplate gUnknown_08596104 =
|
|||||||
.anims = gUnknown_08595E54,
|
.anims = gUnknown_08595E54,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08596100,
|
.affineAnims = gUnknown_08596100,
|
||||||
.callback = sub_810DA7C,
|
.callback = AnimFocusPunchFist,
|
||||||
};
|
};
|
||||||
|
|
||||||
void unc_080B08A0(struct Sprite *sprite)
|
void unc_080B08A0(struct Sprite *sprite)
|
||||||
@ -434,10 +434,10 @@ void sub_810CE68(struct Sprite *sprite)
|
|||||||
|
|
||||||
StartSpriteAnim(sprite, gBattleAnimArgs[6]);
|
StartSpriteAnim(sprite, gBattleAnimArgs[6]);
|
||||||
gBattleAnimArgs[6] = 0;
|
gBattleAnimArgs[6] = 0;
|
||||||
AnimSnoreZ(sprite);
|
AnimTravelDiagonally(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810CEB4(struct Sprite *sprite)
|
static void AnimJumpKick(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
@ -455,7 +455,7 @@ void sub_810CEB4(struct Sprite *sprite)
|
|||||||
// arg 2: duration
|
// arg 2: duration
|
||||||
// arg 3: ? (todo: related to initial pixel offsets)
|
// arg 3: ? (todo: related to initial pixel offsets)
|
||||||
// arg 4: anim num
|
// arg 4: anim num
|
||||||
void AnimBasicFistOrFoot(struct Sprite *sprite)
|
static void AnimBasicFistOrFoot(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
StartSpriteAnim(sprite, gBattleAnimArgs[4]);
|
StartSpriteAnim(sprite, gBattleAnimArgs[4]);
|
||||||
|
|
||||||
@ -469,7 +469,7 @@ void AnimBasicFistOrFoot(struct Sprite *sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810CF30(struct Sprite *sprite)
|
static void AnimFistOrFootRandomPos(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 battler;
|
u8 battler;
|
||||||
s16 xMod, yMod;
|
s16 xMod, yMod;
|
||||||
@ -533,7 +533,7 @@ static void sub_810D0B8(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810D10C(struct Sprite *sprite)
|
static void AnimCrossChopHand(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
sprite->data[0] = 30;
|
sprite->data[0] = 30;
|
||||||
@ -614,7 +614,7 @@ static void sub_810D240(struct Sprite *sprite)
|
|||||||
// arg 1: initial y pixel offset
|
// arg 1: initial y pixel offset
|
||||||
// arg 2: anim num
|
// arg 2: anim num
|
||||||
// arg 3: spin duration
|
// arg 3: spin duration
|
||||||
void AnimSpinningKickOrPunch(struct Sprite *sprite)
|
static void AnimSpinningKickOrPunch(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
||||||
@ -638,7 +638,7 @@ static void AnimSpinningKickOrPunchFinish(struct Sprite *sprite)
|
|||||||
// arg 0: initial x pixel offset
|
// arg 0: initial x pixel offset
|
||||||
// arg 1: initial y pixel offset
|
// arg 1: initial y pixel offset
|
||||||
// arg 2: initial wait duration
|
// arg 2: initial wait duration
|
||||||
void AnimStompFoot(struct Sprite *sprite)
|
static void AnimStompFoot(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
sprite->data[0] = gBattleAnimArgs[2];
|
sprite->data[0] = gBattleAnimArgs[2];
|
||||||
@ -667,7 +667,7 @@ static void AnimStompFootEnd(struct Sprite *sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810D37C(struct Sprite *sprite)
|
static void AnimDizzyPunchDuck(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] == 0)
|
if (sprite->data[0] == 0)
|
||||||
{
|
{
|
||||||
@ -983,7 +983,8 @@ void sub_810DA10(struct Sprite *sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810DA7C(struct Sprite *sprite)
|
// Fist shrinks toward target and shakes
|
||||||
|
static void AnimFocusPunchFist(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->affineAnimEnded)
|
if (sprite->affineAnimEnded)
|
||||||
{
|
{
|
||||||
|
40
src/fire.c
40
src/fire.c
@ -7,7 +7,7 @@
|
|||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "trig.h"
|
#include "trig.h"
|
||||||
|
|
||||||
static void sub_8108EC8(struct Sprite *);
|
static void AnimFireSpiralInward(struct Sprite *);
|
||||||
static void AnimFireSpread(struct Sprite *);
|
static void AnimFireSpread(struct Sprite *);
|
||||||
static void sub_8108F4C(struct Sprite *);
|
static void sub_8108F4C(struct Sprite *);
|
||||||
static void sub_8108FBC(struct Sprite *);
|
static void sub_8108FBC(struct Sprite *);
|
||||||
@ -23,7 +23,7 @@ static void AnimFireRingStep2(struct Sprite *);
|
|||||||
static void AnimFireRingStep3(struct Sprite *);
|
static void AnimFireRingStep3(struct Sprite *);
|
||||||
static void UpdateFireRingCircleOffset(struct Sprite *);
|
static void UpdateFireRingCircleOffset(struct Sprite *);
|
||||||
static void AnimFireCross(struct Sprite *);
|
static void AnimFireCross(struct Sprite *);
|
||||||
static void sub_81093A4(struct Sprite *);
|
static void AnimFireSpiralOutward(struct Sprite *);
|
||||||
static void sub_81093E4(struct Sprite *);
|
static void sub_81093E4(struct Sprite *);
|
||||||
static void sub_810940C(struct Sprite *);
|
static void sub_810940C(struct Sprite *);
|
||||||
static void sub_81094D0(u8 taskId);
|
static void sub_81094D0(u8 taskId);
|
||||||
@ -32,7 +32,7 @@ static void sub_81098EC(struct Sprite *);
|
|||||||
static u16 sub_8109930(u8 spriteId);
|
static u16 sub_8109930(u8 spriteId);
|
||||||
static void sub_8109984(struct Sprite *sprite, s16 x, s16 y);
|
static void sub_8109984(struct Sprite *sprite, s16 x, s16 y);
|
||||||
static void sub_81099A0(struct Sprite *);
|
static void sub_81099A0(struct Sprite *);
|
||||||
static void sub_8109A10(struct Sprite *);
|
static void AnimEruptionFallingRock(struct Sprite *);
|
||||||
static void sub_8109A64(struct Sprite *);
|
static void sub_8109A64(struct Sprite *);
|
||||||
static void sub_8109AFC(struct Sprite *);
|
static void sub_8109AFC(struct Sprite *);
|
||||||
static void sub_8109C4C(struct Sprite *);
|
static void sub_8109C4C(struct Sprite *);
|
||||||
@ -61,7 +61,7 @@ const union AnimCmd *const gUnknown_08595360[] =
|
|||||||
gUnknown_08595350,
|
gUnknown_08595350,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595368 =
|
const struct SpriteTemplate gFireSpiralInwardSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||||
@ -69,7 +69,7 @@ const struct SpriteTemplate gUnknown_08595368 =
|
|||||||
.anims = gUnknown_08595360,
|
.anims = gUnknown_08595360,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_8108EC8,
|
.callback = AnimFireSpiralInward,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gFireSpreadSpriteTemplate =
|
const struct SpriteTemplate gFireSpreadSpriteTemplate =
|
||||||
@ -319,7 +319,7 @@ const struct SpriteTemplate gFireBlastCrossSpriteTemplate =
|
|||||||
.callback = AnimFireCross,
|
.callback = AnimFireCross,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_8595584 =
|
const struct SpriteTemplate gFireSpiralOutwardSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||||
@ -327,7 +327,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8595584 =
|
|||||||
.anims = gUnknown_085954D0,
|
.anims = gUnknown_085954D0,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81093A4,
|
.callback = AnimFireSpiralOutward,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_0859559C =
|
const struct SpriteTemplate gUnknown_0859559C =
|
||||||
@ -364,7 +364,7 @@ const s16 gUnknown_085955CC[][2] =
|
|||||||
{ 4, -7},
|
{ 4, -7},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085955E8 =
|
const struct SpriteTemplate gEruptionFallingRockSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_WARM_ROCK,
|
.tileTag = ANIM_TAG_WARM_ROCK,
|
||||||
.paletteTag = ANIM_TAG_WARM_ROCK,
|
.paletteTag = ANIM_TAG_WARM_ROCK,
|
||||||
@ -372,7 +372,7 @@ const struct SpriteTemplate gUnknown_085955E8 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_8109A10,
|
.callback = AnimEruptionFallingRock,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08595600[] =
|
const union AnimCmd gUnknown_08595600[] =
|
||||||
@ -456,7 +456,8 @@ const s8 gUnknown_08595694[16] =
|
|||||||
-1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1,
|
-1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void sub_8108EC8(struct Sprite *sprite)
|
// For the first stage of Fire Punch
|
||||||
|
static void AnimFireSpiralInward(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0] = gBattleAnimArgs[0];
|
sprite->data[0] = gBattleAnimArgs[0];
|
||||||
sprite->data[1] = 0x3C;
|
sprite->data[1] = 0x3C;
|
||||||
@ -623,7 +624,7 @@ static void AnimEmberFlare(struct Sprite *sprite)
|
|||||||
|| gBattleAnimAttacker == GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)))
|
|| gBattleAnimAttacker == GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)))
|
||||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
|
||||||
sprite->callback = AnimSnoreZ;
|
sprite->callback = AnimTravelDiagonally;
|
||||||
sprite->callback(sprite);
|
sprite->callback(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +633,7 @@ static void sub_8109200(struct Sprite *sprite)
|
|||||||
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
|
||||||
sprite->callback = AnimSnoreZ;
|
sprite->callback = AnimTravelDiagonally;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Animates the a fire sprite in the first-half of the MOVE_FIRE_BLAST
|
// Animates the a fire sprite in the first-half of the MOVE_FIRE_BLAST
|
||||||
@ -730,7 +731,7 @@ static void AnimFireCross(struct Sprite *sprite)
|
|||||||
sprite->callback = TranslateSpriteLinear;
|
sprite->callback = TranslateSpriteLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81093A4(struct Sprite *sprite)
|
static void AnimFireSpiralOutward(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimAttacker(sprite, 1);
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
|
||||||
@ -766,11 +767,12 @@ static void sub_810940C(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8109460(u8 taskId) // initialize animation task for Move_ERUPTION?
|
// Animates first stage of Eruption where the attacker squishes and launches rocks away from themself
|
||||||
|
void AnimTask_EruptionLaunchRocks(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
task->data[15] = GetAnimBattlerSpriteId(0);
|
task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
|
|
||||||
task->data[0] = 0;
|
task->data[0] = 0;
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
@ -992,7 +994,7 @@ static void sub_81099A0(struct Sprite *sprite)
|
|||||||
sprite->invisible = TRUE;
|
sprite->invisible = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8109A10(struct Sprite *sprite)
|
static void AnimEruptionFallingRock(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->pos1.x = gBattleAnimArgs[0];
|
sprite->pos1.x = gBattleAnimArgs[0];
|
||||||
sprite->pos1.y = gBattleAnimArgs[1];
|
sprite->pos1.y = gBattleAnimArgs[1];
|
||||||
@ -1178,14 +1180,14 @@ void sub_8109CB0(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8109DBC(u8 taskId)
|
void AnimTask_MoveHeatWaveTargets(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
task->data[12] = !GetBattlerSide(gBattleAnimAttacker) ? 1 : -1;
|
task->data[12] = !GetBattlerSide(gBattleAnimAttacker) ? 1 : -1;
|
||||||
task->data[13] = IsBattlerSpriteVisible(gBattleAnimTarget ^ 2) + 1;
|
task->data[13] = IsBattlerSpriteVisible(gBattleAnimTarget ^ 2) + 1;
|
||||||
task->data[14] = GetAnimBattlerSpriteId(1);
|
task->data[14] = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||||
task->data[15] = GetAnimBattlerSpriteId(3);
|
task->data[15] = GetAnimBattlerSpriteId(ANIM_DEF_PARTNER);
|
||||||
|
|
||||||
task->func = sub_8109E2C;
|
task->func = sub_8109E2C;
|
||||||
}
|
}
|
||||||
|
71
src/flying.c
71
src/flying.c
@ -6,24 +6,24 @@
|
|||||||
#include "constants/rgb.h"
|
#include "constants/rgb.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
|
||||||
extern const struct SpriteTemplate gUnknown_085973E8;
|
extern const struct SpriteTemplate gFlashingHitSplatSpriteTemplate;
|
||||||
|
|
||||||
void sub_810DE70(struct Sprite *);
|
static void AnimEllipticalGust(struct Sprite *);
|
||||||
void sub_810DFA8(struct Sprite *);
|
static void AnimGustToTarget(struct Sprite *);
|
||||||
void sub_810E044(struct Sprite *);
|
void sub_810E044(struct Sprite *);
|
||||||
void sub_810E13C(struct Sprite *);
|
static void AnimFlyBallUp(struct Sprite *);
|
||||||
void sub_810E1C8(struct Sprite *);
|
static void AnimFlyBallAttack(struct Sprite *);
|
||||||
void sub_810E314(struct Sprite *);
|
static void AnimFallingFeather(struct Sprite *);
|
||||||
void sub_810E520(struct Sprite *);
|
void sub_810E520(struct Sprite *);
|
||||||
void sub_810EB40(struct Sprite *);
|
void sub_810EB40(struct Sprite *);
|
||||||
void sub_810EA4C(struct Sprite *);
|
void sub_810EA4C(struct Sprite *);
|
||||||
void sub_810EAA0(struct Sprite *);
|
void sub_810EAA0(struct Sprite *);
|
||||||
void sub_810EC34(struct Sprite *);
|
void sub_810EC34(struct Sprite *);
|
||||||
void sub_810EC94(struct Sprite *);
|
void sub_810EC94(struct Sprite *);
|
||||||
void sub_810ED28(struct Sprite *);
|
static void AnimDiveBall(struct Sprite *);
|
||||||
void sub_810ED70(struct Sprite *);
|
void sub_810ED70(struct Sprite *);
|
||||||
void sub_810EDD0(struct Sprite *);
|
void sub_810EDD0(struct Sprite *);
|
||||||
void sub_810EE14(struct Sprite *);
|
static void AnimDiveWaterSplash(struct Sprite *);
|
||||||
static void AnimSprayWaterDroplet(struct Sprite *);
|
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 *);
|
||||||
@ -37,7 +37,7 @@ static void sub_810E184(struct Sprite *);
|
|||||||
static void sub_810E24C(struct Sprite *);
|
static void sub_810E24C(struct Sprite *);
|
||||||
|
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596270 =
|
const struct SpriteTemplate gEllipticalGustSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_GUST,
|
.tileTag = ANIM_TAG_GUST,
|
||||||
.paletteTag = ANIM_TAG_GUST,
|
.paletteTag = ANIM_TAG_GUST,
|
||||||
@ -45,7 +45,7 @@ const struct SpriteTemplate gUnknown_08596270 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810DE70,
|
.callback = AnimEllipticalGust,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AffineAnimCmd gUnknown_08596288[] =
|
const union AffineAnimCmd gUnknown_08596288[] =
|
||||||
@ -60,7 +60,7 @@ const union AffineAnimCmd *const gUnknown_085962A0[] =
|
|||||||
gUnknown_08596288,
|
gUnknown_08596288,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_85962A4 =
|
const struct SpriteTemplate gGustToTargetSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_GUST,
|
.tileTag = ANIM_TAG_GUST,
|
||||||
.paletteTag = ANIM_TAG_GUST,
|
.paletteTag = ANIM_TAG_GUST,
|
||||||
@ -68,7 +68,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_85962A4 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_085962A0,
|
.affineAnims = gUnknown_085962A0,
|
||||||
.callback = sub_810DFA8,
|
.callback = AnimGustToTarget,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_085962BC[] =
|
const union AnimCmd gUnknown_085962BC[] =
|
||||||
@ -128,7 +128,7 @@ const union AffineAnimCmd *const gUnknown_08596338[] =
|
|||||||
gUnknown_08596328,
|
gUnknown_08596328,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596340 =
|
const struct SpriteTemplate gFlyBallUpSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_ROUND_SHADOW,
|
.tileTag = ANIM_TAG_ROUND_SHADOW,
|
||||||
.paletteTag = ANIM_TAG_ROUND_SHADOW,
|
.paletteTag = ANIM_TAG_ROUND_SHADOW,
|
||||||
@ -136,10 +136,10 @@ const struct SpriteTemplate gUnknown_08596340 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08596314,
|
.affineAnims = gUnknown_08596314,
|
||||||
.callback = sub_810E13C,
|
.callback = AnimFlyBallUp,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596358 =
|
const struct SpriteTemplate gFlyBallAttackSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_ROUND_SHADOW,
|
.tileTag = ANIM_TAG_ROUND_SHADOW,
|
||||||
.paletteTag = ANIM_TAG_ROUND_SHADOW,
|
.paletteTag = ANIM_TAG_ROUND_SHADOW,
|
||||||
@ -147,7 +147,7 @@ const struct SpriteTemplate gUnknown_08596358 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08596338,
|
.affineAnims = gUnknown_08596338,
|
||||||
.callback = sub_810E1C8,
|
.callback = AnimFlyBallAttack,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08596370[] =
|
const union AnimCmd gUnknown_08596370[] =
|
||||||
@ -168,7 +168,7 @@ const union AnimCmd *const gUnknown_08596380[] =
|
|||||||
gUnknown_08596378,
|
gUnknown_08596378,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596388 =
|
const struct SpriteTemplate gFallingFeatherSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_WHITE_FEATHER,
|
.tileTag = ANIM_TAG_WHITE_FEATHER,
|
||||||
.paletteTag = ANIM_TAG_WHITE_FEATHER,
|
.paletteTag = ANIM_TAG_WHITE_FEATHER,
|
||||||
@ -176,7 +176,7 @@ const struct SpriteTemplate gUnknown_08596388 =
|
|||||||
.anims = gUnknown_08596380,
|
.anims = gUnknown_08596380,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810E314,
|
.callback = AnimFallingFeather,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085963A0 =
|
const struct SpriteTemplate gUnknown_085963A0 =
|
||||||
@ -278,7 +278,7 @@ const union AffineAnimCmd *const gUnknown_0859648C[] =
|
|||||||
gUnknown_08596464,
|
gUnknown_08596464,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596490 =
|
const struct SpriteTemplate gDiveBallSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_ROUND_SHADOW,
|
.tileTag = ANIM_TAG_ROUND_SHADOW,
|
||||||
.paletteTag = ANIM_TAG_ROUND_SHADOW,
|
.paletteTag = ANIM_TAG_ROUND_SHADOW,
|
||||||
@ -286,7 +286,7 @@ const struct SpriteTemplate gUnknown_08596490 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_0859648C,
|
.affineAnims = gUnknown_0859648C,
|
||||||
.callback = sub_810ED28,
|
.callback = AnimDiveBall,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AffineAnimCmd gUnknown_085964A8[] =
|
const union AffineAnimCmd gUnknown_085964A8[] =
|
||||||
@ -302,7 +302,7 @@ const union AffineAnimCmd *const gUnknown_085964C8[] =
|
|||||||
gUnknown_085964A8,
|
gUnknown_085964A8,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085964CC =
|
const struct SpriteTemplate gDiveWaterSplashSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SPLASH,
|
.tileTag = ANIM_TAG_SPLASH,
|
||||||
.paletteTag = ANIM_TAG_SPLASH,
|
.paletteTag = ANIM_TAG_SPLASH,
|
||||||
@ -310,7 +310,7 @@ const struct SpriteTemplate gUnknown_085964CC =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_810EE14,
|
.callback = AnimDiveWaterSplash,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gSprayWaterDropletSpriteTemplate =
|
const struct SpriteTemplate gSprayWaterDropletSpriteTemplate =
|
||||||
@ -347,7 +347,7 @@ const struct SpriteTemplate gUnknown_08596514 =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void sub_810DE70(struct Sprite *sprite)
|
static void AnimEllipticalGust(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimTarget(sprite, FALSE);
|
InitSpritePosToAnimTarget(sprite, FALSE);
|
||||||
sprite->pos1.y += 20;
|
sprite->pos1.y += 20;
|
||||||
@ -366,7 +366,8 @@ static void sub_810DE98(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810DED8(u8 taskId)
|
// Animates the palette on the gust tornado to make it look like its spinning
|
||||||
|
void AnimTask_AnimateGustTornadoPalette(u8 taskId)
|
||||||
{
|
{
|
||||||
gTasks[taskId].data[0] = gBattleAnimArgs[1];
|
gTasks[taskId].data[0] = gBattleAnimArgs[1];
|
||||||
gTasks[taskId].data[1] = gBattleAnimArgs[0];
|
gTasks[taskId].data[1] = gBattleAnimArgs[0];
|
||||||
@ -401,7 +402,7 @@ static void sub_810DF18(u8 taskId)
|
|||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810DFA8(struct Sprite *sprite)
|
static void AnimGustToTarget(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimAttacker(sprite, TRUE);
|
InitSpritePosToAnimAttacker(sprite, TRUE);
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
@ -463,13 +464,13 @@ void sub_810E044(struct Sprite *sprite)
|
|||||||
SeekSpriteAnim(sprite, gBattleAnimArgs[5]);
|
SeekSpriteAnim(sprite, gBattleAnimArgs[5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810E13C(struct Sprite *sprite)
|
static void AnimFlyBallUp(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimAttacker(sprite, TRUE);
|
InitSpritePosToAnimAttacker(sprite, TRUE);
|
||||||
sprite->data[0] = gBattleAnimArgs[2];
|
sprite->data[0] = gBattleAnimArgs[2];
|
||||||
sprite->data[1] = gBattleAnimArgs[3];
|
sprite->data[1] = gBattleAnimArgs[3];
|
||||||
sprite->callback = sub_810E184;
|
sprite->callback = sub_810E184;
|
||||||
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = 1;
|
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_810E184(struct Sprite *sprite)
|
static void sub_810E184(struct Sprite *sprite)
|
||||||
@ -488,7 +489,7 @@ static void sub_810E184(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810E1C8(struct Sprite *sprite)
|
static void AnimFlyBallAttack(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
{
|
{
|
||||||
@ -565,7 +566,7 @@ struct FeatherDanceData
|
|||||||
u16 unkE_1:15;
|
u16 unkE_1:15;
|
||||||
};
|
};
|
||||||
|
|
||||||
void sub_810E314(struct Sprite *sprite)
|
static void AnimFallingFeather(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 battler, matrixNum, sinIndex;
|
u8 battler, matrixNum, sinIndex;
|
||||||
s16 spriteCoord, sinVal;
|
s16 spriteCoord, sinVal;
|
||||||
@ -953,7 +954,7 @@ void sub_810EB40(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810EB88(u8 task)
|
void AnimTask_DrillPeckHitSplats(u8 task)
|
||||||
{
|
{
|
||||||
if (!(gTasks[task].data[0] % 32))
|
if (!(gTasks[task].data[0] % 32))
|
||||||
{
|
{
|
||||||
@ -964,7 +965,7 @@ void sub_810EB88(u8 task)
|
|||||||
gBattleAnimArgs[2] = 1;
|
gBattleAnimArgs[2] = 1;
|
||||||
gBattleAnimArgs[3] = 3;
|
gBattleAnimArgs[3] = 3;
|
||||||
|
|
||||||
CreateSpriteAndAnimate(&gUnknown_085973E8,
|
CreateSpriteAndAnimate(&gFlashingHitSplatSpriteTemplate,
|
||||||
GetBattlerSpriteCoord(gBattleAnimTarget, 2),
|
GetBattlerSpriteCoord(gBattleAnimTarget, 2),
|
||||||
GetBattlerSpriteCoord(gBattleAnimTarget, 3),
|
GetBattlerSpriteCoord(gBattleAnimTarget, 3),
|
||||||
3);
|
3);
|
||||||
@ -1017,13 +1018,13 @@ void sub_810EC94(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810ED28(struct Sprite *sprite)
|
void AnimDiveBall(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimAttacker(sprite, 1);
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
sprite->data[0] = gBattleAnimArgs[2];
|
sprite->data[0] = gBattleAnimArgs[2];
|
||||||
sprite->data[1] = gBattleAnimArgs[3];
|
sprite->data[1] = gBattleAnimArgs[3];
|
||||||
sprite->callback = sub_810ED70;
|
sprite->callback = sub_810ED70;
|
||||||
gSprites[GetAnimBattlerSpriteId(0)].invisible = 1;
|
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810ED70(struct Sprite *sprite)
|
void sub_810ED70(struct Sprite *sprite)
|
||||||
@ -1039,7 +1040,7 @@ void sub_810ED70(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprite->invisible = 1;
|
sprite->invisible = TRUE;
|
||||||
if (sprite->data[3]++ > 20)
|
if (sprite->data[3]++ > 20)
|
||||||
sprite->callback = sub_810EDD0;
|
sprite->callback = sub_810EDD0;
|
||||||
}
|
}
|
||||||
@ -1056,7 +1057,7 @@ void sub_810EDD0(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810EE14(struct Sprite *sprite)
|
static void AnimDiveWaterSplash(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u32 matrixNum;
|
u32 matrixNum;
|
||||||
int t1, t2;
|
int t1, t2;
|
||||||
|
32
src/ghost.c
32
src/ghost.c
@ -31,14 +31,14 @@ static void sub_8112384(struct Sprite *);
|
|||||||
static void sub_81125E0(u8 taskId);
|
static void sub_81125E0(u8 taskId);
|
||||||
static void sub_811280C(u8 taskId);
|
static void sub_811280C(u8 taskId);
|
||||||
static void sub_8112994(u8 taskId);
|
static void sub_8112994(u8 taskId);
|
||||||
static void sub_81129F0(struct Sprite *);
|
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 sub_8112B78(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 sub_8112E9C(struct Sprite *);
|
static void AnimGrudgeFlame(struct Sprite *);
|
||||||
static void sub_8112F60(struct Sprite *);
|
static void sub_8112F60(struct Sprite *);
|
||||||
static void sub_8112FB8(struct Sprite *);
|
static void sub_8112FB8(struct Sprite *);
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ const union AffineAnimCmd *const gUnknown_08596DB4[] =
|
|||||||
gUnknown_08596DA4,
|
gUnknown_08596DA4,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596DB8 =
|
const struct SpriteTemplate gWhiteShadowSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_WHITE_SHADOW,
|
.tileTag = ANIM_TAG_WHITE_SHADOW,
|
||||||
.paletteTag = ANIM_TAG_WHITE_SHADOW,
|
.paletteTag = ANIM_TAG_WHITE_SHADOW,
|
||||||
@ -146,7 +146,7 @@ const struct SpriteTemplate gUnknown_08596DB8 =
|
|||||||
.callback = sub_8112264,
|
.callback = sub_8112264,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596DD0 =
|
const struct SpriteTemplate gCurseNailSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_NAIL,
|
.tileTag = ANIM_TAG_NAIL,
|
||||||
.paletteTag = ANIM_TAG_NAIL,
|
.paletteTag = ANIM_TAG_NAIL,
|
||||||
@ -154,10 +154,10 @@ const struct SpriteTemplate gUnknown_08596DD0 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81129F0,
|
.callback = AnimCurseNail,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_8596DE8 =
|
const struct SpriteTemplate gCurseGhostSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_GHOSTLY_SPIRIT,
|
.tileTag = ANIM_TAG_GHOSTLY_SPIRIT,
|
||||||
.paletteTag = ANIM_TAG_GHOSTLY_SPIRIT,
|
.paletteTag = ANIM_TAG_GHOSTLY_SPIRIT,
|
||||||
@ -193,7 +193,7 @@ const union AnimCmd *const gUnknown_08596E2C[] =
|
|||||||
gUnknown_08596E18,
|
gUnknown_08596E18,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596E30 =
|
const struct SpriteTemplate gGrudgeFlameSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_PURPLE_FLAME,
|
.tileTag = ANIM_TAG_PURPLE_FLAME,
|
||||||
.paletteTag = ANIM_TAG_PURPLE_FLAME,
|
.paletteTag = ANIM_TAG_PURPLE_FLAME,
|
||||||
@ -201,7 +201,7 @@ const struct SpriteTemplate gUnknown_08596E30 =
|
|||||||
.anims = gUnknown_08596E2C,
|
.anims = gUnknown_08596E2C,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_8112E9C,
|
.callback = AnimGrudgeFlame,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596E48 =
|
const struct SpriteTemplate gUnknown_08596E48 =
|
||||||
@ -789,7 +789,7 @@ static void sub_8112384(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81123C4(u8 taskId)
|
void AnimTask_DestinyBondWhiteShadow(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task;
|
struct Task *task;
|
||||||
s16 battler;
|
s16 battler;
|
||||||
@ -811,13 +811,13 @@ void sub_81123C4(u8 taskId)
|
|||||||
baseY = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_BOTTOM);
|
baseY = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_BOTTOM);
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
{
|
{
|
||||||
for (battler = 0; battler < 4; battler++)
|
for (battler = 0; battler < MAX_BATTLERS_COUNT; battler++)
|
||||||
{
|
{
|
||||||
if (battler != gBattleAnimAttacker
|
if (battler != gBattleAnimAttacker
|
||||||
&& battler != (gBattleAnimAttacker ^ 2)
|
&& battler != (gBattleAnimAttacker ^ 2)
|
||||||
&& IsBattlerSpriteVisible(battler))
|
&& IsBattlerSpriteVisible(battler))
|
||||||
{
|
{
|
||||||
spriteId = CreateSprite(&gUnknown_08596DB8, baseX, baseY, 55);
|
spriteId = CreateSprite(&gWhiteShadowSpriteTemplate, baseX, baseY, 55);
|
||||||
if (spriteId != MAX_SPRITES)
|
if (spriteId != MAX_SPRITES)
|
||||||
{
|
{
|
||||||
x = GetBattlerSpriteCoord(battler, 2);
|
x = GetBattlerSpriteCoord(battler, 2);
|
||||||
@ -839,7 +839,7 @@ void sub_81123C4(u8 taskId)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spriteId = CreateSprite(&gUnknown_08596DB8, baseX, baseY, 55);
|
spriteId = CreateSprite(&gWhiteShadowSpriteTemplate, baseX, baseY, 55);
|
||||||
if (spriteId != MAX_SPRITES)
|
if (spriteId != MAX_SPRITES)
|
||||||
{
|
{
|
||||||
x = 48;
|
x = 48;
|
||||||
@ -1029,7 +1029,7 @@ static void sub_8112994(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81129F0(struct Sprite *sprite)
|
static void AnimCurseNail(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
s16 xDelta;
|
s16 xDelta;
|
||||||
s16 xDelta2;
|
s16 xDelta2;
|
||||||
@ -1169,7 +1169,7 @@ static void sub_8112C4C(struct Sprite *sprite)
|
|||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8112C6C(u8 taskId)
|
void AnimTask_GrudgeFlames(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
@ -1200,7 +1200,7 @@ static void sub_8112D10(u8 taskId)
|
|||||||
case 0:
|
case 0:
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
spriteId = CreateSprite(&gUnknown_08596E30, task->data[9], task->data[10], task->data[6]);
|
spriteId = CreateSprite(&gGrudgeFlameSpriteTemplate, task->data[9], task->data[10], task->data[6]);
|
||||||
if (spriteId != MAX_SPRITES)
|
if (spriteId != MAX_SPRITES)
|
||||||
{
|
{
|
||||||
gSprites[spriteId].data[0] = taskId;
|
gSprites[spriteId].data[0] = taskId;
|
||||||
@ -1274,7 +1274,7 @@ static void sub_8112D10(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8112E9C(struct Sprite *sprite)
|
static void AnimGrudgeFlame(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u16 index;
|
u16 index;
|
||||||
|
|
||||||
|
238
src/ground.c
238
src/ground.c
@ -6,25 +6,25 @@
|
|||||||
#include "trig.h"
|
#include "trig.h"
|
||||||
#include "constants/rgb.h"
|
#include "constants/rgb.h"
|
||||||
|
|
||||||
void AnimBonemerangProjectile(struct Sprite *);
|
static void AnimBonemerangProjectile(struct Sprite *);
|
||||||
void AnimBoneHitProjectile(struct Sprite *);
|
static void AnimBoneHitProjectile(struct Sprite *);
|
||||||
void AnimDirtScatter(struct Sprite *);
|
static void AnimDirtScatter(struct Sprite *);
|
||||||
void AnimMudSportDirt(struct Sprite *);
|
static void AnimMudSportDirt(struct Sprite *);
|
||||||
void AnimFissureDirtPlumeParticle(struct Sprite *);
|
static void AnimDirtPlumeParticle(struct Sprite *);
|
||||||
void AnimDigDirtMound(struct Sprite *);
|
static void AnimDigDirtMound(struct Sprite *);
|
||||||
static void AnimBonemerangProjectileStep(struct Sprite *);
|
static void AnimBonemerangProjectileStep(struct Sprite *);
|
||||||
static void AnimBonemerangProjectileEnd(struct Sprite *);
|
static void AnimBonemerangProjectileEnd(struct Sprite *);
|
||||||
static void AnimMudSportDirtRising(struct Sprite *);
|
static void AnimMudSportDirtRising(struct Sprite *);
|
||||||
static void AnimMudSportDirtFalling(struct Sprite *);
|
static void AnimMudSportDirtFalling(struct Sprite *);
|
||||||
static void sub_8114CFC(u8);
|
static void AnimTask_DigBounceMovement(u8);
|
||||||
static void sub_8114EB4(u8);
|
static void AnimTask_DigEndBounceMovementSetInvisible(u8);
|
||||||
static void sub_8114F54(u8);
|
static void AnimTask_DigSetVisibleUnderground(u8);
|
||||||
static void sub_8114FD8(u8);
|
static void AnimTask_DigRiseUpFromHole(u8);
|
||||||
static void sub_81150E0(u8, s16, s16);
|
static void sub_81150E0(u8, s16, s16);
|
||||||
static void AnimFissureDirtPlumeParticleStep(struct Sprite *);
|
static void AnimDirtPlumeParticleStep(struct Sprite *);
|
||||||
static void sub_81153AC(u8);
|
static void AnimTask_ShakeTerrain(u8);
|
||||||
static void sub_81154A4(u8);
|
static void AnimTask_ShakeBattlers(u8);
|
||||||
static void sub_8115588(struct Task *);
|
static void SetBattlersXOffsetForShake(struct Task *);
|
||||||
static void sub_81156D0(u8);
|
static void sub_81156D0(u8);
|
||||||
|
|
||||||
const union AffineAnimCmd gUnknown_08597150[] =
|
const union AffineAnimCmd gUnknown_08597150[] =
|
||||||
@ -115,7 +115,7 @@ const struct SpriteTemplate gUnknown_085971E4 =
|
|||||||
.callback = AnimMudSportDirt,
|
.callback = AnimMudSportDirt,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085971FC =
|
const struct SpriteTemplate gDirtPlumeSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_MUD_SAND,
|
.tileTag = ANIM_TAG_MUD_SAND,
|
||||||
.paletteTag = ANIM_TAG_MUD_SAND,
|
.paletteTag = ANIM_TAG_MUD_SAND,
|
||||||
@ -123,10 +123,10 @@ const struct SpriteTemplate gUnknown_085971FC =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = AnimFissureDirtPlumeParticle,
|
.callback = AnimDirtPlumeParticle,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08597214 =
|
const struct SpriteTemplate gDirtMoundSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_DIRT_MOUND,
|
.tileTag = ANIM_TAG_DIRT_MOUND,
|
||||||
.paletteTag = ANIM_TAG_DIRT_MOUND,
|
.paletteTag = ANIM_TAG_DIRT_MOUND,
|
||||||
@ -139,7 +139,7 @@ const struct SpriteTemplate gUnknown_08597214 =
|
|||||||
|
|
||||||
// Moves a bone projectile towards the target mon, which moves like
|
// Moves a bone projectile towards the target mon, which moves like
|
||||||
// a boomerang. After hitting the target mon, it comes back to the user.
|
// a boomerang. After hitting the target mon, it comes back to the user.
|
||||||
void AnimBonemerangProjectile(struct Sprite *sprite)
|
static void AnimBonemerangProjectile(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);
|
||||||
@ -181,7 +181,7 @@ static void AnimBonemerangProjectileEnd(struct Sprite *sprite)
|
|||||||
// arg 2: target x pixel offset
|
// arg 2: target x pixel offset
|
||||||
// arg 3: target y pixel offset
|
// arg 3: target y pixel offset
|
||||||
// arg 4: duration
|
// arg 4: duration
|
||||||
void AnimBoneHitProjectile(struct Sprite *sprite)
|
static void AnimBoneHitProjectile(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
@ -200,7 +200,7 @@ void AnimBoneHitProjectile(struct Sprite *sprite)
|
|||||||
// arg 2: duration
|
// arg 2: duration
|
||||||
// arg 3: target x pixel offset
|
// arg 3: target x pixel offset
|
||||||
// arg 4: target y pixel offset
|
// arg 4: target y pixel offset
|
||||||
void AnimDirtScatter(struct Sprite *sprite)
|
static void AnimDirtScatter(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 targetXPos, targetYPos;
|
u8 targetXPos, targetYPos;
|
||||||
s16 xOffset, yOffset;
|
s16 xOffset, yOffset;
|
||||||
@ -229,7 +229,7 @@ void AnimDirtScatter(struct Sprite *sprite)
|
|||||||
// arg 0: 0 = dirt is rising into the air, 1 = dirt is falling down
|
// arg 0: 0 = dirt is rising into the air, 1 = dirt is falling down
|
||||||
// arg 1: initial x pixel offset
|
// arg 1: initial x pixel offset
|
||||||
// arg 2: initial y pixel offset
|
// arg 2: initial y pixel offset
|
||||||
void AnimMudSportDirt(struct Sprite *sprite)
|
static void AnimMudSportDirt(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->oam.tileNum++;
|
sprite->oam.tileNum++;
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == 0)
|
||||||
@ -285,19 +285,19 @@ static void AnimMudSportDirtFalling(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8114CBC(u8 taskId)
|
void AnimTask_DigDownMovement(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == FALSE)
|
||||||
task->func = sub_8114CFC;
|
task->func = AnimTask_DigBounceMovement;
|
||||||
else
|
else
|
||||||
task->func = sub_8114EB4;
|
task->func = AnimTask_DigEndBounceMovementSetInvisible;
|
||||||
|
|
||||||
task->func(taskId);
|
task->func(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8114CFC(u8 taskId)
|
static void AnimTask_DigBounceMovement(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 var0;
|
u8 var0;
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
@ -305,7 +305,7 @@ static void sub_8114CFC(u8 taskId)
|
|||||||
switch (task->data[0])
|
switch (task->data[0])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
task->data[10] = GetAnimBattlerSpriteId(0);
|
task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
|
task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
|
||||||
if (task->data[11] == 1)
|
if (task->data[11] == 1)
|
||||||
{
|
{
|
||||||
@ -368,10 +368,10 @@ static void sub_8114CFC(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8114EB4(u8 taskId)
|
static void AnimTask_DigEndBounceMovementSetInvisible(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(0);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
gSprites[spriteId].invisible = 1;
|
gSprites[spriteId].invisible = TRUE;
|
||||||
gSprites[spriteId].pos2.x = 0;
|
gSprites[spriteId].pos2.x = 0;
|
||||||
gSprites[spriteId].pos2.y = 0;
|
gSprites[spriteId].pos2.y = 0;
|
||||||
|
|
||||||
@ -383,27 +383,27 @@ static void sub_8114EB4(u8 taskId)
|
|||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8114F14(u8 taskId)
|
void AnimTask_DigUpMovement(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == FALSE)
|
||||||
task->func = sub_8114F54;
|
task->func = AnimTask_DigSetVisibleUnderground;
|
||||||
else
|
else
|
||||||
task->func = sub_8114FD8;
|
task->func = AnimTask_DigRiseUpFromHole;
|
||||||
|
|
||||||
task->func(taskId);
|
task->func(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8114F54(u8 taskId)
|
static void AnimTask_DigSetVisibleUnderground(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->data[0])
|
switch (task->data[0])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
task->data[10] = GetAnimBattlerSpriteId(0);
|
task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
gSprites[task->data[10]].invisible = 0;
|
gSprites[task->data[10]].invisible = FALSE;
|
||||||
gSprites[task->data[10]].pos2.x = 0;
|
gSprites[task->data[10]].pos2.x = 0;
|
||||||
gSprites[task->data[10]].pos2.y = 160 - gSprites[task->data[10]].pos1.y;
|
gSprites[task->data[10]].pos2.y = 160 - gSprites[task->data[10]].pos1.y;
|
||||||
task->data[0]++;
|
task->data[0]++;
|
||||||
@ -413,7 +413,7 @@ static void sub_8114F54(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8114FD8(u8 taskId)
|
static void AnimTask_DigRiseUpFromHole(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 var0;
|
u8 var0;
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
@ -421,7 +421,7 @@ static void sub_8114FD8(u8 taskId)
|
|||||||
switch (task->data[0])
|
switch (task->data[0])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
task->data[10] = GetAnimBattlerSpriteId(0);
|
task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
|
task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
|
||||||
if (task->data[11] == 1)
|
if (task->data[11] == 1)
|
||||||
task->data[12] = gBattle_BG1_X;
|
task->data[12] = gBattle_BG1_X;
|
||||||
@ -501,7 +501,7 @@ static void sub_81150E0(u8 useBG1, s16 y, s16 endY)
|
|||||||
// arg 3: target y offset
|
// arg 3: target y offset
|
||||||
// arg 4: wave amplitude
|
// arg 4: wave amplitude
|
||||||
// arg 5: duration
|
// arg 5: duration
|
||||||
void AnimFissureDirtPlumeParticle(struct Sprite *sprite)
|
void AnimDirtPlumeParticle(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
s8 battler;
|
s8 battler;
|
||||||
s16 xOffset;
|
s16 xOffset;
|
||||||
@ -525,10 +525,10 @@ void AnimFissureDirtPlumeParticle(struct Sprite *sprite)
|
|||||||
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
|
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
|
||||||
sprite->data[5] = gBattleAnimArgs[4];
|
sprite->data[5] = gBattleAnimArgs[4];
|
||||||
InitAnimArcTranslation(sprite);
|
InitAnimArcTranslation(sprite);
|
||||||
sprite->callback = AnimFissureDirtPlumeParticleStep;
|
sprite->callback = AnimDirtPlumeParticleStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite)
|
static void AnimDirtPlumeParticleStep(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimHorizontalArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
@ -540,7 +540,7 @@ static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite)
|
|||||||
// arg 0: which mon (0 = attacker, 1 = target)
|
// arg 0: which mon (0 = attacker, 1 = target)
|
||||||
// arg 1: oam tile num (0 = left half of image, 1 = right half of image)
|
// arg 1: oam tile num (0 = left half of image, 1 = right half of image)
|
||||||
// arg 2: duration
|
// arg 2: duration
|
||||||
void AnimDigDirtMound(struct Sprite *sprite)
|
static void AnimDigDirtMound(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
s8 battler;
|
s8 battler;
|
||||||
|
|
||||||
@ -557,156 +557,180 @@ void AnimDigDirtMound(struct Sprite *sprite)
|
|||||||
sprite->callback = WaitAnimForDuration;
|
sprite->callback = WaitAnimForDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81152DC(u8 taskId)
|
|
||||||
|
#define tState data[0]
|
||||||
|
#define tDelay data[1]
|
||||||
|
#define tTimer data[2]
|
||||||
|
#define tMaxTime data[3]
|
||||||
|
#define tbattlerSpriteIds(i) data[9 + (i)]
|
||||||
|
#define tNumBattlers data[13] // AnimTask_ShakeBattlers
|
||||||
|
#define tInitialX data[13] // AnimTask_ShakeTerrain
|
||||||
|
#define tHorizOffset data[14]
|
||||||
|
#define tInitHorizOffset data[15]
|
||||||
|
|
||||||
|
// Shakes battler(s) or the battle terrain back and forth horizontally. Used by e.g. Earthquake, Eruption
|
||||||
|
// arg0: What to shake. 0-3 for any specific battler, MAX_BATTLERS_COUNT for all battlers, MAX_BATTLERS_COUNT + 1 for the terrain
|
||||||
|
// arg1: Shake intensity, used to calculate horizontal pixel offset (if 0, use move power instead)
|
||||||
|
// arg2: Length of time to shake for
|
||||||
|
void AnimTask_HorizontalShake(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
if (gBattleAnimArgs[1])
|
if (gBattleAnimArgs[1] != 0)
|
||||||
task->data[14] = task->data[15] = gBattleAnimArgs[1] + 3;
|
task->tHorizOffset = task->tInitHorizOffset = gBattleAnimArgs[1] + 3;
|
||||||
else
|
else
|
||||||
task->data[14] = task->data[15] = (gAnimMovePower / 10) + 3;
|
task->tHorizOffset = task->tInitHorizOffset = (gAnimMovePower / 10) + 3;
|
||||||
|
|
||||||
task->data[3] = gBattleAnimArgs[2];
|
task->tMaxTime = gBattleAnimArgs[2];
|
||||||
switch (gBattleAnimArgs[0])
|
switch (gBattleAnimArgs[0])
|
||||||
{
|
{
|
||||||
case 5:
|
case MAX_BATTLERS_COUNT + 1: // Shake terrain
|
||||||
task->data[13] = gBattle_BG3_X;
|
task->tInitialX = gBattle_BG3_X;
|
||||||
task->func = sub_81153AC;
|
task->func = AnimTask_ShakeTerrain;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case MAX_BATTLERS_COUNT: // Shake all battlers
|
||||||
task->data[13] = 0;
|
task->tNumBattlers = 0;
|
||||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||||
{
|
{
|
||||||
if (IsBattlerSpriteVisible(i))
|
if (IsBattlerSpriteVisible(i))
|
||||||
{
|
{
|
||||||
task->data[task->data[13] + 9] = gBattlerSpriteIds[i];
|
task->tbattlerSpriteIds(task->tNumBattlers) = gBattlerSpriteIds[i];
|
||||||
task->data[13]++;
|
task->tNumBattlers++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
task->func = sub_81154A4;
|
task->func = AnimTask_ShakeBattlers;
|
||||||
break;
|
break;
|
||||||
default:
|
default: // Shake specific battler
|
||||||
task->data[9] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
task->tbattlerSpriteIds(0) = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
||||||
if (task->data[9] == 0xFF)
|
if (task->tbattlerSpriteIds(0) == 0xFF)
|
||||||
{
|
{
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
task->data[13] = 1;
|
task->tNumBattlers = 1;
|
||||||
task->func = sub_81154A4;
|
task->func = AnimTask_ShakeBattlers;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81153AC(u8 taskId)
|
static void AnimTask_ShakeTerrain(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->data[0])
|
switch (task->tState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (++task->data[1] > 1)
|
if (++task->tDelay > 1)
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->tDelay = 0;
|
||||||
if ((task->data[2] & 1) == 0)
|
if ((task->tTimer & 1) == 0)
|
||||||
gBattle_BG3_X = task->data[13] + task->data[15];
|
gBattle_BG3_X = task->tInitialX + task->tInitHorizOffset;
|
||||||
else
|
else
|
||||||
gBattle_BG3_X = task->data[13] - task->data[15];
|
gBattle_BG3_X = task->tInitialX - task->tInitHorizOffset;
|
||||||
|
|
||||||
if (++task->data[2] == task->data[3])
|
if (++task->tTimer == task->tMaxTime)
|
||||||
{
|
{
|
||||||
task->data[2] = 0;
|
task->tTimer = 0;
|
||||||
task->data[14]--;
|
task->tHorizOffset--;
|
||||||
task->data[0]++;
|
task->tState++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (++task->data[1] > 1)
|
if (++task->tDelay > 1)
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->tDelay = 0;
|
||||||
if ((task->data[2] & 1) == 0)
|
if ((task->tTimer & 1) == 0)
|
||||||
gBattle_BG3_X = task->data[13] + task->data[14];
|
gBattle_BG3_X = task->tInitialX + task->tHorizOffset;
|
||||||
else
|
else
|
||||||
gBattle_BG3_X = task->data[13] - task->data[14];
|
gBattle_BG3_X = task->tInitialX - task->tHorizOffset;
|
||||||
|
|
||||||
if (++task->data[2] == 4)
|
if (++task->tTimer == 4)
|
||||||
{
|
{
|
||||||
task->data[2] = 0;
|
task->tTimer = 0;
|
||||||
if (--task->data[14] == 0)
|
if (--task->tHorizOffset == 0)
|
||||||
task->data[0]++;
|
task->tState++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
gBattle_BG3_X = task->data[13];
|
gBattle_BG3_X = task->tInitialX;
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81154A4(u8 taskId)
|
static void AnimTask_ShakeBattlers(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
switch (task->data[0])
|
switch (task->tState)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (++task->data[1] > 1)
|
if (++task->tDelay > 1)
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->tDelay = 0;
|
||||||
sub_8115588(task);
|
SetBattlersXOffsetForShake(task);
|
||||||
if (++task->data[2] == task->data[3])
|
if (++task->tTimer == task->tMaxTime)
|
||||||
{
|
{
|
||||||
task->data[2] = 0;
|
task->tTimer = 0;
|
||||||
task->data[14]--;
|
task->tHorizOffset--;
|
||||||
task->data[0]++;
|
task->tState++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (++task->data[1] > 1)
|
if (++task->tDelay > 1)
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->tDelay = 0;
|
||||||
sub_8115588(task);
|
SetBattlersXOffsetForShake(task);
|
||||||
if (++task->data[2] == 4)
|
if (++task->tTimer == 4)
|
||||||
{
|
{
|
||||||
task->data[2] = 0;
|
task->tTimer = 0;
|
||||||
if (--task->data[14] == 0)
|
if (--task->tHorizOffset == 0)
|
||||||
task->data[0]++;
|
task->tState++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
for (i = 0; i < task->data[13]; i++)
|
for (i = 0; i < task->tNumBattlers; i++)
|
||||||
gSprites[task->data[9 + i]].pos2.x = 0;
|
gSprites[task->tbattlerSpriteIds(i)].pos2.x = 0;
|
||||||
|
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8115588(struct Task *task)
|
static void SetBattlersXOffsetForShake(struct Task *task)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
u16 xOffset;
|
u16 xOffset;
|
||||||
|
|
||||||
if ((task->data[2] & 1) == 0)
|
if ((task->tTimer & 1) == 0)
|
||||||
xOffset = (task->data[14] / 2) + (task->data[14] & 1);
|
xOffset = (task->tHorizOffset / 2) + (task->tHorizOffset & 1);
|
||||||
else
|
else
|
||||||
xOffset = -(task->data[14] / 2);
|
xOffset = -(task->tHorizOffset / 2);
|
||||||
|
|
||||||
for (i = 0; i < task->data[13]; i++)
|
for (i = 0; i < task->tNumBattlers; i++)
|
||||||
{
|
{
|
||||||
gSprites[task->data[9 + i]].pos2.x = xOffset;
|
gSprites[task->tbattlerSpriteIds(i)].pos2.x = xOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef tState
|
||||||
|
#undef tDelay
|
||||||
|
#undef tTimer
|
||||||
|
#undef tMaxTime
|
||||||
|
#undef tbattlerSpriteIds
|
||||||
|
#undef tNumBattlers
|
||||||
|
#undef tInitialX
|
||||||
|
#undef tHorizOffset
|
||||||
|
#undef tInitHorizOffset
|
||||||
|
|
||||||
void AnimTask_IsPowerOver99(u8 taskId)
|
void AnimTask_IsPowerOver99(u8 taskId)
|
||||||
{
|
{
|
||||||
gBattleAnimArgs[15] = gAnimMovePower > 99;
|
gBattleAnimArgs[15] = gAnimMovePower > 99;
|
||||||
|
@ -979,8 +979,8 @@ void AnimSwirlingFogAnim(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fades mons to black and places foggy overlay in Haze.
|
// Adds moving foggy overlay. Used by Haze.
|
||||||
void AnimTask_Haze1(u8 taskId)
|
void AnimTask_HazeScrollingFog(u8 taskId)
|
||||||
{
|
{
|
||||||
struct BattleAnimBgData animBg;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
@ -1330,7 +1330,7 @@ void MovePoisonGasCloud(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Creates Hail.
|
// Creates Hail.
|
||||||
void AnimTask_Hail1(u8 taskId)
|
void AnimTask_HailStart(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
|
60
src/normal.c
60
src/normal.c
@ -12,12 +12,12 @@ u32 UnpackSelectedBattleAnimPalettes(s16);
|
|||||||
void sub_81158A4(struct Sprite *);
|
void sub_81158A4(struct Sprite *);
|
||||||
void sub_81159B4(struct Sprite *);
|
void sub_81159B4(struct Sprite *);
|
||||||
void sub_81160A4(struct Sprite *);
|
void sub_81160A4(struct Sprite *);
|
||||||
void sub_8116388(struct Sprite *);
|
static void AnimBasicHitSplat(struct Sprite *);
|
||||||
void sub_8116420(struct Sprite *);
|
void sub_8116420(struct Sprite *);
|
||||||
void sub_8116458(struct Sprite *);
|
static void AnimHitSplatRandom(struct Sprite *);
|
||||||
void sub_81164F0(struct Sprite *);
|
static void AnimExtremeSpeedHitSplat(struct Sprite *);
|
||||||
void sub_8116560(struct Sprite *);
|
void sub_8116560(struct Sprite *);
|
||||||
void sub_81165A8(struct Sprite *);
|
static void AnimFlashingHitSplat(struct Sprite *);
|
||||||
static void AnimConfusionDuckStep(struct Sprite *);
|
static void AnimConfusionDuckStep(struct Sprite *);
|
||||||
static void AnimSimplePaletteBlendStep(struct Sprite *);
|
static void AnimSimplePaletteBlendStep(struct Sprite *);
|
||||||
static void sub_81158F8(struct Sprite *);
|
static void sub_81158F8(struct Sprite *);
|
||||||
@ -173,7 +173,7 @@ const struct SpriteTemplate gBasicHitSplatSpriteTemplate =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08597348,
|
.affineAnims = gUnknown_08597348,
|
||||||
.callback = sub_8116388,
|
.callback = AnimBasicHitSplat,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_8597370 =
|
const struct SpriteTemplate gBattleAnimSpriteTemplate_8597370 =
|
||||||
@ -195,10 +195,10 @@ const struct SpriteTemplate gWaterHitSplatSpriteTemplate =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08597348,
|
.affineAnims = gUnknown_08597348,
|
||||||
.callback = sub_8116388,
|
.callback = AnimBasicHitSplat,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085973A0 =
|
const struct SpriteTemplate gRandomPosHitSplatSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_IMPACT,
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
.paletteTag = ANIM_TAG_IMPACT,
|
.paletteTag = ANIM_TAG_IMPACT,
|
||||||
@ -206,10 +206,10 @@ const struct SpriteTemplate gUnknown_085973A0 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08597348,
|
.affineAnims = gUnknown_08597348,
|
||||||
.callback = sub_8116458,
|
.callback = AnimHitSplatRandom,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_85973B8 =
|
const struct SpriteTemplate gExtremeSpeedHitSplatSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_IMPACT,
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
.paletteTag = ANIM_TAG_IMPACT,
|
.paletteTag = ANIM_TAG_IMPACT,
|
||||||
@ -217,10 +217,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_85973B8 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08597348,
|
.affineAnims = gUnknown_08597348,
|
||||||
.callback = sub_81164F0,
|
.callback = AnimExtremeSpeedHitSplat,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085973D0 =
|
const struct SpriteTemplate gCrossImpactSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_CROSS_IMPACT,
|
.tileTag = ANIM_TAG_CROSS_IMPACT,
|
||||||
.paletteTag = ANIM_TAG_CROSS_IMPACT,
|
.paletteTag = ANIM_TAG_CROSS_IMPACT,
|
||||||
@ -231,7 +231,7 @@ const struct SpriteTemplate gUnknown_085973D0 =
|
|||||||
.callback = sub_8116560,
|
.callback = sub_8116560,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085973E8 =
|
const struct SpriteTemplate gFlashingHitSplatSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_IMPACT,
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
.paletteTag = ANIM_TAG_IMPACT,
|
.paletteTag = ANIM_TAG_IMPACT,
|
||||||
@ -239,7 +239,7 @@ const struct SpriteTemplate gUnknown_085973E8 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_08597348,
|
.affineAnims = gUnknown_08597348,
|
||||||
.callback = sub_81165A8,
|
.callback = AnimFlashingHitSplat,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08597400 =
|
const struct SpriteTemplate gUnknown_08597400 =
|
||||||
@ -414,12 +414,12 @@ void sub_81159B4(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Task data for AnimTask_BlendCycleMonColor
|
// Task data for AnimTask_BlendCycleMonColor
|
||||||
#define tPalSelector data[0]
|
#define tPalSelector data[0] // arg0
|
||||||
#define tDelay data[1]
|
#define tDelay data[1] // arg1
|
||||||
#define tNumBlends data[2]
|
#define tNumBlends data[2] // arg2
|
||||||
#define tInitialBlendY data[3]
|
#define tInitialBlendY data[3] // arg3
|
||||||
#define tTargetBlendY data[4]
|
#define tTargetBlendY data[4] // arg4
|
||||||
#define tBlendColor data[5]
|
#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 sprite to designated color or back alternately tNumBlends times
|
||||||
@ -703,7 +703,7 @@ static void sub_8115EB8(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8115F10(u8 taskId)
|
void AnimTask_InvertScreenColor(u8 taskId)
|
||||||
{
|
{
|
||||||
u32 selectedPalettes = 0;
|
u32 selectedPalettes = 0;
|
||||||
u8 attackerBattler = gBattleAnimAttacker;
|
u8 attackerBattler = gBattleAnimAttacker;
|
||||||
@ -895,10 +895,10 @@ static void sub_81162F8(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8116388(struct Sprite *sprite)
|
static void AnimBasicHitSplat(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
if (gBattleAnimArgs[2] == 0)
|
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||||
InitSpritePosToAnimAttacker(sprite, 1);
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
else
|
else
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
@ -910,7 +910,7 @@ void sub_8116388(struct Sprite *sprite)
|
|||||||
static void sub_81163D0(struct Sprite *sprite)
|
static void sub_81163D0(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
if (gBattleAnimArgs[2] == 0)
|
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||||
InitSpritePosToAnimAttacker(sprite, 1);
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
else
|
else
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
@ -925,16 +925,16 @@ void sub_8116420(struct Sprite *sprite)
|
|||||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER && !IsContest())
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER && !IsContest())
|
||||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||||
|
|
||||||
sub_8116388(sprite);
|
AnimBasicHitSplat(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8116458(struct Sprite *sprite)
|
static void AnimHitSplatRandom(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gBattleAnimArgs[1] == -1)
|
if (gBattleAnimArgs[1] == -1)
|
||||||
gBattleAnimArgs[1] = Random2() & 3;
|
gBattleAnimArgs[1] = Random2() & 3;
|
||||||
|
|
||||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[1]);
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[1]);
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == ANIM_ATTACKER)
|
||||||
InitSpritePosToAnimAttacker(sprite, 0);
|
InitSpritePosToAnimAttacker(sprite, 0);
|
||||||
else
|
else
|
||||||
InitSpritePosToAnimTarget(sprite, FALSE);
|
InitSpritePosToAnimTarget(sprite, FALSE);
|
||||||
@ -946,7 +946,7 @@ void sub_8116458(struct Sprite *sprite)
|
|||||||
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81164F0(struct Sprite *sprite)
|
static void AnimExtremeSpeedHitSplat(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
sprite->data[0] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]);
|
||||||
sprite->pos1.x = gSprites[sprite->data[0]].pos1.x + gSprites[sprite->data[0]].pos2.x;
|
sprite->pos1.x = gSprites[sprite->data[0]].pos1.x + gSprites[sprite->data[0]].pos2.x;
|
||||||
@ -960,7 +960,7 @@ void sub_81164F0(struct Sprite *sprite)
|
|||||||
|
|
||||||
void sub_8116560(struct Sprite *sprite)
|
void sub_8116560(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gBattleAnimArgs[2] == 0)
|
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||||
InitSpritePosToAnimAttacker(sprite, 1);
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
else
|
else
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
@ -970,10 +970,10 @@ void sub_8116560(struct Sprite *sprite)
|
|||||||
sprite->callback = WaitAnimForDuration;
|
sprite->callback = WaitAnimForDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81165A8(struct Sprite *sprite)
|
static void AnimFlashingHitSplat(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
if (gBattleAnimArgs[2] == 0)
|
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||||
InitSpritePosToAnimAttacker(sprite, 1);
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
else
|
else
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
@ -158,7 +158,7 @@ const struct SpriteTemplate gUnknown_08596624 =
|
|||||||
.callback = sub_810F58C,
|
.callback = sub_810F58C,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_0859663C =
|
const struct SpriteTemplate gGoldRingSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_GOLD_RING,
|
.tileTag = ANIM_TAG_GOLD_RING,
|
||||||
.paletteTag = ANIM_TAG_GOLD_RING,
|
.paletteTag = ANIM_TAG_GOLD_RING,
|
||||||
@ -947,7 +947,9 @@ void sub_810FDF0(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810FE14(u8 taskId)
|
// The scanline effect that distorts the target during Extrasensory by segmenting the mon vertically and shifting the slices
|
||||||
|
// arg0: Stage. Stage 0 is a slight right distortion, 1 is a medium left distortion, and 2 is a severe right distortion
|
||||||
|
void AnimTask_ExtrasensoryDistortion(u8 taskId)
|
||||||
{
|
{
|
||||||
s16 i;
|
s16 i;
|
||||||
u8 yOffset;
|
u8 yOffset;
|
||||||
@ -1045,7 +1047,9 @@ static void sub_810FF34(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8110034(u8 taskId)
|
// Creates a cloned transparent sprite of the battler that grows and then shrinks back to original size. Used by Extrasensory
|
||||||
|
// arg0: battler
|
||||||
|
void AnimTask_TransparentCloneGrowAndShrink(u8 taskId)
|
||||||
{
|
{
|
||||||
s16 spriteId;
|
s16 spriteId;
|
||||||
s16 matrixNum;
|
s16 matrixNum;
|
||||||
|
@ -14,7 +14,7 @@ extern const union AnimCmd *const gUnknown_085954D0[];
|
|||||||
|
|
||||||
void sub_81109F0(struct Sprite *);
|
void sub_81109F0(struct Sprite *);
|
||||||
void sub_8110AB4(struct Sprite *);
|
void sub_8110AB4(struct Sprite *);
|
||||||
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 *);
|
void sub_811131C(struct Sprite *);
|
||||||
@ -112,7 +112,7 @@ const struct SpriteTemplate gUnknown_08596B70 =
|
|||||||
.callback = sub_8110B38,
|
.callback = sub_8110B38,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596B88 =
|
const struct SpriteTemplate gFireSpinSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||||
@ -123,7 +123,7 @@ const struct SpriteTemplate gUnknown_08596B88 =
|
|||||||
.callback = sub_8110B38,
|
.callback = sub_8110B38,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gBattleAnimSpriteTemplate_8596BA0 =
|
const struct SpriteTemplate gFlyingDirtSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_FLYING_DIRT,
|
.tileTag = ANIM_TAG_FLYING_DIRT,
|
||||||
.paletteTag = ANIM_TAG_FLYING_DIRT,
|
.paletteTag = ANIM_TAG_FLYING_DIRT,
|
||||||
@ -499,7 +499,7 @@ static void sub_8110CB0(u8 taskId)
|
|||||||
// arg 1: projectile speed
|
// arg 1: projectile speed
|
||||||
// arg 2: y pixel drop
|
// arg 2: y pixel drop
|
||||||
// arg 3: ??? unknown (possibly a color bit)
|
// arg 3: ??? unknown (possibly a color bit)
|
||||||
void AnimDirtParticleAcrossScreen(struct Sprite *sprite)
|
static void AnimDirtParticleAcrossScreen(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] == 0)
|
if (sprite->data[0] == 0)
|
||||||
{
|
{
|
||||||
|
73
src/water.c
73
src/water.c
@ -21,13 +21,13 @@ void sub_8107408(struct Sprite *);
|
|||||||
void sub_8107430(struct Sprite *);
|
void sub_8107430(struct Sprite *);
|
||||||
static void AnimAuroraBeamRings(struct Sprite *);
|
static void AnimAuroraBeamRings(struct Sprite *);
|
||||||
void sub_81074E4(struct Sprite *);
|
void sub_81074E4(struct Sprite *);
|
||||||
void sub_81075EC(struct Sprite *);
|
static void AnimToTargetInSinWave(struct Sprite *);
|
||||||
void sub_8107674(struct Sprite *);
|
void sub_8107674(struct Sprite *);
|
||||||
void sub_8107730(struct Sprite *);
|
static void AnimHydroCannonCharge(struct Sprite *);
|
||||||
void sub_81077A4(struct Sprite *);
|
static void AnimWaitForHydroCannonChargeEnd(struct Sprite *);
|
||||||
void sub_81077C0(struct Sprite *);
|
static void AnimHydroCannonBeam(struct Sprite *);
|
||||||
void sub_8107894(struct Sprite *);
|
void sub_8107894(struct Sprite *);
|
||||||
void sub_81078D0(struct Sprite *);
|
static void AnimSmallBubblePair(struct Sprite *);
|
||||||
void sub_810790C(struct Sprite *);
|
void sub_810790C(struct Sprite *);
|
||||||
void sub_8108034(struct Sprite *);
|
void sub_8108034(struct Sprite *);
|
||||||
void sub_8108098(struct Sprite *);
|
void sub_8108098(struct Sprite *);
|
||||||
@ -41,7 +41,7 @@ void sub_8108C08(struct Sprite *);
|
|||||||
void sub_8108C54(struct Sprite *);
|
void sub_8108C54(struct Sprite *);
|
||||||
void AnimWaterPulseRing_Step(struct Sprite *);
|
void AnimWaterPulseRing_Step(struct Sprite *);
|
||||||
void sub_810756C(u8);
|
void sub_810756C(u8);
|
||||||
void sub_81076F4(u8);
|
static void AnimTask_RunSinAnimTimer(u8);
|
||||||
void sub_8107B84(u8);
|
void sub_8107B84(u8);
|
||||||
void sub_8107CC4(u8);
|
void sub_8107CC4(u8);
|
||||||
void sub_8107D58(u8);
|
void sub_8107D58(u8);
|
||||||
@ -181,7 +181,7 @@ const union AnimCmd *const gUnknown_085950E0[] =
|
|||||||
gUnknown_085950CC,
|
gUnknown_085950CC,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085950E4 =
|
const struct SpriteTemplate gHydroPumpOrbSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_WATER_ORB,
|
.tileTag = ANIM_TAG_WATER_ORB,
|
||||||
.paletteTag = ANIM_TAG_WATER_ORB,
|
.paletteTag = ANIM_TAG_WATER_ORB,
|
||||||
@ -189,7 +189,7 @@ const struct SpriteTemplate gUnknown_085950E4 =
|
|||||||
.anims = gUnknown_085950E0,
|
.anims = gUnknown_085950E0,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81075EC,
|
.callback = AnimToTargetInSinWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085950FC =
|
const struct SpriteTemplate gUnknown_085950FC =
|
||||||
@ -200,7 +200,7 @@ const struct SpriteTemplate gUnknown_085950FC =
|
|||||||
.anims = gUnknown_085950E0,
|
.anims = gUnknown_085950E0,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81075EC,
|
.callback = AnimToTargetInSinWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595114 =
|
const struct SpriteTemplate gUnknown_08595114 =
|
||||||
@ -211,7 +211,7 @@ const struct SpriteTemplate gUnknown_08595114 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81075EC,
|
.callback = AnimToTargetInSinWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_0859512C =
|
const struct SpriteTemplate gUnknown_0859512C =
|
||||||
@ -222,7 +222,7 @@ const struct SpriteTemplate gUnknown_0859512C =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81075EC,
|
.callback = AnimToTargetInSinWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08595144[] =
|
const union AnimCmd gUnknown_08595144[] =
|
||||||
@ -238,7 +238,7 @@ const union AnimCmd *const gUnknown_08595154[] =
|
|||||||
gUnknown_08595144,
|
gUnknown_08595144,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595158 =
|
const struct SpriteTemplate gFlamethrowerFlameSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_EMBER,
|
.tileTag = ANIM_TAG_SMALL_EMBER,
|
||||||
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
.paletteTag = ANIM_TAG_SMALL_EMBER,
|
||||||
@ -246,7 +246,7 @@ const struct SpriteTemplate gUnknown_08595158 =
|
|||||||
.anims = gUnknown_08595154,
|
.anims = gUnknown_08595154,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81075EC,
|
.callback = AnimToTargetInSinWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595170 =
|
const struct SpriteTemplate gUnknown_08595170 =
|
||||||
@ -257,7 +257,7 @@ const struct SpriteTemplate gUnknown_08595170 =
|
|||||||
.anims = gDummySpriteAnimTable,
|
.anims = gDummySpriteAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gGrowingRingAffineAnimTable,
|
.affineAnims = gGrowingRingAffineAnimTable,
|
||||||
.callback = sub_81075EC,
|
.callback = AnimToTargetInSinWave,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AffineAnimCmd gUnknown_08595188[] =
|
const union AffineAnimCmd gUnknown_08595188[] =
|
||||||
@ -284,7 +284,7 @@ const union AffineAnimCmd *const gUnknown_085951BC[] =
|
|||||||
gUnknown_085951A8,
|
gUnknown_085951A8,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085951C0 =
|
const struct SpriteTemplate gHydroCannonChargeSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_WATER_ORB,
|
.tileTag = ANIM_TAG_WATER_ORB,
|
||||||
.paletteTag = ANIM_TAG_WATER_ORB,
|
.paletteTag = ANIM_TAG_WATER_ORB,
|
||||||
@ -292,10 +292,10 @@ const struct SpriteTemplate gUnknown_085951C0 =
|
|||||||
.anims = gUnknown_085950E0,
|
.anims = gUnknown_085950E0,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_085951B8,
|
.affineAnims = gUnknown_085951B8,
|
||||||
.callback = sub_8107730,
|
.callback = AnimHydroCannonCharge,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_085951D8 =
|
const struct SpriteTemplate gHydroCannonBeamSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_WATER_ORB,
|
.tileTag = ANIM_TAG_WATER_ORB,
|
||||||
.paletteTag = ANIM_TAG_WATER_ORB,
|
.paletteTag = ANIM_TAG_WATER_ORB,
|
||||||
@ -303,7 +303,7 @@ const struct SpriteTemplate gUnknown_085951D8 =
|
|||||||
.anims = gUnknown_085950E0,
|
.anims = gUnknown_085950E0,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gUnknown_085951BC,
|
.affineAnims = gUnknown_085951BC,
|
||||||
.callback = sub_81077C0,
|
.callback = AnimHydroCannonBeam,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_085951F0[] =
|
const union AnimCmd gUnknown_085951F0[] =
|
||||||
@ -352,16 +352,16 @@ const struct SpriteTemplate gUnknown_08595220 =
|
|||||||
|
|
||||||
const struct SpriteTemplate gSmallBubblePairSpriteTemplate =
|
const struct SpriteTemplate gSmallBubblePairSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_ICE_CRYSTALS,
|
.tileTag = ANIM_TAG_ICE_CRYSTALS, // Little confusing. ice_crystals_4, which are basically bubbles. TODO: rename?
|
||||||
.paletteTag = ANIM_TAG_ICE_CRYSTALS,
|
.paletteTag = ANIM_TAG_ICE_CRYSTALS,
|
||||||
.oam = &gOamData_AffineOff_ObjNormal_8x8,
|
.oam = &gOamData_AffineOff_ObjNormal_8x8,
|
||||||
.anims = gUnknown_08595AB8,
|
.anims = gUnknown_08595AB8,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_81078D0,
|
.callback = AnimSmallBubblePair,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08595250 =
|
const struct SpriteTemplate gSmallDriftingBubblesSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_SMALL_BUBBLES,
|
.tileTag = ANIM_TAG_SMALL_BUBBLES,
|
||||||
.paletteTag = ANIM_TAG_SMALL_BUBBLES,
|
.paletteTag = ANIM_TAG_SMALL_BUBBLES,
|
||||||
@ -721,7 +721,8 @@ _081075DE:\n\
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void sub_81075EC(struct Sprite *sprite)
|
// For animating undulating beam attacks (e.g. Flamethrower, Hydro Pump, Signal Beam)
|
||||||
|
static void AnimToTargetInSinWave(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u16 retArg;
|
u16 retArg;
|
||||||
|
|
||||||
@ -764,21 +765,22 @@ void sub_8107674(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81076C8(u8 taskId)
|
void AnimTask_StartSinAnimTimer(u8 taskId)
|
||||||
{
|
{
|
||||||
gTasks[taskId].data[0] = gBattleAnimArgs[0];
|
gTasks[taskId].data[0] = gBattleAnimArgs[0];
|
||||||
gBattleAnimArgs[ARG_RET_ID] = 0;
|
gBattleAnimArgs[ARG_RET_ID] = 0;
|
||||||
gTasks[taskId].func = sub_81076F4;
|
gTasks[taskId].func = AnimTask_RunSinAnimTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81076F4(u8 taskId)
|
static void AnimTask_RunSinAnimTimer(u8 taskId)
|
||||||
{
|
{
|
||||||
gBattleAnimArgs[ARG_RET_ID] = (gBattleAnimArgs[ARG_RET_ID] + 3) & 0xFF;
|
gBattleAnimArgs[ARG_RET_ID] = (gBattleAnimArgs[ARG_RET_ID] + 3) & 0xFF;
|
||||||
if (--gTasks[taskId].data[0] == 0)
|
if (--gTasks[taskId].data[0] == 0)
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8107730(struct Sprite *sprite)
|
// Flashing blue orbs grow in size near the attacker. First stage of Hydro Cannon
|
||||||
|
static void AnimHydroCannonCharge(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 priority;
|
u8 priority;
|
||||||
|
|
||||||
@ -804,16 +806,17 @@ void sub_8107730(struct Sprite *sprite)
|
|||||||
sprite->pos2.x = -10;
|
sprite->pos2.x = -10;
|
||||||
sprite->subpriority = priority + 2;
|
sprite->subpriority = priority + 2;
|
||||||
}
|
}
|
||||||
sprite->callback = sub_81077A4;
|
sprite->callback = AnimWaitForHydroCannonChargeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81077A4(struct Sprite *sprite)
|
static void AnimWaitForHydroCannonChargeEnd(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->affineAnimEnded)
|
if (sprite->affineAnimEnded)
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81077C0(struct Sprite *sprite)
|
// Flashing blue orbs move from the attacker to the target. Second stage of Hydro Cannon
|
||||||
|
static void AnimHydroCannonBeam(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
bool8 animType;
|
bool8 animType;
|
||||||
u8 coordType;
|
u8 coordType;
|
||||||
@ -851,9 +854,9 @@ void sub_8107894(struct Sprite *sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_81078D0(struct Sprite *sprite)
|
static void AnimSmallBubblePair(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gBattleAnimArgs[3])
|
if (gBattleAnimArgs[3] != ANIM_ATTACKER)
|
||||||
InitSpritePosToAnimTarget(sprite, TRUE);
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
else
|
else
|
||||||
InitSpritePosToAnimAttacker(sprite, TRUE);
|
InitSpritePosToAnimAttacker(sprite, TRUE);
|
||||||
@ -1719,17 +1722,17 @@ void sub_810862C(u8 taskId)
|
|||||||
}
|
}
|
||||||
if (task->data[10] != 0 && task->data[13] == 0)
|
if (task->data[10] != 0 && task->data[13] == 0)
|
||||||
{
|
{
|
||||||
gBattleAnimArgs[0] = 1;
|
gBattleAnimArgs[0] = ANIM_TARGET;
|
||||||
gBattleAnimArgs[1] = 0;
|
gBattleAnimArgs[1] = 0;
|
||||||
gBattleAnimArgs[2] = 12;
|
gBattleAnimArgs[2] = 12;
|
||||||
taskId2 = CreateTask(sub_81152DC, 80);
|
taskId2 = CreateTask(AnimTask_HorizontalShake, 80);
|
||||||
if (taskId2 != 0xFF)
|
if (taskId2 != 0xFF)
|
||||||
{
|
{
|
||||||
gTasks[taskId2].func(taskId2);
|
gTasks[taskId2].func(taskId2);
|
||||||
gAnimVisualTaskCount++;
|
gAnimVisualTaskCount++;
|
||||||
}
|
}
|
||||||
gBattleAnimArgs[0] = 3;
|
gBattleAnimArgs[0] = ANIM_DEF_PARTNER;
|
||||||
taskId2 = CreateTask(sub_81152DC, 80);
|
taskId2 = CreateTask(AnimTask_HorizontalShake, 80);
|
||||||
if (taskId2 != 0xFF)
|
if (taskId2 != 0xFF)
|
||||||
{
|
{
|
||||||
gTasks[taskId2].func(taskId2);
|
gTasks[taskId2].func(taskId2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user