mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Added LoadMonIconPalettePersonality to load gender specific pokemon icon palettes
This commit is contained in:
parent
2a02cefc81
commit
886a487bf1
@ -23,6 +23,7 @@ void FreeAndDestroyMonIconSprite(struct Sprite *sprite);
|
||||
u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality);
|
||||
u8 UpdateMonIconFrame(struct Sprite *sprite);
|
||||
void LoadMonIconPalette(u16 species);
|
||||
void LoadMonIconPalettePersonality(u16 species, u32 personality);
|
||||
void SpriteCB_MonIcon(struct Sprite *sprite);
|
||||
void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum);
|
||||
u8 GetMonIconPaletteIndexFromSpecies(u16 species);
|
||||
|
@ -1686,7 +1686,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
|
||||
FreeMonIconPalettes();
|
||||
|
||||
AllocateMonSpritesGfx();
|
||||
LoadMonIconPalette(species);
|
||||
LoadMonIconPalettePersonality(species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
|
||||
|
||||
//Update instructions
|
||||
PrintInstructionsOnWindow(data);
|
||||
|
@ -2760,6 +2760,17 @@ void LoadMonIconPalette(u16 species)
|
||||
LoadSpritePalette(&gMonIconPaletteTable[palIndex]);
|
||||
}
|
||||
|
||||
void LoadMonIconPalettePersonality(u16 species, u32 personality)
|
||||
{
|
||||
u8 palIndex;
|
||||
if (ShouldShowFemaleDifferences(species, personality))
|
||||
palIndex = gMonIconPaletteIndicesFemale[species];
|
||||
else
|
||||
palIndex = gMonIconPaletteIndices[species];
|
||||
if (IndexOfSpritePaletteTag(gMonIconPaletteTable[palIndex].tag) == 0xFF)
|
||||
LoadSpritePalette(&gMonIconPaletteTable[palIndex]);
|
||||
}
|
||||
|
||||
void FreeMonIconPalettes(void)
|
||||
{
|
||||
u8 i;
|
||||
|
Loading…
Reference in New Issue
Block a user