mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +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 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality);
|
||||||
u8 UpdateMonIconFrame(struct Sprite *sprite);
|
u8 UpdateMonIconFrame(struct Sprite *sprite);
|
||||||
void LoadMonIconPalette(u16 species);
|
void LoadMonIconPalette(u16 species);
|
||||||
|
void LoadMonIconPalettePersonality(u16 species, u32 personality);
|
||||||
void SpriteCB_MonIcon(struct Sprite *sprite);
|
void SpriteCB_MonIcon(struct Sprite *sprite);
|
||||||
void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum);
|
void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum);
|
||||||
u8 GetMonIconPaletteIndexFromSpecies(u16 species);
|
u8 GetMonIconPaletteIndexFromSpecies(u16 species);
|
||||||
|
@ -1686,7 +1686,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
|
|||||||
FreeMonIconPalettes();
|
FreeMonIconPalettes();
|
||||||
|
|
||||||
AllocateMonSpritesGfx();
|
AllocateMonSpritesGfx();
|
||||||
LoadMonIconPalette(species);
|
LoadMonIconPalettePersonality(species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
|
||||||
|
|
||||||
//Update instructions
|
//Update instructions
|
||||||
PrintInstructionsOnWindow(data);
|
PrintInstructionsOnWindow(data);
|
||||||
|
@ -2760,6 +2760,17 @@ void LoadMonIconPalette(u16 species)
|
|||||||
LoadSpritePalette(&gMonIconPaletteTable[palIndex]);
|
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)
|
void FreeMonIconPalettes(void)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user