Support for gender palettes.

This commit is contained in:
Eduardo Quezada D'Ottone 2020-11-06 17:12:57 -03:00
parent 3849f7dd5d
commit d7fbaa6cbf
4 changed files with 36 additions and 4 deletions

View File

@ -95,7 +95,9 @@ extern const struct MonCoords gMonBackPicCoords[];
extern const struct CompressedSpriteSheet gMonBackPicTable[];
extern const struct CompressedSpriteSheet gMonBackPicTableFemale[];
extern const struct CompressedSpritePalette gMonPaletteTable[];
extern const struct CompressedSpritePalette gMonPaletteTableFemale[];
extern const struct CompressedSpritePalette gMonShinyPaletteTable[];
extern const struct CompressedSpritePalette gMonShinyPaletteTableFemale[];
extern const union AnimCmd *const *const gTrainerFrontAnimsPtrTable[];
extern const struct MonCoords gTrainerFrontPicCoords[];
extern const struct CompressedSpriteSheet gTrainerFrontPicTable[];

View File

@ -943,3 +943,8 @@ const struct CompressedSpritePalette gMonPaletteTable[] =
SPECIES_PAL(UNOWN_EMARK, gMonPalette_Unown),
SPECIES_PAL(UNOWN_QMARK, gMonPalette_Unown),
};
const struct CompressedSpritePalette gMonPaletteTableFemale[] =
{
SPECIES_PAL(EEVEE, gMonPalette_Eevee),
};

View File

@ -943,3 +943,8 @@ const struct CompressedSpritePalette gMonShinyPaletteTable[] =
SPECIES_SHINY_PAL(UNOWN_EMARK, gMonShinyPalette_Unown),
SPECIES_SHINY_PAL(UNOWN_QMARK, gMonShinyPalette_Unown),
};
const struct CompressedSpritePalette gMonShinyPaletteTableFemale[] =
{
SPECIES_SHINY_PAL(EEVEE, gMonShinyPalette_Eevee),
};

View File

@ -6745,9 +6745,19 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
if (shinyValue < SHINY_ODDS)
return gMonShinyPaletteTable[species].data;
{
if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE)
return gMonShinyPaletteTableFemale[species].data;
else
return gMonShinyPaletteTable[species].data;
}
else
return gMonPaletteTable[species].data;
{
if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE)
return gMonPaletteTableFemale[species].data;
else
return gMonPaletteTable[species].data;
}
}
const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon)
@ -6764,9 +6774,19 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u
shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality);
if (shinyValue < SHINY_ODDS)
return &gMonShinyPaletteTable[species];
{
if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE)
return &gMonShinyPaletteTableFemale[species];
else
return &gMonShinyPaletteTable[species];
}
else
return &gMonPaletteTable[species];
{
if (SpeciesHasGenderDifference[species] && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE)
return &gMonPaletteTableFemale[species];
else
return &gMonPaletteTable[species];
}
}
bool32 IsHMMove2(u16 move)