mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-09-07 17:26:02 -05:00
Fully document IsGBASpeciesInvalid
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#ifndef POKEPLATINUM_CONSTANTS_GBA_SPECIES_H
|
||||
#define POKEPLATINUM_CONSTANTS_GBA_SPECIES_H
|
||||
|
||||
// IDs up to 251 (Celebi) are the same as Gen 4's species.
|
||||
// IDs between 252 and 276 correspond to Gen 3's SPECIES_OLD_UNOWN B to Z.
|
||||
|
||||
#define GBA_SPECIES_TREECKO 277
|
||||
#define GBA_SPECIES_GROVYLE 278
|
||||
#define GBA_SPECIES_SCEPTILE 279
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
#include "overlay097/ov97_02237694.h"
|
||||
#include "overlay097/ov97_022392E4.h"
|
||||
|
||||
#include "constants/species.h"
|
||||
#include "constants/gba/species.h"
|
||||
|
||||
FS_EXTERN_OVERLAY(overlay77);
|
||||
|
||||
typedef struct {
|
||||
@@ -232,25 +235,18 @@ static int Unk_ov97_0223EAB8[] = {
|
||||
0x21
|
||||
};
|
||||
|
||||
static BOOL IsGBASpeciesInvalid (int param0)
|
||||
static BOOL IsGBASpeciesInvalid (int speciesGBA)
|
||||
{
|
||||
if (param0 <= 0) {
|
||||
return 1;
|
||||
}
|
||||
if (speciesGBA <= SPECIES_NONE)
|
||||
return TRUE;
|
||||
else if (speciesGBA <= SPECIES_CELEBI)
|
||||
return FALSE;
|
||||
else if (speciesGBA < GBA_SPECIES_TREECKO)
|
||||
return TRUE;
|
||||
else if (speciesGBA <= GBA_SPECIES_CHIMECHO)
|
||||
return FALSE;
|
||||
|
||||
if (param0 <= 251) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (param0 < 277) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (param0 <= 411) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void ov97_02233B44 (UnkStruct_ov97_02234A2C * param0)
|
||||
|
||||
Reference in New Issue
Block a user