diff --git a/include/applications/naming_screen.h b/include/applications/naming_screen.h index a8efbba877..39eda1748b 100644 --- a/include/applications/naming_screen.h +++ b/include/applications/naming_screen.h @@ -1,10 +1,9 @@ #ifndef POKEPLATINUM_KEYBOARD_H #define POKEPLATINUM_KEYBOARD_H -#include "struct_decls/pc_boxes_decl.h" - #include "game_options.h" #include "overlay_manager.h" +#include "pc_boxes.h" #include "string_gf.h" enum NamingScreenType { diff --git a/include/applications/pc_boxes/box_app_manager.h b/include/applications/pc_boxes/box_app_manager.h index da6fe1d935..48fa98506f 100644 --- a/include/applications/pc_boxes/box_app_manager.h +++ b/include/applications/pc_boxes/box_app_manager.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_BOX_APP_MANAGER_H #define POKEPLATINUM_BOX_APP_MANAGER_H -#include "struct_decls/pc_boxes_decl.h" - #include "applications/naming_screen.h" #include "applications/pc_boxes/box_application.h" #include "applications/pc_boxes/box_customization.h" @@ -15,6 +13,7 @@ #include "message.h" #include "overlay_manager.h" +#include "pc_boxes.h" #include "pokemon.h" #include "string_template.h" #include "touch_screen_actions.h" diff --git a/include/applications/pc_boxes/box_application.h b/include/applications/pc_boxes/box_application.h index cf69f95dbc..d1c71d083c 100644 --- a/include/applications/pc_boxes/box_application.h +++ b/include/applications/pc_boxes/box_application.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_BOX_APPLICATION_H #define POKEPLATINUM_STRUCT_BOX_APPLICATION_H -#include "struct_decls/pc_boxes_decl.h" - #include "applications/pc_boxes/box_cursor.h" #include "applications/pc_boxes/box_customization.h" #include "applications/pc_boxes/box_mon_selection.h" @@ -13,6 +11,7 @@ #include "applications/pc_boxes/struct_box_menu.h" #include "party.h" +#include "pc_boxes.h" typedef struct BoxApplication { const PCBoxes *pcBoxes; diff --git a/include/applications/pokedex/pokedex_main.h b/include/applications/pokedex/pokedex_main.h index 8943c319c8..f8d7ad81fd 100644 --- a/include/applications/pokedex/pokedex_main.h +++ b/include/applications/pokedex/pokedex_main.h @@ -3,8 +3,6 @@ #include -#include "struct_decls/pokedexdata_decl.h" - #include "applications/pokedex/pokedex_app.h" #include "applications/pokedex/pokedex_graphics.h" #include "applications/pokedex/pokedex_sort_data.h" @@ -16,6 +14,7 @@ #include "bg_window.h" #include "heap.h" #include "overlay_manager.h" +#include "pokedex.h" #include "pokedex_memory.h" #include "sprite.h" #include "string_gf.h" diff --git a/include/applications/pokedex/pokedex_sort.h b/include/applications/pokedex/pokedex_sort.h index 9f9be7c8e0..1f821e1c25 100644 --- a/include/applications/pokedex/pokedex_sort.h +++ b/include/applications/pokedex/pokedex_sort.h @@ -3,11 +3,10 @@ #include "constants/heap.h" -#include "struct_decls/pokedexdata_decl.h" - #include "applications/pokedex/pokedex_sort_data.h" #include "applications/pokedex/species_caught_status.h" +#include "pokedex.h" #include "string_gf.h" #include "trainer_info.h" diff --git a/include/applications/pokedex/pokedex_sort_data.h b/include/applications/pokedex/pokedex_sort_data.h index ec5bcd0a44..f9c15c8122 100644 --- a/include/applications/pokedex/pokedex_sort_data.h +++ b/include/applications/pokedex/pokedex_sort_data.h @@ -1,10 +1,9 @@ #ifndef POKEPLATINUM_POKEDEX_SORT_DATA_H #define POKEPLATINUM_POKEDEX_SORT_DATA_H -#include "struct_decls/pokedexdata_decl.h" - #include "applications/pokedex/sorted_pokedex.h" +#include "pokedex.h" #include "pokedex_heightweight.h" #include "string_gf.h" diff --git a/include/battle/battle_system.h b/include/battle/battle_system.h index 3e2751af07..c8884bcdc7 100644 --- a/include/battle/battle_system.h +++ b/include/battle/battle_system.h @@ -5,8 +5,6 @@ #include "generated/trainer_message_types.h" #include "struct_decls/battle_system.h" -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/battler_data.h" #include "struct_defs/chatot_cry.h" #include "struct_defs/trainer.h" @@ -28,6 +26,8 @@ #include "message.h" #include "palette.h" #include "party.h" +#include "pc_boxes.h" +#include "pokedex.h" #include "pokemon.h" #include "pokemon_anim.h" #include "pokemon_sprite.h" diff --git a/include/berry_patch_manager.h b/include/berry_patch_manager.h index 0c09a069bf..807844a891 100644 --- a/include/berry_patch_manager.h +++ b/include/berry_patch_manager.h @@ -3,11 +3,12 @@ #include "constants/heap.h" -#include "struct_decls/berry_patch_manager_decl.h" #include "struct_decls/struct_02061AB4_decl.h" #include "field/field_system_decl.h" +#include "berry_patches.h" + enum BerryWateringState { BERRY_WATERING_STATE_INIT = 0, // Initial state - setting up watering mode BERRY_WATERING_STATE_WATERING, // Watering the current patch @@ -23,6 +24,14 @@ enum BerryPatchFlags { BERRY_PATCH_FLAG_HAS_BERRY = 0x4, // Patch has berry growing }; +typedef struct BerryPatchManager { + enum HeapID heapID; + BerryGrowthData *growthData; + NNSG3dRenderObj renderObj; + NNSG3dResMdl *model; + NNSG3dResFileHeader *resource; +} BerryPatchManager; + BerryPatchManager *BerryPatchManager_New(FieldSystem *fieldSystem, enum HeapID heapID); void BerryPatchManager_Free(BerryPatchManager *manager); void BerryPatches_ElapseTime(FieldSystem *fieldSystem, int minutes); diff --git a/include/dexmode_checker.h b/include/dexmode_checker.h index 749db670a1..57b4ba0721 100644 --- a/include/dexmode_checker.h +++ b/include/dexmode_checker.h @@ -1,8 +1,7 @@ #ifndef POKEPLATINUM_DEXMODE_CHECKER_H #define POKEPLATINUM_DEXMODE_CHECKER_H -#include "struct_decls/pokedexdata_decl.h" - +#include "pokedex.h" #include "savedata.h" u32 SaveData_GetDexMode(SaveData *saveData); diff --git a/include/evolution.h b/include/evolution.h index 0ed6de839f..f82fc9d149 100644 --- a/include/evolution.h +++ b/include/evolution.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_EVOLUTION_H #define POKEPLATINUM_EVOLUTION_H -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/struct_0207C8C4.h" #include "applications/pokemon_summary_screen/main.h" @@ -13,6 +12,7 @@ #include "game_records.h" #include "overlay_manager.h" #include "party.h" +#include "pokedex.h" #include "pokemon.h" #include "pokemon_anim.h" #include "poketch.h" diff --git a/include/field/field_system_sub2_t.h b/include/field/field_system_sub2_t.h index 9987ee4140..54a8c1b36e 100644 --- a/include/field/field_system_sub2_t.h +++ b/include/field/field_system_sub2_t.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_FIELD_SYSTEM_SUB2_T_H #define POKEPLATINUM_FIELD_SYSTEM_SUB2_T_H -#include "struct_decls/berry_patch_manager_decl.h" - #include "applications/poketch/poketch_system.h" #include "overlay005/hblank_system.h" #include "overlay005/map_name_popup.h" @@ -11,6 +9,8 @@ #include "overlay005/struct_ov5_021EF4F8_decl.h" #include "overlay005/texture_resource_manager.h" +#include "berry_patch_manager.h" + struct FieldSystem_sub2_t { BOOL unk_00; UnkStruct_ov5_021D1A94 *unk_04; diff --git a/include/field_battle_data_transfer.h b/include/field_battle_data_transfer.h index 69a336b3e5..4ccc20f556 100644 --- a/include/field_battle_data_transfer.h +++ b/include/field_battle_data_transfer.h @@ -5,8 +5,6 @@ #include "generated/evolution_methods.h" #include "generated/map_headers.h" -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/chatot_cry.h" #include "struct_defs/trainer.h" #include "struct_defs/wi_fi_history.h" @@ -19,6 +17,8 @@ #include "journal.h" #include "pal_pad.h" #include "party.h" +#include "pc_boxes.h" +#include "pokedex.h" #include "poketch.h" #include "rtc.h" #include "savedata.h" diff --git a/include/game_records.h b/include/game_records.h index ed0d394566..bf06876bc4 100644 --- a/include/game_records.h +++ b/include/game_records.h @@ -1,8 +1,7 @@ #ifndef POKEPLATINUM_GAME_RECORDS_H #define POKEPLATINUM_GAME_RECORDS_H -#include "struct_decls/pokedexdata_decl.h" - +#include "pokedex.h" #include "savedata.h" #define NUM_U32_RECORDS 71 diff --git a/include/overlay061/ov61_0222AE60.h b/include/overlay061/ov61_0222AE60.h index 186c91bb1f..8c9666fe8c 100644 --- a/include/overlay061/ov61_0222AE60.h +++ b/include/overlay061/ov61_0222AE60.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV61_0222AE60_H #define POKEPLATINUM_OV61_0222AE60_H -#include "struct_decls/pc_boxes_decl.h" #include "struct_decls/struct_02030A80_decl.h" #include "struct_defs/dress_up_photo.h" @@ -10,6 +9,7 @@ #include "overlay061/struct_ov61_0222AFCC.h" #include "overlay062/struct_ov62_02239DA4.h" +#include "pc_boxes.h" #include "savedata.h" void ov61_0222AE60(SaveData *saveData, const DressUpPhoto *photo, UnkStruct_ov61_0222AE80 *param2); diff --git a/include/overlay061/ov61_0222B008.h b/include/overlay061/ov61_0222B008.h index 12d3693458..d98793b896 100644 --- a/include/overlay061/ov61_0222B008.h +++ b/include/overlay061/ov61_0222B008.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_OV61_0222B008_H #define POKEPLATINUM_OV61_0222B008_H -#include "struct_decls/pc_boxes_decl.h" #include "struct_decls/struct_02030A80_decl.h" #include "struct_defs/dress_up_photo.h" @@ -16,6 +15,7 @@ #include "gds.h" #include "message.h" +#include "pc_boxes.h" #include "savedata.h" #include "string_gf.h" #include "string_template.h" diff --git a/include/overlay088/struct_ov88_0223C370.h b/include/overlay088/struct_ov88_0223C370.h index 331bd5e501..bd1526162c 100644 --- a/include/overlay088/struct_ov88_0223C370.h +++ b/include/overlay088/struct_ov88_0223C370.h @@ -1,7 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_OV88_0223C370_H #define POKEPLATINUM_STRUCT_OV88_0223C370_H -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/wi_fi_history.h" #include "field/field_system_decl.h" @@ -11,6 +10,7 @@ #include "journal.h" #include "pal_pad.h" #include "party.h" +#include "pokedex.h" #include "pokemon.h" #include "savedata.h" #include "trainer_info.h" diff --git a/include/overlay094/screens/deposit.h b/include/overlay094/screens/deposit.h index 5ed9ef683a..0413e83f5e 100644 --- a/include/overlay094/screens/deposit.h +++ b/include/overlay094/screens/deposit.h @@ -1,14 +1,13 @@ #ifndef POKEPLATINUM_GTS_SCREENS_DEPOSIT_H #define POKEPLATINUM_GTS_SCREENS_DEPOSIT_H -#include "struct_decls/pokedexdata_decl.h" - #include "overlay094/gts_application_state.h" #include "overlay094/struct_ov94_02242AAC.h" #include "bg_window.h" #include "list_menu.h" #include "message.h" +#include "pokedex.h" #include "string_list.h" #include "string_template.h" #include "text.h" diff --git a/include/overlay094/screens/select_pokemon.h b/include/overlay094/screens/select_pokemon.h index 99ca3904c5..f34461f922 100644 --- a/include/overlay094/screens/select_pokemon.h +++ b/include/overlay094/screens/select_pokemon.h @@ -1,11 +1,10 @@ #ifndef POKEPLATINUM_GTS_SCREENS_SELECT_POKEMON_H #define POKEPLATINUM_GTS_SCREENS_SELECT_POKEMON_H -#include "struct_decls/pc_boxes_decl.h" - #include "overlay094/gts_application_state.h" #include "party.h" +#include "pc_boxes.h" #include "pokemon.h" int GTSApplication_SelectPokemon_Init(GTSApplicationState *param0, int param1); diff --git a/include/pc_boxes.h b/include/pc_boxes.h index 5a1bdea42c..0040a02d4a 100644 --- a/include/pc_boxes.h +++ b/include/pc_boxes.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_PC_BOXES_H #define POKEPLATINUM_PC_BOXES_H -#include "struct_decls/pc_boxes_decl.h" - #include "pokemon.h" #include "string_gf.h" @@ -17,6 +15,14 @@ #define USE_CURRENT_BOX -1 +typedef struct PCBoxes { + u32 currentBoxID; + BoxPokemon boxMons[MAX_PC_BOXES][MAX_MONS_PER_BOX]; + u16 names[MAX_PC_BOXES][PC_BOX_NAME_BUFFER_LEN]; + u8 wallpapers[MAX_PC_BOXES]; + u8 unlockedWallpapers; +} PCBoxes; + void PCBoxes_Init(PCBoxes *pcBoxes); u32 PCBoxes_SaveSize(void); BOOL PCBoxes_TryStoreBoxMon(PCBoxes *pcBoxes, BoxPokemon *boxMon); diff --git a/include/pokedex.h b/include/pokedex.h index 46b8842971..38b1295896 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -1,12 +1,34 @@ #ifndef POKEPLATINUM_POKEDEX_H #define POKEPLATINUM_POKEDEX_H -#include "struct_decls/pokedexdata_decl.h" - #include "heap.h" #include "pokemon.h" #include "savedata.h" +#define DEX_SIZE_U32 ((int)((NATIONAL_DEX_COUNT - 1) / 32) + 1) // default 16 + +typedef struct Pokedex { + u32 magic; + u32 caughtPokemon[DEX_SIZE_U32]; + u32 seenPokemon[DEX_SIZE_U32]; + u32 recordedGenders[2][DEX_SIZE_U32]; + u32 spindaForm; + u8 shellosFormsSeen; + u8 gastrodonFormsSeen; + u8 burmyFormsSeen; + u8 wormadamFormsSeen; + u8 unownFormsSeen[UNOWN_FORM_COUNT]; + u8 recordedLanguages[MAX_SPECIES + 1]; + u8 canDetectForms; + u8 canDetectLanguages; + u8 pokedexObtained; + u8 nationalDexObtained; + u32 rotomFormsSeen; + u8 shayminFormsSeen; + u8 giratinaFormsSeen; + // u8 padding[2]; // implicit padding in vanilla +} Pokedex; + int Pokedex_SaveSize(void); Pokedex *Pokedex_New(enum HeapID heapID); void Pokedex_Copy(const Pokedex *src, Pokedex *dest); diff --git a/include/savedata/save_table.h b/include/savedata/save_table.h index 3967ca3572..3aac84a6d3 100644 --- a/include/savedata/save_table.h +++ b/include/savedata/save_table.h @@ -3,7 +3,6 @@ #include "constants/savedata/save_table.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_decls/struct_02024440_decl.h" #include "struct_decls/struct_020308A0_decl.h" #include "struct_defs/struct_0202440C.h" @@ -11,6 +10,7 @@ #include "hall_of_fame_entries.h" #include "mystery_gift.h" +#include "pc_boxes.h" #include "savedata.h" typedef int (*SaveEntrySizeFunc)(void); diff --git a/include/string_template.h b/include/string_template.h index 03ed3a281b..0408d5679e 100644 --- a/include/string_template.h +++ b/include/string_template.h @@ -4,11 +4,11 @@ #include "generated/abilities.h" #include "generated/genders.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/pokemon.h" #include "struct_defs/trainer.h" #include "enums.h" +#include "pc_boxes.h" #include "savedata.h" #include "string_gf.h" #include "trainer_info.h" diff --git a/include/struct_decls/berry_patch_manager_decl.h b/include/struct_decls/berry_patch_manager_decl.h deleted file mode 100644 index 9225d1145a..0000000000 --- a/include/struct_decls/berry_patch_manager_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_BERRY_PATCH_MANAGER_DECL_H -#define POKEPLATINUM_BERRY_PATCH_MANAGER_DECL_H - -typedef struct BerryPatchManager BerryPatchManager; - -#endif // POKEPLATINUM_BERRY_PATCH_MANAGER_DECL_H diff --git a/include/struct_decls/pc_boxes_decl.h b/include/struct_decls/pc_boxes_decl.h deleted file mode 100644 index dcf08d6566..0000000000 --- a/include/struct_decls/pc_boxes_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_PC_BOXES_DECL_H -#define POKEPLATINUM_PC_BOXES_DECL_H - -typedef struct PCBoxes PCBoxes; - -#endif // POKEPLATINUM_PC_BOXES_DECL_H diff --git a/include/struct_decls/pokedexdata_decl.h b/include/struct_decls/pokedexdata_decl.h deleted file mode 100644 index a8cb4775c7..0000000000 --- a/include/struct_decls/pokedexdata_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_POKEDEXDATA_DECL_H -#define POKEPLATINUM_POKEDEXDATA_DECL_H - -typedef struct Pokedex Pokedex; - -#endif // POKEPLATINUM_POKEDEXDATA_DECL_H diff --git a/include/struct_decls/struct_0200AC5C_decl.h b/include/struct_decls/struct_0200AC5C_decl.h deleted file mode 100644 index f91a4ffa29..0000000000 --- a/include/struct_decls/struct_0200AC5C_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_0200AC5C_DECL_H -#define POKEPLATINUM_STRUCT_0200AC5C_DECL_H - -typedef struct MessageBank_t MessageBank; - -#endif // POKEPLATINUM_STRUCT_0200AC5C_DECL_H diff --git a/include/struct_decls/struct_0200B144_decl.h b/include/struct_decls/struct_0200B144_decl.h deleted file mode 100644 index 9d987e66d5..0000000000 --- a/include/struct_decls/struct_0200B144_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_0200B144_DECL_H -#define POKEPLATINUM_STRUCT_0200B144_DECL_H - -typedef struct MessageLoader_t MessageLoader; - -#endif // POKEPLATINUM_STRUCT_0200B144_DECL_H diff --git a/include/struct_decls/struct_02023790_decl.h b/include/struct_decls/struct_02023790_decl.h deleted file mode 100644 index e8e84c97dd..0000000000 --- a/include/struct_decls/struct_02023790_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_02023790_DECL_H -#define POKEPLATINUM_STRUCT_02023790_DECL_H - -typedef struct String String; - -#endif // POKEPLATINUM_STRUCT_02023790_DECL_H diff --git a/include/struct_decls/struct_02027F8C_decl.h b/include/struct_decls/struct_02027F8C_decl.h deleted file mode 100644 index def6b3f6dc..0000000000 --- a/include/struct_decls/struct_02027F8C_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_02027F8C_DECL_H -#define POKEPLATINUM_STRUCT_02027F8C_DECL_H - -typedef struct PalPad_t PalPad; - -#endif // POKEPLATINUM_STRUCT_02027F8C_DECL_H diff --git a/include/struct_decls/struct_020789BC_sub1_decl.h b/include/struct_decls/struct_020789BC_sub1_decl.h deleted file mode 100644 index 1cfc7d8e22..0000000000 --- a/include/struct_decls/struct_020789BC_sub1_decl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_020789BC_SUB1_DECL_H -#define POKEPLATINUM_STRUCT_020789BC_SUB1_DECL_H - -typedef struct ArchivedAnimation_sub1_t ArchivedAnimation_sub1; - -#endif // POKEPLATINUM_STRUCT_020789BC_SUB1_DECL_H diff --git a/include/struct_defs/battle_system.h b/include/struct_defs/battle_system.h index 3ad34b1379..4db62371e3 100644 --- a/include/struct_defs/battle_system.h +++ b/include/struct_defs/battle_system.h @@ -6,8 +6,6 @@ #include "constants/battle.h" #include "constants/rtc.h" -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/battler_data.h" #include "struct_defs/trainer.h" @@ -29,6 +27,8 @@ #include "pal_pad.h" #include "palette.h" #include "party.h" +#include "pc_boxes.h" +#include "pokedex.h" #include "pokemon_anim.h" #include "poketch.h" #include "render_window.h" diff --git a/include/struct_defs/clear_game_player_info.h b/include/struct_defs/clear_game_player_info.h index d3d82e0238..27966a8cce 100644 --- a/include/struct_defs/clear_game_player_info.h +++ b/include/struct_defs/clear_game_player_info.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_CLEAR_GAME_PLAYER_INFO_H #define POKEPLATINUM_CLEAR_GAME_PLAYER_INFO_H -#include "struct_decls/pokedexdata_decl.h" +#include "pokedex.h" typedef struct ClearGamePlayerInfo { int gender; diff --git a/include/struct_defs/gts_player_data.h b/include/struct_defs/gts_player_data.h index 1633472ed3..bddba8e1c4 100644 --- a/include/struct_defs/gts_player_data.h +++ b/include/struct_defs/gts_player_data.h @@ -1,8 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_GTS_PLAYER_DATA_H #define POKEPLATINUM_STRUCT_GTS_PLAYER_DATA_H -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_defs/wi_fi_history.h" @@ -12,6 +10,8 @@ #include "global_trade.h" #include "journal.h" #include "party.h" +#include "pc_boxes.h" +#include "pokedex.h" #include "savedata.h" #include "system_data.h" #include "trainer_info.h" diff --git a/include/unk_0209747C.h b/include/unk_0209747C.h index c028cdb9bf..234f12d84e 100644 --- a/include/unk_0209747C.h +++ b/include/unk_0209747C.h @@ -1,11 +1,11 @@ #ifndef POKEPLATINUM_UNK_0209747C_H #define POKEPLATINUM_UNK_0209747C_H -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_0209747C_decl.h" #include "struct_defs/sentence.h" +#include "pokedex.h" #include "savedata.h" UnkStruct_0209747C *sub_0209747C(u32 param0, u32 param1, SaveData *saveData, enum HeapID heapID); diff --git a/src/applications/pc_boxes/box_app_manager.c b/src/applications/pc_boxes/box_app_manager.c index 42e8634183..5f6a4c8074 100644 --- a/src/applications/pc_boxes/box_app_manager.c +++ b/src/applications/pc_boxes/box_app_manager.c @@ -7,7 +7,6 @@ #include "constants/species.h" #include "constants/string.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/chatot_cry.h" #include "applications/bag/application.h" diff --git a/src/applications/pc_boxes/box_menu.c b/src/applications/pc_boxes/box_menu.c index 5524080c41..e932566fb3 100644 --- a/src/applications/pc_boxes/box_menu.c +++ b/src/applications/pc_boxes/box_menu.c @@ -1,18 +1,14 @@ #include "applications/pc_boxes/box_menu.h" #include -#include #include "constants/items.h" -#include "struct_decls/pc_boxes_decl.h" - #include "applications/pc_boxes/box_app_manager.h" #include "applications/pc_boxes/box_application.h" #include "applications/pc_boxes/pc_mon_preview.h" #include "applications/pc_boxes/struct_box_menu.h" -#include "enums.h" #include "pc_boxes.h" #include "sound_playback.h" #include "system.h" diff --git a/src/applications/pc_boxes/ov19_021D79F8.c b/src/applications/pc_boxes/ov19_021D79F8.c index 0bee3adf43..0e6fbaf5e0 100644 --- a/src/applications/pc_boxes/ov19_021D79F8.c +++ b/src/applications/pc_boxes/ov19_021D79F8.c @@ -1,12 +1,9 @@ #include "applications/pc_boxes/ov19_021D79F8.h" #include -#include #include "generated/species.h" -#include "struct_decls/pc_boxes_decl.h" - #include "applications/pc_boxes/box_app_manager.h" #include "applications/pc_boxes/box_application.h" #include "applications/pc_boxes/box_customization.h" diff --git a/src/applications/pc_boxes/ov19_021DB8E4.c b/src/applications/pc_boxes/ov19_021DB8E4.c index 877bcb516a..c91cd1bf42 100644 --- a/src/applications/pc_boxes/ov19_021DB8E4.c +++ b/src/applications/pc_boxes/ov19_021DB8E4.c @@ -1,13 +1,10 @@ #include "applications/pc_boxes/ov19_021DB8E4.h" #include -#include #include "generated/pokemon_colors.h" #include "generated/species.h" -#include "struct_decls/pc_boxes_decl.h" - #include "applications/pc_boxes/box_app_manager.h" #include "applications/pc_boxes/box_application.h" #include "applications/pc_boxes/ov19_021D61B0.h" diff --git a/src/applications/pokedex/pokedex_sort.c b/src/applications/pokedex/pokedex_sort.c index dd7054670f..09da88bf6a 100644 --- a/src/applications/pokedex/pokedex_sort.c +++ b/src/applications/pokedex/pokedex_sort.c @@ -4,8 +4,6 @@ #include "constants/heap.h" -#include "struct_decls/pokedexdata_decl.h" - #include "applications/pokedex/pokedex_sort_data.h" #include "applications/pokedex/sorted_pokedex.h" #include "applications/pokedex/species_caught_status.h" diff --git a/src/applications/poketch/calculator/main.c b/src/applications/poketch/calculator/main.c index 196f1b5dd6..2fcabcafa8 100644 --- a/src/applications/poketch/calculator/main.c +++ b/src/applications/poketch/calculator/main.c @@ -1,8 +1,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" - #include "applications/poketch/calculator/graphics.h" #include "applications/poketch/calculator/value.h" #include "applications/poketch/poketch_button.h" diff --git a/src/battle/battle_script.c b/src/battle/battle_script.c index bb74aa30e2..2727ecc8d3 100644 --- a/src/battle/battle_script.c +++ b/src/battle/battle_script.c @@ -17,7 +17,6 @@ #include "generated/genders.h" #include "struct_decls/battle_system.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/battle_system.h" #include "struct_defs/battler_data.h" #include "struct_defs/fraction.h" diff --git a/src/battle/battle_system.c b/src/battle/battle_system.c index 28a1f2dace..c422c23d80 100644 --- a/src/battle/battle_system.c +++ b/src/battle/battle_system.c @@ -16,8 +16,6 @@ #include "generated/trainer_score_events.h" #include "struct_decls/battle_system.h" -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/battle_system.h" #include "struct_defs/battler_data.h" #include "struct_defs/chatot_cry.h" @@ -53,6 +51,7 @@ #include "message.h" #include "palette.h" #include "party.h" +#include "pc_boxes.h" #include "pokedex.h" #include "pokemon.h" #include "pokemon_anim.h" diff --git a/src/battle_sub_menus/battle_bag.c b/src/battle_sub_menus/battle_bag.c index d0acbdd941..be87dcd380 100644 --- a/src/battle_sub_menus/battle_bag.c +++ b/src/battle_sub_menus/battle_bag.c @@ -3,7 +3,6 @@ #include "generated/text_banks.h" #include "struct_decls/battle_system.h" -#include "struct_decls/pc_boxes_decl.h" #include "battle/battle_lib.h" #include "battle/battle_system.h" diff --git a/src/berry_patch_manager.c b/src/berry_patch_manager.c index af16578772..d617adb9d3 100644 --- a/src/berry_patch_manager.c +++ b/src/berry_patch_manager.c @@ -1,11 +1,9 @@ #include "berry_patch_manager.h" #include -#include #include "constants/items.h" -#include "struct_decls/berry_patch_manager_decl.h" #include "struct_decls/struct_02061AB4_decl.h" #include "field/field_system.h" @@ -31,14 +29,6 @@ #include "tv_episode_segment.h" #include "unk_020655F4.h" -struct BerryPatchManager { - enum HeapID heapID; - BerryGrowthData *growthData; - NNSG3dRenderObj renderObj; - NNSG3dResMdl *model; - NNSG3dResFileHeader *resource; -}; - typedef struct BerryWateringTask { enum BerryWateringState state; enum FaceDirection direction; diff --git a/src/dexmode_checker.c b/src/dexmode_checker.c index 7ec71281e4..4b4c667262 100644 --- a/src/dexmode_checker.c +++ b/src/dexmode_checker.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" - #include "pokedex.h" #include "pokemon.h" #include "savedata.h" diff --git a/src/encounter.c b/src/encounter.c index e74a43128a..41f88633af 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -1,7 +1,6 @@ #include "encounter.h" #include -#include #include "constants/battle.h" #include "constants/heap.h" @@ -10,7 +9,6 @@ #include "generated/map_headers.h" #include "generated/trainer_score_events.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_decls/struct_0202440C_decl.h" #include "field/field_system.h" diff --git a/src/evolution.c b/src/evolution.c index 70834e6a58..8b0693da4b 100644 --- a/src/evolution.c +++ b/src/evolution.c @@ -10,7 +10,6 @@ #include "generated/species.h" #include "generated/trainer_score_events.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/mail.h" #include "struct_defs/seal_case.h" #include "struct_defs/sprite_animation_frame.h" diff --git a/src/field_battle_data_transfer.c b/src/field_battle_data_transfer.c index 2f1426f214..ded13eac2f 100644 --- a/src/field_battle_data_transfer.c +++ b/src/field_battle_data_transfer.c @@ -12,7 +12,6 @@ #include "generated/items.h" #include "generated/species.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0203A790_decl.h" #include "struct_defs/chatot_cry.h" #include "struct_defs/struct_0205EC34.h" diff --git a/src/main_menu/main_menu.c b/src/main_menu/main_menu.c index efd0f0dcc5..ba276d7499 100644 --- a/src/main_menu/main_menu.c +++ b/src/main_menu/main_menu.c @@ -7,8 +7,6 @@ #include "generated/string_padding_mode.h" #include "generated/text_banks.h" -#include "struct_decls/pokedexdata_decl.h" - #include "game_opening/const_ov77_021D742C.h" #include "main_menu/application_template.h" #include "main_menu/distribution_cartridge.h" diff --git a/src/main_menu/ov97_0222C174.c b/src/main_menu/ov97_0222C174.c index fe6515535b..15e058b383 100644 --- a/src/main_menu/ov97_0222C174.c +++ b/src/main_menu/ov97_0222C174.c @@ -1,8 +1,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" - #include "game_opening/const_ov77_021D742C.h" #include "main_menu/main_menu_util.h" #include "main_menu/ov97_02232DC8.h" diff --git a/src/overlay005/save_info_window.c b/src/overlay005/save_info_window.c index 7c1dddbd54..85753415a8 100644 --- a/src/overlay005/save_info_window.c +++ b/src/overlay005/save_info_window.c @@ -7,8 +7,6 @@ #include "constants/narc.h" #include "generated/map_headers.h" -#include "struct_decls/pokedexdata_decl.h" - #include "applications/poketch/poketch_system.h" #include "overlay005/ov5_021EA714.h" #include "overlay005/save_info_window.h" diff --git a/src/overlay006/ov6_02246A30.c b/src/overlay006/ov6_02246A30.c index 4546f8cdba..1f7b7dc19d 100644 --- a/src/overlay006/ov6_02246A30.c +++ b/src/overlay006/ov6_02246A30.c @@ -5,8 +5,6 @@ #include "generated/first_arrival_to_zones.h" -#include "struct_decls/pokedexdata_decl.h" - #include "field/field_system.h" #include "inlines.h" diff --git a/src/overlay061/ov61_0222AE60.c b/src/overlay061/ov61_0222AE60.c index e255341bad..3daa8cd417 100644 --- a/src/overlay061/ov61_0222AE60.c +++ b/src/overlay061/ov61_0222AE60.c @@ -1,11 +1,9 @@ #include "overlay061/ov61_0222AE60.h" #include -#include #include "constants/species.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/dress_up_photo.h" #include "struct_defs/struct_02030A80.h" diff --git a/src/overlay061/ov61_0222B008.c b/src/overlay061/ov61_0222B008.c index a03b5e73ff..8727053216 100644 --- a/src/overlay061/ov61_0222B008.c +++ b/src/overlay061/ov61_0222B008.c @@ -4,7 +4,6 @@ #include #include -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/dress_up_photo.h" #include "struct_defs/struct_02030A80.h" @@ -28,6 +27,7 @@ #include "gds.h" #include "heap.h" #include "message.h" +#include "pc_boxes.h" #include "play_time.h" #include "save_player.h" #include "string_gf.h" diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 93439df841..153fedc19b 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/dress_up_photo.h" #include "struct_defs/struct_02030A80.h" #include "struct_defs/struct_0208C06C.h" diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index 268f88910f..1cba5421b3 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -6,7 +6,6 @@ #include "constants/narc.h" #include "constants/species.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/struct_02030A80.h" #include "struct_defs/struct_0208C06C.h" diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index d6da260d9d..67ebdfd720 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0202F41C_decl.h" #include "struct_defs/struct_02030A80.h" #include "struct_defs/struct_0208C06C.h" diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index 20eafdc60f..91f1812577 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -6,7 +6,6 @@ #include "generated/journal_online_events.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02012B20_decl.h" #include "struct_decls/struct_0202B370_decl.h" #include "struct_defs/battle_frontier.h" diff --git a/src/overlay066/ov66_0222DDF0.c b/src/overlay066/ov66_0222DDF0.c index 2c10d95995..41a71afa03 100644 --- a/src/overlay066/ov66_0222DDF0.c +++ b/src/overlay066/ov66_0222DDF0.c @@ -9,7 +9,6 @@ #include "generated/journal_online_events.h" #include "generated/species.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02014FB0_decl.h" #include "struct_decls/struct_02030EC4_decl.h" #include "struct_decls/struct_0207E060_decl.h" diff --git a/src/overlay094/screens/deposit.c b/src/overlay094/screens/deposit.c index 8887f692a8..9252d8be0d 100644 --- a/src/overlay094/screens/deposit.c +++ b/src/overlay094/screens/deposit.c @@ -8,8 +8,6 @@ #include "generated/gender_ratios.h" #include "generated/species_data_params.h" -#include "struct_decls/pokedexdata_decl.h" - #include "overlay094/application.h" #include "overlay094/const_ov94_02245FD4.h" #include "overlay094/const_ov94_02245FD8.h" diff --git a/src/overlay094/screens/select_pokemon.c b/src/overlay094/screens/select_pokemon.c index f269d3a87b..8ec0f806c0 100644 --- a/src/overlay094/screens/select_pokemon.c +++ b/src/overlay094/screens/select_pokemon.c @@ -2,13 +2,10 @@ #include #include -#include #include "generated/items.h" #include "generated/species.h" -#include "struct_decls/pc_boxes_decl.h" - #include "global/utility.h" #include "overlay094/application.h" #include "overlay094/gts_application_state.h" diff --git a/src/pc_boxes.c b/src/pc_boxes.c index 035c7bbfeb..9fda3ec696 100644 --- a/src/pc_boxes.c +++ b/src/pc_boxes.c @@ -12,14 +12,6 @@ #include "res/text/bank/pokemon_storage_system.h" -typedef struct PCBoxes { - u32 currentBoxID; - BoxPokemon boxMons[MAX_PC_BOXES][MAX_MONS_PER_BOX]; - u16 names[MAX_PC_BOXES][PC_BOX_NAME_BUFFER_LEN]; - u8 wallpapers[MAX_PC_BOXES]; - u8 unlockedWallpapers; -} PCBoxes; - static void PCBoxes_InitInternal(PCBoxes *pcBoxes); void PCBoxes_Init(PCBoxes *pcBoxes) diff --git a/src/pokedex.c b/src/pokedex.c index 36538fde5b..981f483648 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -27,35 +27,12 @@ static const u16 sExcludedMonsNational[] = { }; static const u16 sExcludedMonsLocal[] = {}; -#define DEX_SIZE_U32 ((int)((NATIONAL_DEX_COUNT - 1) / 32) + 1) // default 16 #define MAGIC_NUMBER 0xBEEFCAFE #define NUM_EXCLUDED_NATIONAL ((int)(sizeof(sExcludedMonsNational) / sizeof(u16))) #define NUM_EXCLUDED_LOCAL 0 //((int)(sizeof(sExcludedMonsLocal) / sizeof(u16))) #define NATIONAL_DEX_GOAL (NATIONAL_DEX_COUNT - NUM_EXCLUDED_NATIONAL) #define LOCAL_DEX_GOAL (SINNOH_DEX_COUNT - NUM_EXCLUDED_LOCAL) -typedef struct Pokedex { - u32 magic; - u32 caughtPokemon[DEX_SIZE_U32]; - u32 seenPokemon[DEX_SIZE_U32]; - u32 recordedGenders[2][DEX_SIZE_U32]; - u32 spindaForm; - u8 shellosFormsSeen; - u8 gastrodonFormsSeen; - u8 burmyFormsSeen; - u8 wormadamFormsSeen; - u8 unownFormsSeen[UNOWN_FORM_COUNT]; - u8 recordedLanguages[MAX_SPECIES + 1]; - u8 canDetectForms; - u8 canDetectLanguages; - u8 pokedexObtained; - u8 nationalDexObtained; - u32 rotomFormsSeen; - u8 shayminFormsSeen; - u8 giratinaFormsSeen; - // u8 padding[2]; // implicit padding in vanilla -} Pokedex; - int Pokedex_SaveSize(void) { return sizeof(Pokedex); diff --git a/src/pokemon.c b/src/pokemon.c index e6e64e7bd6..aae729853b 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -20,7 +20,6 @@ #include "generated/natures.h" #include "generated/species_data_params.h" -#include "struct_decls/struct_02023790_decl.h" #include "struct_defs/chatot_cry.h" #include "struct_defs/mail.h" #include "struct_defs/seal_case.h" diff --git a/src/scrcmd.c b/src/scrcmd.c index 735f182148..e67a9ad21e 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -23,8 +23,6 @@ #include "generated/save_types.h" #include "generated/signpost_commands.h" -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_decls/struct_0203A790_decl.h" diff --git a/src/scrcmd_catching_show.c b/src/scrcmd_catching_show.c index ed072f8a70..7f2116987f 100644 --- a/src/scrcmd_catching_show.c +++ b/src/scrcmd_catching_show.c @@ -1,12 +1,9 @@ #include "scrcmd_catching_show.h" #include -#include #include "generated/catching_show_points_category.h" -#include "struct_decls/pc_boxes_decl.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02024440_decl.h" #include "savedata/save_table.h" diff --git a/src/scrcmd_jubilife_lottery.c b/src/scrcmd_jubilife_lottery.c index 811896c7a4..d5494c147b 100644 --- a/src/scrcmd_jubilife_lottery.c +++ b/src/scrcmd_jubilife_lottery.c @@ -1,9 +1,6 @@ #include "scrcmd_jubilife_lottery.h" #include -#include - -#include "struct_decls/pc_boxes_decl.h" #include "field/field_system.h" #include "savedata/save_table.h" diff --git a/src/scrcmd_party.c b/src/scrcmd_party.c index 610151f6d3..e09ded1d24 100644 --- a/src/scrcmd_party.c +++ b/src/scrcmd_party.c @@ -1,14 +1,11 @@ #include "scrcmd_party.h" #include -#include #include "constants/heap.h" #include "generated/natures.h" #include "generated/species.h" -#include "struct_decls/pc_boxes_decl.h" - #include "field/field_system.h" #include "overlay005/daycare.h" #include "savedata/save_table.h" diff --git a/src/scrcmd_strings.c b/src/scrcmd_strings.c index 8c96f28af5..d1cc9829c4 100644 --- a/src/scrcmd_strings.c +++ b/src/scrcmd_strings.c @@ -2,12 +2,9 @@ #include #include -#include #include "constants/narc.h" -#include "struct_decls/pc_boxes_decl.h" - #include "field/field_system.h" #include "savedata/save_table.h" diff --git a/src/scrcmd_system_flags.c b/src/scrcmd_system_flags.c index 7862502172..1898ce9808 100644 --- a/src/scrcmd_system_flags.c +++ b/src/scrcmd_system_flags.c @@ -2,7 +2,6 @@ #include "generated/badges.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0203A790_decl.h" #include "struct_defs/struct_0205EC34.h" diff --git a/src/start_menu.c b/src/start_menu.c index 96fe7ca94d..58c26eee41 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -11,7 +11,6 @@ #include "generated/species.h" #include "generated/text_banks.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0209747C_decl.h" #include "struct_defs/sentence.h" #include "struct_defs/struct_020708E0.h" diff --git a/src/string_template.c b/src/string_template.c index e61d52b9c9..e862cc89dc 100644 --- a/src/string_template.c +++ b/src/string_template.c @@ -11,7 +11,6 @@ #include "generated/genders.h" #include "generated/moves.h" -#include "struct_decls/pc_boxes_decl.h" #include "struct_defs/trainer.h" #include "global/utility.h" diff --git a/src/tv_episode_segment.c b/src/tv_episode_segment.c index eac27f4321..82289fcbc1 100644 --- a/src/tv_episode_segment.c +++ b/src/tv_episode_segment.c @@ -12,7 +12,6 @@ #include "generated/natures.h" #include "generated/pokemon_stats.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_defs/dress_up_photo.h" #include "struct_defs/image_clips.h" diff --git a/src/unk_0202F180.c b/src/unk_0202F180.c index e7263262fa..4a9a61e2cd 100644 --- a/src/unk_0202F180.c +++ b/src/unk_0202F180.c @@ -3,8 +3,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" - #include "game_records.h" #include "pokedex.h" #include "pokemon.h" diff --git a/src/unk_0204AEE8.c b/src/unk_0204AEE8.c index ab3fb34d5c..eb68eb4af4 100644 --- a/src/unk_0204AEE8.c +++ b/src/unk_0204AEE8.c @@ -10,7 +10,6 @@ #include "generated/species_data_params.h" #include "generated/trainer_classes.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_defs/battle_frontier_pokemon_data.h" #include "struct_defs/battle_frontier_trainer_data.h" #include "struct_defs/battle_tower.h" diff --git a/src/unk_020933F8.c b/src/unk_020933F8.c index d26adc57bb..e279c3fb2b 100644 --- a/src/unk_020933F8.c +++ b/src/unk_020933F8.c @@ -9,7 +9,6 @@ #include "generated/pokemon_contest_ranks.h" #include "generated/trainer_score_events.h" -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_0202440C_decl.h" #include "struct_defs/image_clips.h" #include "struct_defs/struct_02029C88.h" diff --git a/src/unk_0209747C.c b/src/unk_0209747C.c index 0968dd59d1..8b03d5f212 100644 --- a/src/unk_0209747C.c +++ b/src/unk_0209747C.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_0209747C_decl.h" #include "struct_defs/sentence.h" diff --git a/src/unk_020998EC.c b/src/unk_020998EC.c index a0f8aee353..8ec40683e2 100644 --- a/src/unk_020998EC.c +++ b/src/unk_020998EC.c @@ -3,7 +3,6 @@ #include #include -#include "struct_decls/pokedexdata_decl.h" #include "struct_decls/struct_02014D38_decl.h" #include "struct_decls/struct_02014EC4_decl.h" #include "struct_decls/struct_0209747C_decl.h"