diff options
author | Diegoisawesome <Diegoisawesome@users.noreply.github.com> | 2018-06-01 00:02:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-01 00:02:46 -0700 |
commit | 0b09575fd4a3f8b001e283f7ea6842d3357359bd (patch) | |
tree | e8e5094fa06efa07599d874c4414706249d1e3a5 /include/global.h | |
parent | dd28854a226753e2da53b35dcf1f67b142b75b77 (diff) | |
parent | 94030c6b53dc0de149ff9bddcaf6e618be282993 (diff) |
Merge pull request #249 from golemgalvanize/decompile_pokedex
Decompile pokedex
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/global.h b/include/global.h index f9e0aa66e..4a0fdb70a 100644 --- a/include/global.h +++ b/include/global.h @@ -43,6 +43,10 @@ #define PARTY_SIZE 6 +#define POKEMON_SLOTS_NUMBER 412 +#define POKEMON_NAME_LENGTH 10 +#define OT_NAME_LENGTH 7 + #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) @@ -185,6 +189,8 @@ struct Time /*0x04*/ s8 seconds; }; +#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0)) + struct Pokedex { /*0x00*/ u8 order; @@ -194,8 +200,8 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[52]; - /*0x44*/ u8 seen[52]; + /*0x10*/ u8 owned[DEX_FLAGS_NO]; + /*0x44*/ u8 seen[DEX_FLAGS_NO]; }; struct PokemonJumpResults // possibly used in the game itself? @@ -785,7 +791,7 @@ struct SaveBlock1 /*0x690*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; /*0x790*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT]; /*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT]; - /*0x988*/ u8 seen1[52]; + /*0x988*/ u8 seen1[DEX_FLAGS_NO]; /*0x9BC*/ u16 berryBlenderRecords[3]; /*0x9C2*/ u8 field_9C2[6]; /*0x9C8*/ u16 trainerRematchStepCounter; @@ -839,7 +845,7 @@ struct SaveBlock1 /*0x322C*/ u8 field_322C[1276]; /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; - /*0x3B24*/ u8 seen2[52]; + /*0x3B24*/ u8 seen2[DEX_FLAGS_NO]; /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3B98*/ struct UnkSaveSubstruct_3b98 unk_3B98[20]; /*0x3C88*/ u8 filler_3C88[0xE8]; |