Misc cleanup

This commit is contained in:
Eduardo Quezada 2022-08-18 14:23:45 -04:00
parent 936ebbd973
commit 59f89bde9e
5 changed files with 17 additions and 20 deletions

View File

@ -103,7 +103,7 @@ typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *);
#define DUMMY_OAM_DATA \ #define DUMMY_OAM_DATA \
{ \ { \
.y = DISPLAY_HEIGHT, \ .y = DISPLAY_HEIGHT, \
.affineMode = 0, \ .affineMode = ST_OAM_AFFINE_OFF, \
.objMode = 0, \ .objMode = 0, \
.mosaic = FALSE, \ .mosaic = FALSE, \
.bpp = 0, \ .bpp = 0, \

View File

@ -551,7 +551,7 @@ struct BattleHealthboxInfo
u8 specialAnimActive:1; // x40 u8 specialAnimActive:1; // x40
u8 triedShinyMonAnim:1; u8 triedShinyMonAnim:1;
u8 finishedShinyMonAnim:1; u8 finishedShinyMonAnim:1;
u8 field_1_x1E:4; u8 opponentDrawPartyStatusSummaryDelay:4;
u8 bgmRestored:1; u8 bgmRestored:1;
u8 waitForCry:1; u8 waitForCry:1;
u8 healthboxSlideInStarted:1; u8 healthboxSlideInStarted:1;

View File

@ -368,16 +368,13 @@ static void TryShinyAnimAfterMonAnim(void)
{ {
TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]); TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]);
} }
else else if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim)
{ {
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim) gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE;
{ gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim = FALSE;
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE; FreeSpriteTilesByTag(ANIM_TAG_GOLD_STARS);
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim = FALSE; FreeSpritePaletteByTag(ANIM_TAG_GOLD_STARS);
FreeSpriteTilesByTag(ANIM_TAG_GOLD_STARS); LinkOpponentBufferExecCompleted();
FreeSpritePaletteByTag(ANIM_TAG_GOLD_STARS);
LinkOpponentBufferExecCompleted();
}
} }
} }
} }
@ -1758,14 +1755,14 @@ static void LinkOpponentHandleDrawPartyStatusSummary(void)
if (gBattleBufferA[gActiveBattler][2] != 0) if (gBattleBufferA[gActiveBattler][2] != 0)
{ {
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E < 2) if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay < 2)
{ {
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E++; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay++;
return; return;
} }
else else
{ {
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E = 0; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay = 0;
} }
} }

View File

@ -1929,14 +1929,14 @@ static void OpponentHandleDrawPartyStatusSummary(void)
if (gBattleBufferA[gActiveBattler][2] != 0) if (gBattleBufferA[gActiveBattler][2] != 0)
{ {
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E < 2) if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay < 2)
{ {
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E++; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay++;
return; return;
} }
else else
{ {
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E = 0; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay = 0;
} }
} }

View File

@ -1698,14 +1698,14 @@ static void RecordedOpponentHandleDrawPartyStatusSummary(void)
if (gBattleBufferA[gActiveBattler][2] != 0) if (gBattleBufferA[gActiveBattler][2] != 0)
{ {
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E < 2) if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay < 2)
{ {
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E++; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay++;
return; return;
} }
else else
{ {
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E = 0; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay = 0;
} }
} }