mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Proper label for species flags
This commit is contained in:
parent
d0d4c52d84
commit
2ee843c70d
@ -343,15 +343,15 @@
|
||||
#define NUM_HIDDEN_ABILITY_SLOTS 1
|
||||
|
||||
// Species Flags
|
||||
#define FLAG_LEGENDARY (1 << 0)
|
||||
#define FLAG_MYTHICAL (1 << 1)
|
||||
#define FLAG_ULTRA_BEAST (1 << 2)
|
||||
#define FLAG_ALOLAN_FORM (1 << 3)
|
||||
#define FLAG_GALARIAN_FORM (1 << 4)
|
||||
#define FLAG_HISUIAN_FORM (1 << 5)
|
||||
#define FLAG_GENDER_DIFFERENCE (1 << 6)
|
||||
#define FLAG_ALL_PERFECT_IVS (1 << 7)
|
||||
#define FLAG_SHINY_LOCKED (1 << 8)
|
||||
#define SPECIES_FLAG_LEGENDARY (1 << 0)
|
||||
#define SPECIES_FLAG_MYTHICAL (1 << 1)
|
||||
#define SPECIES_FLAG_ULTRA_BEAST (1 << 2)
|
||||
#define SPECIES_FLAG_ALOLAN_FORM (1 << 3)
|
||||
#define SPECIES_FLAG_GALARIAN_FORM (1 << 4)
|
||||
#define SPECIES_FLAG_HISUIAN_FORM (1 << 5)
|
||||
#define SPECIES_FLAG_GENDER_DIFFERENCE (1 << 6)
|
||||
#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 7)
|
||||
#define SPECIES_FLAG_SHINY_LOCKED (1 << 8)
|
||||
|
||||
#define LEGENDARY_PERFECT_IV_COUNT 3
|
||||
|
||||
|
@ -13708,7 +13708,7 @@ static void Cmd_handleballthrow(void)
|
||||
else
|
||||
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;
|
||||
|
||||
if (gBaseStats[gBattleMons[gBattlerTarget].species].flags & FLAG_ULTRA_BEAST)
|
||||
if (gBaseStats[gBattleMons[gBattlerTarget].species].flags & SPECIES_FLAG_ULTRA_BEAST)
|
||||
{
|
||||
if (gLastUsedItem == ITEM_BEAST_BALL)
|
||||
ballMultiplier = 50;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3307,7 +3307,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
| (gSaveBlock2Ptr->playerTrainerId[2] << 16)
|
||||
| (gSaveBlock2Ptr->playerTrainerId[3] << 24);
|
||||
|
||||
if (gBaseStats[species].flags & FLAG_SHINY_LOCKED)
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_SHINY_LOCKED)
|
||||
{
|
||||
do
|
||||
{
|
||||
@ -3379,7 +3379,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
iv = (value & (MAX_IV_MASK << 10)) >> 10;
|
||||
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
||||
|
||||
if (gBaseStats[species].flags & FLAG_ALL_PERFECT_IVS)
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_ALL_PERFECT_IVS)
|
||||
{
|
||||
iv = MAX_PER_STAT_IVS;
|
||||
SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv);
|
||||
@ -3390,7 +3390,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv);
|
||||
}
|
||||
#if P_LEGENDARY_PERFECT_IVS >= GEN_6
|
||||
else if (gBaseStats[species].flags & (FLAG_LEGENDARY | FLAG_MYTHICAL | FLAG_ULTRA_BEAST))
|
||||
else if (gBaseStats[species].flags & (SPECIES_FLAG_LEGENDARY | SPECIES_FLAG_MYTHICAL | SPECIES_FLAG_ULTRA_BEAST))
|
||||
{
|
||||
iv = MAX_PER_STAT_IVS;
|
||||
// Initialize a list of IV indices.
|
||||
@ -8418,5 +8418,5 @@ void TrySpecialOverworldEvo(void)
|
||||
|
||||
bool32 ShouldShowFemaleDifferences(u16 species, u32 personality)
|
||||
{
|
||||
return (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE;
|
||||
return (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE;
|
||||
}
|
||||
|
@ -417,21 +417,21 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data)
|
||||
FillWindowPixelBuffer(WIN_INSTRUCTIONS, 0x11);
|
||||
if (data->currentSubmenu == 0)
|
||||
{
|
||||
if (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
|
||||
if (gBaseStats[species].flags & SPECIES_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 (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
|
||||
if (gBaseStats[species].flags & SPECIES_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 (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
|
||||
if (gBaseStats[species].flags & SPECIES_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 (gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE)
|
||||
if (gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE)
|
||||
{
|
||||
if (data->isFemale)
|
||||
text[i++] = CHAR_FEMALE;
|
||||
@ -688,14 +688,14 @@ static const struct CompressedSpritePalette *GetMonSpritePalStructCustom(u16 spe
|
||||
{
|
||||
if (isShiny)
|
||||
{
|
||||
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
return &gMonShinyPaletteTableFemale[species];
|
||||
else
|
||||
return &gMonShinyPaletteTable[species];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gBaseStats[species].flags & SPECIES_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 ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
lzPaletteData = gMonShinyPaletteTableFemale[species].data;
|
||||
else
|
||||
lzPaletteData = gMonShinyPaletteTable[species].data;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((gBaseStats[species].flags & FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
if ((gBaseStats[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && isFemale)
|
||||
lzPaletteData = gMonPaletteTableFemale[species].data;
|
||||
else
|
||||
lzPaletteData = gMonPaletteTable[species].data;
|
||||
@ -1493,7 +1493,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
|
||||
ReloadPokemonSprites(data);
|
||||
ApplyOffsetSpriteValues(data);
|
||||
}
|
||||
if (JOY_NEW(SELECT_BUTTON) && (gBaseStats[data->currentmonId].flags & FLAG_GENDER_DIFFERENCE))
|
||||
if (JOY_NEW(SELECT_BUTTON) && (gBaseStats[data->currentmonId].flags & SPECIES_FLAG_GENDER_DIFFERENCE))
|
||||
{
|
||||
data->isFemale = !data->isFemale;
|
||||
PrintDigitChars(data);
|
||||
|
Loading…
Reference in New Issue
Block a user