mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-03-21 17:55:13 -05:00
27 lines
587 B
C
27 lines
587 B
C
#include "dexmode_checker.h"
|
|
|
|
#include <nitro.h>
|
|
#include <string.h>
|
|
|
|
#include "pokedex.h"
|
|
#include "pokemon.h"
|
|
#include "savedata.h"
|
|
|
|
u32 SaveData_GetDexMode(SaveData *saveData)
|
|
{
|
|
Pokedex *dex = SaveData_GetPokedex(saveData);
|
|
return IsNationalDexObtained(dex);
|
|
}
|
|
|
|
u32 IsNationalDexObtained(const Pokedex *dex)
|
|
{
|
|
BOOL isNationalDexObtained = Pokedex_IsNationalDexObtained(dex);
|
|
|
|
return isNationalDexObtained == 1;
|
|
}
|
|
|
|
u32 GetDexNumber(u32 isNationalDexObtained, u32 monSpecies)
|
|
{
|
|
return isNationalDexObtained == 0 ? Pokemon_SinnohDexNumber(monSpecies) : monSpecies;
|
|
}
|