mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Label battle_anim_effects_1
This commit is contained in:
parent
65b82d67c9
commit
975c0ce1d0
@ -2549,7 +2549,7 @@ Move_THRASH:
|
|||||||
Move_SING:
|
Move_SING:
|
||||||
loadspritegfx ANIM_TAG_MUSIC_NOTES
|
loadspritegfx ANIM_TAG_MUSIC_NOTES
|
||||||
monbg ANIM_DEF_PARTNER
|
monbg ANIM_DEF_PARTNER
|
||||||
createvisualtask sub_8102BE8, 2
|
createvisualtask AnimTask_MusicNotesRainbowBlend, 2
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
panse_1B SE_W047, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
|
panse_1B SE_W047, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
|
||||||
createsprite gWavingMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 0, 12
|
createsprite gWavingMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 0, 12
|
||||||
@ -2578,7 +2578,7 @@ Move_SING:
|
|||||||
delay 4
|
delay 4
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
clearmonbg ANIM_DEF_PARTNER
|
clearmonbg ANIM_DEF_PARTNER
|
||||||
createvisualtask sub_8102CA0, 2
|
createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -4229,7 +4229,7 @@ Move_GRASS_WHISTLE:
|
|||||||
loadspritegfx ANIM_TAG_MUSIC_NOTES
|
loadspritegfx ANIM_TAG_MUSIC_NOTES
|
||||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, RGB(18, 31, 12)
|
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, RGB(18, 31, 12)
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
createvisualtask sub_8102BE8, 2
|
createvisualtask AnimTask_MusicNotesRainbowBlend, 2
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
panse_1B SE_W320, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
|
panse_1B SE_W320, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
|
||||||
createsprite gWavingMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 1, 0
|
createsprite gWavingMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 1, 0
|
||||||
@ -4257,7 +4257,7 @@ Move_GRASS_WHISTLE:
|
|||||||
createsprite gWavingMusicNotesSpriteTemplate, ANIM_TARGET, 2, 5, 1, 0
|
createsprite gWavingMusicNotesSpriteTemplate, ANIM_TARGET, 2, 5, 1, 0
|
||||||
delay 4
|
delay 4
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
createvisualtask sub_8102CA0, 2
|
createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2
|
||||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 4, 4, 0, RGB(18, 31, 12)
|
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 4, 4, 0, RGB(18, 31, 12)
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
@ -4577,7 +4577,7 @@ Move_HARDEN:
|
|||||||
Move_BELLY_DRUM:
|
Move_BELLY_DRUM:
|
||||||
loadspritegfx ANIM_TAG_MUSIC_NOTES
|
loadspritegfx ANIM_TAG_MUSIC_NOTES
|
||||||
loadspritegfx ANIM_TAG_PURPLE_HAND_OUTLINE
|
loadspritegfx ANIM_TAG_PURPLE_HAND_OUTLINE
|
||||||
createvisualtask sub_8102BE8, 2
|
createvisualtask AnimTask_MusicNotesRainbowBlend, 2
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
call BellyDrum1
|
call BellyDrum1
|
||||||
createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, 0
|
createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, 0
|
||||||
@ -4603,7 +4603,7 @@ Move_BELLY_DRUM:
|
|||||||
createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 3, 0
|
createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 3, 0
|
||||||
playsewithpan SE_W187, SOUND_PAN_ATTACKER
|
playsewithpan SE_W187, SOUND_PAN_ATTACKER
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
createvisualtask sub_8102CA0, 2
|
createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ void AnimTrickBag(struct Sprite *);
|
|||||||
void AnimFlyingParticle(struct Sprite *);
|
void AnimFlyingParticle(struct Sprite *);
|
||||||
void AnimNeedleArmSpike(struct Sprite *);
|
void AnimNeedleArmSpike(struct Sprite *);
|
||||||
void sub_81009F8(struct Sprite *);
|
void sub_81009F8(struct Sprite *);
|
||||||
void sub_8100A50(struct Sprite *);
|
void AnimWhipHit(struct Sprite *);
|
||||||
void sub_8100A94(struct Sprite *);
|
void sub_8100A94(struct Sprite *);
|
||||||
void AnimCuttingSlice(struct Sprite *);
|
void AnimCuttingSlice(struct Sprite *);
|
||||||
void AnimAirCutterSlice(struct Sprite *);
|
void AnimAirCutterSlice(struct Sprite *);
|
||||||
@ -93,8 +93,8 @@ static void AnimTranslateLinearSingleSineWaveStep(struct Sprite *);
|
|||||||
static void AnimMoveTwisterParticleStep(struct Sprite *);
|
static void AnimMoveTwisterParticleStep(struct Sprite *);
|
||||||
static void AnimConstrictBindingStep1(struct Sprite *);
|
static void AnimConstrictBindingStep1(struct Sprite *);
|
||||||
static void AnimConstrictBindingStep2(struct Sprite *);
|
static void AnimConstrictBindingStep2(struct Sprite *);
|
||||||
static void AnimTask_ShrinkMonSpriteToPosStep1(u8);
|
static void AnimTask_DuplicateAndShrinkToPosStep1(u8);
|
||||||
static void AnimTask_ShrinkMonSpriteToPosStep2(u8);
|
static void AnimTask_DuplicateAndShrinkToPosStep2(u8);
|
||||||
static void AnimItemStealStep(struct Sprite *);
|
static void AnimItemStealStep(struct Sprite *);
|
||||||
static void AnimRootFlickerOut(struct Sprite *);
|
static void AnimRootFlickerOut(struct Sprite *);
|
||||||
static void AnimTrickBagStep1(struct Sprite *);
|
static void AnimTrickBagStep1(struct Sprite *);
|
||||||
@ -1091,7 +1091,7 @@ const struct SpriteTemplate gSlamHitSpriteTemplate =
|
|||||||
.anims = gWhipAnimTable,
|
.anims = gWhipAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_8100A50,
|
.callback = AnimWhipHit,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gVineWhipSpriteTemplate =
|
const struct SpriteTemplate gVineWhipSpriteTemplate =
|
||||||
@ -1102,7 +1102,7 @@ const struct SpriteTemplate gVineWhipSpriteTemplate =
|
|||||||
.anims = gWhipAnimTable,
|
.anims = gWhipAnimTable,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
.affineAnims = gDummySpriteAffineAnimTable,
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
.callback = sub_8100A50,
|
.callback = AnimWhipHit,
|
||||||
};
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08592900[] =
|
const union AnimCmd gUnknown_08592900[] =
|
||||||
@ -2810,11 +2810,11 @@ void sub_80FF458(u8 taskId)
|
|||||||
gTasks[taskId].data[0] = gBattleAnimArgs[0];
|
gTasks[taskId].data[0] = gBattleAnimArgs[0];
|
||||||
gTasks[taskId].data[1] = gBattleAnimArgs[1];
|
gTasks[taskId].data[1] = gBattleAnimArgs[1];
|
||||||
gTasks[taskId].data[11] = 0x100;
|
gTasks[taskId].data[11] = 0x100;
|
||||||
gTasks[taskId].func = AnimTask_ShrinkMonSpriteToPosStep1;
|
gTasks[taskId].func = AnimTask_DuplicateAndShrinkToPosStep1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AnimTask_ShrinkMonSpriteToPosStep1(u8 taskId)
|
static void AnimTask_DuplicateAndShrinkToPosStep1(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||||
gTasks[taskId].data[10] += gTasks[taskId].data[0];
|
gTasks[taskId].data[10] += gTasks[taskId].data[0];
|
||||||
@ -2828,11 +2828,11 @@ static void AnimTask_ShrinkMonSpriteToPosStep1(u8 taskId)
|
|||||||
if (--gTasks[taskId].data[1] == 0)
|
if (--gTasks[taskId].data[1] == 0)
|
||||||
{
|
{
|
||||||
gTasks[taskId].data[0] = 0;
|
gTasks[taskId].data[0] = 0;
|
||||||
gTasks[taskId].func = AnimTask_ShrinkMonSpriteToPosStep2;
|
gTasks[taskId].func = AnimTask_DuplicateAndShrinkToPosStep2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AnimTask_ShrinkMonSpriteToPosStep2(u8 taskId)
|
static void AnimTask_DuplicateAndShrinkToPosStep2(u8 taskId)
|
||||||
{
|
{
|
||||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||||
{
|
{
|
||||||
@ -2988,34 +2988,34 @@ static void sub_80FF9B8(struct Sprite* sprite, s16 c)
|
|||||||
sprite->data[7] = c;
|
sprite->data[7] = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 sub_80FF9E0(struct Sprite* sprite)
|
bool8 moveAlongLinearPath(struct Sprite* sprite)
|
||||||
{
|
{
|
||||||
u16 r10 = (u8)(sprite->data[5] >> 8);
|
u16 xStartPos = (u8)(sprite->data[5] >> 8);
|
||||||
u16 r9 = (u8)sprite->data[5];
|
u16 yStartPos = (u8)sprite->data[5];
|
||||||
s32 r2 = (u8)(sprite->data[6] >> 8);
|
s32 xEndPos = (u8)(sprite->data[6] >> 8);
|
||||||
s32 r4 = (u8)sprite->data[6];
|
s32 yEndPos = (u8)sprite->data[6];
|
||||||
s16 r6 = sprite->data[7] >> 8;
|
s16 totalTime = sprite->data[7] >> 8;
|
||||||
s16 r3 = sprite->data[7] & 0xFF;
|
s16 currentTime = sprite->data[7] & 0xFF;
|
||||||
s16 r4_2;
|
s16 yEndPos_2;
|
||||||
s16 r0;
|
s16 r0;
|
||||||
s32 var1;
|
s32 var1;
|
||||||
s32 var2;
|
s32 vaxEndPos;
|
||||||
|
|
||||||
if (r2 == 0)
|
if (xEndPos == 0)
|
||||||
r2 = -32;
|
xEndPos = -32;
|
||||||
else if (r2 == 255)
|
else if (xEndPos == 255)
|
||||||
r2 = 272;
|
xEndPos = 272;
|
||||||
|
|
||||||
r4_2 = r4 - r9;
|
yEndPos_2 = yEndPos - yStartPos;
|
||||||
r0 = r2 - r10;
|
r0 = xEndPos - xStartPos;
|
||||||
var1 = r0 * r3 / r6;
|
var1 = r0 * currentTime / totalTime;
|
||||||
var2 = r4_2 * r3 / r6;
|
vaxEndPos = yEndPos_2 * currentTime / totalTime;
|
||||||
sprite->pos1.x = var1 + r10;
|
sprite->pos1.x = var1 + xStartPos;
|
||||||
sprite->pos1.y = var2 + r9;
|
sprite->pos1.y = vaxEndPos + yStartPos;
|
||||||
if (++r3 == r6)
|
if (++currentTime == totalTime)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
sprite->data[7] = (r6 << 8) | r3;
|
sprite->data[7] = (totalTime << 8) | currentTime;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3039,7 +3039,7 @@ static void sub_80FFAB4(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sprite->pos2.y = Sin(sprite->data[0] + 128, 30 - sprite->data[1] * 8);
|
sprite->pos2.y = Sin(sprite->data[0] + 128, 30 - sprite->data[1] * 8);
|
||||||
if (sub_80FF9E0(sprite))
|
if (moveAlongLinearPath(sprite))
|
||||||
{
|
{
|
||||||
sprite->pos2.y = 0;
|
sprite->pos2.y = 0;
|
||||||
sprite->data[0] = 0;
|
sprite->data[0] = 0;
|
||||||
@ -3085,7 +3085,7 @@ static void sub_80FFB90(struct Sprite* sprite)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sprite->pos2.y = Sin(sprite->data[0] + 0x80, 30 - sprite->data[1] * 8);
|
sprite->pos2.y = Sin(sprite->data[0] + 0x80, 30 - sprite->data[1] * 8);
|
||||||
if (sub_80FF9E0(sprite))
|
if (moveAlongLinearPath(sprite))
|
||||||
{
|
{
|
||||||
sprite->pos2.y = zero;
|
sprite->pos2.y = zero;
|
||||||
sprite->data[0] = zero;
|
sprite->data[0] = zero;
|
||||||
@ -3179,7 +3179,7 @@ static void AnimItemStealStep(struct Sprite* sprite)
|
|||||||
if (sprite->pos2.y == 0)
|
if (sprite->pos2.y == 0)
|
||||||
PlaySE12WithPanning(SE_W145B, BattleAnimAdjustPanning(63));
|
PlaySE12WithPanning(SE_W145B, BattleAnimAdjustPanning(63));
|
||||||
|
|
||||||
if (sub_80FF9E0(sprite))
|
if (moveAlongLinearPath(sprite))
|
||||||
{
|
{
|
||||||
sprite->pos2.y = 0;
|
sprite->pos2.y = 0;
|
||||||
sprite->data[0] = 0;
|
sprite->data[0] = 0;
|
||||||
@ -3753,7 +3753,7 @@ void sub_81009F8(struct Sprite* sprite)
|
|||||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8100A50(struct Sprite* sprite)
|
void AnimWhipHit(struct Sprite* sprite)
|
||||||
{
|
{
|
||||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
||||||
StartSpriteAnim(sprite, 1);
|
StartSpriteAnim(sprite, 1);
|
||||||
@ -5237,7 +5237,7 @@ void AnimSuperFang(struct Sprite* sprite)
|
|||||||
sprite->callback = RunStoredCallbackWhenAnimEnds;
|
sprite->callback = RunStoredCallbackWhenAnimEnds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_8102BE8(u8 taskId)
|
void AnimTask_MusicNotesRainbowBlend(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
u16 j;
|
u16 j;
|
||||||
@ -5265,7 +5265,7 @@ void sub_8102BE8(u8 taskId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clears the rainbow effect for musical notes.
|
// clears the rainbow effect for musical notes.
|
||||||
void sub_8102CA0(u8 taskId)
|
void AnimTask_MusicNotesClearRainbowBlend(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
for (i = 1; i < ARRAY_COUNT(gParticlesColorBlendTable); i++)
|
for (i = 1; i < ARRAY_COUNT(gParticlesColorBlendTable); i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user