From 9ceff166bca9d2fcd58fe3f8c1e898f8d0d1fb0f Mon Sep 17 00:00:00 2001 From: ultima-soul Date: Thu, 1 Aug 2019 18:13:09 -0700 Subject: Dump and convert Pokedex Entries and Text to C. --- include/pokedex.h | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/pokedex.h b/include/pokedex.h index c4ec27e0b..0cd52e64d 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -1,15 +1,14 @@ #ifndef GUARD_POKEDEX_H #define GUARD_POKEDEX_H -#include "global.h" +#define KANTO_DEX_COUNT 151 +#define NATIONAL_DEX_COUNT 386 -void ResetPokedex(void); -void CopyMonCategoryText(u16 species, u8 *dst); -u16 GetPokedexHeightWeight(u16 dexNum, u8 data); -u16 GetNationalPokedexCount(u8); -u16 GetKantoPokedexCount(u8); -bool16 HasAllKantoMons(void); -u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality); +enum +{ + DEX_MODE_HOENN, + DEX_MODE_NATIONAL +}; enum { @@ -19,6 +18,27 @@ enum FLAG_SET_CAUGHT }; +struct PokedexEntry +{ + /*0x00*/ u8 categoryName[12]; + /*0x0C*/ u16 height; //in decimeters + /*0x0E*/ u16 weight; //in hectograms + /*0x10*/ const u8 *description; + /*0x14*/ const u8 *unusedDescription; + /*0x18*/ u16 unused; + /*0x1A*/ u16 pokemonScale; + /*0x1C*/ u16 pokemonOffset; + /*0x1E*/ u16 trainerScale; + /*0x20*/ u16 trainerOffset; +}; /*size = 0x24*/ + +void ResetPokedex(void); +void CopyMonCategoryText(u16 species, u8 *dst); +u16 GetPokedexHeightWeight(u16 dexNum, u8 data); +u16 GetNationalPokedexCount(u8); +u16 GetKantoPokedexCount(u8); +bool16 HasAllKantoMons(void); +u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality); s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId); u16 pokedex_count(u8); u16 sub_80C0844(u8); -- cgit v1.2.3 From bbc7c6ccfc7d59f61f406849f752fdd5038a6a80 Mon Sep 17 00:00:00 2001 From: ultima-soul Date: Sun, 4 Aug 2019 15:11:02 -0700 Subject: Port pokedex.c --- include/pokedex.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/pokedex.h b/include/pokedex.h index 0cd52e64d..718d2e853 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -2,11 +2,12 @@ #define GUARD_POKEDEX_H #define KANTO_DEX_COUNT 151 +#define HOENN_DEX_COUNT 202 #define NATIONAL_DEX_COUNT 386 enum { - DEX_MODE_HOENN, + DEX_MODE_KANTO, DEX_MODE_NATIONAL }; @@ -37,11 +38,11 @@ void CopyMonCategoryText(u16 species, u8 *dst); u16 GetPokedexHeightWeight(u16 dexNum, u8 data); u16 GetNationalPokedexCount(u8); u16 GetKantoPokedexCount(u8); -bool16 HasAllKantoMons(void); +bool16 HasAllMons(void); u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality); s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId); -u16 pokedex_count(u8); +u16 GetNationalPokedexCount(u8); u16 sub_80C0844(u8); -u16 sub_8088EDC(u8); +u16 GetKantoPokedexCount(u8); #endif // GUARD_POKEDEX_H -- cgit v1.2.3