Sync battle anim - scripts
This commit is contained in:
@@ -866,7 +866,7 @@ static void AnimTask_MetallicShine_Step(u8 taskId)
|
||||
// Changes battler's palette to either greyscale or original.
|
||||
// arg0: which battler
|
||||
// arg1: 0 grayscale, 1 original
|
||||
void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId)
|
||||
void AnimTask_SetGrayscaleOrOriginalPal(u8 taskId)
|
||||
{
|
||||
u8 spriteId, battler;
|
||||
bool8 calcSpriteId = FALSE;
|
||||
|
||||
@@ -516,7 +516,7 @@ const struct SpriteTemplate gRazorLeafParticleSpriteTemplate =
|
||||
.callback = AnimRazorLeafParticle,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gTwisterLeafParticleSpriteTemplate =
|
||||
const struct SpriteTemplate gTwisterLeafSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_LEAF,
|
||||
.paletteTag = ANIM_TAG_LEAF,
|
||||
@@ -1362,7 +1362,7 @@ static const struct SpriteTemplate sCirclingMusicNoteSpriteTemplate =
|
||||
.callback = AnimCirclingMusicNote,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gProtectWallSpriteTemplate =
|
||||
const struct SpriteTemplate gProtectSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PROTECT,
|
||||
.paletteTag = ANIM_TAG_PROTECT,
|
||||
@@ -5034,10 +5034,10 @@ static void AnimMoonlightSparkle_Step(struct Sprite* sprite)
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
|
||||
void AnimTask_FadeScreenBlue_Step(u8);
|
||||
void AnimTask_MoonlightEndFade_Step(u8);
|
||||
|
||||
|
||||
void AnimTask_FadeScreenBlue(u8 taskId)
|
||||
void AnimTask_MoonlightEndFade(u8 taskId)
|
||||
{
|
||||
int a = GetBattlePalettesMask(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) & 0xFFFF;
|
||||
int b;
|
||||
@@ -5060,11 +5060,11 @@ void AnimTask_FadeScreenBlue(u8 taskId)
|
||||
b = b | (0x10000 << IndexOfSpritePaletteTag(ANIM_TAG_MOON));
|
||||
d = IndexOfSpritePaletteTag(ANIM_TAG_GREEN_SPARKLE);
|
||||
BeginNormalPaletteFade((0x10000 << d) | b, 0, 0, 16, RGB(27, 29, 31));
|
||||
gTasks[taskId].func = AnimTask_FadeScreenBlue_Step;
|
||||
gTasks[taskId].func = AnimTask_MoonlightEndFade_Step;
|
||||
gTasks[taskId].func(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_FadeScreenBlue_Step(u8 taskId)
|
||||
void AnimTask_MoonlightEndFade_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ static void AnimGuillotinePincer(struct Sprite *);
|
||||
static void AnimGuillotinePincer_Step1(struct Sprite *);
|
||||
static void AnimGuillotinePincer_Step2(struct Sprite *);
|
||||
static void AnimGuillotinePincer_Step3(struct Sprite *);
|
||||
static void AnimTask_GrowAndGreyscale_Step(u8);
|
||||
static void AnimTask_GrowAndGrayscale_Step(u8);
|
||||
static void AnimTask_Minimize_Step1(u8);
|
||||
static void CreateMinimizeSprite(struct Task *, u8);
|
||||
static void ClonedMinizeSprite_Step(struct Sprite *);
|
||||
@@ -301,7 +301,7 @@ static const union AffineAnimCmd *const sWaterPulseRingAffineAnimTable[] =
|
||||
sWaterPulseRingAffineAnimCmds,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSupersonicWaveSpriteTemplate =
|
||||
const struct SpriteTemplate gSupersonicRingSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_GOLD_RING,
|
||||
.paletteTag = ANIM_TAG_GOLD_RING,
|
||||
@@ -312,7 +312,7 @@ const struct SpriteTemplate gSupersonicWaveSpriteTemplate =
|
||||
.callback = TranslateAnimSpriteToTargetMonLocation,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gScreechWaveSpriteTemplate =
|
||||
const struct SpriteTemplate gScreechRingSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_PURPLE_RING,
|
||||
.paletteTag = ANIM_TAG_PURPLE_RING,
|
||||
@@ -2005,7 +2005,7 @@ static void AnimGuillotinePincer_Step3(struct Sprite *sprite)
|
||||
// Scales up the target mon sprite, and sets the palette to greyscale.
|
||||
// Used in MOVE_DISABLE.
|
||||
// No args.
|
||||
void AnimTask_GrowAndGreyscale(u8 taskId)
|
||||
void AnimTask_GrowAndGrayscale(u8 taskId)
|
||||
{
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET);
|
||||
|
||||
@@ -2013,10 +2013,10 @@ void AnimTask_GrowAndGreyscale(u8 taskId)
|
||||
SetSpriteRotScale(spriteId, 0xD0, 0xD0, 0);
|
||||
SetGreyscaleOrOriginalPalette(gSprites[spriteId].oam.paletteNum + 16, FALSE);
|
||||
gTasks[taskId].data[0] = 80;
|
||||
gTasks[taskId].func = AnimTask_GrowAndGreyscale_Step;
|
||||
gTasks[taskId].func = AnimTask_GrowAndGrayscale_Step;
|
||||
}
|
||||
|
||||
static void AnimTask_GrowAndGreyscale_Step(u8 taskId)
|
||||
static void AnimTask_GrowAndGrayscale_Step(u8 taskId)
|
||||
{
|
||||
if (--gTasks[taskId].data[0] == -1)
|
||||
{
|
||||
|
||||
@@ -792,7 +792,7 @@ void AnimTask_RotateMonSpriteToSide(u8 taskId)
|
||||
gTasks[taskId].data[7] = 1;
|
||||
else
|
||||
{
|
||||
if (gBattleAnimArgs[2] == 0)
|
||||
if (gBattleAnimArgs[2] == ANIM_ATTACKER)
|
||||
gTasks[taskId].data[7] = GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER ? 1 : 0;
|
||||
else
|
||||
gTasks[taskId].data[7] = GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER ? 1 : 0;
|
||||
|
||||
@@ -2037,7 +2037,7 @@ void AnimTask_IsAttackerBehindSubstitute(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_TargetToEffectBattler(u8 taskId)
|
||||
void AnimTask_SetTargetToEffectBattler(u8 taskId)
|
||||
{
|
||||
gBattleAnimTarget = gEffectBattler;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
|
||||
@@ -50,7 +50,7 @@ const u8 gBattleIntroRegOffsBgCnt[] = { REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, RE
|
||||
// 8: Player battler right
|
||||
// 9: Enemy battler left
|
||||
// 10: Enemy battler right
|
||||
void AnimTask_BlendSelected(u8 taskId)
|
||||
void AnimTask_BlendBattleAnimPal(u8 taskId)
|
||||
{
|
||||
u32 selectedPalettes = UnpackSelectedBattlePalettes(gBattleAnimArgs[0]);
|
||||
|
||||
@@ -72,7 +72,7 @@ void AnimTask_BlendSelected(u8 taskId)
|
||||
// 5: Blend all
|
||||
// 6: Neither bg nor attacker's partner
|
||||
// 7: Neither bg nor target's partner
|
||||
void AnimTask_BlendExcept(u8 taskId)
|
||||
void AnimTask_BlendBattleAnimPalExclude(u8 taskId)
|
||||
{
|
||||
u8 battler;
|
||||
u32 selectedPalettes;
|
||||
|
||||
@@ -1662,7 +1662,7 @@ static void OakOldManHandleSuccessBallThrowAnim(void)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
@@ -1672,7 +1672,7 @@ static void OakOldManHandleBallThrowAnim(void)
|
||||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ static void SafariHandleSuccessBallThrowAnim(void)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ static void SafariHandleBallThrowAnim(void)
|
||||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW);
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user