Merge pull request #16 from AsparagusEduardo/dexnav_fix
Fixed icons showing when there's no encounters in the map
This commit is contained in:
commit
279f5962ed
1 changed files with 2 additions and 2 deletions
|
@ -1997,7 +1997,7 @@ static void DexNavLoadEncounterData(void)
|
|||
|
||||
static void TryDrawIconInSlot(u16 species, s16 x, s16 y)
|
||||
{
|
||||
if (species == SPECIES_NONE)
|
||||
if (species == SPECIES_NONE || species > NUM_SPECIES)
|
||||
CreateNoDataIcon(x, y); //'X' in slot
|
||||
else if (!GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_SEEN))
|
||||
CreateMonIcon(SPECIES_NONE, SpriteCB_MonIcon, x, y, 0, 0xFFFFFFFF, 0); //question mark
|
||||
|
@ -2035,7 +2035,7 @@ static void DrawSpeciesIcons(void)
|
|||
y = ROW_HIDDEN_ICON_Y;
|
||||
if (FlagGet(FLAG_SYS_DETECTOR_MODE))
|
||||
TryDrawIconInSlot(species, x, y);
|
||||
else if (species == SPECIES_NONE)
|
||||
else if (species == SPECIES_NONE || species > NUM_SPECIES)
|
||||
CreateNoDataIcon(x, y);
|
||||
else
|
||||
CreateMonIcon(SPECIES_NONE, SpriteCB_MonIcon, x, y, 0, 0xFFFFFFFF, 0); //question mark if detector mode inactive
|
||||
|
|
Loading…
Reference in a new issue