mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
battle_anim_effects_3 (4)
This commit is contained in:
parent
64cf2d70fa
commit
4f590e8f61
@ -2266,7 +2266,7 @@ Move_SMOKESCREEN:
|
||||
playsewithpan SE_W104, SOUND_PAN_ATTACKER
|
||||
createsprite gBlackBallSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 0, 35, -25
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_815A160, 2
|
||||
createvisualtask AnimTask_SmokescreenImpact, 2
|
||||
delay 2
|
||||
playsewithpan SE_W028, SOUND_PAN_TARGET
|
||||
createsprite gBlackSmokeSpriteTemplate, ANIM_TARGET, 4, 0, -12, 104, 0, 75
|
||||
@ -3341,7 +3341,7 @@ Move_RAPID_SPIN:
|
||||
loadspritegfx ANIM_TAG_RAPID_SPIN
|
||||
monbg ANIM_ATTACKER
|
||||
createsprite gRapidSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 32, -32, 40, -2
|
||||
createvisualtask sub_815ADB0, 2, 0, 2, 0
|
||||
createvisualtask AnimTask_RapinSpinMonElevation, 2, 0, 2, 0
|
||||
loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 4
|
||||
waitforvisualfinish
|
||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 2
|
||||
@ -3349,7 +3349,7 @@ Move_RAPID_SPIN:
|
||||
playsewithpan SE_W003, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
delay 8
|
||||
createvisualtask sub_815ADB0, 2, 0, 2, 1
|
||||
createvisualtask AnimTask_RapinSpinMonElevation, 2, 0, 2, 1
|
||||
loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 4
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATTACKER
|
||||
@ -3493,7 +3493,7 @@ Move_HAIL:
|
||||
Move_TORMENT:
|
||||
loadspritegfx ANIM_TAG_ANGER
|
||||
loadspritegfx ANIM_TAG_THOUGHT_BUBBLE
|
||||
createvisualtask sub_815AFF0, 2
|
||||
createvisualtask AnimTask_TormentAttacker, 2
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_BlendMonInAndOut, 2, ANIM_TARGET, RGB_RED, 10, 1, 1
|
||||
createsprite gAngerMarkSpriteTemplate, ANIM_TARGET, 2, 1, -20, -28
|
||||
@ -3906,7 +3906,7 @@ Move_LUSTER_PURGE:
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
fadetobg BG_PSYCHIC
|
||||
waitbgfadeout
|
||||
createvisualtask sub_815A5C8, 5
|
||||
createvisualtask AnimTask_FadeScreenToWhite, 5
|
||||
waitbgfadein
|
||||
monbg ANIM_ATTACKER
|
||||
setalpha 12, 8
|
||||
@ -8095,7 +8095,7 @@ Move_WILL_O_WISP:
|
||||
Move_ENCORE:
|
||||
loadspritegfx ANIM_TAG_SPOTLIGHT
|
||||
loadspritegfx ANIM_TAG_TAG_HAND
|
||||
createvisualtask sub_815ABEC, 2
|
||||
createvisualtask AnimTask_CreateSpotlight, 2
|
||||
createvisualtask sub_8116960, 2, 248, 3, 0, 10, 0
|
||||
waitforvisualfinish
|
||||
createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8
|
||||
@ -8109,7 +8109,7 @@ Move_ENCORE:
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_8116960, 2, 248, 3, 10, 0, 1
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_815AC8C, 2
|
||||
createvisualtask AnimTask_RemoveSpotlight, 2
|
||||
end
|
||||
|
||||
Move_TRICK:
|
||||
@ -8272,7 +8272,7 @@ Move_TRANSFORM:
|
||||
monbg ANIM_ATTACKER
|
||||
playsewithpan SE_W100, SOUND_PAN_ATTACKER
|
||||
waitplaysewithpan SE_W107, SOUND_PAN_ATTACKER, 48
|
||||
createvisualtask sub_815B7D0, 2, 0
|
||||
createvisualtask AnimTask_TransformMon, 2, 0
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATTACKER
|
||||
end
|
||||
@ -8401,7 +8401,7 @@ Move_FLATTER:
|
||||
loadspritegfx ANIM_TAG_SPOTLIGHT
|
||||
loadspritegfx ANIM_TAG_CONFETTI
|
||||
createvisualtask sub_8159244, 5, 223, SOUND_PAN_TARGET
|
||||
createvisualtask sub_815ABEC, 2
|
||||
createvisualtask AnimTask_CreateSpotlight, 2
|
||||
createvisualtask sub_8116960, 2, 248, 3, 0, 10, 0
|
||||
waitforvisualfinish
|
||||
createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80
|
||||
@ -8435,7 +8435,7 @@ Move_FLATTER:
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_8116960, 2, 248, 3, 10, 0, 1
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_815AC8C, 2
|
||||
createvisualtask AnimTask_RemoveSpotlight, 2
|
||||
end
|
||||
CreateFlatterConfetti:
|
||||
createsprite gFlatterConfettiSpriteTemplate, ANIM_ATTACKER, 40, ANIM_ATTACKER
|
||||
@ -9523,7 +9523,7 @@ Move_PSYCHO_BOOST:
|
||||
monbg ANIM_ATK_PARTNER
|
||||
fadetobg BG_PSYCHIC
|
||||
waitbgfadeout
|
||||
createvisualtask sub_815A5C8, 5
|
||||
createvisualtask AnimTask_FadeScreenToWhite, 5
|
||||
waitbgfadein
|
||||
delay 6
|
||||
createvisualtask sub_8115A04, 2, 1, 2, 8, 0, 10, RGB_BLACK
|
||||
@ -10154,7 +10154,7 @@ ConfusionEffect:
|
||||
SetPsychicBackground:
|
||||
fadetobg BG_PSYCHIC
|
||||
waitbgfadeout
|
||||
createvisualtask sub_815A504, 5
|
||||
createvisualtask AnimTask_SetPsychicBackground, 5
|
||||
waitbgfadein
|
||||
return
|
||||
|
||||
@ -10292,19 +10292,19 @@ Status_Nightmare:
|
||||
end
|
||||
|
||||
General_CastformChange:
|
||||
createvisualtask sub_815BB18, 2
|
||||
createvisualtask AnimTask_IsMonInvisible, 2
|
||||
jumpreteq 1, AnimScript_82D7ECA
|
||||
goto AnimScript_82D7EB2
|
||||
AnimScript_82D7EB2:
|
||||
monbg ANIM_ATTACKER
|
||||
playsewithpan SE_W100, SOUND_PAN_ATTACKER
|
||||
waitplaysewithpan SE_W107, SOUND_PAN_ATTACKER, 48
|
||||
createvisualtask sub_815B7D0, 2, 1
|
||||
createvisualtask AnimTask_TransformMon, 2, 1
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATTACKER
|
||||
end
|
||||
AnimScript_82D7ECA:
|
||||
createvisualtask sub_815BB58, 2, 1
|
||||
createvisualtask AnimTask_CastformGfxChange, 2, 1
|
||||
end
|
||||
|
||||
General_StatsChange:
|
||||
|
@ -13,11 +13,11 @@ gUnknown_0831C604:: @ 831C604
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C620:: @ 831C620
|
||||
gSmokescreenImpactSpriteSheet:: @ 831C620
|
||||
obj_tiles gSmokescreenImpactTiles, 0x0180, 0xd6eb
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C628:: @ 831C628
|
||||
gSmokescreenlImpactSpritePalette:: @ 831C628
|
||||
obj_pal gSmokescreenImpactPalette, 0xd6eb
|
||||
|
||||
.align 2
|
||||
@ -48,8 +48,8 @@ gUnknown_0831C678:: @ 831C678
|
||||
.4byte gUnknown_0831C668
|
||||
|
||||
.align 2
|
||||
gUnknown_0831C688:: @ 831C688
|
||||
spr_template 0xd6eb, 0xd6eb, gUnknown_0831C630, gUnknown_0831C678, NULL, gDummySpriteAffineAnimTable, sub_80753B4
|
||||
gSmokescreenImpactSpriteTemplate:: @ 831C688
|
||||
spr_template 0xd6eb, 0xd6eb, gUnknown_0831C630, gUnknown_0831C678, NULL, gDummySpriteAffineAnimTable, SpriteCB_DestroySprite
|
||||
|
||||
.align 2
|
||||
gSpriteSheet_EnemyShadow:: @ 831C6A0
|
||||
|
@ -185,7 +185,7 @@ bool8 IsBattlerSpritePresent(u8 battlerId);
|
||||
void sub_80A6C68(u32 arg0);
|
||||
u8 GetAnimBattlerSpriteId(u8 wantedBattler);
|
||||
bool8 IsDoubleBattle(void);
|
||||
u8 sub_80A6D94(void);
|
||||
u8 GetPaletteOffset(void);
|
||||
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
||||
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
|
||||
@ -231,7 +231,7 @@ void AnimWaterPulseRing(struct Sprite *sprite);
|
||||
void sub_810E2C8(struct Sprite *sprite);
|
||||
|
||||
// smokescreen.c
|
||||
u8 sub_807521C(s16 x, s16 y, u8 a3);
|
||||
u8 SmokescreenImpact(s16 x, s16 y, u8 a3);
|
||||
|
||||
u32 UnpackSelectedBattleAnimPalettes(s16);
|
||||
|
||||
|
@ -2808,12 +2808,12 @@ static void LoadMoveBg(u16 bgId)
|
||||
void *dmaDest;
|
||||
|
||||
LZDecompressWram(tilemap, gDecompressionBuffer);
|
||||
sub_80A4720(sub_80A6D94(), (void*)(gDecompressionBuffer), 0x100, 0);
|
||||
sub_80A4720(GetPaletteOffset(), (void*)(gDecompressionBuffer), 0x100, 0);
|
||||
dmaSrc = gDecompressionBuffer;
|
||||
dmaDest = (void *)(BG_SCREEN_ADDR(26));
|
||||
DmaCopy32(3, dmaSrc, dmaDest, 0x800);
|
||||
LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(BG_SCREEN_ADDR(4)));
|
||||
LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, sub_80A6D94() * 16, 32);
|
||||
LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, GetPaletteOffset() * 16, 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -32,13 +32,13 @@ void AnimTealAlert(struct Sprite *);
|
||||
void AnimMeanLookEye(struct Sprite *);
|
||||
void AnimSpikes(struct Sprite *);
|
||||
void AnimLeer(struct Sprite *);
|
||||
void sub_815A7EC(struct Sprite *);
|
||||
void AnimLetterZ(struct Sprite *);
|
||||
void AnimFang(struct Sprite *);
|
||||
void AnimSpotlight(struct Sprite *);
|
||||
void AnimClappingHand(struct Sprite *);
|
||||
void AnimClappingHand2(struct Sprite *);
|
||||
void AnimRapidSpin(struct Sprite *);
|
||||
void sub_815B27C(struct Sprite *);
|
||||
void AnimTriForceTriangle(struct Sprite *);
|
||||
void AnimBatonPassPokeball(struct Sprite *);
|
||||
void AnimWishStar(struct Sprite *);
|
||||
void AnimMiniTwinklingStar(struct Sprite *);
|
||||
@ -52,7 +52,7 @@ void AnimFlatterSpotlight(struct Sprite *);
|
||||
void AnimReversalOrb(struct Sprite *);
|
||||
void AnimYawnCloud(struct Sprite *);
|
||||
void AnimSmokeBallEscapeCloud(struct Sprite *);
|
||||
void sub_815DEBC(struct Sprite *);
|
||||
void AnimFacadeSweatDrop(struct Sprite *);
|
||||
void AnimRoarNoiseLine(struct Sprite *);
|
||||
void AnimGlareEyeDot(struct Sprite *);
|
||||
void AnimAssistPawprint(struct Sprite *);
|
||||
@ -66,26 +66,26 @@ void sub_815FE80(struct Sprite *);
|
||||
void AnimParticuleBurst(struct Sprite *);
|
||||
void AnimKnockOffStrike(struct Sprite *);
|
||||
void AnimRecycle(struct Sprite *);
|
||||
static void sub_815A114(struct Sprite *);
|
||||
static void sub_815A1F4(struct Sprite *);
|
||||
static void sub_815A234(struct Sprite *);
|
||||
static void sub_815A31C(struct Sprite *);
|
||||
static void sub_815A3AC(struct Sprite *);
|
||||
static void sub_815A3F0(struct Sprite *);
|
||||
static void sub_815A49C(struct Sprite *);
|
||||
static void sub_815A52C(u8);
|
||||
static void sub_815A5F0(u8);
|
||||
static void sub_815A73C(struct Sprite *);
|
||||
static void sub_815A76C(struct Sprite *);
|
||||
static void sub_815A9A0(struct Sprite *);
|
||||
static void sub_815AA6C(struct Sprite *);
|
||||
static void sub_815AB5C(struct Sprite *);
|
||||
static void sub_815AD4C(struct Sprite *);
|
||||
static void sub_815AED8(u8);
|
||||
static void sub_815B054(u8);
|
||||
static void sub_815B23C(struct Sprite *);
|
||||
static void sub_815B4D4(struct Sprite *);
|
||||
static void sub_815B5D0(struct Sprite *);
|
||||
static void AnimBlackSmokeStep(struct Sprite *);
|
||||
static void AnimWhiteHalo_Step1(struct Sprite *);
|
||||
static void AnimWhiteHalo_Step2(struct Sprite *);
|
||||
static void AnimMeanLookEye_Step1(struct Sprite *);
|
||||
static void AnimMeanLookEye_Step2(struct Sprite *);
|
||||
static void AnimMeanLookEye_Step3(struct Sprite *);
|
||||
static void AnimMeanLookEye_Step4(struct Sprite *);
|
||||
static void SetPsychicBackground_Step(u8);
|
||||
static void FadeScreenToWhite_Step(u8);
|
||||
static void AnimSpikes_Step1(struct Sprite *);
|
||||
static void AnimSpikes_Step2(struct Sprite *);
|
||||
static void AnimSpotlight_Step1(struct Sprite *);
|
||||
static void AnimSpotlight_Step2(struct Sprite *);
|
||||
static void AnimClappingHand_Step(struct Sprite *);
|
||||
static void AnimRapidSpin_Step(struct Sprite *);
|
||||
static void RapinSpinMonElevation_Step(u8);
|
||||
static void TormentAttacker_Step(u8);
|
||||
static void TormentAttacker_Callback(struct Sprite *);
|
||||
static void AnimWishStar_Step(struct Sprite *);
|
||||
static void AnimMiniTwinklingStar_Step(struct Sprite *);
|
||||
static void AnimGreenStar_Step1(struct Sprite *);
|
||||
static void AnimGreenStar_Step2(struct Sprite *);
|
||||
static void AnimGreenStar_Callback(struct Sprite *);
|
||||
@ -107,7 +107,7 @@ static void AnimRoarNoiseLineStep(struct Sprite *);
|
||||
static void AnimTask_GlareEyeDotsStep(u8);
|
||||
static void GetGlareEyeDotCoords(s16, s16, s16, s16, u8, u8, s16 *, s16 *);
|
||||
static void AnimTask_BarrageBallStep(u8);
|
||||
static void sub_815E784(struct Sprite *);
|
||||
static void AnimSmellingSaltsHand_Step(struct Sprite *);
|
||||
static void AnimTask_SmellingSaltsSquishStep(u8);
|
||||
static void AnimSmellingSaltExclamationStep(struct Sprite *);
|
||||
static void AnimHelpingHandClapStep(struct Sprite *);
|
||||
@ -315,7 +315,7 @@ const struct SpriteTemplate gLetterZSpriteTemplate =
|
||||
.anims = gLetterZAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gLetterZAffineAnimTable,
|
||||
.callback = sub_815A7EC,
|
||||
.callback = AnimLetterZ,
|
||||
};
|
||||
|
||||
const union AnimCmd gFangAnimCmds[] =
|
||||
@ -473,7 +473,7 @@ const struct SpriteTemplate gTriForceTriangleSpriteTemplate =
|
||||
.anims = gTriForceTriangleAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gTriForceTriangleAffineAnimTable,
|
||||
.callback = sub_815B27C,
|
||||
.callback = AnimTriForceTriangle,
|
||||
};
|
||||
|
||||
const union AnimCmd gEclipsingOrbAnimCmds[] =
|
||||
@ -888,7 +888,7 @@ const union AffineAnimCmd gFacadeSquishAffineAnimCmds[] =
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gFacadeSweatDrop =
|
||||
const struct SpriteTemplate gFacadeSweatDropSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_SWEAT_DROP,
|
||||
.paletteTag = ANIM_TAG_SWEAT_DROP,
|
||||
@ -896,7 +896,7 @@ const struct SpriteTemplate gFacadeSweatDrop =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_815DEBC,
|
||||
.callback = AnimFacadeSweatDrop,
|
||||
};
|
||||
|
||||
const u16 gFacadeBlendColors[] = {
|
||||
@ -1190,10 +1190,10 @@ void AnimBlackSmoke(struct Sprite *sprite)
|
||||
sprite->data[0] = -gBattleAnimArgs[2];
|
||||
|
||||
sprite->data[1] = gBattleAnimArgs[4];
|
||||
sprite->callback = sub_815A114;
|
||||
sprite->callback = AnimBlackSmokeStep;
|
||||
}
|
||||
|
||||
static void sub_815A114(struct Sprite *sprite)
|
||||
static void AnimBlackSmokeStep(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[1] > 0)
|
||||
{
|
||||
@ -1208,9 +1208,9 @@ static void sub_815A114(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815A160(u8 taskId)
|
||||
void AnimTask_SmokescreenImpact(u8 taskId)
|
||||
{
|
||||
sub_807521C(
|
||||
SmokescreenImpact(
|
||||
GetBattlerSpriteCoord(gBattleAnimTarget, 2) + 8,
|
||||
GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 8,
|
||||
0);
|
||||
@ -1222,22 +1222,22 @@ void AnimWhiteHalo(struct Sprite *sprite)
|
||||
sprite->data[0] = 90;
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
sprite->data[1] = 7;
|
||||
StoreSpriteCallbackInData6(sprite, sub_815A1F4);
|
||||
StoreSpriteCallbackInData6(sprite, AnimWhiteHalo_Step1);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[1], 16 - sprite->data[1]));
|
||||
}
|
||||
|
||||
static void sub_815A1F4(struct Sprite *sprite)
|
||||
static void AnimWhiteHalo_Step1(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[1], 16 - sprite->data[1]));
|
||||
if (--sprite->data[1] < 0)
|
||||
{
|
||||
sprite->invisible = 1;
|
||||
sprite->callback = sub_815A234;
|
||||
sprite->callback = AnimWhiteHalo_Step2;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815A234(struct Sprite *sprite)
|
||||
static void AnimWhiteHalo_Step2(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
@ -1271,10 +1271,10 @@ void AnimMeanLookEye(struct Sprite *sprite)
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||
sprite->data[0] = 4;
|
||||
sprite->callback = sub_815A31C;
|
||||
sprite->callback = AnimMeanLookEye_Step1;
|
||||
}
|
||||
|
||||
static void sub_815A31C(struct Sprite *sprite)
|
||||
static void AnimMeanLookEye_Step1(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[0], 16 - sprite->data[0]));
|
||||
|
||||
@ -1294,22 +1294,22 @@ static void sub_815A31C(struct Sprite *sprite)
|
||||
sprite->data[2] = 0;
|
||||
sprite->invisible = 1;
|
||||
sprite->affineAnimPaused = 1;
|
||||
sprite->callback = sub_815A3AC;
|
||||
sprite->callback = AnimMeanLookEye_Step2;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815A3AC(struct Sprite *sprite)
|
||||
static void AnimMeanLookEye_Step2(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[2]++ > 9)
|
||||
{
|
||||
sprite->invisible = 0;
|
||||
sprite->affineAnimPaused = 0;
|
||||
if (sprite->affineAnimEnded)
|
||||
sprite->callback = sub_815A3F0;
|
||||
sprite->callback = AnimMeanLookEye_Step3;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815A3F0(struct Sprite *sprite)
|
||||
static void AnimMeanLookEye_Step3(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[3])
|
||||
{
|
||||
@ -1344,11 +1344,11 @@ static void sub_815A3F0(struct Sprite *sprite)
|
||||
sprite->data[1] = 0;
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[0], 0));
|
||||
sprite->callback = sub_815A49C;
|
||||
sprite->callback = AnimMeanLookEye_Step4;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815A49C(struct Sprite *sprite)
|
||||
static void AnimMeanLookEye_Step4(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[0], 16 - sprite->data[0]));
|
||||
|
||||
@ -1369,17 +1369,17 @@ static void sub_815A49C(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815A504(u8 taskId)
|
||||
void AnimTask_SetPsychicBackground(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].func = sub_815A52C;
|
||||
gTasks[taskId].func = SetPsychicBackground_Step;
|
||||
gAnimVisualTaskCount--;
|
||||
}
|
||||
|
||||
static void sub_815A52C(u8 taskId)
|
||||
static void SetPsychicBackground_Step(u8 taskId)
|
||||
{
|
||||
int i;
|
||||
u16 lastColor;
|
||||
u8 paletteIndex = sub_80A6D94();
|
||||
u8 paletteIndex = GetPaletteOffset();
|
||||
|
||||
if (++gTasks[taskId].data[5] == 4)
|
||||
{
|
||||
@ -1395,17 +1395,17 @@ static void sub_815A52C(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
void sub_815A5C8(u8 taskId)
|
||||
void AnimTask_FadeScreenToWhite(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].func = sub_815A5F0;
|
||||
gTasks[taskId].func = FadeScreenToWhite_Step;
|
||||
gAnimVisualTaskCount--;
|
||||
}
|
||||
|
||||
static void sub_815A5F0(u8 taskId)
|
||||
static void FadeScreenToWhite_Step(u8 taskId)
|
||||
{
|
||||
int i;
|
||||
u16 lastColor;
|
||||
u8 paletteIndex = sub_80A6D94();
|
||||
u8 paletteIndex = GetPaletteOffset();
|
||||
|
||||
if (++gTasks[taskId].data[5] == 4)
|
||||
{
|
||||
@ -1443,21 +1443,21 @@ void AnimSpikes(struct Sprite *sprite)
|
||||
sprite->data[5] = -50;
|
||||
|
||||
InitAnimArcTranslation(sprite);
|
||||
sprite->callback = sub_815A73C;
|
||||
sprite->callback = AnimSpikes_Step1;
|
||||
}
|
||||
|
||||
static void sub_815A73C(struct Sprite *sprite)
|
||||
static void AnimSpikes_Step1(struct Sprite *sprite)
|
||||
{
|
||||
if (TranslateAnimHorizontalArc(sprite))
|
||||
{
|
||||
sprite->data[0] = 30;
|
||||
sprite->data[1] = 0;
|
||||
sprite->callback = WaitAnimForDuration;
|
||||
StoreSpriteCallbackInData6(sprite, sub_815A76C);
|
||||
StoreSpriteCallbackInData6(sprite, AnimSpikes_Step2);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815A76C(struct Sprite *sprite)
|
||||
static void AnimSpikes_Step2(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[1] & 1)
|
||||
sprite->invisible ^= 1;
|
||||
@ -1475,7 +1475,7 @@ void AnimLeer(struct Sprite *sprite)
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_815A7EC(struct Sprite *sprite)
|
||||
void AnimLetterZ(struct Sprite *sprite)
|
||||
{
|
||||
int var0;
|
||||
if (sprite->data[0] == 0)
|
||||
@ -1552,10 +1552,10 @@ void AnimSpotlight(struct Sprite *sprite)
|
||||
|
||||
sprite->oam.objMode = ST_OAM_OBJ_WINDOW;
|
||||
sprite->invisible = 1;
|
||||
sprite->callback = sub_815A9A0;
|
||||
sprite->callback = AnimSpotlight_Step1;
|
||||
}
|
||||
|
||||
static void sub_815A9A0(struct Sprite *sprite)
|
||||
static void AnimSpotlight_Step1(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
@ -1591,13 +1591,13 @@ static void sub_815A9A0(struct Sprite *sprite)
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
sprite->invisible = 1;
|
||||
sprite->callback = sub_815AA6C;
|
||||
sprite->callback = AnimSpotlight_Step2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815AA6C(struct Sprite *sprite)
|
||||
static void AnimSpotlight_Step2(struct Sprite *sprite)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR | WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) ^ DISPCNT_OBJWIN_ON);
|
||||
@ -1633,10 +1633,10 @@ void AnimClappingHand(struct Sprite *sprite)
|
||||
if (sprite->data[3] != 255)
|
||||
sprite->data[3] = gBattleAnimArgs[2];
|
||||
|
||||
sprite->callback = sub_815AB5C;
|
||||
sprite->callback = AnimClappingHand_Step;
|
||||
}
|
||||
|
||||
static void sub_815AB5C(struct Sprite *sprite)
|
||||
static void AnimClappingHand_Step(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[2] == 0)
|
||||
{
|
||||
@ -1672,7 +1672,7 @@ void AnimClappingHand2(struct Sprite *sprite)
|
||||
AnimClappingHand(sprite);
|
||||
}
|
||||
|
||||
void sub_815ABEC(u8 taskId)
|
||||
void AnimTask_CreateSpotlight(u8 taskId)
|
||||
{
|
||||
if (IsContest())
|
||||
{
|
||||
@ -1695,7 +1695,7 @@ void sub_815ABEC(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_815AC8C(u8 taskId)
|
||||
void AnimTask_RemoveSpotlight(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR);
|
||||
gBattle_WIN1H = 0;
|
||||
@ -1726,10 +1726,10 @@ void AnimRapidSpin(struct Sprite *sprite)
|
||||
sprite->data[2] = gBattleAnimArgs[4];
|
||||
sprite->data[3] = gBattleAnimArgs[5];
|
||||
sprite->data[4] = gBattleAnimArgs[3];
|
||||
sprite->callback = sub_815AD4C;
|
||||
sprite->callback = AnimRapidSpin_Step;
|
||||
}
|
||||
|
||||
static void sub_815AD4C(struct Sprite *sprite)
|
||||
static void AnimRapidSpin_Step(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[1] = (sprite->data[1] + sprite->data[2]) & 0xFF;
|
||||
sprite->pos2.x = gSineTable[sprite->data[1]] >> 4;
|
||||
@ -1747,7 +1747,7 @@ static void sub_815AD4C(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815ADB0(u8 taskId)
|
||||
void AnimTask_RapinSpinMonElevation(u8 taskId)
|
||||
{
|
||||
s16 var0;
|
||||
u8 toBG2;
|
||||
@ -1828,10 +1828,10 @@ void sub_815ADB0(u8 taskId)
|
||||
scanlineParams.unused9 = 0;
|
||||
ScanlineEffect_SetParams(scanlineParams);
|
||||
|
||||
task->func = sub_815AED8;
|
||||
task->func = RapinSpinMonElevation_Step;
|
||||
}
|
||||
|
||||
static void sub_815AED8(u8 taskId)
|
||||
static void RapinSpinMonElevation_Step(u8 taskId)
|
||||
{
|
||||
s16 i;
|
||||
struct Task *task = &gTasks[taskId];
|
||||
@ -1890,7 +1890,7 @@ static void sub_815AED8(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815AFF0(u8 taskId)
|
||||
void AnimTask_TormentAttacker(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
@ -1902,10 +1902,10 @@ void sub_815AFF0(u8 taskId)
|
||||
task->data[5] = -20;
|
||||
task->data[6] = 0;
|
||||
task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
task->func = sub_815B054;
|
||||
task->func = TormentAttacker_Step;
|
||||
}
|
||||
|
||||
static void sub_815B054(u8 taskId)
|
||||
static void TormentAttacker_Step(u8 taskId)
|
||||
{
|
||||
int var0, var1;
|
||||
s16 x, y;
|
||||
@ -1987,7 +1987,7 @@ static void sub_815B054(u8 taskId)
|
||||
gSprites[i].data[0] = taskId;
|
||||
gSprites[i].data[1] = 6;
|
||||
StartSpriteAnim(&gSprites[i], 2);
|
||||
gSprites[i].callback = sub_815B23C;
|
||||
gSprites[i].callback = TormentAttacker_Callback;
|
||||
|
||||
if (++j == 6)
|
||||
break;
|
||||
@ -2004,7 +2004,7 @@ static void sub_815B054(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_815B23C(struct Sprite *sprite)
|
||||
static void TormentAttacker_Callback(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
@ -2013,7 +2013,7 @@ static void sub_815B23C(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815B27C(struct Sprite *sprite)
|
||||
void AnimTriForceTriangle(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data[0] == 0)
|
||||
InitSpritePosToAnimAttacker(sprite, FALSE);
|
||||
@ -2110,10 +2110,10 @@ void AnimWishStar(struct Sprite *sprite)
|
||||
sprite->pos1.x = 256;
|
||||
|
||||
sprite->pos1.y = 0;
|
||||
sprite->callback = sub_815B4D4;
|
||||
sprite->callback = AnimWishStar_Step;
|
||||
}
|
||||
|
||||
static void sub_815B4D4(struct Sprite *sprite)
|
||||
static void AnimWishStar_Step(struct Sprite *sprite)
|
||||
{
|
||||
u32 newX;
|
||||
|
||||
@ -2156,10 +2156,10 @@ void AnimMiniTwinklingStar(struct Sprite *sprite)
|
||||
y = -y;
|
||||
|
||||
sprite->pos2.y = y;
|
||||
sprite->callback = sub_815B5D0;
|
||||
sprite->callback = AnimMiniTwinklingStar_Step;
|
||||
}
|
||||
|
||||
static void sub_815B5D0(struct Sprite *sprite)
|
||||
static void AnimMiniTwinklingStar_Step(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[0] < 30)
|
||||
{
|
||||
@ -2248,7 +2248,7 @@ void AnimTask_SwallowDeformMon(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815B7D0(u8 taskId)
|
||||
void AnimTask_TransformMon(u8 taskId)
|
||||
{
|
||||
int i, j;
|
||||
u8 position;
|
||||
@ -2361,13 +2361,13 @@ void sub_815B7D0(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815BB18(u8 taskId)
|
||||
void AnimTask_IsMonInvisible(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_815BB58(u8 taskId)
|
||||
void AnimTask_CastformGfxChange(u8 taskId)
|
||||
{
|
||||
HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, TRUE);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
@ -3808,7 +3808,7 @@ static void CreateSweatDroplets(u8 taskId, bool8 arg1)
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gFacadeSweatDrop, xCoords[i], yCoords[i & 1], task->data[6] - 5);
|
||||
u8 spriteId = CreateSprite(&gFacadeSweatDropSpriteTemplate, xCoords[i], yCoords[i & 1], task->data[6] - 5);
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
gSprites[spriteId].data[0] = 0;
|
||||
@ -3821,7 +3821,7 @@ static void CreateSweatDroplets(u8 taskId, bool8 arg1)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_815DEBC(struct Sprite *sprite)
|
||||
void AnimFacadeSweatDrop(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x += sprite->data[1];
|
||||
sprite->pos1.y += sprite->data[2];
|
||||
@ -4175,10 +4175,10 @@ void AnimSmellingSaltsHand(struct Sprite *sprite)
|
||||
sprite->pos1.x = GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_RIGHT) + 8;
|
||||
}
|
||||
|
||||
sprite->callback = sub_815E784;
|
||||
sprite->callback = AnimSmellingSaltsHand_Step;
|
||||
}
|
||||
|
||||
static void sub_815E784(struct Sprite *sprite)
|
||||
static void AnimSmellingSaltsHand_Step(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
|
@ -966,7 +966,7 @@ void sub_80A6D60(struct BattleAnimBgData *unk, const void *src, u32 arg2)
|
||||
CopyBgTilemapBufferToVram(unk->bgId);
|
||||
}
|
||||
|
||||
u8 sub_80A6D94(void)
|
||||
u8 GetPaletteOffset(void)
|
||||
{
|
||||
if (IsContest())
|
||||
return 1;
|
||||
@ -1353,7 +1353,7 @@ u32 sub_80A75AC(u8 battleBackground, u8 attacker, u8 target, u8 attackerPartner,
|
||||
if (!IsContest())
|
||||
selectedPalettes = 0xe;
|
||||
else
|
||||
selectedPalettes = 1 << sub_80A6D94();
|
||||
selectedPalettes = 1 << GetPaletteOffset();
|
||||
}
|
||||
if (attacker)
|
||||
{
|
||||
|
@ -4,46 +4,46 @@
|
||||
#include "sprite.h"
|
||||
#include "util.h"
|
||||
|
||||
static void sub_8075370(struct Sprite *);
|
||||
static void SmokescreenImpact_Callback(struct Sprite *);
|
||||
|
||||
extern const struct CompressedSpriteSheet gUnknown_0831C620;
|
||||
extern const struct CompressedSpritePalette gUnknown_0831C628;
|
||||
extern const struct SpriteTemplate gUnknown_0831C688;
|
||||
extern const struct CompressedSpriteSheet gSmokescreenImpactSpriteSheet;
|
||||
extern const struct CompressedSpritePalette gSmokescreenlImpactSpritePalette;
|
||||
extern const struct SpriteTemplate gSmokescreenImpactSpriteTemplate;
|
||||
|
||||
u8 sub_807521C(s16 x, s16 y, u8 a3)
|
||||
u8 SmokescreenImpact(s16 x, s16 y, u8 a3)
|
||||
{
|
||||
u8 mainSpriteId;
|
||||
u8 spriteId1, spriteId2, spriteId3, spriteId4;
|
||||
struct Sprite *mainSprite;
|
||||
|
||||
if (GetSpriteTileStartByTag(gUnknown_0831C620.tag) == 0xFFFF)
|
||||
if (GetSpriteTileStartByTag(gSmokescreenImpactSpriteSheet.tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedSpriteSheetUsingHeap(&gUnknown_0831C620);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gUnknown_0831C628);
|
||||
LoadCompressedSpriteSheetUsingHeap(&gSmokescreenImpactSpriteSheet);
|
||||
LoadCompressedSpritePaletteUsingHeap(&gSmokescreenlImpactSpritePalette);
|
||||
}
|
||||
|
||||
mainSpriteId = CreateInvisibleSpriteWithCallback(sub_8075370);
|
||||
mainSpriteId = CreateInvisibleSpriteWithCallback(SmokescreenImpact_Callback);
|
||||
mainSprite = &gSprites[mainSpriteId];
|
||||
mainSprite->data[1] = a3;
|
||||
|
||||
spriteId1 = CreateSprite(&gUnknown_0831C688, x - 16, y - 16, 2);
|
||||
spriteId1 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x - 16, y - 16, 2);
|
||||
gSprites[spriteId1].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
AnimateSprite(&gSprites[spriteId1]);
|
||||
|
||||
spriteId2 = CreateSprite(&gUnknown_0831C688, x, y - 16, 2);
|
||||
spriteId2 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x, y - 16, 2);
|
||||
gSprites[spriteId2].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
StartSpriteAnim(&gSprites[spriteId2], 1);
|
||||
AnimateSprite(&gSprites[spriteId2]);
|
||||
|
||||
spriteId3 = CreateSprite(&gUnknown_0831C688, x - 16, y, 2);
|
||||
spriteId3 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x - 16, y, 2);
|
||||
gSprites[spriteId3].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
StartSpriteAnim(&gSprites[spriteId3], 2);
|
||||
AnimateSprite(&gSprites[spriteId3]);
|
||||
|
||||
spriteId4 = CreateSprite(&gUnknown_0831C688, x, y, 2);
|
||||
spriteId4 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x, y, 2);
|
||||
gSprites[spriteId4].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
StartSpriteAnim(&gSprites[spriteId4], 3);
|
||||
@ -52,12 +52,12 @@ u8 sub_807521C(s16 x, s16 y, u8 a3)
|
||||
return mainSpriteId;
|
||||
}
|
||||
|
||||
static void sub_8075370(struct Sprite *sprite)
|
||||
static void SmokescreenImpact_Callback(struct Sprite *sprite)
|
||||
{
|
||||
if (!sprite->data[0])
|
||||
{
|
||||
FreeSpriteTilesByTag(gUnknown_0831C620.tag);
|
||||
FreeSpritePaletteByTag(gUnknown_0831C628.tag);
|
||||
FreeSpriteTilesByTag(gSmokescreenImpactSpriteSheet.tag);
|
||||
FreeSpritePaletteByTag(gSmokescreenlImpactSpritePalette.tag);
|
||||
if (!sprite->data[1])
|
||||
DestroySprite(sprite);
|
||||
else
|
||||
@ -65,7 +65,7 @@ static void sub_8075370(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80753B4(struct Sprite *sprite)
|
||||
void SpriteCB_DestroySprite(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user