mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Document some battle anim things
This commit is contained in:
parent
e9149b8608
commit
1253cbf5f6
@ -16,14 +16,14 @@ enum
|
|||||||
BG_ANIM_SCREEN_BASE_BLOCK,
|
BG_ANIM_SCREEN_BASE_BLOCK,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UnknownAnimStruct2
|
struct BattleAnimBgData
|
||||||
{
|
{
|
||||||
u8 *bgTiles;
|
u8 *bgTiles;
|
||||||
u16 *unk4;
|
u16 *bgTilemap;
|
||||||
u8 unk8;
|
u8 paletteId;
|
||||||
u8 bgId;
|
u8 bgId;
|
||||||
u16 tilesOffset;
|
u16 tilesOffset;
|
||||||
u16 unkC;
|
u16 unused;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BattleAnimBackground
|
struct BattleAnimBackground
|
||||||
@ -74,14 +74,14 @@ void HandleIntroSlide(u8 terrainId);
|
|||||||
int GetAnimBgAttribute(u8 bgId, u8 attributeId);
|
int GetAnimBgAttribute(u8 bgId, u8 attributeId);
|
||||||
|
|
||||||
// battle_anim_80A5C6C.s
|
// battle_anim_80A5C6C.s
|
||||||
void sub_80A6450(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 sub_80A8B64(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 AnimTranslateLinearSimple(struct Sprite *sprite);
|
void TranslateSpriteLinearFixedPoint(struct Sprite *sprite);
|
||||||
void InitSpritePosToAnimAttacker(struct Sprite *sprite, bool8 respectMonPicOffsets);
|
void InitSpritePosToAnimAttacker(struct Sprite *sprite, bool8 respectMonPicOffsets);
|
||||||
void InitSpritePosToAnimTarget(struct Sprite *sprite, bool8 respectMonPicOffsets);
|
void InitSpritePosToAnimTarget(struct Sprite *sprite, bool8 respectMonPicOffsets);
|
||||||
void StartAnimLinearTranslation(struct Sprite *sprite);
|
void StartAnimLinearTranslation(struct Sprite *sprite);
|
||||||
@ -94,7 +94,7 @@ void sub_80A6FD4(struct Sprite *sprite);
|
|||||||
u16 ArcTan2Neg(s16 a, s16 b);
|
u16 ArcTan2Neg(s16 a, s16 b);
|
||||||
void TrySetSpriteRotScale(struct Sprite *sprite, bool8 a2, s16 xScale, s16 yScale, u16 rotation);
|
void TrySetSpriteRotScale(struct Sprite *sprite, bool8 a2, s16 xScale, s16 yScale, u16 rotation);
|
||||||
void RunStoredCallbackWhenAffineAnimEnds(struct Sprite *sprite);
|
void RunStoredCallbackWhenAffineAnimEnds(struct Sprite *sprite);
|
||||||
void sub_80A66DC(struct Sprite *sprite);
|
void TranslateSpriteLinearAndFlicker(struct Sprite *sprite);
|
||||||
void SetSpriteCoordsToAnimAttackerCoords(struct Sprite *sprite);
|
void SetSpriteCoordsToAnimAttackerCoords(struct Sprite *sprite);
|
||||||
void RunStoredCallbackWhenAnimEnds(struct Sprite *sprite);
|
void RunStoredCallbackWhenAnimEnds(struct Sprite *sprite);
|
||||||
void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2);
|
void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2);
|
||||||
@ -108,12 +108,12 @@ u8 GetBattlerSpriteBGPriority(u8 battlerId);
|
|||||||
void *LoadPointerFromVars(s16 bottom, s16 top);
|
void *LoadPointerFromVars(s16 bottom, s16 top);
|
||||||
void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr);
|
void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr);
|
||||||
void sub_80A8278(void);
|
void sub_80A8278(void);
|
||||||
void sub_80A6B30(struct UnknownAnimStruct2*);
|
void sub_80A6B30(struct BattleAnimBgData*);
|
||||||
void sub_80A6B90(struct UnknownAnimStruct2*, u32 arg1);
|
void sub_80A6B90(struct BattleAnimBgData*, u32 arg1);
|
||||||
u8 GetBattlerSpriteSubpriority(u8 battlerId);
|
u8 GetBattlerSpriteSubpriority(u8 battlerId);
|
||||||
bool8 TranslateAnimArc(struct Sprite *sprite);
|
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite);
|
||||||
void sub_80A6630(struct Sprite *sprite);
|
void sub_80A6630(struct Sprite *sprite);
|
||||||
void sub_80A6680(struct Sprite *sprite);
|
void TranslateMonSpriteLinearFixedPoint(struct Sprite *sprite);
|
||||||
void ResetSpriteRotScale(u8 spriteId);
|
void ResetSpriteRotScale(u8 spriteId);
|
||||||
void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
|
void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
|
||||||
void InitSpriteDataForLinearTranslation(struct Sprite *sprite);
|
void InitSpriteDataForLinearTranslation(struct Sprite *sprite);
|
||||||
@ -125,8 +125,8 @@ u8 sub_80A77AC(u8 a1);
|
|||||||
s16 CloneBattlerSpriteWithBlend(u8);
|
s16 CloneBattlerSpriteWithBlend(u8);
|
||||||
void obj_delete_but_dont_free_vram(struct Sprite*);
|
void obj_delete_but_dont_free_vram(struct Sprite*);
|
||||||
u8 sub_80A89C8(int, u8, int);
|
u8 sub_80A89C8(int, u8, int);
|
||||||
void sub_80A6D60(struct UnknownAnimStruct2*, const void*, u32);
|
void sub_80A6D60(struct BattleAnimBgData*, const void*, u32);
|
||||||
void sub_80A6CC0(u32, const u32*, u32);
|
void AnimLoadCompressedBgGfx(u32, const u32*, u32);
|
||||||
void sub_80A6DAC(bool8);
|
void sub_80A6DAC(bool8);
|
||||||
void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *);
|
void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *);
|
||||||
void sub_80A653C(struct Sprite *);
|
void sub_80A653C(struct Sprite *);
|
||||||
@ -134,13 +134,13 @@ void SetBattlerSpriteYOffsetFromYScale(u8 spriteId);
|
|||||||
void sub_80A805C(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7);
|
void sub_80A805C(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7);
|
||||||
u8 sub_80A80C8(struct Task *task);
|
u8 sub_80A80C8(struct Task *task);
|
||||||
void sub_80A8EE4(struct Sprite *);
|
void sub_80A8EE4(struct Sprite *);
|
||||||
void sub_80A67F4(struct Sprite *);
|
void DestroyAnimSpriteAndDisableBlend(struct Sprite *);
|
||||||
void sub_80A6D48(u32 bgId, const void *src);
|
void AnimLoadCompressedBgTilemap(u32 bgId, const void *src);
|
||||||
void InitAnimFastLinearTranslationWithSpeed(struct Sprite *sprite);
|
void InitAnimFastLinearTranslationWithSpeed(struct Sprite *sprite);
|
||||||
bool8 AnimFastTranslateLinear(struct Sprite *sprite);
|
bool8 AnimFastTranslateLinear(struct Sprite *sprite);
|
||||||
void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite);
|
void InitAndRunAnimFastLinearTranslation(struct Sprite *sprite);
|
||||||
void TranslateMonBGUntil(struct Sprite *sprite);
|
void TranslateMonSpriteLinear(struct Sprite *sprite);
|
||||||
void TranslateSpriteOverDuration(struct Sprite *sprite);
|
void TranslateSpriteLinear(struct Sprite *sprite);
|
||||||
void sub_80A77C8(struct Sprite *sprite);
|
void sub_80A77C8(struct Sprite *sprite);
|
||||||
void sub_80A7000(struct Sprite *sprite);
|
void sub_80A7000(struct Sprite *sprite);
|
||||||
void TranslateSpriteInCircleOverDuration(struct Sprite *sprite);
|
void TranslateSpriteInCircleOverDuration(struct Sprite *sprite);
|
||||||
@ -148,7 +148,7 @@ void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2);
|
|||||||
void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds);
|
void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds);
|
||||||
bool8 RunAffineAnimFromTaskData(struct Task *task);
|
bool8 RunAffineAnimFromTaskData(struct Task *task);
|
||||||
void sub_80A78AC(struct Sprite *sprite);
|
void sub_80A78AC(struct Sprite *sprite);
|
||||||
void sub_80A6BFC(struct UnknownAnimStruct2 *unk, u8 unused);
|
void sub_80A6BFC(struct BattleAnimBgData *unk, u8 unused);
|
||||||
u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10);
|
u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10);
|
||||||
void sub_80A749C(struct Sprite *sprite);
|
void sub_80A749C(struct Sprite *sprite);
|
||||||
void sub_80A6DEC(struct Sprite *sprite);
|
void sub_80A6DEC(struct Sprite *sprite);
|
||||||
@ -185,7 +185,7 @@ bool8 IsDoubleBattle(void);
|
|||||||
u8 sub_80A6D94(void);
|
u8 sub_80A6D94(void);
|
||||||
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
|
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
|
||||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
||||||
void oamt_add_pos2_onto_pos1(struct Sprite *sprite);
|
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
|
||||||
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
|
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
|
||||||
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
|
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
|
||||||
|
|
||||||
|
@ -4724,9 +4724,9 @@ extern const u32 gBattleAnimBackgroundTilemap_17[];
|
|||||||
extern const u32 gBattleAnimBackgroundTilemap_20[];
|
extern const u32 gBattleAnimBackgroundTilemap_20[];
|
||||||
extern const u32 gBattleAnimBackgroundTilemap_21[];
|
extern const u32 gBattleAnimBackgroundTilemap_21[];
|
||||||
|
|
||||||
extern const u32 gUnknown_08C1D0AC[];
|
extern const u32 gMetalShineGfx[];
|
||||||
extern const u32 gUnknown_08C1D1E8[];
|
extern const u32 gMetalShinePalette[];
|
||||||
extern const u32 gUnknown_08C1D210[];
|
extern const u32 gMetalShineTilemap[];
|
||||||
|
|
||||||
extern const u32 gUnknown_08C20668[];
|
extern const u32 gUnknown_08C20668[];
|
||||||
extern const u32 gUnknown_08C20684[];
|
extern const u32 gUnknown_08C20684[];
|
||||||
|
@ -1924,7 +1924,7 @@ bool8 IsBattlerSpriteVisible(u8 battlerId)
|
|||||||
|
|
||||||
void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
u8 battlerSpriteId;
|
u8 battlerSpriteId;
|
||||||
|
|
||||||
if (!toBG_2)
|
if (!toBG_2)
|
||||||
@ -1942,9 +1942,9 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
|||||||
RequestDma3Fill(0xFF, (void*)(VRAM + 0xe000), 0x1000, 0);
|
RequestDma3Fill(0xFF, (void*)(VRAM + 0xe000), 0x1000, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
CpuFill16(0, unknownStruct.bgTiles, 0x1000);
|
CpuFill16(0, animBg.bgTiles, 0x1000);
|
||||||
CpuFill16(0xFF, unknownStruct.unk4, 0x800);
|
CpuFill16(0xFF, animBg.bgTilemap, 0x800);
|
||||||
|
|
||||||
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 2);
|
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 2);
|
||||||
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 1);
|
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 1);
|
||||||
@ -1963,15 +1963,15 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
|||||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
|
|
||||||
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], unknownStruct.unk8 * 16, 0x20);
|
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], animBg.paletteId * 16, 0x20);
|
||||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + unknownStruct.unk8 * 32), 0x20);
|
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + animBg.paletteId * 32), 0x20);
|
||||||
|
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
battlerPosition = 0;
|
battlerPosition = 0;
|
||||||
else
|
else
|
||||||
battlerPosition = GetBattlerPosition(battlerId);
|
battlerPosition = GetBattlerPosition(battlerId);
|
||||||
|
|
||||||
sub_8118FBC(1, 0, 0, battlerPosition, unknownStruct.unk8, unknownStruct.bgTiles, unknownStruct.unk4, unknownStruct.tilesOffset);
|
sub_8118FBC(1, 0, 0, battlerPosition, animBg.paletteId, animBg.bgTiles, animBg.bgTilemap, animBg.tilesOffset);
|
||||||
|
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
sub_80A46A0();
|
sub_80A46A0();
|
||||||
@ -1980,9 +1980,9 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
|||||||
{
|
{
|
||||||
RequestDma3Fill(0, (void*)(VRAM + 0x6000), 0x2000, 1);
|
RequestDma3Fill(0, (void*)(VRAM + 0x6000), 0x2000, 1);
|
||||||
RequestDma3Fill(0, (void*)(VRAM + 0xF000), 0x1000, 1);
|
RequestDma3Fill(0, (void*)(VRAM + 0xF000), 0x1000, 1);
|
||||||
sub_80A6B90(&unknownStruct, 2);
|
sub_80A6B90(&animBg, 2);
|
||||||
CpuFill16(0, unknownStruct.bgTiles + 0x1000, 0x1000);
|
CpuFill16(0, animBg.bgTiles + 0x1000, 0x1000);
|
||||||
CpuFill16(0, unknownStruct.unk4 + 0x400, 0x800);
|
CpuFill16(0, animBg.bgTilemap + 0x400, 0x800);
|
||||||
SetAnimBgAttribute(2, BG_ANIM_PRIORITY, 2);
|
SetAnimBgAttribute(2, BG_ANIM_PRIORITY, 2);
|
||||||
SetAnimBgAttribute(2, BG_ANIM_SCREEN_SIZE, 1);
|
SetAnimBgAttribute(2, BG_ANIM_SCREEN_SIZE, 1);
|
||||||
SetAnimBgAttribute(2, BG_ANIM_AREA_OVERFLOW_MODE, 0);
|
SetAnimBgAttribute(2, BG_ANIM_AREA_OVERFLOW_MODE, 0);
|
||||||
@ -2001,20 +2001,20 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
|||||||
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], 0x90, 0x20);
|
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], 0x90, 0x20);
|
||||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + 0x120), 0x20);
|
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + 0x120), 0x20);
|
||||||
|
|
||||||
sub_8118FBC(2, 0, 0, GetBattlerPosition(battlerId), unknownStruct.unk8, unknownStruct.bgTiles + 0x1000, unknownStruct.unk4 + 0x400, unknownStruct.tilesOffset);
|
sub_8118FBC(2, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles + 0x1000, animBg.bgTilemap + 0x400, animBg.tilesOffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80A46A0(void)
|
static void sub_80A46A0(void)
|
||||||
{
|
{
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
u16 *ptr;
|
u16 *ptr;
|
||||||
|
|
||||||
if (IsSpeciesNotUnown(gContestResources->field_18->species))
|
if (IsSpeciesNotUnown(gContestResources->field_18->species))
|
||||||
{
|
{
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
ptr = unknownStruct.unk4;
|
ptr = animBg.bgTilemap;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
@ -2052,8 +2052,8 @@ void sub_80A4720(u16 a, u16 *b, u32 c, u8 d)
|
|||||||
|
|
||||||
void sub_80A477C(bool8 to_BG2)
|
void sub_80A477C(bool8 to_BG2)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
|
|
||||||
if (!to_BG2 || IsContest())
|
if (!to_BG2 || IsContest())
|
||||||
{
|
{
|
||||||
@ -2073,11 +2073,11 @@ static void task_pA_ma0A_obj_to_bg_pal(u8 taskId)
|
|||||||
{
|
{
|
||||||
u8 spriteId, palIndex;
|
u8 spriteId, palIndex;
|
||||||
s16 x, y;
|
s16 x, y;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
spriteId = gTasks[taskId].data[0];
|
spriteId = gTasks[taskId].data[0];
|
||||||
palIndex = gTasks[taskId].data[6];
|
palIndex = gTasks[taskId].data[6];
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
x = gTasks[taskId].data[1] - (gSprites[spriteId].pos1.x + gSprites[spriteId].pos2.x);
|
x = gTasks[taskId].data[1] - (gSprites[spriteId].pos1.x + gSprites[spriteId].pos2.x);
|
||||||
y = gTasks[taskId].data[2] - (gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y);
|
y = gTasks[taskId].data[2] - (gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y);
|
||||||
|
|
||||||
@ -2089,7 +2089,7 @@ static void task_pA_ma0A_obj_to_bg_pal(u8 taskId)
|
|||||||
gBattle_BG1_X = x + gTasks[taskId].data[3];
|
gBattle_BG1_X = x + gTasks[taskId].data[3];
|
||||||
gBattle_BG1_Y = y + gTasks[taskId].data[4];
|
gBattle_BG1_Y = y + gTasks[taskId].data[4];
|
||||||
src = gPlttBufferFaded + 0x100 + palIndex * 16;
|
src = gPlttBufferFaded + 0x100 + palIndex * 16;
|
||||||
dst = gPlttBufferFaded + 0x100 + unknownStruct.unk8 * 16 - 256;
|
dst = gPlttBufferFaded + 0x100 + animBg.paletteId * 16 - 256;
|
||||||
CpuCopy32(src, dst, 0x20);
|
CpuCopy32(src, dst, 0x20);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -33,21 +33,18 @@ extern const u8 gEnemyMonElevation[];
|
|||||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
||||||
extern const union AffineAnimCmd *gUnknown_082FF6C0[];
|
extern const union AffineAnimCmd *gUnknown_082FF6C0[];
|
||||||
|
|
||||||
// This file's functions.
|
static void sub_80A6FB4(struct Sprite *sprite);
|
||||||
void sub_80A64EC(struct Sprite *sprite);
|
static void sub_80A7144(struct Sprite *sprite);
|
||||||
void sub_80A6FB4(struct Sprite *sprite);
|
static void sub_80A791C(struct Sprite *sprite);
|
||||||
void sub_80A7144(struct Sprite *sprite);
|
static void sub_80A8DFC(struct Sprite *sprite);
|
||||||
void sub_80A791C(struct Sprite *sprite);
|
static void sub_80A8E88(struct Sprite *sprite);
|
||||||
void sub_80A8DFC(struct Sprite *sprite);
|
static u16 GetBattlerYDeltaFromSpriteId(u8 spriteId);
|
||||||
void sub_80A8E88(struct Sprite *sprite);
|
static void AnimTask_BlendMonInAndOutSetup(struct Task *task);
|
||||||
void SetBattlerSpriteYOffsetFromYScale(u8 spriteId);
|
static void sub_80A7AFC(u8 taskId);
|
||||||
u16 GetBattlerYDeltaFromSpriteId(u8 spriteId);
|
static void sub_80A8CAC(u8 taskId);
|
||||||
void AnimTask_BlendMonInAndOutSetup(struct Task *task);
|
static void AnimTask_BlendMonInAndOutStep(u8 taskId);
|
||||||
void sub_80A7AFC(u8 taskId);
|
static bool8 sub_80A7238(void);
|
||||||
void sub_80A8CAC(u8 taskId);
|
static void sub_80A8D78(struct Task *task, u8 taskId);
|
||||||
void AnimTask_BlendMonInAndOutStep(u8 taskId);
|
|
||||||
bool8 sub_80A7238(void);
|
|
||||||
void sub_80A8D78(struct Task *task, u8 taskId);
|
|
||||||
|
|
||||||
// EWRAM vars
|
// EWRAM vars
|
||||||
EWRAM_DATA static union AffineAnimCmd *gAnimTaskAffineAnim = NULL;
|
EWRAM_DATA static union AffineAnimCmd *gAnimTaskAffineAnim = NULL;
|
||||||
@ -503,7 +500,7 @@ void sub_80A63C8(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6450(struct Sprite *sprite)
|
void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[3])
|
if (sprite->data[3])
|
||||||
{
|
{
|
||||||
@ -533,28 +530,28 @@ void WaitAnimForDuration(struct Sprite *sprite)
|
|||||||
SetCallbackToStoredInData6(sprite);
|
SetCallbackToStoredInData6(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A64D0(struct Sprite *sprite)
|
static void sub_80A64D0(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sub_80A64EC(sprite);
|
sub_80A64EC(sprite);
|
||||||
sprite->callback = TranslateSpriteOverDuration;
|
sprite->callback = TranslateSpriteLinear;
|
||||||
sprite->callback(sprite);
|
sprite->callback(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A64EC(struct Sprite *sprite)
|
void sub_80A64EC(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
s16 old;
|
s16 old;
|
||||||
int v1;
|
int xDiff;
|
||||||
|
|
||||||
if (sprite->data[1] > sprite->data[2])
|
if (sprite->data[1] > sprite->data[2])
|
||||||
sprite->data[0] = -sprite->data[0];
|
sprite->data[0] = -sprite->data[0];
|
||||||
v1 = sprite->data[2] - sprite->data[1];
|
xDiff = sprite->data[2] - sprite->data[1];
|
||||||
old = sprite->data[0];
|
old = sprite->data[0];
|
||||||
sprite->data[0] = abs(v1 / sprite->data[0]);
|
sprite->data[0] = abs(xDiff / sprite->data[0]);
|
||||||
sprite->data[2] = (sprite->data[4] - sprite->data[3]) / sprite->data[0];
|
sprite->data[2] = (sprite->data[4] - sprite->data[3]) / sprite->data[0];
|
||||||
sprite->data[1] = old;
|
sprite->data[1] = old;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranslateSpriteOverDuration(struct Sprite *sprite)
|
void TranslateSpriteLinear(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] > 0)
|
if (sprite->data[0] > 0)
|
||||||
{
|
{
|
||||||
@ -568,7 +565,7 @@ void TranslateSpriteOverDuration(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTranslateLinearSimple(struct Sprite *sprite)
|
void TranslateSpriteLinearFixedPoint(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] > 0)
|
if (sprite->data[0] > 0)
|
||||||
{
|
{
|
||||||
@ -584,7 +581,7 @@ void AnimTranslateLinearSimple(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A65A8(struct Sprite *sprite)
|
static void TranslateSpriteLinearFixedPointIconFrame(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] > 0)
|
if (sprite->data[0] > 0)
|
||||||
{
|
{
|
||||||
@ -598,6 +595,7 @@ void sub_80A65A8(struct Sprite *sprite)
|
|||||||
{
|
{
|
||||||
SetCallbackToStoredInData6(sprite);
|
SetCallbackToStoredInData6(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateMonIconFrame(sprite);
|
UpdateMonIconFrame(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -605,12 +603,12 @@ void sub_80A65EC(struct Sprite *sprite)
|
|||||||
{
|
{
|
||||||
sprite->data[1] = sprite->pos1.x + sprite->pos2.x;
|
sprite->data[1] = sprite->pos1.x + sprite->pos2.x;
|
||||||
sprite->data[3] = sprite->pos1.y + sprite->pos2.y;
|
sprite->data[3] = sprite->pos1.y + sprite->pos2.y;
|
||||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2);
|
||||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET);
|
||||||
sprite->callback = sub_80A64D0;
|
sprite->callback = sub_80A64D0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TranslateMonBGUntil(struct Sprite *sprite)
|
void TranslateMonSpriteLinear(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] > 0)
|
if (sprite->data[0] > 0)
|
||||||
{
|
{
|
||||||
@ -624,9 +622,7 @@ void TranslateMonBGUntil(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as TranslateMonBGUntil, but it operates on sub-pixel values
|
void TranslateMonSpriteLinearFixedPoint(struct Sprite *sprite)
|
||||||
// to handle slower translations.
|
|
||||||
void sub_80A6680(struct Sprite *sprite)
|
|
||||||
{
|
{
|
||||||
if (sprite->data[0] > 0)
|
if (sprite->data[0] > 0)
|
||||||
{
|
{
|
||||||
@ -642,7 +638,7 @@ void sub_80A6680(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A66DC(struct Sprite *sprite)
|
void TranslateSpriteLinearAndFlicker(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (sprite->data[0] > 0)
|
if (sprite->data[0] > 0)
|
||||||
{
|
{
|
||||||
@ -673,8 +669,8 @@ void sub_80A6760(struct Sprite *sprite)
|
|||||||
{
|
{
|
||||||
sprite->data[1] = sprite->pos1.x + sprite->pos2.x;
|
sprite->data[1] = sprite->pos1.x + sprite->pos2.x;
|
||||||
sprite->data[3] = sprite->pos1.y + sprite->pos2.y;
|
sprite->data[3] = sprite->pos1.y + sprite->pos2.y;
|
||||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
||||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
|
||||||
sprite->callback = sub_80A64D0;
|
sprite->callback = sub_80A64D0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,7 +692,7 @@ void RunStoredCallbackWhenAnimEnds(struct Sprite *sprite)
|
|||||||
SetCallbackToStoredInData6(sprite);
|
SetCallbackToStoredInData6(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A67F4(struct Sprite *sprite)
|
void DestroyAnimSpriteAndDisableBlend(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||||
@ -749,7 +745,7 @@ void InitAnimArcTranslation(struct Sprite *sprite)
|
|||||||
sprite->data[7] = 0;
|
sprite->data[7] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 TranslateAnimArc(struct Sprite *sprite)
|
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (AnimTranslateLinear(sprite))
|
if (AnimTranslateLinear(sprite))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -758,7 +754,7 @@ bool8 TranslateAnimArc(struct Sprite *sprite)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_80A6934(struct Sprite *sprite)
|
bool8 TranslateAnimVerticalArc(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (AnimTranslateLinear(sprite))
|
if (AnimTranslateLinear(sprite))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -767,7 +763,7 @@ bool8 sub_80A6934(struct Sprite *sprite)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void oamt_add_pos2_onto_pos1(struct Sprite *sprite)
|
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->pos1.x += sprite->pos2.x;
|
sprite->pos1.x += sprite->pos2.x;
|
||||||
sprite->pos1.y += sprite->pos2.y;
|
sprite->pos1.y += sprite->pos2.y;
|
||||||
@ -862,38 +858,38 @@ bool8 IsDoubleBattle(void)
|
|||||||
return IS_DOUBLE_BATTLE();
|
return IS_DOUBLE_BATTLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6B30(struct UnknownAnimStruct2 *unk)
|
void sub_80A6B30(struct BattleAnimBgData *unk)
|
||||||
{
|
{
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
unk->bgTiles = gUnknown_0202305C;
|
unk->bgTiles = gUnknown_0202305C;
|
||||||
unk->unk4 = (u16 *)gUnknown_02023060;
|
unk->bgTilemap = (u16 *)gUnknown_02023060;
|
||||||
unk->unk8 = 0xe;
|
unk->paletteId = 14;
|
||||||
unk->bgId = 1;
|
unk->bgId = 1;
|
||||||
unk->tilesOffset = 0;
|
unk->tilesOffset = 0;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unk->bgTiles = gUnknown_0202305C;
|
unk->bgTiles = gUnknown_0202305C;
|
||||||
unk->unk4 = (u16 *)gUnknown_02023060;
|
unk->bgTilemap = (u16 *)gUnknown_02023060;
|
||||||
unk->unk8 = 0x8;
|
unk->paletteId = 8;
|
||||||
unk->bgId = 1;
|
unk->bgId = 1;
|
||||||
unk->tilesOffset = 0x200;
|
unk->tilesOffset = 0x200;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6B90(struct UnknownAnimStruct2 *unk, u32 arg1)
|
void sub_80A6B90(struct BattleAnimBgData *unk, u32 arg1)
|
||||||
{
|
{
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
unk->bgTiles = gUnknown_0202305C;
|
unk->bgTiles = gUnknown_0202305C;
|
||||||
unk->unk4 = (u16 *)gUnknown_02023060;
|
unk->bgTilemap = (u16 *)gUnknown_02023060;
|
||||||
unk->unk8 = 0xe;
|
unk->paletteId = 14;
|
||||||
unk->bgId = 1;
|
unk->bgId = 1;
|
||||||
unk->tilesOffset = 0;
|
unk->tilesOffset = 0;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
else if (arg1 == 1)
|
else if (arg1 == 1)
|
||||||
{
|
{
|
||||||
@ -902,76 +898,76 @@ void sub_80A6B90(struct UnknownAnimStruct2 *unk, u32 arg1)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
unk->bgTiles = gUnknown_0202305C;
|
unk->bgTiles = gUnknown_0202305C;
|
||||||
unk->unk4 = (u16 *)gUnknown_02023060;
|
unk->bgTilemap = (u16 *)gUnknown_02023060;
|
||||||
unk->unk8 = 0x9;
|
unk->paletteId = 9;
|
||||||
unk->bgId = 2;
|
unk->bgId = 2;
|
||||||
unk->tilesOffset = 0x300;
|
unk->tilesOffset = 0x300;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6BFC(struct UnknownAnimStruct2 *unk, u8 unused)
|
void sub_80A6BFC(struct BattleAnimBgData *unk, u8 unused)
|
||||||
{
|
{
|
||||||
unk->bgTiles = gUnknown_0202305C;
|
unk->bgTiles = gUnknown_0202305C;
|
||||||
unk->unk4 = (u16 *)gUnknown_02023060;
|
unk->bgTilemap = (u16 *)gUnknown_02023060;
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
unk->unk8 = 0xe;
|
unk->paletteId = 14;
|
||||||
unk->bgId = 1;
|
unk->bgId = 1;
|
||||||
unk->tilesOffset = 0;
|
unk->tilesOffset = 0;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
else if (GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) == 1)
|
else if (GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) == 1)
|
||||||
{
|
{
|
||||||
unk->unk8 = 8;
|
unk->paletteId = 8;
|
||||||
unk->bgId = 1;
|
unk->bgId = 1;
|
||||||
unk->tilesOffset = 0x200;
|
unk->tilesOffset = 0x200;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unk->unk8 = 0x9;
|
unk->paletteId = 9;
|
||||||
unk->bgId = 2;
|
unk->bgId = 2;
|
||||||
unk->tilesOffset = 0x300;
|
unk->tilesOffset = 0x300;
|
||||||
unk->unkC = 0;
|
unk->unused = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6C68(u32 bgId)
|
void sub_80A6C68(u32 bgId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unkStruct;
|
struct BattleAnimBgData unkStruct;
|
||||||
|
|
||||||
sub_80A6B90(&unkStruct, bgId);
|
sub_80A6B90(&unkStruct, bgId);
|
||||||
CpuFill32(0, unkStruct.bgTiles, 0x2000);
|
CpuFill32(0, unkStruct.bgTiles, 0x2000);
|
||||||
LoadBgTiles(unkStruct.bgId, unkStruct.bgTiles, 0x2000, unkStruct.tilesOffset);
|
LoadBgTiles(unkStruct.bgId, unkStruct.bgTiles, 0x2000, unkStruct.tilesOffset);
|
||||||
FillBgTilemapBufferRect(unkStruct.bgId, 0, 0, 0, 0x20, 0x40, 0x11);
|
FillBgTilemapBufferRect(unkStruct.bgId, 0, 0, 0, 32, 64, 17);
|
||||||
CopyBgTilemapBufferToVram(unkStruct.bgId);
|
CopyBgTilemapBufferToVram(unkStruct.bgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6CC0(u32 bgId, const u32 *src, u32 tilesOffset)
|
void AnimLoadCompressedBgGfx(u32 bgId, const u32 *src, u32 tilesOffset)
|
||||||
{
|
{
|
||||||
CpuFill32(0, gUnknown_0202305C, 0x2000);
|
CpuFill32(0, gUnknown_0202305C, 0x2000);
|
||||||
LZDecompressWram(src, gUnknown_0202305C);
|
LZDecompressWram(src, gUnknown_0202305C);
|
||||||
LoadBgTiles(bgId, gUnknown_0202305C, 0x2000, tilesOffset);
|
LoadBgTiles(bgId, gUnknown_0202305C, 0x2000, tilesOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6D10(u32 bgId, const void *src)
|
static void InitAnimBgTilemapBuffer(u32 bgId, const void *src)
|
||||||
{
|
{
|
||||||
FillBgTilemapBufferRect(bgId, 0, 0, 0, 0x20, 0x40, 0x11);
|
FillBgTilemapBufferRect(bgId, 0, 0, 0, 32, 64, 17);
|
||||||
CopyToBgTilemapBuffer(bgId, src, 0, 0);
|
CopyToBgTilemapBuffer(bgId, src, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6D48(u32 bgId, const void *src)
|
void AnimLoadCompressedBgTilemap(u32 bgId, const void *src)
|
||||||
{
|
{
|
||||||
sub_80A6D10(bgId, src);
|
InitAnimBgTilemapBuffer(bgId, src);
|
||||||
CopyBgTilemapBufferToVram(bgId);
|
CopyBgTilemapBufferToVram(bgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6D60(struct UnknownAnimStruct2 *unk, const void *src, u32 arg2)
|
void sub_80A6D60(struct BattleAnimBgData *unk, const void *src, u32 arg2)
|
||||||
{
|
{
|
||||||
sub_80A6D10(unk->bgId, src);
|
InitAnimBgTilemapBuffer(unk->bgId, src);
|
||||||
if (IsContest() == TRUE)
|
if (IsContest() == TRUE)
|
||||||
sub_80A4720(unk->unk8, unk->unk4, 0, arg2);
|
sub_80A4720(unk->paletteId, unk->bgTilemap, 0, arg2);
|
||||||
CopyBgTilemapBufferToVram(unk->bgId);
|
CopyBgTilemapBufferToVram(unk->bgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1002,7 +998,7 @@ void sub_80A6DEC(struct Sprite *sprite)
|
|||||||
sprite->data[1] = sprite->pos1.x;
|
sprite->data[1] = sprite->pos1.x;
|
||||||
sprite->data[3] = sprite->pos1.y;
|
sprite->data[3] = sprite->pos1.y;
|
||||||
InitSpriteDataForLinearTranslation(sprite);
|
InitSpriteDataForLinearTranslation(sprite);
|
||||||
sprite->callback = sub_80A65A8;
|
sprite->callback = TranslateSpriteLinearFixedPointIconFrame;
|
||||||
sprite->callback(sprite);
|
sprite->callback(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1098,7 +1094,7 @@ void sub_80A6F98(struct Sprite *sprite)
|
|||||||
SetCallbackToStoredInData6(sprite);
|
SetCallbackToStoredInData6(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A6FB4(struct Sprite *sprite)
|
static void sub_80A6FB4(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sub_8039E9C(sprite);
|
sub_8039E9C(sprite);
|
||||||
if (AnimTranslateLinear(sprite))
|
if (AnimTranslateLinear(sprite))
|
||||||
@ -1188,7 +1184,7 @@ bool8 AnimFastTranslateLinear(struct Sprite *sprite)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A7144(struct Sprite *sprite)
|
static void sub_80A7144(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (AnimFastTranslateLinear(sprite))
|
if (AnimFastTranslateLinear(sprite))
|
||||||
SetCallbackToStoredInData6(sprite);
|
SetCallbackToStoredInData6(sprite);
|
||||||
@ -1229,7 +1225,7 @@ void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation)
|
|||||||
gOamMatrices[i].d = matrix.d;
|
gOamMatrices[i].d = matrix.d;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_80A7238(void)
|
static bool8 sub_80A7238(void)
|
||||||
{
|
{
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
@ -1352,56 +1348,57 @@ void SetGreyscaleOrOriginalPalette(u16 paletteNum, bool8 restoreOriginalColor)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 sub_80A75AC(u8 a1, u8 a2, u8 a3, u8 a4, u8 a5, u8 a6, u8 a7)
|
u32 sub_80A75AC(u8 battleBackground, u8 attacker, u8 target, u8 attackerPartner, u8 targetPartner, u8 a6, u8 a7)
|
||||||
{
|
{
|
||||||
u32 var = 0;
|
u32 selectedPalettes = 0;
|
||||||
u32 shift;
|
u32 shift;
|
||||||
|
|
||||||
if (a1)
|
if (battleBackground)
|
||||||
{
|
{
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
var = 0xe;
|
selectedPalettes = 0xe;
|
||||||
else
|
else
|
||||||
var = 1 << sub_80A6D94();
|
selectedPalettes = 1 << sub_80A6D94();
|
||||||
}
|
}
|
||||||
if (a2)
|
if (attacker)
|
||||||
{
|
{
|
||||||
shift = gBattleAnimAttacker + 16;
|
shift = gBattleAnimAttacker + 16;
|
||||||
var |= 1 << shift;
|
selectedPalettes |= 1 << shift;
|
||||||
}
|
}
|
||||||
if (a3) {
|
if (target)
|
||||||
shift = gBattleAnimTarget + 16;
|
|
||||||
var |= 1 << shift;
|
|
||||||
}
|
|
||||||
if (a4)
|
|
||||||
{
|
{
|
||||||
if (IsBattlerSpriteVisible(gBattleAnimAttacker ^ 2))
|
shift = gBattleAnimTarget + 16;
|
||||||
|
selectedPalettes |= 1 << shift;
|
||||||
|
}
|
||||||
|
if (attackerPartner)
|
||||||
|
{
|
||||||
|
if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
|
||||||
{
|
{
|
||||||
shift = (gBattleAnimAttacker ^ 2) + 16;
|
shift = BATTLE_PARTNER(gBattleAnimAttacker) + 16;
|
||||||
var |= 1 << shift;
|
selectedPalettes |= 1 << shift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (a5)
|
if (targetPartner)
|
||||||
{
|
{
|
||||||
if (IsBattlerSpriteVisible(gBattleAnimTarget ^ 2))
|
if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget)))
|
||||||
{
|
{
|
||||||
shift = (gBattleAnimTarget ^ 2) + 16;
|
shift = BATTLE_PARTNER(gBattleAnimTarget) + 16;
|
||||||
var |= 1 << shift;
|
selectedPalettes |= 1 << shift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (a6)
|
if (a6)
|
||||||
{
|
{
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
var |= 0x100;
|
selectedPalettes |= 0x100;
|
||||||
else
|
else
|
||||||
var |= 0x4000;
|
selectedPalettes |= 0x4000;
|
||||||
}
|
}
|
||||||
if (a7)
|
if (a7)
|
||||||
{
|
{
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
var |= 0x200;
|
selectedPalettes |= 0x200;
|
||||||
}
|
}
|
||||||
return var;
|
return selectedPalettes;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 sub_80A76C4(u8 a1, u8 a2, u8 a3, u8 a4)
|
u32 sub_80A76C4(u8 a1, u8 a2, u8 a3, u8 a4)
|
||||||
@ -1459,7 +1456,7 @@ u8 sub_80A77AC(u8 a1)
|
|||||||
return a1;
|
return a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 sub_80A77B4(u8 position)
|
static u8 GetBattlerAtPosition_(u8 position)
|
||||||
{
|
{
|
||||||
return GetBattlerAtPosition(position);
|
return GetBattlerAtPosition(position);
|
||||||
}
|
}
|
||||||
@ -1527,33 +1524,33 @@ void sub_80A78AC(struct Sprite *sprite)
|
|||||||
if (GetBattlerSide(gBattleAnimAttacker))
|
if (GetBattlerSide(gBattleAnimAttacker))
|
||||||
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
sprite->data[0] = gBattleAnimArgs[4];
|
sprite->data[0] = gBattleAnimArgs[4];
|
||||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
|
||||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3];
|
||||||
sprite->data[5] = gBattleAnimArgs[5];
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
InitAnimArcTranslation(sprite);
|
InitAnimArcTranslation(sprite);
|
||||||
sprite->callback = sub_80A791C;
|
sprite->callback = sub_80A791C;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A791C(struct Sprite *sprite)
|
static void sub_80A791C(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A7938(struct Sprite *sprite)
|
void sub_80A7938(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
bool8 r4;
|
bool8 r4;
|
||||||
u8 battlerId, attributeId;
|
u8 battlerId, coordType;
|
||||||
|
|
||||||
if (!gBattleAnimArgs[6])
|
if (!gBattleAnimArgs[6])
|
||||||
{
|
{
|
||||||
r4 = TRUE;
|
r4 = TRUE;
|
||||||
attributeId = BATTLER_COORD_Y_PIC_OFFSET;
|
coordType = BATTLER_COORD_Y_PIC_OFFSET;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
r4 = FALSE;
|
r4 = FALSE;
|
||||||
attributeId = BATTLER_COORD_Y;
|
coordType = BATTLER_COORD_Y;
|
||||||
}
|
}
|
||||||
if (!gBattleAnimArgs[5])
|
if (!gBattleAnimArgs[5])
|
||||||
{
|
{
|
||||||
@ -1570,7 +1567,7 @@ void sub_80A7938(struct Sprite *sprite)
|
|||||||
InitSpritePosToAnimTarget(sprite, r4);
|
InitSpritePosToAnimTarget(sprite, r4);
|
||||||
sprite->data[0] = gBattleAnimArgs[4];
|
sprite->data[0] = gBattleAnimArgs[4];
|
||||||
sprite->data[2] = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
|
sprite->data[2] = GetBattlerSpriteCoord(battlerId, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
|
||||||
sprite->data[4] = GetBattlerSpriteCoord(battlerId, attributeId) + gBattleAnimArgs[3];
|
sprite->data[4] = GetBattlerSpriteCoord(battlerId, coordType) + gBattleAnimArgs[3];
|
||||||
sprite->callback = StartAnimLinearTranslation;
|
sprite->callback = StartAnimLinearTranslation;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
@ -1629,7 +1626,7 @@ void sub_80A7A74(u8 taskId)
|
|||||||
gTasks[taskId].func = sub_80A7AFC;
|
gTasks[taskId].func = sub_80A7AFC;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A7AFC(u8 taskId)
|
static void sub_80A7AFC(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
@ -1674,7 +1671,7 @@ void AnimTask_BlendMonInAndOut(u8 task)
|
|||||||
AnimTask_BlendMonInAndOutSetup(&gTasks[task]);
|
AnimTask_BlendMonInAndOutSetup(&gTasks[task]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTask_BlendMonInAndOutSetup(struct Task *task)
|
static void AnimTask_BlendMonInAndOutSetup(struct Task *task)
|
||||||
{
|
{
|
||||||
task->data[1] = gBattleAnimArgs[1];
|
task->data[1] = gBattleAnimArgs[1];
|
||||||
task->data[2] = 0;
|
task->data[2] = 0;
|
||||||
@ -1686,7 +1683,7 @@ void AnimTask_BlendMonInAndOutSetup(struct Task *task)
|
|||||||
task->func = AnimTask_BlendMonInAndOutStep;
|
task->func = AnimTask_BlendMonInAndOutStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTask_BlendMonInAndOutStep(u8 taskId)
|
static void AnimTask_BlendMonInAndOutStep(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
|
|
||||||
@ -1844,7 +1841,7 @@ void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId)
|
|||||||
gSprites[spriteId].pos2.y = (var - var2) / 2;
|
gSprites[spriteId].pos2.y = (var - var2) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 GetBattlerYDeltaFromSpriteId(u8 spriteId)
|
static u16 GetBattlerYDeltaFromSpriteId(u8 spriteId)
|
||||||
{
|
{
|
||||||
struct BattleSpriteInfo *spriteInfo;
|
struct BattleSpriteInfo *spriteInfo;
|
||||||
u8 battlerId = gSprites[spriteId].data[0];
|
u8 battlerId = gSprites[spriteId].data[0];
|
||||||
@ -2300,7 +2297,7 @@ void sub_80A8A6C(struct Sprite *sprite)
|
|||||||
sprite->data[3] = gBattleAnimArgs[4];
|
sprite->data[3] = gBattleAnimArgs[4];
|
||||||
sprite->data[5] = gBattleAnimArgs[5];
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
sprite->callback = sub_80A66DC;
|
sprite->callback = TranslateSpriteLinearAndFlicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8AEC(struct Sprite *sprite)
|
void sub_80A8AEC(struct Sprite *sprite)
|
||||||
@ -2321,7 +2318,7 @@ void sub_80A8AEC(struct Sprite *sprite)
|
|||||||
sprite->data[5] = gBattleAnimArgs[5];
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
StartSpriteAnim(sprite, gBattleAnimArgs[6]);
|
StartSpriteAnim(sprite, gBattleAnimArgs[6]);
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
sprite->callback = sub_80A66DC;
|
sprite->callback = TranslateSpriteLinearAndFlicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8B64(struct Sprite *sprite)
|
void sub_80A8B64(struct Sprite *sprite)
|
||||||
@ -2362,7 +2359,7 @@ void sub_80A8BC4(u8 taskId)
|
|||||||
task->func = sub_80A8CAC;
|
task->func = sub_80A8CAC;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8CAC(u8 taskId)
|
static void sub_80A8CAC(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
switch (task->data[2])
|
switch (task->data[2])
|
||||||
@ -2395,7 +2392,7 @@ void sub_80A8CAC(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8D78(struct Task *task, u8 taskId)
|
static void sub_80A8D78(struct Task *task, u8 taskId)
|
||||||
{
|
{
|
||||||
s16 spriteId = CloneBattlerSpriteWithBlend(0);
|
s16 spriteId = CloneBattlerSpriteWithBlend(0);
|
||||||
if (spriteId >= 0)
|
if (spriteId >= 0)
|
||||||
@ -2411,7 +2408,7 @@ void sub_80A8D78(struct Task *task, u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8DFC(struct Sprite *sprite)
|
static void sub_80A8DFC(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (--sprite->data[0] == 0)
|
if (--sprite->data[0] == 0)
|
||||||
{
|
{
|
||||||
@ -2432,7 +2429,7 @@ void sub_80A8E30(struct Sprite *sprite)
|
|||||||
sprite->callback = sub_80A8E88;
|
sprite->callback = sub_80A8E88;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_80A8E88(struct Sprite *sprite)
|
static void sub_80A8E88(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[2] += sprite->data[0];
|
sprite->data[2] += sprite->data[0];
|
||||||
sprite->data[3] += sprite->data[1];
|
sprite->data[3] += sprite->data[1];
|
||||||
|
@ -441,14 +441,14 @@ static void DoHorizontalLunge(struct Sprite *sprite)
|
|||||||
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
|
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
|
||||||
sprite->data[4] = gBattleAnimArgs[0];
|
sprite->data[4] = gBattleAnimArgs[0];
|
||||||
StoreSpriteCallbackInData6(sprite, ReverseHorizontalLungeDirection);
|
StoreSpriteCallbackInData6(sprite, ReverseHorizontalLungeDirection);
|
||||||
sprite->callback = TranslateMonBGUntil;
|
sprite->callback = TranslateMonSpriteLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ReverseHorizontalLungeDirection(struct Sprite *sprite)
|
static void ReverseHorizontalLungeDirection(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0] = sprite->data[4];
|
sprite->data[0] = sprite->data[4];
|
||||||
sprite->data[1] = -sprite->data[1];
|
sprite->data[1] = -sprite->data[1];
|
||||||
sprite->callback = TranslateMonBGUntil;
|
sprite->callback = TranslateMonSpriteLinear;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,14 +468,14 @@ static void DoVerticalDip(struct Sprite *sprite)
|
|||||||
sprite->data[3] = spriteId;
|
sprite->data[3] = spriteId;
|
||||||
sprite->data[4] = gBattleAnimArgs[0];
|
sprite->data[4] = gBattleAnimArgs[0];
|
||||||
StoreSpriteCallbackInData6(sprite, ReverseVerticalDipDirection);
|
StoreSpriteCallbackInData6(sprite, ReverseVerticalDipDirection);
|
||||||
sprite->callback = TranslateMonBGUntil;
|
sprite->callback = TranslateMonSpriteLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ReverseVerticalDipDirection(struct Sprite *sprite)
|
static void ReverseVerticalDipDirection(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0] = sprite->data[4];
|
sprite->data[0] = sprite->data[4];
|
||||||
sprite->data[2] = -sprite->data[2];
|
sprite->data[2] = -sprite->data[2];
|
||||||
sprite->callback = TranslateMonBGUntil;
|
sprite->callback = TranslateMonSpriteLinear;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,7 +581,7 @@ static void SlideMonToOffset(struct Sprite *sprite)
|
|||||||
sprite->data[5] = monSpriteId;
|
sprite->data[5] = monSpriteId;
|
||||||
sprite->invisible = TRUE;
|
sprite->invisible = TRUE;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
sprite->callback = sub_80A6680;
|
sprite->callback = TranslateMonSpriteLinearFixedPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_80D5B48(struct Sprite *sprite)
|
static void sub_80D5B48(struct Sprite *sprite)
|
||||||
@ -624,7 +624,7 @@ static void sub_80D5B48(struct Sprite *sprite)
|
|||||||
{
|
{
|
||||||
StoreSpriteCallbackInData6(sprite, sub_80D5C20);
|
StoreSpriteCallbackInData6(sprite, sub_80D5C20);
|
||||||
}
|
}
|
||||||
sprite->callback = sub_80A6680;
|
sprite->callback = TranslateMonSpriteLinearFixedPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ extern const struct SpriteTemplate gMiniTwinklingStarSpriteTemplate;
|
|||||||
|
|
||||||
void unref_sub_8170478(u8 taskId)
|
void unref_sub_8170478(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData unknownStruct;
|
||||||
u8 healthBoxSpriteId;
|
u8 healthBoxSpriteId;
|
||||||
u8 battler;
|
u8 battler;
|
||||||
u8 spriteId1, spriteId2, spriteId3, spriteId4;
|
u8 spriteId1, spriteId2, spriteId3, spriteId4;
|
||||||
@ -426,9 +426,9 @@ void unref_sub_8170478(u8 taskId)
|
|||||||
gSprites[spriteId4].callback = SpriteCallbackDummy;
|
gSprites[spriteId4].callback = SpriteCallbackDummy;
|
||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&unknownStruct);
|
||||||
sub_80A6D48(unknownStruct.bgId, gUnknown_08C2EA9C);
|
AnimLoadCompressedBgTilemap(unknownStruct.bgId, gUnknown_08C2EA9C);
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08C2EA50, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(unknownStruct.bgId, gUnknown_08C2EA50, unknownStruct.tilesOffset);
|
||||||
LoadCompressedPalette(gCureBubblesPal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gCureBubblesPal, unknownStruct.paletteId << 4, 32);
|
||||||
|
|
||||||
gBattle_BG1_X = -gSprites[spriteId3].pos1.x + 32;
|
gBattle_BG1_X = -gSprites[spriteId3].pos1.x + 32;
|
||||||
gBattle_BG1_Y = -gSprites[spriteId3].pos1.y - 32;
|
gBattle_BG1_Y = -gSprites[spriteId3].pos1.y - 32;
|
||||||
@ -806,7 +806,7 @@ static void sub_8171134(struct Sprite *sprite)
|
|||||||
u8 ballId;
|
u8 ballId;
|
||||||
int ballId2; // extra var needed to match
|
int ballId2; // extra var needed to match
|
||||||
|
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
if (gBattleSpritesDataPtr->animationData->ballThrowCaseId == BALL_TRAINER_BLOCK)
|
if (gBattleSpritesDataPtr->animationData->ballThrowCaseId == BALL_TRAINER_BLOCK)
|
||||||
{
|
{
|
||||||
@ -1276,7 +1276,7 @@ static void sub_81719EC(struct Sprite *sprite)
|
|||||||
static void sub_8171AAC(struct Sprite *sprite)
|
static void sub_8171AAC(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->invisible = !sprite->invisible;
|
sprite->invisible = !sprite->invisible;
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroySprite(sprite);
|
DestroySprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2206,7 +2206,7 @@ static void sub_817339C(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void sub_81733D4(struct Sprite *sprite)
|
static void sub_81733D4(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
sprite->data[0] = 0;
|
sprite->data[0] = 0;
|
||||||
sprite->invisible = 1;
|
sprite->invisible = 1;
|
||||||
|
@ -2326,7 +2326,7 @@ void AnimAbsorptionOrb(struct Sprite* sprite)
|
|||||||
|
|
||||||
static void AnimAbsorptionOrbStep(struct Sprite* sprite)
|
static void AnimAbsorptionOrbStep(struct Sprite* sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2401,7 +2401,7 @@ void AnimLeechSeed(struct Sprite* sprite)
|
|||||||
|
|
||||||
static void AnimLeechSeedStep(struct Sprite* sprite)
|
static void AnimLeechSeedStep(struct Sprite* sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
sprite->invisible = 1;
|
sprite->invisible = 1;
|
||||||
sprite->data[0] = 10;
|
sprite->data[0] = 10;
|
||||||
@ -2662,7 +2662,7 @@ static void AnimTranslateLinearSingleSineWaveStep(struct Sprite* sprite)
|
|||||||
s16 r0;
|
s16 r0;
|
||||||
|
|
||||||
sprite->data[0] = 1;
|
sprite->data[0] = 1;
|
||||||
TranslateAnimArc(sprite);
|
TranslateAnimHorizontalArc(sprite);
|
||||||
r0 = sprite->data[7];
|
r0 = sprite->data[7];
|
||||||
sprite->data[0] = a;
|
sprite->data[0] = a;
|
||||||
if (b > 200 && r0 < 56 && sprite->oam.affineParam == 0)
|
if (b > 200 && r0 < 56 && sprite->oam.affineParam == 0)
|
||||||
@ -3325,7 +3325,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
{
|
{
|
||||||
case 4:
|
case 4:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
task->data[15] = 5;
|
task->data[15] = 5;
|
||||||
task->data[0] = 0xFF;
|
task->data[0] = 0xFF;
|
||||||
@ -3333,7 +3333,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
task->data[15] = 9;
|
task->data[15] = 9;
|
||||||
task->data[0] = 0xFF;
|
task->data[0] = 0xFF;
|
||||||
@ -3341,7 +3341,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
task->data[15] = 1;
|
task->data[15] = 1;
|
||||||
task->data[0] = 0xFF;
|
task->data[0] = 0xFF;
|
||||||
@ -3367,7 +3367,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
task->data[15] = 3;
|
task->data[15] = 3;
|
||||||
task->data[0] = 0xFF;
|
task->data[0] = 0xFF;
|
||||||
@ -3410,7 +3410,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
task->data[15] = 7;
|
task->data[15] = 7;
|
||||||
task->data[0] = 0xFF;
|
task->data[0] = 0xFF;
|
||||||
@ -3453,7 +3453,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
task->data[15] = 11;
|
task->data[15] = 11;
|
||||||
task->data[0] = 0xFF;
|
task->data[0] = 0xFF;
|
||||||
@ -3481,7 +3481,7 @@ static void sub_8100128(u8 taskId)
|
|||||||
}
|
}
|
||||||
case 12:
|
case 12:
|
||||||
sub_8100524(task, taskId);
|
sub_8100524(task, taskId);
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
DestroySprite(sprite);
|
DestroySprite(sprite);
|
||||||
task->data[0]++;
|
task->data[0]++;
|
||||||
@ -3766,7 +3766,7 @@ void sub_8100A94(struct Sprite* sprite)
|
|||||||
sprite->data[5] = gBattleAnimArgs[5];
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
StartSpriteAffineAnim(sprite, gBattleAnimArgs[6]);
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[6]);
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
sprite->callback = sub_80A66DC;
|
sprite->callback = TranslateSpriteLinearAndFlicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moves the sprite in a diagonally slashing motion across the target mon.
|
// Moves the sprite in a diagonally slashing motion across the target mon.
|
||||||
@ -3995,7 +3995,7 @@ static void sub_8100FD4(struct Sprite *sprite)
|
|||||||
if (sprite->data[7] == 16)
|
if (sprite->data[7] == 16)
|
||||||
{
|
{
|
||||||
sprite->invisible = 1;
|
sprite->invisible = 1;
|
||||||
sprite->callback = sub_80A67F4;
|
sprite->callback = DestroyAnimSpriteAndDisableBlend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4121,7 +4121,7 @@ void sub_810130C(struct Sprite* sprite)
|
|||||||
sprite->data[1] = gBattleAnimArgs[3];
|
sprite->data[1] = gBattleAnimArgs[3];
|
||||||
sprite->data[2] = gBattleAnimArgs[4];
|
sprite->data[2] = gBattleAnimArgs[4];
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
sprite->callback = AnimTranslateLinearSimple;
|
sprite->callback = TranslateSpriteLinearFixedPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_810135C(struct Sprite* sprite)
|
void sub_810135C(struct Sprite* sprite)
|
||||||
@ -4158,7 +4158,7 @@ void sub_810135C(struct Sprite* sprite)
|
|||||||
sprite->data[1] = gBattleAnimArgs[3];
|
sprite->data[1] = gBattleAnimArgs[3];
|
||||||
sprite->data[2] = gBattleAnimArgs[4];
|
sprite->data[2] = gBattleAnimArgs[4];
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
sprite->callback = AnimTranslateLinearSimple;
|
sprite->callback = TranslateSpriteLinearFixedPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8101440(struct Sprite* sprite)
|
void sub_8101440(struct Sprite* sprite)
|
||||||
@ -4428,7 +4428,7 @@ static void sub_8101998(struct Sprite* sprite)
|
|||||||
sprite->data[2] = 0;
|
sprite->data[2] = 0;
|
||||||
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
|
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
|
||||||
StoreSpriteCallbackInData6(sprite, sub_81019E8);
|
StoreSpriteCallbackInData6(sprite, sub_81019E8);
|
||||||
sprite->callback = TranslateMonBGUntil;
|
sprite->callback = TranslateMonSpriteLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81019E8(struct Sprite* sprite)
|
static void sub_81019E8(struct Sprite* sprite)
|
||||||
@ -4458,7 +4458,7 @@ static void sub_8101A74(struct Sprite* sprite)
|
|||||||
sprite->data[2] = 0;
|
sprite->data[2] = 0;
|
||||||
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
|
sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker];
|
||||||
StoreSpriteCallbackInData6(sprite, sub_8101B84);
|
StoreSpriteCallbackInData6(sprite, sub_8101B84);
|
||||||
sprite->callback = TranslateMonBGUntil;
|
sprite->callback = TranslateMonSpriteLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8101AC4(struct Sprite* sprite)
|
static void sub_8101AC4(struct Sprite* sprite)
|
||||||
@ -4737,7 +4737,7 @@ static void sub_8102044(struct Sprite* sprite)
|
|||||||
sprite->data[1] = 8;
|
sprite->data[1] = 8;
|
||||||
sprite->data[2] = 0;
|
sprite->data[2] = 0;
|
||||||
StoreSpriteCallbackInData6(sprite, sub_810207C);
|
StoreSpriteCallbackInData6(sprite, sub_810207C);
|
||||||
sprite->callback = TranslateSpriteOverDuration;
|
sprite->callback = TranslateSpriteLinear;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1264,7 +1264,7 @@ void sub_8103448(struct Sprite *sprite)
|
|||||||
sprite->data[3] = gBattleAnimArgs[5];
|
sprite->data[3] = gBattleAnimArgs[5];
|
||||||
sprite->data[4] = gBattleAnimArgs[3];
|
sprite->data[4] = gBattleAnimArgs[3];
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
sprite->callback = sub_80A6450;
|
sprite->callback = TranslateSpriteInEllipseOverDuration;
|
||||||
sprite->callback(sprite);
|
sprite->callback(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2318,7 +2318,7 @@ void Anim_BreathPuff(struct Sprite *sprite)
|
|||||||
sprite->data[3] = 0;
|
sprite->data[3] = 0;
|
||||||
sprite->data[4] = 0;
|
sprite->data[4] = 0;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
sprite->callback = AnimTranslateLinearSimple;
|
sprite->callback = TranslateSpriteLinearFixedPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Animates an "angry" mark above a mon's head.
|
// Animates an "angry" mark above a mon's head.
|
||||||
@ -3291,7 +3291,7 @@ static void sub_810627C(struct Sprite *sprite)
|
|||||||
|
|
||||||
void sub_81062E8(u8 taskId)
|
void sub_81062E8(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND);
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||||
@ -3304,16 +3304,16 @@ void sub_81062E8(u8 taskId)
|
|||||||
gBattle_BG1_Y = 0;
|
gBattle_BG1_Y = 0;
|
||||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6CC0(unknownStruct.bgId, &gUnknown_08C232E0, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, &gUnknown_08C232E0, animBg.tilesOffset);
|
||||||
sub_80A6D60(&unknownStruct, &gUnknown_08C23D78, 0);
|
sub_80A6D60(&animBg, &gUnknown_08C23D78, 0);
|
||||||
LoadCompressedPalette(&gUnknown_08C23D50, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(&gUnknown_08C23D50, animBg.paletteId * 16, 32);
|
||||||
gTasks[taskId].func = sub_81063A8;
|
gTasks[taskId].func = sub_81063A8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81063A8(u8 taskId)
|
static void sub_81063A8(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
switch (gTasks[taskId].data[12])
|
switch (gTasks[taskId].data[12])
|
||||||
{
|
{
|
||||||
@ -3351,8 +3351,8 @@ static void sub_81063A8(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(unknownStruct.bgId);
|
sub_80A6C68(animBg.bgId);
|
||||||
gTasks[taskId].data[12]++;
|
gTasks[taskId].data[12]++;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@ -3369,7 +3369,7 @@ static void sub_81063A8(u8 taskId)
|
|||||||
|
|
||||||
void sub_81064F8(u8 taskId)
|
void sub_81064F8(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND);
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||||
@ -3382,22 +3382,22 @@ void sub_81064F8(u8 taskId)
|
|||||||
gBattle_BG1_Y = 0;
|
gBattle_BG1_Y = 0;
|
||||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
sub_80A6D60(&unknownStruct, &gBattleAnimBackgroundTilemap_ScaryFaceContest, 0);
|
sub_80A6D60(&animBg, &gBattleAnimBackgroundTilemap_ScaryFaceContest, 0);
|
||||||
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT)
|
else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT)
|
||||||
sub_80A6D60(&unknownStruct, &gBattleAnimBackgroundTilemap_ScaryFacePlayer, 0);
|
sub_80A6D60(&animBg, &gBattleAnimBackgroundTilemap_ScaryFacePlayer, 0);
|
||||||
else
|
else
|
||||||
sub_80A6D60(&unknownStruct, &gBattleAnimBackgroundTilemap_ScaryFaceOpponent, 0);
|
sub_80A6D60(&animBg, &gBattleAnimBackgroundTilemap_ScaryFaceOpponent, 0);
|
||||||
|
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08C249F8, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C249F8, animBg.tilesOffset);
|
||||||
LoadCompressedPalette(gUnknown_08C249D0, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gUnknown_08C249D0, animBg.paletteId * 16, 32);
|
||||||
gTasks[taskId].func = sub_81065EC;
|
gTasks[taskId].func = sub_81065EC;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81065EC(u8 taskId)
|
static void sub_81065EC(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
switch (gTasks[taskId].data[12])
|
switch (gTasks[taskId].data[12])
|
||||||
{
|
{
|
||||||
@ -3435,7 +3435,7 @@ static void sub_81065EC(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(1);
|
sub_80A6C68(1);
|
||||||
sub_80A6C68(2);
|
sub_80A6C68(2);
|
||||||
gTasks[taskId].data[12]++;
|
gTasks[taskId].data[12]++;
|
||||||
@ -3804,7 +3804,7 @@ void sub_8106F60(struct Sprite *sprite)
|
|||||||
sprite->callback = sub_8107018;
|
sprite->callback = sub_8107018;
|
||||||
|
|
||||||
sprite->data[0] = 0;
|
sprite->data[0] = 0;
|
||||||
oamt_add_pos2_onto_pos1(sprite);
|
SetSpritePrimaryCoordsFromSecondaryCoords(sprite);
|
||||||
sprite->data[2] = 5;
|
sprite->data[2] = 5;
|
||||||
sprite->data[4] = 0;
|
sprite->data[4] = 0;
|
||||||
sprite->data[3] = 0;
|
sprite->data[3] = 0;
|
||||||
|
@ -1453,7 +1453,7 @@ void sub_815A6C4(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void sub_815A73C(struct Sprite *sprite)
|
static void sub_815A73C(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
sprite->data[0] = 30;
|
sprite->data[0] = 30;
|
||||||
sprite->data[1] = 0;
|
sprite->data[1] = 0;
|
||||||
@ -2257,10 +2257,10 @@ void sub_815B7D0(u8 taskId)
|
|||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
u8 position;
|
u8 position;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
u8 *dest;
|
u8 *dest;
|
||||||
u8 *src;
|
u8 *src;
|
||||||
u16 *unk4;
|
u16 *bgTilemap;
|
||||||
u16 stretch;
|
u16 stretch;
|
||||||
|
|
||||||
switch (gTasks[taskId].data[0])
|
switch (gTasks[taskId].data[0])
|
||||||
@ -2288,7 +2288,7 @@ void sub_815B7D0(u8 taskId)
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, gTasks[taskId].data[10]);
|
HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, gTasks[taskId].data[10]);
|
||||||
sub_80A6BFC(&unknownStruct, gBattleAnimAttacker);
|
sub_80A6BFC(&animBg, gBattleAnimAttacker);
|
||||||
|
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
position = 0;
|
position = 0;
|
||||||
@ -2296,21 +2296,21 @@ void sub_815B7D0(u8 taskId)
|
|||||||
position = GetBattlerPosition(gBattleAnimAttacker);
|
position = GetBattlerPosition(gBattleAnimAttacker);
|
||||||
|
|
||||||
src = gMonSpritesGfxPtr->sprites[position] + (gBattleMonForms[gBattleAnimAttacker] << 11);
|
src = gMonSpritesGfxPtr->sprites[position] + (gBattleMonForms[gBattleAnimAttacker] << 11);
|
||||||
dest = unknownStruct.bgTiles;
|
dest = animBg.bgTiles;
|
||||||
CpuCopy32(src, dest, 0x800);
|
CpuCopy32(src, dest, 0x800);
|
||||||
LoadBgTiles(1, unknownStruct.bgTiles, 0x800, unknownStruct.tilesOffset);
|
LoadBgTiles(1, animBg.bgTiles, 0x800, animBg.tilesOffset);
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
if (IsSpeciesNotUnown(gContestResources->field_18->species) != IsSpeciesNotUnown(gContestResources->field_18->unk2))
|
if (IsSpeciesNotUnown(gContestResources->field_18->species) != IsSpeciesNotUnown(gContestResources->field_18->unk2))
|
||||||
{
|
{
|
||||||
unk4 = (u16 *)unknownStruct.unk4;
|
bgTilemap = (u16 *)animBg.bgTilemap;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 4; j++)
|
for (j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
u16 temp = unk4[j + i * 0x20];
|
u16 temp = bgTilemap[j + i * 0x20];
|
||||||
unk4[j + i * 0x20] = unk4[(7 - j) + i * 0x20];
|
bgTilemap[j + i * 0x20] = bgTilemap[(7 - j) + i * 0x20];
|
||||||
unk4[(7 - j) + i * 0x20] = temp;
|
bgTilemap[(7 - j) + i * 0x20] = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2318,7 +2318,7 @@ void sub_815B7D0(u8 taskId)
|
|||||||
{
|
{
|
||||||
for (j = 0; j < 8; j++)
|
for (j = 0; j < 8; j++)
|
||||||
{
|
{
|
||||||
unk4[j + i * 0x20] ^= 0x400;
|
bgTilemap[j + i * 0x20] ^= 0x400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2380,7 +2380,7 @@ void sub_815BB58(u8 taskId)
|
|||||||
|
|
||||||
void sub_815BB84(u8 taskId)
|
void sub_815BB84(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
switch (gTasks[taskId].data[0])
|
switch (gTasks[taskId].data[0])
|
||||||
{
|
{
|
||||||
@ -2392,8 +2392,8 @@ void sub_815BB84(u8 taskId)
|
|||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6D60(&unknownStruct, &gUnknown_08C2A6EC, 0);
|
sub_80A6D60(&animBg, &gUnknown_08C2A6EC, 0);
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
gBattle_BG1_X = -56;
|
gBattle_BG1_X = -56;
|
||||||
@ -2409,8 +2409,8 @@ void sub_815BB84(u8 taskId)
|
|||||||
gBattle_BG1_Y = 0;
|
gBattle_BG1_Y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08C2A634, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C2A634, animBg.tilesOffset);
|
||||||
LoadCompressedPalette(gUnknown_08C2A6D4, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gUnknown_08C2A6D4, animBg.paletteId * 16, 32);
|
||||||
|
|
||||||
gTasks[taskId].data[10] = gBattle_BG1_X;
|
gTasks[taskId].data[10] = gBattle_BG1_X;
|
||||||
gTasks[taskId].data[11] = gBattle_BG1_Y;
|
gTasks[taskId].data[11] = gBattle_BG1_Y;
|
||||||
@ -2455,8 +2455,8 @@ void sub_815BB84(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(unknownStruct.bgId);
|
sub_80A6C68(animBg.bgId);
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
||||||
|
|
||||||
@ -2571,7 +2571,7 @@ static void sub_815C050(struct Sprite *sprite)
|
|||||||
|
|
||||||
void sub_815C0A4(u8 taskId)
|
void sub_815C0A4(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
switch (gTasks[taskId].data[0])
|
switch (gTasks[taskId].data[0])
|
||||||
{
|
{
|
||||||
@ -2583,8 +2583,8 @@ void sub_815C0A4(u8 taskId)
|
|||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6D60(&unknownStruct, &gUnknown_08C2A6EC, 0);
|
sub_80A6D60(&animBg, &gUnknown_08C2A6EC, 0);
|
||||||
if (IsContest())
|
if (IsContest())
|
||||||
{
|
{
|
||||||
gBattle_BG1_X = -56;
|
gBattle_BG1_X = -56;
|
||||||
@ -2615,8 +2615,8 @@ void sub_815C0A4(u8 taskId)
|
|||||||
gBattle_BG1_Y = 0;
|
gBattle_BG1_Y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08C2A634, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C2A634, animBg.tilesOffset);
|
||||||
LoadCompressedPalette(gUnknown_08C2A6D4, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gUnknown_08C2A6D4, animBg.paletteId * 16, 32);
|
||||||
gTasks[taskId].data[10] = gBattle_BG1_X;
|
gTasks[taskId].data[10] = gBattle_BG1_X;
|
||||||
gTasks[taskId].data[11] = gBattle_BG1_Y;
|
gTasks[taskId].data[11] = gBattle_BG1_Y;
|
||||||
gTasks[taskId].data[0]++;
|
gTasks[taskId].data[0]++;
|
||||||
@ -2654,8 +2654,8 @@ void sub_815C0A4(u8 taskId)
|
|||||||
gTasks[taskId].data[0] = 1;
|
gTasks[taskId].data[0] = 1;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(unknownStruct.bgId);
|
sub_80A6C68(animBg.bgId);
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
||||||
|
|
||||||
@ -4130,13 +4130,13 @@ static void AnimTask_BarrageBallStep(u8 taskId)
|
|||||||
if (++task->data[1] > 1)
|
if (++task->data[1] > 1)
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
TranslateAnimArc(&gSprites[task->data[15]]);
|
TranslateAnimHorizontalArc(&gSprites[task->data[15]]);
|
||||||
if (++task->data[2] > 7)
|
if (++task->data[2] > 7)
|
||||||
task->data[0]++;
|
task->data[0]++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (TranslateAnimArc(&gSprites[task->data[15]]))
|
if (TranslateAnimHorizontalArc(&gSprites[task->data[15]]))
|
||||||
{
|
{
|
||||||
task->data[1] = 0;
|
task->data[1] = 0;
|
||||||
task->data[2] = 0;
|
task->data[2] = 0;
|
||||||
|
@ -276,7 +276,7 @@ void sub_8116B14(u8 taskId)
|
|||||||
int spriteId, newSpriteId;
|
int spriteId, newSpriteId;
|
||||||
u16 var0;
|
u16 var0;
|
||||||
u16 bg1Cnt;
|
u16 bg1Cnt;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData unknownStruct;
|
||||||
|
|
||||||
var0 = 0;
|
var0 = 0;
|
||||||
gBattle_WIN0H = 0;
|
gBattle_WIN0H = 0;
|
||||||
@ -330,8 +330,8 @@ void sub_8116B14(u8 taskId)
|
|||||||
newSpriteId = sub_80A89C8(gBattleAnimAttacker, spriteId, species);
|
newSpriteId = sub_80A89C8(gBattleAnimAttacker, spriteId, species);
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&unknownStruct);
|
||||||
sub_80A6D60(&unknownStruct, gUnknown_08C20684, 0);
|
sub_80A6D60(&unknownStruct, gUnknown_08C20684, 0);
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08C20668, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(unknownStruct.bgId, gUnknown_08C20668, unknownStruct.tilesOffset);
|
||||||
LoadPalette(&gUnknown_08597418, unknownStruct.unk8 * 16 + 1, 2);
|
LoadPalette(&gUnknown_08597418, unknownStruct.paletteId * 16 + 1, 2);
|
||||||
|
|
||||||
gBattle_BG1_X = -gSprites[spriteId].pos1.x + 32;
|
gBattle_BG1_X = -gSprites[spriteId].pos1.x + 32;
|
||||||
gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32;
|
gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32;
|
||||||
@ -342,7 +342,7 @@ void sub_8116B14(u8 taskId)
|
|||||||
|
|
||||||
static void sub_8116D64(u8 taskId)
|
static void sub_8116D64(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData unknownStruct;
|
||||||
struct Sprite *sprite;
|
struct Sprite *sprite;
|
||||||
u16 bg1Cnt;
|
u16 bg1Cnt;
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ static void sub_8116F04(u8 taskId)
|
|||||||
|
|
||||||
static void sub_81170EC(u8 taskId)
|
static void sub_81170EC(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData unknownStruct;
|
||||||
u8 spriteId, spriteId2;
|
u8 spriteId, spriteId2;
|
||||||
u8 battlerSpriteId;
|
u8 battlerSpriteId;
|
||||||
|
|
||||||
@ -472,32 +472,32 @@ static void sub_81170EC(u8 taskId)
|
|||||||
else
|
else
|
||||||
sub_80A6D60(&unknownStruct, gBattleStatMask2_Tilemap, 0);
|
sub_80A6D60(&unknownStruct, gBattleStatMask2_Tilemap, 0);
|
||||||
|
|
||||||
sub_80A6CC0(unknownStruct.bgId, gBattleStatMask_Gfx, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(unknownStruct.bgId, gBattleStatMask_Gfx, unknownStruct.tilesOffset);
|
||||||
switch (sAnimStatsChangeData->data[1])
|
switch (sAnimStatsChangeData->data[1])
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
LoadCompressedPalette(gBattleStatMask2_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask2_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
LoadCompressedPalette(gBattleStatMask1_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask1_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
LoadCompressedPalette(gBattleStatMask3_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask3_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
LoadCompressedPalette(gBattleStatMask4_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask4_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
LoadCompressedPalette(gBattleStatMask6_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask6_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
LoadCompressedPalette(gBattleStatMask7_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask7_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
LoadCompressedPalette(gBattleStatMask8_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask8_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LoadCompressedPalette(gBattleStatMask5_Pal, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gBattleStatMask5_Pal, unknownStruct.paletteId * 16, 32);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -773,7 +773,7 @@ void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5,
|
|||||||
u16 species;
|
u16 species;
|
||||||
u8 spriteId, spriteId2;
|
u8 spriteId, spriteId2;
|
||||||
u16 bg1Cnt;
|
u16 bg1Cnt;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData unknownStruct;
|
||||||
u8 battler2;
|
u8 battler2;
|
||||||
|
|
||||||
spriteId2 = 0;
|
spriteId2 = 0;
|
||||||
@ -820,8 +820,8 @@ void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5,
|
|||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&unknownStruct);
|
||||||
sub_80A6D60(&unknownStruct, tilemap, 0);
|
sub_80A6D60(&unknownStruct, tilemap, 0);
|
||||||
sub_80A6CC0(unknownStruct.bgId, gfx, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(unknownStruct.bgId, gfx, unknownStruct.tilesOffset);
|
||||||
LoadCompressedPalette(palette, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(palette, unknownStruct.paletteId * 16, 32);
|
||||||
|
|
||||||
gBattle_BG1_X = 0;
|
gBattle_BG1_X = 0;
|
||||||
gBattle_BG1_Y = 0;
|
gBattle_BG1_Y = 0;
|
||||||
|
@ -1339,7 +1339,7 @@ static void LinkOpponentHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void LinkOpponentHandleTrainerSlideBack(void)
|
static void LinkOpponentHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -1700,7 +1700,7 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void)
|
|||||||
u8 paletteNum;
|
u8 paletteNum;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||||
|
@ -1160,7 +1160,7 @@ static void LinkPartnerHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void LinkPartnerHandleTrainerSlideBack(void)
|
static void LinkPartnerHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -1525,7 +1525,7 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void)
|
|||||||
u8 taskId;
|
u8 taskId;
|
||||||
u32 trainerPicId;
|
u32 trainerPicId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
|
@ -1376,7 +1376,7 @@ static void OpponentHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void OpponentHandleTrainerSlideBack(void)
|
static void OpponentHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -1849,7 +1849,7 @@ static void OpponentHandleIntroTrainerBallThrow(void)
|
|||||||
u8 paletteNum;
|
u8 paletteNum;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||||
|
@ -2377,7 +2377,7 @@ static void PlayerHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void PlayerHandleTrainerSlideBack(void)
|
static void PlayerHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -2921,7 +2921,7 @@ static void PlayerHandleIntroTrainerBallThrow(void)
|
|||||||
u8 paletteNum;
|
u8 paletteNum;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
|
@ -1354,7 +1354,7 @@ static void PlayerPartnerHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void PlayerPartnerHandleTrainerSlideBack(void)
|
static void PlayerPartnerHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -1777,7 +1777,7 @@ static void PlayerPartnerHandleIntroTrainerBallThrow(void)
|
|||||||
u8 paletteNum;
|
u8 paletteNum;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
|
@ -1267,7 +1267,7 @@ static void RecordedOpponentHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void RecordedOpponentHandleTrainerSlideBack(void)
|
static void RecordedOpponentHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -1640,7 +1640,7 @@ static void RecordedOpponentHandleIntroTrainerBallThrow(void)
|
|||||||
u8 paletteNum;
|
u8 paletteNum;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = 280;
|
||||||
|
@ -1268,7 +1268,7 @@ static void RecordedPlayerHandleTrainerSlide(void)
|
|||||||
|
|
||||||
static void RecordedPlayerHandleTrainerSlideBack(void)
|
static void RecordedPlayerHandleTrainerSlideBack(void)
|
||||||
{
|
{
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 35;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[4] = gSprites[gBattlerSpriteIds[gActiveBattler]].pos1.y;
|
||||||
@ -1662,7 +1662,7 @@ static void RecordedPlayerHandleIntroTrainerBallThrow(void)
|
|||||||
u8 taskId;
|
u8 taskId;
|
||||||
u32 trainerPicId;
|
u32 trainerPicId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
|
@ -1427,7 +1427,7 @@ static void WallyHandleIntroTrainerBallThrow(void)
|
|||||||
u8 paletteNum;
|
u8 paletteNum;
|
||||||
u8 taskId;
|
u8 taskId;
|
||||||
|
|
||||||
oamt_add_pos2_onto_pos1(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||||
|
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[0] = 50;
|
||||||
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
gSprites[gBattlerSpriteIds[gActiveBattler]].data[2] = -40;
|
||||||
|
@ -433,7 +433,7 @@ static void AnimMissileArcStep(struct Sprite *sprite)
|
|||||||
{
|
{
|
||||||
sprite->invisible = FALSE;
|
sprite->invisible = FALSE;
|
||||||
|
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
@ -453,7 +453,7 @@ static void AnimMissileArcStep(struct Sprite *sprite)
|
|||||||
x2 += x1;
|
x2 += x1;
|
||||||
y2 += y1;
|
y2 += y1;
|
||||||
|
|
||||||
if (!TranslateAnimArc(sprite))
|
if (!TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
u16 rotation = ArcTan2Neg(sprite->pos1.x + sprite->pos2.x - x2,
|
u16 rotation = ArcTan2Neg(sprite->pos1.x + sprite->pos2.x - x2,
|
||||||
sprite->pos1.y + sprite->pos2.y - y2);
|
sprite->pos1.y + sprite->pos2.y - y2);
|
||||||
|
32
src/dark.c
32
src/dark.c
@ -389,14 +389,14 @@ void sub_8113A90(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void sub_8113B90(struct Sprite *sprite)
|
static void sub_8113B90(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroySpriteAndMatrix(sprite);
|
DestroySpriteAndMatrix(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8113BAC(u8 taskId)
|
void sub_8113BAC(u8 taskId)
|
||||||
{
|
{
|
||||||
struct ScanlineEffectParams scanlineParams;
|
struct ScanlineEffectParams scanlineParams;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
u16 i;
|
u16 i;
|
||||||
u8 pos;
|
u8 pos;
|
||||||
int var0;
|
int var0;
|
||||||
@ -420,10 +420,10 @@ void sub_8113BAC(u8 taskId)
|
|||||||
task->data[3] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
|
task->data[3] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker);
|
||||||
if (task->data[3] == 1)
|
if (task->data[3] == 1)
|
||||||
{
|
{
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
task->data[10] = gBattle_BG1_Y;
|
task->data[10] = gBattle_BG1_Y;
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG1);
|
||||||
FillPalette(0, unknownStruct.unk8 << 4, 32);
|
FillPalette(0, animBg.paletteId * 16, 32);
|
||||||
scanlineParams.dmaDest = ®_BG1VOFS;
|
scanlineParams.dmaDest = ®_BG1VOFS;
|
||||||
var0 = WINOUT_WIN01_BG1;
|
var0 = WINOUT_WIN01_BG1;
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
@ -524,7 +524,7 @@ static void sub_8113D60(u8 taskId)
|
|||||||
|
|
||||||
void sub_8113E78(u8 taskId)
|
void sub_8113E78(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
struct ScanlineEffectParams scanlineParams;
|
struct ScanlineEffectParams scanlineParams;
|
||||||
u8 x;
|
u8 x;
|
||||||
u16 i;
|
u16 i;
|
||||||
@ -561,14 +561,14 @@ void sub_8113E78(u8 taskId)
|
|||||||
case 1:
|
case 1:
|
||||||
if (task->data[3] == 1)
|
if (task->data[3] == 1)
|
||||||
{
|
{
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
task->data[10] = gBattle_BG1_Y;
|
task->data[10] = gBattle_BG1_Y;
|
||||||
FillPalette(0, unknownStruct.unk8 << 4, 32);
|
FillPalette(0, animBg.paletteId * 16, 32);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
task->data[10] = gBattle_BG2_Y;
|
task->data[10] = gBattle_BG2_Y;
|
||||||
FillPalette(0, 144, 32);
|
FillPalette(0, 9 * 16, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_8114374(3);
|
sub_8114374(3);
|
||||||
@ -809,7 +809,7 @@ void sub_81144F8(u8 taskId)
|
|||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
u8 newSpriteId;
|
u8 newSpriteId;
|
||||||
u16 paletteNum;
|
u16 paletteNum;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
int var0 = 0;
|
int var0 = 0;
|
||||||
|
|
||||||
gBattle_WIN0H = var0;
|
gBattle_WIN0H = var0;
|
||||||
@ -852,10 +852,10 @@ void sub_81144F8(u8 taskId)
|
|||||||
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||||
newSpriteId = sub_80A89C8(gBattleAnimAttacker, spriteId, species);
|
newSpriteId = sub_80A89C8(gBattleAnimAttacker, spriteId, species);
|
||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6D48(unknownStruct.bgId, gUnknown_08C1D210);
|
AnimLoadCompressedBgTilemap(animBg.bgId, gMetalShineTilemap);
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08C1D0AC, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, gMetalShineGfx, animBg.tilesOffset);
|
||||||
LoadCompressedPalette(gUnknown_08C1D1E8, unknownStruct.unk8 << 4, 32);
|
LoadCompressedPalette(gMetalShinePalette, animBg.paletteId * 16, 32);
|
||||||
|
|
||||||
gBattle_BG1_X = -gSprites[spriteId].pos1.x + 96;
|
gBattle_BG1_X = -gSprites[spriteId].pos1.x + 96;
|
||||||
gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32;
|
gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32;
|
||||||
@ -876,7 +876,7 @@ void sub_81144F8(u8 taskId)
|
|||||||
|
|
||||||
static void sub_8114748(u8 taskId)
|
static void sub_8114748(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
u16 paletteNum;
|
u16 paletteNum;
|
||||||
u8 spriteId;
|
u8 spriteId;
|
||||||
u8 taskIdCopy = taskId;
|
u8 taskIdCopy = taskId;
|
||||||
@ -896,8 +896,8 @@ static void sub_8114748(u8 taskId)
|
|||||||
SetGreyscaleOrOriginalPalette(paletteNum, 1);
|
SetGreyscaleOrOriginalPalette(paletteNum, 1);
|
||||||
|
|
||||||
DestroySprite(&gSprites[gTasks[taskIdCopy].data[0]]);
|
DestroySprite(&gSprites[gTasks[taskIdCopy].data[0]]);
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(unknownStruct.bgId);
|
sub_80A6C68(animBg.bgId);
|
||||||
if (gTasks[taskIdCopy].data[6] == 1)
|
if (gTasks[taskIdCopy].data[6] == 1)
|
||||||
gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority++;
|
gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority++;
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ void sub_8113064(struct Sprite *sprite)
|
|||||||
sprite->data[5] = gBattleAnimArgs[5];
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
sprite->invisible = 1;
|
sprite->invisible = 1;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
sprite->callback = sub_80A66DC;
|
sprite->callback = TranslateSpriteLinearAndFlicker;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_8113100(struct Sprite *sprite)
|
static void sub_8113100(struct Sprite *sprite)
|
||||||
|
10
src/fire.c
10
src/fire.c
@ -479,7 +479,7 @@ static void sub_8108F08(struct Sprite *sprite)
|
|||||||
sprite->data[1] = gBattleAnimArgs[2];
|
sprite->data[1] = gBattleAnimArgs[2];
|
||||||
sprite->data[2] = gBattleAnimArgs[3];
|
sprite->data[2] = gBattleAnimArgs[3];
|
||||||
|
|
||||||
sprite->callback = AnimTranslateLinearSimple;
|
sprite->callback = TranslateSpriteLinearFixedPoint;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -726,7 +726,7 @@ static void AnimFireCross(struct Sprite *sprite)
|
|||||||
|
|
||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
|
||||||
sprite->callback = TranslateSpriteOverDuration;
|
sprite->callback = TranslateSpriteLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_81093A4(struct Sprite *sprite)
|
static void sub_81093A4(struct Sprite *sprite)
|
||||||
@ -1280,9 +1280,9 @@ static void sub_8109E2C(u8 taskId)
|
|||||||
// arg 1: color code
|
// arg 1: color code
|
||||||
void AnimTask_BlendBackground(u8 taskId)
|
void AnimTask_BlendBackground(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unk;
|
struct BattleAnimBgData animBg;
|
||||||
sub_80A6B30(&unk);
|
sub_80A6B30(&animBg);
|
||||||
BlendPalette(unk.unk8 << 4, 16, gBattleAnimArgs[0], gBattleAnimArgs[1]); // u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor
|
BlendPalette(animBg.paletteId * 16, 16, gBattleAnimArgs[0], gBattleAnimArgs[1]); // u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ static void sub_81116E8(struct Sprite *sprite)
|
|||||||
if (sprite->data[6] == 0)
|
if (sprite->data[6] == 0)
|
||||||
{
|
{
|
||||||
sprite->invisible = TRUE;
|
sprite->invisible = TRUE;
|
||||||
sprite->callback = sub_80A67F4;
|
sprite->callback = DestroyAnimSpriteAndDisableBlend;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sub_8111764(sprite);
|
sub_8111764(sprite);
|
||||||
@ -536,7 +536,7 @@ void sub_8111C50(u8 taskId)
|
|||||||
gSprites[task->data[0]].data[3] = 0;
|
gSprites[task->data[0]].data[3] = 0;
|
||||||
gSprites[task->data[0]].data[4] = 0;
|
gSprites[task->data[0]].data[4] = 0;
|
||||||
StoreSpriteCallbackInData6(&gSprites[task->data[0]], SpriteCallbackDummy);
|
StoreSpriteCallbackInData6(&gSprites[task->data[0]], SpriteCallbackDummy);
|
||||||
gSprites[task->data[0]].callback = AnimTranslateLinearSimple;
|
gSprites[task->data[0]].callback = TranslateSpriteLinearFixedPoint;
|
||||||
task->func = sub_8111D78;
|
task->func = sub_8111D78;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,9 +592,9 @@ const u32 gBattleAnimBackgroundImage_00[] = INCBIN_U32("graphics/battle_anims/ba
|
|||||||
const u32 gBattleAnimBackgroundPalette_00[] = INCBIN_U32("graphics/battle_anims/backgrounds/00.gbapal.lz");
|
const u32 gBattleAnimBackgroundPalette_00[] = INCBIN_U32("graphics/battle_anims/backgrounds/00.gbapal.lz");
|
||||||
const u32 gBattleAnimBackgroundTilemap_00[] = INCBIN_U32("graphics/battle_anims/backgrounds/00.bin.lz");
|
const u32 gBattleAnimBackgroundTilemap_00[] = INCBIN_U32("graphics/battle_anims/backgrounds/00.bin.lz");
|
||||||
|
|
||||||
const u32 gUnknown_08C1D0AC[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.4bpp.lz");
|
const u32 gMetalShineGfx[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.4bpp.lz");
|
||||||
const u32 gUnknown_08C1D1E8[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.gbapal.lz");
|
const u32 gMetalShinePalette[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.gbapal.lz");
|
||||||
const u32 gUnknown_08C1D210[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.bin.lz");
|
const u32 gMetalShineTilemap[] = INCBIN_U32("graphics/battle_anims/masks/metal_shine.bin.lz");
|
||||||
|
|
||||||
const u32 gUnusedGfx_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.4bpp.lz"); // ghost
|
const u32 gUnusedGfx_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.4bpp.lz"); // ghost
|
||||||
const u32 gUnusedPal_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.gbapal.lz");
|
const u32 gUnusedPal_Goosuto[] = INCBIN_U32("graphics/unused/goosuto.gbapal.lz");
|
||||||
|
@ -153,7 +153,7 @@ void AnimBonemerangProjectile(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void AnimBonemerangProjectileStep(struct Sprite *sprite)
|
static void AnimBonemerangProjectileStep(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
sprite->pos1.x += sprite->pos2.x;
|
sprite->pos1.x += sprite->pos2.x;
|
||||||
sprite->pos1.y += sprite->pos2.y;
|
sprite->pos1.y += sprite->pos2.y;
|
||||||
@ -170,7 +170,7 @@ static void AnimBonemerangProjectileStep(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void AnimBonemerangProjectileEnd(struct Sprite *sprite)
|
static void AnimBonemerangProjectileEnd(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +530,7 @@ void AnimFissureDirtPlumeParticle(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite)
|
static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
30
src/ice.c
30
src/ice.c
@ -1176,7 +1176,7 @@ void AnimSwirlingFogAnim(struct Sprite *sprite)
|
|||||||
// Fades mons to black and places foggy overlay in Haze.
|
// Fades mons to black and places foggy overlay in Haze.
|
||||||
void AnimTask_Haze1(u8 taskId)
|
void AnimTask_Haze1(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 subStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||||
@ -1191,17 +1191,17 @@ void AnimTask_Haze1(u8 taskId)
|
|||||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
|
|
||||||
sub_80A6B30(&subStruct);
|
sub_80A6B30(&animBg);
|
||||||
LoadBgTiles(subStruct.bgId, gWeatherFog1Tiles, 0x800, subStruct.tilesOffset);
|
LoadBgTiles(animBg.bgId, gWeatherFog1Tiles, 0x800, animBg.tilesOffset);
|
||||||
sub_80A6D60(&subStruct, gBattleAnimFogTilemap, 0);
|
sub_80A6D60(&animBg, gBattleAnimFogTilemap, 0);
|
||||||
LoadPalette(&gUnknown_083970E8, subStruct.unk8 * 16, 32);
|
LoadPalette(&gUnknown_083970E8, animBg.paletteId * 16, 32);
|
||||||
|
|
||||||
gTasks[taskId].func = AnimTask_Haze2;
|
gTasks[taskId].func = AnimTask_Haze2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTask_Haze2(u8 taskId)
|
void AnimTask_Haze2(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 subStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
gBattle_BG1_X += -1;
|
gBattle_BG1_X += -1;
|
||||||
gBattle_BG1_Y += 0;
|
gBattle_BG1_Y += 0;
|
||||||
@ -1245,7 +1245,7 @@ void AnimTask_Haze2(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_80A6B30(&subStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(1);
|
sub_80A6C68(1);
|
||||||
sub_80A6C68(2);
|
sub_80A6C68(2);
|
||||||
|
|
||||||
@ -1283,7 +1283,7 @@ void AnimThrowMistBall(struct Sprite *sprite)
|
|||||||
// Displays misty background in Mist Ball.
|
// Displays misty background in Mist Ball.
|
||||||
void AnimTask_LoadMistTiles(u8 taskId)
|
void AnimTask_LoadMistTiles(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 subStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||||
@ -1298,10 +1298,10 @@ void AnimTask_LoadMistTiles(u8 taskId)
|
|||||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
|
|
||||||
sub_80A6B30(&subStruct);
|
sub_80A6B30(&animBg);
|
||||||
LoadBgTiles(subStruct.bgId, gWeatherFog1Tiles, 0x800, subStruct.tilesOffset);
|
LoadBgTiles(animBg.bgId, gWeatherFog1Tiles, 0x800, animBg.tilesOffset);
|
||||||
sub_80A6D60(&subStruct, gBattleAnimFogTilemap, 0);
|
sub_80A6D60(&animBg, gBattleAnimFogTilemap, 0);
|
||||||
LoadPalette(&gUnknown_083970E8, subStruct.unk8 * 16, 32);
|
LoadPalette(&gUnknown_083970E8, animBg.paletteId * 16, 32);
|
||||||
|
|
||||||
gTasks[taskId].data[15] = -1;
|
gTasks[taskId].data[15] = -1;
|
||||||
gTasks[taskId].func = AnimTask_OverlayFogTiles;
|
gTasks[taskId].func = AnimTask_OverlayFogTiles;
|
||||||
@ -1309,7 +1309,7 @@ void AnimTask_LoadMistTiles(u8 taskId)
|
|||||||
|
|
||||||
void AnimTask_OverlayFogTiles(u8 taskId)
|
void AnimTask_OverlayFogTiles(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 subStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
gBattle_BG1_X += gTasks[taskId].data[15];
|
gBattle_BG1_X += gTasks[taskId].data[15];
|
||||||
gBattle_BG1_Y += 0;
|
gBattle_BG1_Y += 0;
|
||||||
@ -1347,7 +1347,7 @@ void AnimTask_OverlayFogTiles(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_80A6B30(&subStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(1);
|
sub_80A6C68(1);
|
||||||
sub_80A6C68(2);
|
sub_80A6C68(2);
|
||||||
|
|
||||||
@ -1887,7 +1887,7 @@ void InitIceBallAnim(struct Sprite *sprite)
|
|||||||
// Throws the ball of ice in Ice Ball.
|
// Throws the ball of ice in Ice Ball.
|
||||||
void AnimThrowIceBall(struct Sprite *sprite)
|
void AnimThrowIceBall(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (!TranslateAnimArc(sprite))
|
if (!TranslateAnimHorizontalArc(sprite))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
StartSpriteAnim(sprite, 1);
|
StartSpriteAnim(sprite, 1);
|
||||||
|
12
src/normal.c
12
src/normal.c
@ -323,14 +323,14 @@ void AnimSimplePaletteBlend(struct Sprite *sprite)
|
|||||||
// 6: BG palette 5
|
// 6: BG palette 5
|
||||||
u32 UnpackSelectedBattleAnimPalettes(s16 selector)
|
u32 UnpackSelectedBattleAnimPalettes(s16 selector)
|
||||||
{
|
{
|
||||||
u8 arg0 = selector & 1;
|
u8 battleBackground = selector & 1;
|
||||||
u8 arg1 = (selector >> 1) & 1;
|
u8 attacker = (selector >> 1) & 1;
|
||||||
u8 arg2 = (selector >> 2) & 1;
|
u8 target = (selector >> 2) & 1;
|
||||||
u8 arg3 = (selector >> 3) & 1;
|
u8 attackerPartner = (selector >> 3) & 1;
|
||||||
u8 arg4 = (selector >> 4) & 1;
|
u8 targetPartner = (selector >> 4) & 1;
|
||||||
u8 arg5 = (selector >> 5) & 1;
|
u8 arg5 = (selector >> 5) & 1;
|
||||||
u8 arg6 = (selector >> 6) & 1;
|
u8 arg6 = (selector >> 6) & 1;
|
||||||
return sub_80A75AC(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
|
return sub_80A75AC(battleBackground, attacker, target, attackerPartner, targetPartner, arg5, arg6);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AnimSimplePaletteBlendStep(struct Sprite *sprite)
|
static void AnimSimplePaletteBlendStep(struct Sprite *sprite)
|
||||||
|
@ -208,7 +208,7 @@ void sub_810DBAC(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void sub_810DC10(struct Sprite *sprite)
|
static void sub_810DC10(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ void sub_810DC2C(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void sub_810DCB4(struct Sprite *sprite)
|
static void sub_810DCB4(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
DestroyAnimSprite(sprite);
|
DestroyAnimSprite(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ void sub_810DCD0(struct Sprite *sprite)
|
|||||||
|
|
||||||
static void sub_810DD24(struct Sprite *sprite)
|
static void sub_810DD24(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
AnimTranslateLinearSimple(sprite);
|
TranslateSpriteLinearFixedPoint(sprite);
|
||||||
|
|
||||||
sprite->data[1] -= sprite->data[5];
|
sprite->data[1] -= sprite->data[5];
|
||||||
sprite->data[2] -= sprite->data[6];
|
sprite->data[2] -= sprite->data[6];
|
||||||
|
@ -411,7 +411,7 @@ static void Task_DoPokeballSendOutAnim(u8 taskId)
|
|||||||
|
|
||||||
static void SpriteCB_TestBallThrow(struct Sprite *sprite)
|
static void SpriteCB_TestBallThrow(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
u16 ballId;
|
u16 ballId;
|
||||||
u8 taskId = sprite->oam.affineParam;
|
u8 taskId = sprite->oam.affineParam;
|
||||||
@ -940,7 +940,7 @@ static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
sprite->pos1.x += sprite->pos2.x;
|
sprite->pos1.x += sprite->pos2.x;
|
||||||
sprite->pos1.y += sprite->pos2.y;
|
sprite->pos1.y += sprite->pos2.y;
|
||||||
|
@ -939,7 +939,7 @@ static void sub_810FD3C(u8 taskId)
|
|||||||
|
|
||||||
void sub_810FDF0(struct Sprite *sprite)
|
void sub_810FDF0(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
FreeOamMatrix(sprite->oam.matrixNum);
|
FreeOamMatrix(sprite->oam.matrixNum);
|
||||||
DestroySprite(sprite);
|
DestroySprite(sprite);
|
||||||
|
24
src/rock.c
24
src/rock.c
@ -326,7 +326,7 @@ void sub_81109F0(struct Sprite *sprite)
|
|||||||
sprite->data[5] = gBattleAnimArgs[2];
|
sprite->data[5] = gBattleAnimArgs[2];
|
||||||
|
|
||||||
StoreSpriteCallbackInData6(sprite, sub_8110A70);
|
StoreSpriteCallbackInData6(sprite, sub_8110A70);
|
||||||
sprite->callback = sub_80A6450;
|
sprite->callback = TranslateSpriteInEllipseOverDuration;
|
||||||
sprite->callback(sprite);
|
sprite->callback(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ static void sub_8110A70(struct Sprite *sprite)
|
|||||||
sprite->data[4] = -24;
|
sprite->data[4] = -24;
|
||||||
|
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
sprite->callback = sub_80A6450;
|
sprite->callback = TranslateSpriteInEllipseOverDuration;
|
||||||
sprite->callback(sprite);
|
sprite->callback(sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ void sub_8110AB4(struct Sprite *sprite)
|
|||||||
sprite->data[3] = 0;
|
sprite->data[3] = 0;
|
||||||
sprite->data[4] = 0;
|
sprite->data[4] = 0;
|
||||||
|
|
||||||
sprite->callback = AnimTranslateLinearSimple;
|
sprite->callback = TranslateSpriteLinearFixedPoint;
|
||||||
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,7 +402,7 @@ static void sub_8110B80(struct Sprite *sprite)
|
|||||||
void AnimTask_LoadSandstormBackground(u8 taskId)
|
void AnimTask_LoadSandstormBackground(u8 taskId)
|
||||||
{
|
{
|
||||||
int var0;
|
int var0;
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
var0 = 0;
|
var0 = 0;
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||||
@ -418,10 +418,10 @@ void AnimTask_LoadSandstormBackground(u8 taskId)
|
|||||||
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
|
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6CC0(unknownStruct.bgId, gUnknown_08D8D58C, unknownStruct.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08D8D58C, animBg.tilesOffset);
|
||||||
sub_80A6D60(&unknownStruct, gUnknown_08D8D410, 0);
|
sub_80A6D60(&animBg, gUnknown_08D8D410, 0);
|
||||||
LoadCompressedPalette(gBattleAnimSpritePalette_261, unknownStruct.unk8 * 16, 32);
|
LoadCompressedPalette(gBattleAnimSpritePalette_261, animBg.paletteId * 16, 32);
|
||||||
|
|
||||||
if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
var0 = 1;
|
var0 = 1;
|
||||||
@ -432,7 +432,7 @@ void AnimTask_LoadSandstormBackground(u8 taskId)
|
|||||||
|
|
||||||
static void sub_8110CB0(u8 taskId)
|
static void sub_8110CB0(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unknownStruct;
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
if (gTasks[taskId].data[0] == 0)
|
if (gTasks[taskId].data[0] == 0)
|
||||||
gBattle_BG1_X += -6;
|
gBattle_BG1_X += -6;
|
||||||
@ -477,8 +477,8 @@ static void sub_8110CB0(u8 taskId)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sub_80A6B30(&unknownStruct);
|
sub_80A6B30(&animBg);
|
||||||
sub_80A6C68(unknownStruct.bgId);
|
sub_80A6C68(animBg.bgId);
|
||||||
gTasks[taskId].data[12]++;
|
gTasks[taskId].data[12]++;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@ -735,7 +735,7 @@ static void sub_8111214(struct Task *task)
|
|||||||
|
|
||||||
void sub_811131C(struct Sprite *sprite)
|
void sub_811131C(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
u8 taskId = FindTaskIdByFunc(sub_81110A4);
|
u8 taskId = FindTaskIdByFunc(sub_81110A4);
|
||||||
if (taskId != 0xFF)
|
if (taskId != 0xFF)
|
||||||
|
36
src/water.c
36
src/water.c
@ -876,31 +876,31 @@ void sub_810790C(struct Sprite *sprite)
|
|||||||
#ifdef NONMATCHING
|
#ifdef NONMATCHING
|
||||||
void AnimTask_CreateSurfWave(u8 taskId)
|
void AnimTask_CreateSurfWave(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unk;
|
struct BattleAnimBgData animBg;
|
||||||
u8 taskId2;
|
u8 taskId2;
|
||||||
|
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||||
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||||
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 1);
|
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 1);
|
||||||
sub_80A6B30(&unk);
|
sub_80A6B30(&animBg);
|
||||||
if (!IsContest())
|
if (!IsContest())
|
||||||
{
|
{
|
||||||
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||||
sub_80A6D48(unk.bgId, gUnknown_08D95E00);
|
AnimLoadCompressedBgTilemap(animBg.bgId, gUnknown_08D95E00);
|
||||||
else
|
else
|
||||||
sub_80A6D48(unk.bgId, gUnknown_08D960D0);
|
AnimLoadCompressedBgTilemap(animBg.bgId, gUnknown_08D960D0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sub_80A6D60(&unk, gUnknown_08D963A4, 1);
|
sub_80A6D60(&animBg, gUnknown_08D963A4, 1);
|
||||||
}
|
}
|
||||||
sub_80A6CC0(unk.bgId, gBattleAnimBackgroundImage_Surf, unk.tilesOffset);
|
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBackgroundImage_Surf, animBg.tilesOffset);
|
||||||
if (gBattleAnimArgs[0] == 0)
|
if (gBattleAnimArgs[0] == 0)
|
||||||
LoadCompressedPalette(gBattleAnimBackgroundPalette_Surf, unk.unk8 * 16, 32);
|
LoadCompressedPalette(gBattleAnimBackgroundPalette_Surf, animBg.paletteId * 16, 32);
|
||||||
else
|
else
|
||||||
LoadCompressedPalette(gBattleAnimBackgroundImageMuddyWater_Pal, unk.unk8 * 16, 32);
|
LoadCompressedPalette(gBattleAnimBackgroundImageMuddyWater_Pal, animBg.paletteId * 16, 32);
|
||||||
taskId2 = CreateTask(sub_8107D58, gTasks[taskId].priority + 1);
|
taskId2 = CreateTask(sub_8107D58, gTasks[taskId].priority + 1);
|
||||||
gTasks[taskId].data[15] = taskId2;
|
gTasks[taskId].data[15] = taskId2;
|
||||||
gTasks[taskId2].data[0] = 0;
|
gTasks[taskId2].data[0] = 0;
|
||||||
@ -993,14 +993,14 @@ void AnimTask_CreateSurfWave(u8 taskId)
|
|||||||
mov r0, sp\n\
|
mov r0, sp\n\
|
||||||
ldrb r0, [r0, 0x9]\n\
|
ldrb r0, [r0, 0x9]\n\
|
||||||
ldr r1, =gUnknown_08D95E00\n\
|
ldr r1, =gUnknown_08D95E00\n\
|
||||||
bl sub_80A6D48\n\
|
bl AnimLoadCompressedBgTilemap\n\
|
||||||
b _081079EA\n\
|
b _081079EA\n\
|
||||||
.pool\n\
|
.pool\n\
|
||||||
_081079D0:\n\
|
_081079D0:\n\
|
||||||
mov r0, sp\n\
|
mov r0, sp\n\
|
||||||
ldrb r0, [r0, 0x9]\n\
|
ldrb r0, [r0, 0x9]\n\
|
||||||
ldr r1, =gUnknown_08D960D0\n\
|
ldr r1, =gUnknown_08D960D0\n\
|
||||||
bl sub_80A6D48\n\
|
bl AnimLoadCompressedBgTilemap\n\
|
||||||
b _081079EA\n\
|
b _081079EA\n\
|
||||||
.pool\n\
|
.pool\n\
|
||||||
_081079E0:\n\
|
_081079E0:\n\
|
||||||
@ -1014,7 +1014,7 @@ _081079EA:\n\
|
|||||||
ldr r1, =gBattleAnimBackgroundImage_Surf\n\
|
ldr r1, =gBattleAnimBackgroundImage_Surf\n\
|
||||||
mov r2, sp\n\
|
mov r2, sp\n\
|
||||||
ldrh r2, [r2, 0xA]\n\
|
ldrh r2, [r2, 0xA]\n\
|
||||||
bl sub_80A6CC0\n\
|
bl AnimLoadCompressedBgGfx\n\
|
||||||
ldr r0, =gBattleAnimArgs\n\
|
ldr r0, =gBattleAnimArgs\n\
|
||||||
movs r1, 0\n\
|
movs r1, 0\n\
|
||||||
ldrsh r0, [r0, r1]\n\
|
ldrsh r0, [r0, r1]\n\
|
||||||
@ -1176,7 +1176,7 @@ _08107B58:\n\
|
|||||||
#ifdef NONMATCHING
|
#ifdef NONMATCHING
|
||||||
void sub_8107B84(u8 taskId)
|
void sub_8107B84(u8 taskId)
|
||||||
{
|
{
|
||||||
struct UnknownAnimStruct2 unk;
|
struct BattleAnimBgData animBg;
|
||||||
u8 i;
|
u8 i;
|
||||||
u16 rgbBuffer;
|
u16 rgbBuffer;
|
||||||
u16 *BGptrX = &gBattle_BG1_X;
|
u16 *BGptrX = &gBattle_BG1_X;
|
||||||
@ -1187,18 +1187,18 @@ void sub_8107B84(u8 taskId)
|
|||||||
|
|
||||||
*BGptrX += gTasks[taskId].data[0];
|
*BGptrX += gTasks[taskId].data[0];
|
||||||
*BGptrY += gTasks[taskId].data[1];
|
*BGptrY += gTasks[taskId].data[1];
|
||||||
sub_80A6B30(&unk);
|
sub_80A6B30(&animBg);
|
||||||
gTasks[taskId].data[2] += gTasks[taskId].data[1];
|
gTasks[taskId].data[2] += gTasks[taskId].data[1];
|
||||||
if (++gTasks[taskId].data[5] == 4)
|
if (++gTasks[taskId].data[5] == 4)
|
||||||
{
|
{
|
||||||
rgbBuffer = gPlttBufferFaded[unk.unk8 * 16 + 7];
|
rgbBuffer = gPlttBufferFaded[animBg.paletteId * 16 + 7];
|
||||||
for (i = 6; i != 0; i--)
|
for (i = 6; i != 0; i--)
|
||||||
{
|
{
|
||||||
palNum = unk.unk8 * 16;
|
palNum = animBg.paletteId * 16;
|
||||||
palOffset = 1 + i;
|
palOffset = 1 + i;
|
||||||
gPlttBufferFaded[palNum + palOffset] = gPlttBufferFaded[palNum + palOffset - 1];
|
gPlttBufferFaded[palNum + palOffset] = gPlttBufferFaded[palNum + palOffset - 1];
|
||||||
}
|
}
|
||||||
gPlttBufferFaded[unk.unk8 * 16 + 1] = rgbBuffer;
|
gPlttBufferFaded[animBg.paletteId * 16 + 1] = rgbBuffer;
|
||||||
gTasks[taskId].data[5] = 0;
|
gTasks[taskId].data[5] = 0;
|
||||||
}
|
}
|
||||||
if (++gTasks[taskId].data[6] > 1)
|
if (++gTasks[taskId].data[6] > 1)
|
||||||
@ -2320,7 +2320,7 @@ void sub_8108AC0(struct Task *task)
|
|||||||
|
|
||||||
void sub_8108B2C(struct Sprite *sprite)
|
void sub_8108B2C(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
sprite->pos1.x += sprite->pos2.x;
|
sprite->pos1.x += sprite->pos2.x;
|
||||||
sprite->pos1.y += sprite->pos2.y;
|
sprite->pos1.y += sprite->pos2.y;
|
||||||
@ -2337,7 +2337,7 @@ void sub_8108B94(struct Sprite *sprite)
|
|||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
||||||
if (TranslateAnimArc(sprite))
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
{
|
{
|
||||||
for (i = 0; i < NUM_TASKS; i++)
|
for (i = 0; i < NUM_TASKS; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user