diff options
author | hondew <pokehondew@gmail.com> | 2020-08-30 14:14:38 -0400 |
---|---|---|
committer | hondew <pokehondew@gmail.com> | 2020-08-30 14:14:38 -0400 |
commit | e46b35455d1e2af8c8c2d291ce1cc28e682d9095 (patch) | |
tree | 76855f3dedad94ba34a8f8b40811a1005107b5ae /src/battle_gfx_sfx_util.c | |
parent | 328aecc96e690c437e52663a1445417e8aa78df6 (diff) | |
parent | a9719c92bfa4c6b6dcf57e9516f184721152ad80 (diff) |
Merge branch 'master' into pokeball-doc
Diffstat (limited to 'src/battle_gfx_sfx_util.c')
-rw-r--r-- | src/battle_gfx_sfx_util.c | 29 |
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) |