Fixed references by debug menu.

This commit is contained in:
Eduardo Quezada D'Ottone 2022-01-01 21:07:49 -03:00
parent 3bbaf5a15d
commit d328c2e006
3 changed files with 12 additions and 12 deletions

View File

@ -128,7 +128,7 @@ static void LoadSpecialPokePicCustom(const struct CompressedSpriteSheet *src, vo
}
else if (species > NUM_SPECIES) // is species unknown? draw the ? icon
LZ77UnCompWram(gMonFrontPicTable[0].data, dest);
else if (SpeciesHasGenderDifference[species] && isFemale)
else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
{
if (isFrontPic)
LZ77UnCompWram(gMonFrontPicTableFemale[species].data, dest);

View File

@ -417,21 +417,21 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data)
FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11);
if (data->currentSubmenu == 0)
{
if (SpeciesHasGenderDifference[species])
if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsGender, x, 0, 0, NULL);
else
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructions, x, 0, 0, NULL);
}
else if (data->currentSubmenu == 1)
{
if (SpeciesHasGenderDifference[species])
if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOneGender, x, 0, 0, NULL);
else
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuOne, x, 0, 0, NULL);
}
else if (data->currentSubmenu == 2)
{
if (SpeciesHasGenderDifference[species])
if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwoGender, x, 0, 0, NULL);
else
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL);
@ -485,7 +485,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data)
text[i++] = CHAR_SPACE;
text[i++] = CHAR_HYPHEN;
if (SpeciesHasGenderDifference[species])
if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
{
if (data->isFemale)
text[i++] = CHAR_FEMALE;
@ -688,14 +688,14 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe
{
if (isShiny)
{
if (SpeciesHasGenderDifference[species] && isFemale)
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
return &gMonShinyPaletteTableFemale[species];
else
return &gMonShinyPaletteTable[species];
}
else
{
if (SpeciesHasGenderDifference[species] && isFemale)
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
return &gMonPaletteTableFemale[species];
else
return &gMonPaletteTable[species];
@ -714,14 +714,14 @@ static void BattleLoadOpponentMonSpriteGfxCustom(u16 species, bool8 isFemale, bo
if (isShiny)
{
if (SpeciesHasGenderDifference[species] && isFemale)
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
lzPaletteData = gMonShinyPaletteTableFemale[species].data;
else
lzPaletteData = gMonShinyPaletteTable[species].data;
}
else
{
if (SpeciesHasGenderDifference[species] && isFemale)
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
lzPaletteData = gMonPaletteTableFemale[species].data;
else
lzPaletteData = gMonPaletteTable[species].data;
@ -1472,7 +1472,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
ReloadPokemonSprites(data);
}
if (JOY_NEW(SELECT_BUTTON) && SpeciesHasGenderDifference[data->currentmonId])
if (JOY_NEW(SELECT_BUTTON) && (gBaseStats[data->currentmonId].flags & FLAG_GENDER_DIFFERENCE))
{
data->isFemale = !data->isFemale;
PrintDigitChars(data);

View File

@ -2607,7 +2607,7 @@ u8 CreateMonIconCustom(u16 species, void (*callback)(struct Sprite *), s16 x, s1
if (species > NUM_SPECIES)
iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG;
else if (SpeciesHasGenderDifference[species] && isFemale)
else if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
iconTemplate.paletteTag = POKE_ICON_BASE_PAL_TAG + gMonIconPaletteIndicesFemale[species];
spriteId = CreateMonIconSprite(&iconTemplate, x, y, subpriority);
@ -2768,7 +2768,7 @@ const u8* GetMonIconTiles(u16 species, u32 personality)
static const u8* GetMonIconTilesCustom(u16 species, bool8 isFemale)
{
const u8* iconSprite = gMonIconTable[species];
if (SpeciesHasGenderDifference[species] && isFemale)
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
{
iconSprite = gMonIconTableFemale[species];
}