summaryrefslogtreecommitdiff
path: root/src/battle_gfx_sfx_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_gfx_sfx_util.c')
-rw-r--r--src/battle_gfx_sfx_util.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index 54fc88f24..b1bb61aaf 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -916,14 +916,14 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
if (IsContest())
{
position = 0;
- targetSpecies = gContestResources->field_18->unk2;
- personalityValue = gContestResources->field_18->unk8;
- otId = gContestResources->field_18->unkC;
+ targetSpecies = gContestResources->moveAnim->targetSpecies;
+ personalityValue = gContestResources->moveAnim->personality;
+ otId = gContestResources->moveAnim->otId;
HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[targetSpecies],
gMonSpritesGfxPtr->sprites[0],
targetSpecies,
- gContestResources->field_18->unk10);
+ gContestResources->moveAnim->targetPersonality);
}
else
{
@@ -1014,15 +1014,12 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
palOffset = (battlerId * 16) + 0x100;
LoadCompressedPalette(gSubstituteDollPal, palOffset, 32);
}
- else
+ else if (!IsContest())
{
- if (!IsContest())
- {
- if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
- BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId);
- else
- BattleLoadPlayerMonSpriteGfx(&gPlayerParty[gBattlerPartyIndexes[battlerId]], battlerId);
- }
+ if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
+ BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId);
+ else
+ BattleLoadPlayerMonSpriteGfx(&gPlayerParty[gBattlerPartyIndexes[battlerId]], battlerId);
}
}
@@ -1058,7 +1055,7 @@ void HandleLowHpMusicChange(struct Pokemon *mon, u8 battlerId)
if (!gBattleSpritesDataPtr->battlerData[battlerId].lowHpSong)
{
if (!gBattleSpritesDataPtr->battlerData[battlerId ^ BIT_FLANK].lowHpSong)
- PlaySE(SE_HINSI);
+ PlaySE(SE_LOW_HEALTH);
gBattleSpritesDataPtr->battlerData[battlerId].lowHpSong = 1;
}
}
@@ -1067,12 +1064,12 @@ void HandleLowHpMusicChange(struct Pokemon *mon, u8 battlerId)
gBattleSpritesDataPtr->battlerData[battlerId].lowHpSong = 0;
if (!IsDoubleBattle())
{
- m4aSongNumStop(SE_HINSI);
+ m4aSongNumStop(SE_LOW_HEALTH);
return;
}
if (IsDoubleBattle() && !gBattleSpritesDataPtr->battlerData[battlerId ^ BIT_FLANK].lowHpSong)
{
- m4aSongNumStop(SE_HINSI);
+ m4aSongNumStop(SE_LOW_HEALTH);
return;
}
}
@@ -1086,7 +1083,7 @@ void BattleStopLowHpSound(void)
if (IsDoubleBattle())
gBattleSpritesDataPtr->battlerData[playerBattler ^ BIT_FLANK].lowHpSong = 0;
- m4aSongNumStop(SE_HINSI);
+ m4aSongNumStop(SE_LOW_HEALTH);
}
u8 GetMonHPBarLevel(struct Pokemon *mon)