mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 17:34:20 +01:00
Generalize usage of castformPalette
This commit is contained in:
parent
ef4d99c87e
commit
91baf08638
@ -590,7 +590,7 @@ void BattleLoadOpponentMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
if (species == SPECIES_CASTFORM)
|
||||
{
|
||||
paletteOffset = 0x100 + battlerId * 16;
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]);
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette);
|
||||
LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20);
|
||||
}
|
||||
|
||||
@ -653,7 +653,7 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
if (species == SPECIES_CASTFORM)
|
||||
{
|
||||
paletteOffset = 0x100 + battlerId * 16;
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]);
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette);
|
||||
LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerId]], paletteOffset, 0x20);
|
||||
}
|
||||
|
||||
@ -973,7 +973,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 castform)
|
||||
if (targetSpecies == SPECIES_CASTFORM)
|
||||
{
|
||||
gSprites[gBattlerSpriteIds[battlerAtk]].anims = gMonFrontAnimsPtrTable[targetSpecies];
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette[CASTFORM_NORMAL]);
|
||||
LZDecompressWram(lzPaletteData, gBattleStruct->castformPalette);
|
||||
LoadPalette(gBattleStruct->castformPalette[gBattleMonForms[battlerDef]], paletteOffset, 32);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user