mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
remove IsMoveWithoutAnimation
This commit is contained in:
parent
6be8151981
commit
c60de5055d
@ -9,7 +9,6 @@ void SpriteCB_TrainerSlideIn(struct Sprite *sprite);
|
||||
void InitAndLaunchChosenStatusAnimation(bool8 isStatus2, u32 status);
|
||||
bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattlerId, u8 attacker, u8 target, u8 tableId, u16 argument);
|
||||
void InitAndLaunchSpecialAnimation(u8 activeBattlerId, u8 attacker, u8 target, u8 tableId);
|
||||
bool8 IsMoveWithoutAnimation(u16 moveId, u8 animationTurn);
|
||||
bool8 IsBattleSEPlaying(u8 battlerId);
|
||||
void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId);
|
||||
void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId);
|
||||
|
@ -1399,16 +1399,9 @@ static void LinkOpponentHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
LinkOpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = LinkOpponentDoMoveAnimation;
|
||||
BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr);
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = LinkOpponentDoMoveAnimation;
|
||||
BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1231,16 +1231,9 @@ static void LinkPartnerHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
LinkPartnerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = LinkPartnerDoMoveAnimation;
|
||||
BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr);
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = LinkPartnerDoMoveAnimation;
|
||||
BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1461,15 +1461,8 @@ static void OpponentHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
OpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpponentDoMoveAnimation;
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpponentDoMoveAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2662,16 +2662,9 @@ static void PlayerHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // Always returns FALSE.
|
||||
{
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = PlayerDoMoveAnimation;
|
||||
BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr);
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = PlayerDoMoveAnimation;
|
||||
BattleTv_SetDataBasedOnMove(move, gWeatherMoveAnim, gAnimDisableStructPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1428,15 +1428,8 @@ static void PlayerPartnerHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = PlayerPartnerDoMoveAnimation;
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = PlayerPartnerDoMoveAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1327,15 +1327,8 @@ static void RecordedOpponentHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
RecordedOpponentBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = RecordedOpponentDoMoveAnimation;
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = RecordedOpponentDoMoveAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1331,15 +1331,8 @@ static void RecordedPlayerHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = RecordedPlayerDoMoveAnimation;
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = RecordedPlayerDoMoveAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1114,16 +1114,8 @@ static void WallyHandleMoveAnimation(void)
|
||||
gWeatherMoveAnim = gBattleResources->bufferA[gActiveBattler][12] | (gBattleResources->bufferA[gActiveBattler][13] << 8);
|
||||
gAnimDisableStructPtr = (struct DisableStruct *)&gBattleResources->bufferA[gActiveBattler][16];
|
||||
gTransformedPersonalities[gActiveBattler] = gAnimDisableStructPtr->transformedMonPersonality;
|
||||
if (IsMoveWithoutAnimation(move, gAnimMoveTurn)) // always returns FALSE
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = WallyDoMoveAnimation;
|
||||
}
|
||||
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 0;
|
||||
gBattlerControllerFuncs[gActiveBattler] = WallyDoMoveAnimation;
|
||||
}
|
||||
|
||||
static void WallyDoMoveAnimation(void)
|
||||
|
@ -526,15 +526,6 @@ static void Task_ClearBitWhenSpecialAnimDone(u8 taskId)
|
||||
|
||||
#undef tBattlerId
|
||||
|
||||
// Great function to include newly added moves that don't have animation yet.
|
||||
bool8 IsMoveWithoutAnimation(u16 moveId, u8 animationTurn)
|
||||
{
|
||||
if (moveId >= (MOVES_COUNT - 1))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Check if SE has finished or 30 calls, whichever comes first
|
||||
bool8 IsBattleSEPlaying(u8 battlerId)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user