mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Some battle anim review changes
This commit is contained in:
parent
1ba12dc050
commit
0d651c7c9e
@ -7703,7 +7703,7 @@ Move_HEAL_BELL:
|
||||
loadspritegfx ANIM_TAG_THIN_RING
|
||||
createvisualtask AnimTask_BlendBattleAnimPal, 10, 10, 0, 0, 10, RGB_WHITE
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_LoadMusicNotesPal, 5
|
||||
createvisualtask AnimTask_LoadMusicNotesPals, 5
|
||||
createsprite gBellSpriteTemplate, ANIM_ATTACKER, 2, 0, -24, 0, 1
|
||||
delay 12
|
||||
createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 48, -18, 35, 0, 0
|
||||
@ -7724,7 +7724,7 @@ Move_HEAL_BELL:
|
||||
createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -36, -18, 30, 6, 1
|
||||
call HealBellRing
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_FreeMusicNotesPal, 5
|
||||
createvisualtask AnimTask_FreeMusicNotesPals, 5
|
||||
waitforvisualfinish
|
||||
unloadspritegfx ANIM_TAG_BELL
|
||||
unloadspritegfx ANIM_TAG_MUSIC_NOTES_2
|
||||
@ -9053,7 +9053,7 @@ Move_COSMIC_POWER:
|
||||
loadspritegfx ANIM_TAG_SPARKLE_2
|
||||
createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W322, 0
|
||||
playsewithpan SE_W322, 0
|
||||
createvisualtask AnimTask_BlendAllBattlerPalettesButAttacker, 2, 0, 0, 15, RGB_BLACK
|
||||
createvisualtask AnimTask_BlendNonAttackerPalettes, 2, 0, 0, 15, RGB_BLACK
|
||||
waitforvisualfinish
|
||||
fadetobg BG_COSMIC
|
||||
waitbgfadeout
|
||||
@ -9065,7 +9065,7 @@ Move_COSMIC_POWER:
|
||||
delay 8
|
||||
createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 12, -5, 0, 0, 32, 60
|
||||
delay 40
|
||||
createvisualtask AnimTask_BlendAllBattlerPalettesButAttacker, 2, 0, 15, 0, RGB_BLACK
|
||||
createvisualtask AnimTask_BlendNonAttackerPalettes, 2, 0, 15, 0, RGB_BLACK
|
||||
waitforvisualfinish
|
||||
restorebg
|
||||
waitbgfadeout
|
||||
|
@ -2759,7 +2759,7 @@ static void AnimConstrictBindingStep1(struct Sprite* sprite)
|
||||
{
|
||||
u8 spriteId;
|
||||
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
{
|
||||
sprite->affineAnimPaused = 0;
|
||||
spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
@ -2833,7 +2833,7 @@ static void AnimTask_DuplicateAndShrinkToPosStep1(u8 taskId)
|
||||
|
||||
static void AnimTask_DuplicateAndShrinkToPosStep2(u8 taskId)
|
||||
{
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
{
|
||||
@ -3653,7 +3653,7 @@ void AnimTask_CycleMagicalLeafPal(u8 taskId)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gBattleAnimArgs[7] == -1)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == -1)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
@ -4353,7 +4353,7 @@ static void AnimLockOnTargetStep4(struct Sprite* sprite)
|
||||
|
||||
static void AnimLockOnTargetStep5(struct Sprite* sprite)
|
||||
{
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
sprite->data[0] = 0;
|
||||
@ -4845,7 +4845,7 @@ void AnimConversion(struct Sprite* sprite)
|
||||
sprite->data[0]++;
|
||||
}
|
||||
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
@ -4853,7 +4853,7 @@ void AnimTask_ConversionAlphaBlend(u8 taskId)
|
||||
{
|
||||
if (gTasks[taskId].data[2] == 1)
|
||||
{
|
||||
gBattleAnimArgs[7] = 0xFFFF;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0xFFFF;
|
||||
gTasks[taskId].data[2]++;
|
||||
}
|
||||
else if (gTasks[taskId].data[2] == 2)
|
||||
|
@ -2758,7 +2758,7 @@ static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *sprite)
|
||||
|
||||
static void AnimSoftBoiledEgg_Step4(struct Sprite *sprite)
|
||||
{
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
{
|
||||
sprite->invisible = 1;
|
||||
if (sprite->data[7] == 0)
|
||||
@ -3001,7 +3001,7 @@ void AnimSpeedDust(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void AnimTask_LoadMusicNotesPal(u8 taskId)
|
||||
void AnimTask_LoadMusicNotesPals(u8 taskId)
|
||||
{
|
||||
int i;
|
||||
u8 paletteNums[NUM_MUSIC_NOTE_PAL_TAGS];
|
||||
@ -3019,7 +3019,7 @@ void AnimTask_LoadMusicNotesPal(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_FreeMusicNotesPal(u8 taskId)
|
||||
void AnimTask_FreeMusicNotesPals(u8 taskId)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
|
||||
@ -3441,7 +3441,7 @@ static void AnimOrbitFastStep(struct Sprite *sprite)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
@ -3814,12 +3814,12 @@ void AnimGuardRing(struct Sprite *sprite)
|
||||
|
||||
void AnimTask_IsFuryCutterHitRight(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = gAnimDisableStructPtr->furyCutterCounter & 1;
|
||||
gBattleAnimArgs[ARG_RET_ID] = gAnimDisableStructPtr->furyCutterCounter & 1;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_GetFuryCutterHitCount(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = gAnimDisableStructPtr->furyCutterCounter;
|
||||
gBattleAnimArgs[ARG_RET_ID] = gAnimDisableStructPtr->furyCutterCounter;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
@ -1391,7 +1391,7 @@ static void SetPsychicBackground_Step(u8 taskId)
|
||||
gTasks[taskId].data[5] = 0;
|
||||
}
|
||||
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
@ -1422,7 +1422,7 @@ static void FadeScreenToWhite_Step(u8 taskId)
|
||||
gTasks[taskId].data[5] = 0;
|
||||
}
|
||||
|
||||
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||
if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
@ -1522,9 +1522,9 @@ void AnimFang(struct Sprite *sprite)
|
||||
void AnimTask_IsTargetPlayerSide(u8 taskId)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT)
|
||||
gBattleAnimArgs[7] = FALSE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = FALSE;
|
||||
else
|
||||
gBattleAnimArgs[7] = TRUE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = TRUE;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -1532,9 +1532,9 @@ void AnimTask_IsTargetPlayerSide(u8 taskId)
|
||||
void AnimTask_IsHealingMove(u8 taskId)
|
||||
{
|
||||
if (gAnimMoveDmg > 0)
|
||||
gBattleAnimArgs[7] = FALSE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = FALSE;
|
||||
else
|
||||
gBattleAnimArgs[7] = TRUE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = TRUE;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -2363,7 +2363,7 @@ void AnimTask_TransformMon(u8 taskId)
|
||||
|
||||
void AnimTask_IsMonInvisible(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible;
|
||||
gBattleAnimArgs[ARG_RET_ID] = gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
@ -4984,15 +4984,15 @@ static void MoveOdorSleuthClone(struct Sprite *sprite)
|
||||
|
||||
void AnimTask_GetReturnPowerLevel(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = 0;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0;
|
||||
if (gAnimFriendship < 60)
|
||||
gBattleAnimArgs[7] = 0;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0;
|
||||
if (gAnimFriendship > 60 && gAnimFriendship < 92)
|
||||
gBattleAnimArgs[7] = 1;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 1;
|
||||
if (gAnimFriendship > 91 && gAnimFriendship < 201)
|
||||
gBattleAnimArgs[7] = 2;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 2;
|
||||
if (gAnimFriendship > 200)
|
||||
gBattleAnimArgs[7] = 3;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 3;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -5091,7 +5091,7 @@ void AnimTask_SnatchOpposingMonMove(u8 taskId)
|
||||
if (x < GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X))
|
||||
{
|
||||
gTasks[taskId].data[14]++;
|
||||
gBattleAnimArgs[7] = 0xFFFF;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0xFFFF;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5099,7 +5099,7 @@ void AnimTask_SnatchOpposingMonMove(u8 taskId)
|
||||
if (x > GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X))
|
||||
{
|
||||
gTasks[taskId].data[14]++;
|
||||
gBattleAnimArgs[7] = 0xFFFF;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0xFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5149,7 +5149,7 @@ void sub_815FE80(struct Sprite *sprite)
|
||||
switch (sprite->data[7])
|
||||
{
|
||||
case 0:
|
||||
if (gBattleAnimArgs[7] == -1)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == -1)
|
||||
{
|
||||
PlaySE12WithPanning(SE_W233, BattleAnimAdjustPanning(63));
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 16;
|
||||
@ -5421,15 +5421,15 @@ static void AnimRecycleStep(struct Sprite *sprite)
|
||||
|
||||
void AnimTask_GetWeather(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = ANIM_WEATHER_NONE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_NONE;
|
||||
if (gWeatherMoveAnim & WEATHER_SUN_ANY)
|
||||
gBattleAnimArgs[7] = ANIM_WEATHER_SUN;
|
||||
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SUN;
|
||||
else if (gWeatherMoveAnim & WEATHER_RAIN_ANY)
|
||||
gBattleAnimArgs[7] = ANIM_WEATHER_RAIN;
|
||||
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_RAIN;
|
||||
else if (gWeatherMoveAnim & WEATHER_SANDSTORM_ANY)
|
||||
gBattleAnimArgs[7] = ANIM_WEATHER_SANDSTORM;
|
||||
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SANDSTORM;
|
||||
else if (gWeatherMoveAnim & WEATHER_HAIL_ANY)
|
||||
gBattleAnimArgs[7] = ANIM_WEATHER_HAIL;
|
||||
gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_HAIL;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
@ -1944,7 +1944,7 @@ void AnimTask_GetFrustrationPowerLevel(u8 taskId)
|
||||
powerLevel = 2;
|
||||
else
|
||||
powerLevel = 3;
|
||||
gBattleAnimArgs[7] = powerLevel;
|
||||
gBattleAnimArgs[ARG_RET_ID] = powerLevel;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
|
@ -683,7 +683,7 @@ static void sub_81175C4(u32 selectedPalettes, u16 color)
|
||||
}
|
||||
}
|
||||
|
||||
void AnimTask_BlendAllBattlerPalettesButAttacker(u8 taskId)
|
||||
void AnimTask_BlendNonAttackerPalettes(u8 taskId)
|
||||
{
|
||||
u32 battler;
|
||||
int j;
|
||||
@ -729,7 +729,7 @@ static void sub_81176D8(u8 taskId)
|
||||
gTasks[taskId].data[10] &= 0xFF;
|
||||
gTasks[taskId].data[11] &= 0xFF;
|
||||
|
||||
if (gBattleAnimArgs[7] == gTasks[taskId].data[3])
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == gTasks[taskId].data[3])
|
||||
{
|
||||
gBattle_BG3_X = 0;
|
||||
gBattle_BG3_Y = 0;
|
||||
@ -740,19 +740,19 @@ static void sub_81176D8(u8 taskId)
|
||||
|
||||
void AnimTask_GetAttackerSide(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = GetBattlerSide(gBattleAnimAttacker);
|
||||
gBattleAnimArgs[ARG_RET_ID] = GetBattlerSide(gBattleAnimAttacker);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_GetTargetSide(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = GetBattlerSide(gBattleAnimTarget);
|
||||
gBattleAnimArgs[ARG_RET_ID] = GetBattlerSide(gBattleAnimTarget);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_GetTargetIsAttackerPartner(u8 taskId)
|
||||
{
|
||||
gBattleAnimArgs[7] = BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget;
|
||||
gBattleAnimArgs[ARG_RET_ID] = BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
@ -1005,9 +1005,9 @@ void sub_8117DD8(u8 taskId)
|
||||
void AnimTask_IsContest(u8 taskId)
|
||||
{
|
||||
if (IsContest())
|
||||
gBattleAnimArgs[7] = TRUE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = TRUE;
|
||||
else
|
||||
gBattleAnimArgs[7] = FALSE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = FALSE;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -1022,9 +1022,9 @@ void sub_8117E94(u8 taskId)
|
||||
void AnimTask_IsTargetSameSide(u8 taskId)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget))
|
||||
gBattleAnimArgs[7] = TRUE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = TRUE;
|
||||
else
|
||||
gBattleAnimArgs[7] = FALSE;
|
||||
gBattleAnimArgs[ARG_RET_ID] = FALSE;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -1060,7 +1060,7 @@ void AnimTask_ExtremeSpeedMoveTarget(u8 taskId)
|
||||
|
||||
static void ExtremSpeedMoveTarget_Step(u8 taskId)
|
||||
{
|
||||
if (gBattleAnimArgs[7] == 0x1000)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == 0x1000)
|
||||
{
|
||||
gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = (u8)gTasks[taskId].data[0] & 1;
|
||||
DestroyTask(taskId);
|
||||
|
@ -983,10 +983,10 @@ void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId)
|
||||
void sub_8114960(u8 taskId)
|
||||
{
|
||||
if (gAnimMoveTurn < 2)
|
||||
gBattleAnimArgs[7] = 0;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0;
|
||||
|
||||
if (gAnimMoveTurn == 2)
|
||||
gBattleAnimArgs[7] = 1;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 1;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ static void sub_810A628(struct Sprite *sprite)
|
||||
u8 battler;
|
||||
|
||||
sprite->data[0] = gBattleAnimArgs[3];
|
||||
if (gBattleAnimArgs[7] & 0x8000)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] & 0x8000)
|
||||
battler = gBattleAnimTarget;
|
||||
else
|
||||
battler = gBattleAnimAttacker;
|
||||
@ -638,7 +638,7 @@ static void sub_810A628(struct Sprite *sprite)
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2) + gBattleAnimArgs[0];
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(battler, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[1];
|
||||
|
||||
sprite->data[4] = gBattleAnimArgs[7] & 0x7FFF;
|
||||
sprite->data[4] = gBattleAnimArgs[ARG_RET_ID] & 0x7FFF;
|
||||
sprite->data[5] = gBattleAnimArgs[2];
|
||||
sprite->data[6] = gBattleAnimArgs[5];
|
||||
sprite->data[7] = gBattleAnimArgs[4];
|
||||
|
@ -426,7 +426,7 @@ void unc_080B08A0(struct Sprite *sprite)
|
||||
|
||||
void sub_810CE68(struct Sprite *sprite)
|
||||
{
|
||||
if (gBattleAnimArgs[7] == 1 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == 1 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
{
|
||||
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||
@ -1027,7 +1027,7 @@ void AnimTask_MoveSkyUppercutBg(u8 taskId)
|
||||
task->data[9] &= 0xFF;
|
||||
task->data[10] &= 0xFF;
|
||||
|
||||
if (gBattleAnimArgs[7] == -1)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == -1)
|
||||
{
|
||||
gBattle_BG3_X = 0;
|
||||
gBattle_BG3_Y = 0;
|
||||
|
@ -573,7 +573,7 @@ static void AnimFallingFeather(struct Sprite *sprite)
|
||||
|
||||
struct FeatherDanceData *data = (struct FeatherDanceData *)sprite->data;
|
||||
|
||||
if (gBattleAnimArgs[7] & 0x100)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] & 0x100)
|
||||
battler = gBattleAnimAttacker;
|
||||
else
|
||||
battler = gBattleAnimTarget;
|
||||
|
@ -758,7 +758,7 @@ static void sub_81156D0(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
if (gBattleAnimArgs[7] == task->data[3])
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == task->data[3])
|
||||
{
|
||||
gBattle_BG3_X = 0;
|
||||
gBattle_BG3_Y = 0;
|
||||
|
@ -788,7 +788,7 @@ void AnimMoveParticleBeyondTarget(struct Sprite *sprite)
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
|
||||
if (!gBattleAnimArgs[7])
|
||||
if (!gBattleAnimArgs[ARG_RET_ID])
|
||||
{
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2);
|
||||
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
@ -1203,7 +1203,7 @@ static void InitPoisonGasCloudAnim(struct Sprite *sprite)
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
if (gBattleAnimArgs[7])
|
||||
if (gBattleAnimArgs[ARG_RET_ID])
|
||||
{
|
||||
sprite->data[1] = sprite->pos1.x + gBattleAnimArgs[1];
|
||||
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[3];
|
||||
|
26
src/normal.c
26
src/normal.c
@ -22,8 +22,8 @@ static void AnimConfusionDuckStep(struct Sprite *);
|
||||
static void AnimSimplePaletteBlendStep(struct Sprite *);
|
||||
static void sub_81158F8(struct Sprite *);
|
||||
static void sub_8115984(struct Sprite *);
|
||||
static void BlendMonColorInCycle(u8, u8, u8);
|
||||
static void AnimTask_BlendCycleMonColorLoop(u8);
|
||||
static void BlendColorInCycle(u8, u8, u8);
|
||||
static void AnimTask_BlendColorInCycleLoop(u8);
|
||||
static void sub_8115BC8(u8, u8, u8);
|
||||
static void sub_8115C18(u8);
|
||||
static void sub_8115CD0(u8, u8, u8);
|
||||
@ -416,12 +416,12 @@ void sub_81159B4(struct Sprite *sprite)
|
||||
}
|
||||
|
||||
// Task data for AnimTask_BlendColorCycle
|
||||
#define tPalSelector data[0] // arg0
|
||||
#define tDelay data[1] // arg1
|
||||
#define tNumBlends data[2] // arg2
|
||||
#define tInitialBlendY data[3] // arg3
|
||||
#define tTargetBlendY data[4] // arg4
|
||||
#define tBlendColor data[5] // arg5
|
||||
#define tPalSelector data[0]
|
||||
#define tDelay data[1]
|
||||
#define tNumBlends data[2]
|
||||
#define tInitialBlendY data[3]
|
||||
#define tTargetBlendY data[4]
|
||||
#define tBlendColor data[5]
|
||||
#define tRestoreBlend data[8]
|
||||
|
||||
// Blends mon/screen to designated color or back alternately tNumBlends times
|
||||
@ -435,11 +435,11 @@ void AnimTask_BlendColorCycle(u8 taskId)
|
||||
gTasks[taskId].tTargetBlendY = gBattleAnimArgs[4];
|
||||
gTasks[taskId].tBlendColor = gBattleAnimArgs[5];
|
||||
gTasks[taskId].tRestoreBlend = FALSE;
|
||||
BlendMonColorInCycle(taskId, 0, gTasks[taskId].tTargetBlendY);
|
||||
gTasks[taskId].func = AnimTask_BlendCycleMonColorLoop;
|
||||
BlendColorInCycle(taskId, 0, gTasks[taskId].tTargetBlendY);
|
||||
gTasks[taskId].func = AnimTask_BlendColorInCycleLoop;
|
||||
}
|
||||
|
||||
static void BlendMonColorInCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount)
|
||||
static void BlendColorInCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount)
|
||||
{
|
||||
u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gTasks[taskId].tPalSelector);
|
||||
BeginNormalPaletteFade(
|
||||
@ -453,7 +453,7 @@ static void BlendMonColorInCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendA
|
||||
gTasks[taskId].tRestoreBlend ^= 1;
|
||||
}
|
||||
|
||||
static void AnimTask_BlendCycleMonColorLoop(u8 taskId)
|
||||
static void AnimTask_BlendColorInCycleLoop(u8 taskId)
|
||||
{
|
||||
u8 startBlendAmount, targetBlendAmount;
|
||||
if (!gPaletteFade.active)
|
||||
@ -476,7 +476,7 @@ static void AnimTask_BlendCycleMonColorLoop(u8 taskId)
|
||||
if (gTasks[taskId].tNumBlends == 1)
|
||||
targetBlendAmount = 0;
|
||||
|
||||
BlendMonColorInCycle(taskId, startBlendAmount, targetBlendAmount);
|
||||
BlendColorInCycle(taskId, startBlendAmount, targetBlendAmount);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -827,11 +827,11 @@ static void sub_811149C(struct Sprite *sprite)
|
||||
void AnimTask_GetSeismicTossDamageLevel(u8 taskId)
|
||||
{
|
||||
if (gAnimMoveDmg < 33)
|
||||
gBattleAnimArgs[7] = 0;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0;
|
||||
if ((u32)gAnimMoveDmg - 33 < 33)
|
||||
gBattleAnimArgs[7] = 1;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 1;
|
||||
if (gAnimMoveDmg > 65)
|
||||
gBattleAnimArgs[7] = 2;
|
||||
gBattleAnimArgs[ARG_RET_ID] = 2;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -869,7 +869,7 @@ void sub_8111590(u8 taskId)
|
||||
gTasks[taskId].data[1] &= 0xFF;
|
||||
gBattle_BG3_Y = gTasks[taskId].data[2] + Cos(4, gTasks[taskId].data[1]);
|
||||
|
||||
if (gBattleAnimArgs[7] == 0xFFF)
|
||||
if (gBattleAnimArgs[ARG_RET_ID] == 0xFFF)
|
||||
{
|
||||
gBattle_BG3_Y = 0;
|
||||
sub_80A6DAC(TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user