summaryrefslogtreecommitdiff
path: root/src/battle_gfx_sfx_util.c
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-07 18:06:37 -0500
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-07 18:06:37 -0500
commita29b18ed2f27c2991b0894a69fa04738ba9522ca (patch)
tree4db08c6d6a2d585a0a42ee6f023faa9f6e8d13fb /src/battle_gfx_sfx_util.c
parent8d2d34aae9767f283b3c34140920828e37540d23 (diff)
parent8b1c2c946b3b58cc938f0496a9af11a641749a1e (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald
Diffstat (limited to 'src/battle_gfx_sfx_util.c')
-rw-r--r--src/battle_gfx_sfx_util.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index d044f2fbd..41cffec3d 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -956,7 +956,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
}
src = gMonSpritesGfxPtr->sprites[position];
- dst = (void *)(OBJ_VRAM0 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
+ dst = (void *)(VRAM + 0x10000 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
DmaCopy32(3, src, dst, 0x800);
paletteOffset = 0x100 + battlerAtk * 16;
lzPaletteData = GetMonSpritePalFromSpeciesAndPersonality(targetSpecies, otId, personalityValue);
@@ -1013,12 +1013,15 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
palOffset = (battlerId * 16) + 0x100;
LoadCompressedPalette(gSubstituteDollPal, palOffset, 32);
}
- else if (!IsContest())
+ else
{
- if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
- BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId);
- else
- BattleLoadPlayerMonSpriteGfx(&gPlayerParty[gBattlerPartyIndexes[battlerId]], battlerId);
+ if (!IsContest())
+ {
+ if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
+ BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId);
+ else
+ BattleLoadPlayerMonSpriteGfx(&gPlayerParty[gBattlerPartyIndexes[battlerId]], battlerId);
+ }
}
}