diff --git a/include/constdata/const_020E582C.h b/include/constdata/const_020E582C.h deleted file mode 100644 index 6ac7281bf7..0000000000 --- a/include/constdata/const_020E582C.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_CONST_020E582C_H -#define POKEPLATINUM_CONST_020E582C_H - -extern const int Unk_020E582C; - -#endif // POKEPLATINUM_CONST_020E582C_H diff --git a/include/constdata/const_020E5830.h b/include/constdata/const_020E5830.h deleted file mode 100644 index f73650dfbf..0000000000 --- a/include/constdata/const_020E5830.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_CONST_020E5830_H -#define POKEPLATINUM_CONST_020E5830_H - -extern const int Unk_020E5830; - -#endif // POKEPLATINUM_CONST_020E5830_H diff --git a/include/constdata/const_020E5834.h b/include/constdata/const_020E5834.h deleted file mode 100644 index 26cdebe149..0000000000 --- a/include/constdata/const_020E5834.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef POKEPLATINUM_CONST_020E5834_H -#define POKEPLATINUM_CONST_020E5834_H - -#include "struct_defs/struct_02025340.h" - -extern const UnkStruct_02025340 Unk_020E5834[]; - -#endif // POKEPLATINUM_CONST_020E5834_H diff --git a/include/constdata/const_020E5894.h b/include/constdata/const_020E5894.h deleted file mode 100644 index 35c998b887..0000000000 --- a/include/constdata/const_020E5894.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef POKEPLATINUM_CONST_020E5894_H -#define POKEPLATINUM_CONST_020E5894_H - -#include "struct_defs/struct_020251A4.h" - -extern const UnkStruct_020251A4 Unk_020E5894[]; - -#endif // POKEPLATINUM_CONST_020E5894_H diff --git a/include/functypes/funcptr_020E5894.h b/include/functypes/funcptr_020E5894.h deleted file mode 100644 index 3d02e3551f..0000000000 --- a/include/functypes/funcptr_020E5894.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_FUNCPTR_020E5894_H -#define POKEPLATINUM_FUNCPTR_020E5894_H - -typedef int (* UnkFuncPtr_020E5894)(void); - -#endif // POKEPLATINUM_FUNCPTR_020E5894_H diff --git a/include/functypes/funcptr_020E5894_1.h b/include/functypes/funcptr_020E5894_1.h deleted file mode 100644 index c80255b1d6..0000000000 --- a/include/functypes/funcptr_020E5894_1.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef POKEPLATINUM_FUNCPTR_020E5894_1_H -#define POKEPLATINUM_FUNCPTR_020E5894_1_H - -typedef void (* UnkFuncPtr_020E5894_1)(void *); - -#endif // POKEPLATINUM_FUNCPTR_020E5894_1_H diff --git a/include/overlay004/ov4_021D0D80.h b/include/overlay004/ov4_021D0D80.h index 31257ba4e8..aa8e3c078f 100644 --- a/include/overlay004/ov4_021D0D80.h +++ b/include/overlay004/ov4_021D0D80.h @@ -9,7 +9,7 @@ #include -int ov4_021D0D80(UnkStruct_021C0794 * param0, int param1, int param2, int param3); +int ov4_021D0D80(SaveData * param0, int param1, int param2, int param3); void ov4_021D0F68(); int ov4_021D0FEC(); void ov4_021D1104(UnkFuncPtr_ov4_021D1104 param0, UnkFuncPtr_ov4_021D1104 param1); diff --git a/include/overlay005/ov5_021E622C.h b/include/overlay005/ov5_021E622C.h index dd6c665127..da3fd8695e 100644 --- a/include/overlay005/ov5_021E622C.h +++ b/include/overlay005/ov5_021E622C.h @@ -12,7 +12,7 @@ u8 ov5_021E6238(UnkStruct_02026310 * param0); int ov5_021E6270(UnkStruct_02026310 * param0); -void ov5_021E6358(Party * param0, int param1, UnkStruct_02026310 * param2, UnkStruct_021C0794 * param3); +void ov5_021E6358(Party * param0, int param1, UnkStruct_02026310 * param2, SaveData * param3); u16 ov5_021E64F8(Party * param0, UnkStruct_0200B358 * param1, UnkStruct_02026310 * param2, u8 param3); int ov5_021E6520(BoxPokemon * param0, u32 param1); int ov5_021E6568(UnkStruct_02026218 * param0); diff --git a/include/overlay006/battle_params.h b/include/overlay006/battle_params.h index f30094eae1..0440c324c5 100644 --- a/include/overlay006/battle_params.h +++ b/include/overlay006/battle_params.h @@ -30,7 +30,7 @@ typedef struct { UnkStruct_0207D3C0 * unk_E0; UnkStruct_0207D99C * unk_E4; UnkStruct_02026324 * unk_E8; - UnkStruct_020797DC * unk_EC; + PCBoxes * unk_EC; UnkStruct_0202CC84 * unk_F0[4]; UnkStruct_02056B24 * unk_100; UnkStruct_0202C878 * unk_104; @@ -64,7 +64,7 @@ typedef struct { int unk_18C; UnkStruct_0209C370 * unk_190; u8 unk_194[4]; - UnkStruct_021C0794 * unk_198; + SaveData * unk_198; u32 unk_19C; } BattleParams; diff --git a/include/overlay006/ov6_02246BF4.h b/include/overlay006/ov6_02246BF4.h index 19eadc972d..1ea68bcc28 100644 --- a/include/overlay006/ov6_02246BF4.h +++ b/include/overlay006/ov6_02246BF4.h @@ -4,6 +4,6 @@ #include "struct_decls/struct_0203CDB0_decl.h" #include "struct_decls/struct_021C0794_decl.h" -BOOL ov6_02246BF4(UnkStruct_021C0794 * param0, UnkStruct_0203CDB0 * param1); +BOOL ov6_02246BF4(SaveData * param0, UnkStruct_0203CDB0 * param1); #endif // POKEPLATINUM_OV6_02246BF4_H diff --git a/include/overlay006/ov6_022475B0.h b/include/overlay006/ov6_022475B0.h index 4b9ef3dd94..1390d82410 100644 --- a/include/overlay006/ov6_022475B0.h +++ b/include/overlay006/ov6_022475B0.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_021C0794_decl.h" -void ov6_022475B0(UnkStruct_021C0794 * param0); -int ov6_02247624(UnkStruct_021C0794 * param0); +void ov6_022475B0(SaveData * param0); +int ov6_02247624(SaveData * param0); #endif // POKEPLATINUM_OV6_022475B0_H diff --git a/include/overlay007/ov7_0224BE9C.h b/include/overlay007/ov7_0224BE9C.h index 6d5a0f0fa4..745025de26 100644 --- a/include/overlay007/ov7_0224BE9C.h +++ b/include/overlay007/ov7_0224BE9C.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay007/struct_ov7_0224BEFC_decl.h" -UnkStruct_ov7_0224BEFC * ov7_0224BE9C(u32 param0, UnkStruct_021C0794 * param1, UnkStruct_02018340 * param2); +UnkStruct_ov7_0224BEFC * ov7_0224BE9C(u32 param0, SaveData * param1, UnkStruct_02018340 * param2); void ov7_0224BEFC(UnkStruct_ov7_0224BEFC * param0); BOOL ov7_0224BF2C(UnkStruct_ov7_0224BEFC * param0); diff --git a/include/overlay007/struct_ov7_0224D008.h b/include/overlay007/struct_ov7_0224D008.h index 59bf451ec5..1ee364535d 100644 --- a/include/overlay007/struct_ov7_0224D008.h +++ b/include/overlay007/struct_ov7_0224D008.h @@ -40,7 +40,7 @@ typedef struct { UnkStruct_020279FC * unk_278; UnkStruct_0202B628 * unk_27C; UnkStruct_0202CD88 * unk_280; - UnkStruct_021C0794 * unk_284; + SaveData * unk_284; UnkStruct_020507E4 * unk_288; BOOL unk_28C; u16 * unk_290; diff --git a/include/overlay016/ov16_0223DF00.h b/include/overlay016/ov16_0223DF00.h index 5ccb920579..13a6cbb228 100644 --- a/include/overlay016/ov16_0223DF00.h +++ b/include/overlay016/ov16_0223DF00.h @@ -80,7 +80,7 @@ int ov16_0223E1C4(BattleSystem * param0, int param1); u8 BattleSystem_BattlerSlot(BattleSystem * param0, int param1); u8 Battler_Side(BattleSystem * param0, int param1); void * ov16_0223E220(BattleSystem * param0); -UnkStruct_020797DC * ov16_0223E228(BattleSystem * param0); +PCBoxes * ov16_0223E228(BattleSystem * param0); int ov16_0223E22C(BattleSystem * param0); int ov16_0223E240(BattleSystem * param0); int ov16_0223E24C(BattleSystem * param0); diff --git a/include/overlay019/ov19_021D0D80.h b/include/overlay019/ov19_021D0D80.h index 6352cc9e37..82b7b791b7 100644 --- a/include/overlay019/ov19_021D0D80.h +++ b/include/overlay019/ov19_021D0D80.h @@ -34,7 +34,7 @@ u32 ov19_021D5E68(const UnkStruct_ov19_021D4DF0 * param0); const UnkStruct_ov19_021D5BAC * ov19_021D5E70(const UnkStruct_ov19_021D4DF0 * param0); u32 ov19_021D5E74(const UnkStruct_ov19_021D4DF0 * param0); const UnkStruct_ov19_021D4F5C * ov19_021D5E8C(const UnkStruct_ov19_021D4DF0 * param0); -const UnkStruct_020797DC * ov19_021D5E90(const UnkStruct_ov19_021D4DF0 * param0); +const PCBoxes * ov19_021D5E90(const UnkStruct_ov19_021D4DF0 * param0); u32 ov19_021D5E94(const UnkStruct_ov19_021D4DF0 * param0); BoxPokemon * ov19_021D5E9C(const UnkStruct_ov19_021D4DF0 * param0); u32 ov19_021D5EA0(const UnkStruct_ov19_021D4DF0 * param0); diff --git a/include/overlay019/struct_ov19_021D4DF0.h b/include/overlay019/struct_ov19_021D4DF0.h index 4f4130f7fe..ba3efb3570 100644 --- a/include/overlay019/struct_ov19_021D4DF0.h +++ b/include/overlay019/struct_ov19_021D4DF0.h @@ -14,7 +14,7 @@ #include "overlay019/struct_ov19_021DF964.h" typedef struct { - const UnkStruct_020797DC * unk_00; + const PCBoxes * unk_00; const Party * unk_04; UnkStruct_ov19_021D3CFC unk_08; UnkStruct_ov19_021D5594 unk_14; diff --git a/include/overlay023/ov23_02241F74.h b/include/overlay023/ov23_02241F74.h index 577a917a08..383f131a3d 100644 --- a/include/overlay023/ov23_02241F74.h +++ b/include/overlay023/ov23_02241F74.h @@ -40,7 +40,7 @@ void ov23_02242CB4(void); void ov23_02242D08(void); void ov23_02242D44(UnkStruct_0203CDB0 * param0); BOOL ov23_02242D60(Strbuf *param0); -UnkStruct_02029894 * ov23_02242E10(UnkStruct_021C0794 * param0); +UnkStruct_02029894 * ov23_02242E10(SaveData * param0); int ov23_02242E28(void); int ov23_02242E40(void); BOOL ov23_02242E58(int param0, int param1); diff --git a/include/overlay023/ov23_0224B05C.h b/include/overlay023/ov23_0224B05C.h index a0283518e3..2599c561cc 100644 --- a/include/overlay023/ov23_0224B05C.h +++ b/include/overlay023/ov23_0224B05C.h @@ -42,7 +42,7 @@ int ov23_0224CD7C(void); void ov23_0224CD80(int param0, int param1, void * param2, void * param3); void ov23_0224CF18(int param0, int param1, void * param2, void * param3); BOOL ov23_0224D020(Strbuf *param0); -UnkStruct_02029894 * ov23_0224D130(UnkStruct_021C0794 * param0); +UnkStruct_02029894 * ov23_0224D130(SaveData * param0); int ov23_0224D150(void); int ov23_0224D178(void); BOOL ov23_0224D1A0(int param0, int param1); diff --git a/include/overlay023/ov23_02253598.h b/include/overlay023/ov23_02253598.h index a2803c4316..021cc9727a 100644 --- a/include/overlay023/ov23_02253598.h +++ b/include/overlay023/ov23_02253598.h @@ -9,7 +9,7 @@ #include "overlay023/struct_ov23_02253598_decl.h" #include "overlay023/funcptr_ov23_02253834.h" -void ov23_02253598(UnkStruct_ov23_02253598 * param0, UnkStruct_0202855C * param1, UnkStruct_021C0794 * param2); +void ov23_02253598(UnkStruct_ov23_02253598 * param0, UnkStruct_0202855C * param1, SaveData * param2); void ov23_022535CC(void); void ov23_022535EC(void); void ov23_02253604(void); diff --git a/include/overlay025/ov25_02253CE0.h b/include/overlay025/ov25_02253CE0.h index 838cb6b97c..8c473a8010 100644 --- a/include/overlay025/ov25_02253CE0.h +++ b/include/overlay025/ov25_02253CE0.h @@ -15,7 +15,7 @@ #include -void ov25_02253CE8(UnkStruct_0203CDB0 * param0, UnkStruct_ov25_02253CE0 ** param1, UnkStruct_021C0794 * param2, UnkStruct_02018340 * param3, NNSG2dOamManagerInstance * param4); +void ov25_02253CE8(UnkStruct_0203CDB0 * param0, UnkStruct_ov25_02253CE0 ** param1, SaveData * param2, UnkStruct_02018340 * param3, NNSG2dOamManagerInstance * param4); void ov25_02253D5C(UnkStruct_ov25_02253CE0 * param0); BOOL ov25_02253D70(UnkStruct_ov25_02253CE0 * param0); void ov25_02253D7C(UnkStruct_ov25_02253CE0 * param0, int param1, u32 param2); @@ -36,7 +36,7 @@ BOOL ov25_02254534(const UnkStruct_ov25_0225424C * param0); BOOL ov25_02254538(const UnkStruct_ov25_0225424C * param0); UnkStruct_0203CDB0 * ov25_0225453C(const UnkStruct_ov25_0225424C * param0); UnkStruct_02056B24 * ov25_02254540(const UnkStruct_ov25_0225424C * param0); -UnkStruct_021C0794 * ov25_02254544(const UnkStruct_ov25_0225424C * param0); +SaveData * ov25_02254544(const UnkStruct_ov25_0225424C * param0); int ov25_02254548(const UnkStruct_ov25_0225424C * param0); #endif // POKEPLATINUM_OV25_02253CE0_H diff --git a/include/overlay057/ov57_021D0F30.h b/include/overlay057/ov57_021D0F30.h index 4464b4f48a..dd29663e37 100644 --- a/include/overlay057/ov57_021D0F30.h +++ b/include/overlay057/ov57_021D0F30.h @@ -3,7 +3,7 @@ #include "struct_decls/struct_021C0794_decl.h" -void ov57_021D0F30(int param0, UnkStruct_021C0794 * param1); -void ov57_021D0F44(int param0, UnkStruct_021C0794 * param1); +void ov57_021D0F30(int param0, SaveData * param1); +void ov57_021D0F44(int param0, SaveData * param1); #endif // POKEPLATINUM_OV57_021D0F30_H diff --git a/include/overlay059/ov59_021D2B44.h b/include/overlay059/ov59_021D2B44.h index 34a1a77f5c..289e5f6669 100644 --- a/include/overlay059/ov59_021D2B44.h +++ b/include/overlay059/ov59_021D2B44.h @@ -5,17 +5,17 @@ #include "struct_decls/struct_0202E794_decl.h" #include "struct_decls/struct_021C0794_decl.h" -u32 ov59_021D2B44(const UnkStruct_021C0794 * param0); -u32 ov59_021D2B4C(const UnkStruct_021C0794 * param0); -u32 ov59_021D2B54(const UnkStruct_021C0794 * param0); -UnkStruct_0202E794 * ov59_021D2C28(UnkStruct_021C0794 * param0, int param1, u32 param2); -UnkStruct_0202E794 * ov59_021D2C70(UnkStruct_021C0794 * param0, int param1, u32 param2); -UnkStruct_0202E794 * ov59_021D2CB4(UnkStruct_021C0794 * param0, int param1, u32 param2); -UnkStruct_0202E794 * ov59_021D2CF8(UnkStruct_021C0794 * param0, int param1, u32 param2); -UnkStruct_0202E794 * ov59_021D2D3C(UnkStruct_021C0794 * param0, int param1, u32 param2); -UnkStruct_0202E794 * ov59_021D2D80(UnkStruct_021C0794 * param0, int param1, u32 param2); -void ov59_021D2F10(UnkStruct_0202440C * param0, int param1, int param2, const void ** param3, const void ** param4); -void ov59_021D2F38(UnkStruct_0202440C * param0, int param1, int param2, const void ** param3, const void ** param4); -void ov59_021D2F60(UnkStruct_0202440C * param0, int param1, int param2, const void ** param3, const void ** param4); +u32 ov59_021D2B44(const SaveData * param0); +u32 ov59_021D2B4C(const SaveData * param0); +u32 ov59_021D2B54(const SaveData * param0); +UnkStruct_0202E794 * ov59_021D2C28(SaveData * param0, int param1, u32 param2); +UnkStruct_0202E794 * ov59_021D2C70(SaveData * param0, int param1, u32 param2); +UnkStruct_0202E794 * ov59_021D2CB4(SaveData * param0, int param1, u32 param2); +UnkStruct_0202E794 * ov59_021D2CF8(SaveData * param0, int param1, u32 param2); +UnkStruct_0202E794 * ov59_021D2D3C(SaveData * param0, int param1, u32 param2); +UnkStruct_0202E794 * ov59_021D2D80(SaveData * param0, int param1, u32 param2); +void ov59_021D2F10(TVBroadcast * param0, int param1, int param2, const void ** param3, const void ** param4); +void ov59_021D2F38(TVBroadcast * param0, int param1, int param2, const void ** param3, const void ** param4); +void ov59_021D2F60(TVBroadcast * param0, int param1, int param2, const void ** param3, const void ** param4); #endif // POKEPLATINUM_OV59_021D2B44_H diff --git a/include/overlay059/ov59_021D2F88.h b/include/overlay059/ov59_021D2F88.h index fa5f4bbf7c..38934c24a3 100644 --- a/include/overlay059/ov59_021D2F88.h +++ b/include/overlay059/ov59_021D2F88.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay059/struct_ov59_021D30E0.h" -void ov59_021D30E0(UnkStruct_021C0794 * param0, UnkStruct_ov59_021D30E0 * param1); -void ov59_021D313C(UnkStruct_021C0794 * param0, const UnkStruct_ov59_021D30E0 * param1); +void ov59_021D30E0(SaveData * param0, UnkStruct_ov59_021D30E0 * param1); +void ov59_021D313C(SaveData * param0, const UnkStruct_ov59_021D30E0 * param1); #endif // POKEPLATINUM_OV59_021D2F88_H diff --git a/include/overlay061/ov61_0222AE60.h b/include/overlay061/ov61_0222AE60.h index 856a88b789..be5c91ae89 100644 --- a/include/overlay061/ov61_0222AE60.h +++ b/include/overlay061/ov61_0222AE60.h @@ -10,12 +10,12 @@ #include "overlay061/struct_ov61_0222AFCC.h" #include "overlay062/struct_ov62_02239DA4.h" -void ov61_0222AE60(UnkStruct_021C0794 * param0, const UnkStruct_02029C68 * param1, UnkStruct_ov61_0222AE80 * param2); +void ov61_0222AE60(SaveData * param0, const UnkStruct_02029C68 * param1, UnkStruct_ov61_0222AE80 * param2); void ov61_0222AE80(const UnkStruct_ov61_0222AE80 * param0, UnkStruct_02029C68 * param1); -void ov61_0222AE88(UnkStruct_021C0794 * param0, const UnkStruct_020797DC * param1, int param2, UnkStruct_ov62_02239DA4 * param3, int param4); -void ov61_0222AF88(UnkStruct_021C0794 * param0, UnkStruct_ov62_02239DA4 * param1, int param2); -void ov61_0222AFA4(UnkStruct_021C0794 * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFC0 * param2); +void ov61_0222AE88(SaveData * param0, const PCBoxes * param1, int param2, UnkStruct_ov62_02239DA4 * param3, int param4); +void ov61_0222AF88(SaveData * param0, UnkStruct_ov62_02239DA4 * param1, int param2); +void ov61_0222AFA4(SaveData * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFC0 * param2); void ov61_0222AFC0(const UnkStruct_ov61_0222AFC0 * param0, UnkStruct_02030A80 * param1); -void ov61_0222AFCC(UnkStruct_021C0794 * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFCC * param2); +void ov61_0222AFCC(SaveData * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFCC * param2); #endif // POKEPLATINUM_OV61_0222AE60_H diff --git a/include/overlay061/ov61_0222B008.h b/include/overlay061/ov61_0222B008.h index 2b79061247..8f50fb2812 100644 --- a/include/overlay061/ov61_0222B008.h +++ b/include/overlay061/ov61_0222B008.h @@ -13,7 +13,7 @@ int ov61_0222B008(UnkStruct_ov62_022349A8 * param0, const UnkStruct_ov62_0224113 void ov61_0222B0F0(UnkStruct_ov62_022349A8 * param0); int ov61_0222B1B4(UnkStruct_ov62_022349A8 * param0, UnkStruct_02030A80 * param1, UnkStruct_02029C68 * param2); int ov61_0222B1FC(UnkStruct_ov62_022349A8 * param0, int param1); -int ov61_0222B224(UnkStruct_ov62_022349A8 * param0, int param1, UnkStruct_02030A80 * param2, const UnkStruct_020797DC * param3, int param4); +int ov61_0222B224(UnkStruct_ov62_022349A8 * param0, int param1, UnkStruct_02030A80 * param2, const PCBoxes * param3, int param4); int ov61_0222B290(UnkStruct_ov62_022349A8 * param0, int param1); int ov61_0222B2B8(UnkStruct_ov62_022349A8 * param0); int ov61_0222B2D8(UnkStruct_ov62_022349A8 * param0, UnkStruct_02030A80 * param1, UnkStruct_ov61_0222B2D8 param2[]); diff --git a/include/overlay062/ov62_02248408.h b/include/overlay062/ov62_02248408.h index 3d09e930ae..25a11c3d95 100644 --- a/include/overlay062/ov62_02248408.h +++ b/include/overlay062/ov62_02248408.h @@ -5,10 +5,10 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay006/battle_params.h" -void ov62_02248408(UnkStruct_0202F264 * param0, BattleParams * param1, int param2); -int ov62_02248598(UnkStruct_021C0794 * param0, int param1, u8 param2, u16 * param3, u16 * param4); -void ov62_02248624(UnkStruct_021C0794 * param0); -int ov62_02248658(UnkStruct_021C0794 * param0, u64 param1, u16 * param2, u16 * param3); -int ov62_022486A4(UnkStruct_021C0794 * param0, int param1); +void ov62_02248408(BattleRecording * param0, BattleParams * param1, int param2); +int ov62_02248598(SaveData * param0, int param1, u8 param2, u16 * param3, u16 * param4); +void ov62_02248624(SaveData * param0); +int ov62_02248658(SaveData * param0, u64 param1, u16 * param2, u16 * param3); +int ov62_022486A4(SaveData * param0, int param1); #endif // POKEPLATINUM_OV62_02248408_H diff --git a/include/overlay062/struct_ov62_022349A8.h b/include/overlay062/struct_ov62_022349A8.h index 9c46864a0e..0273107352 100644 --- a/include/overlay062/struct_ov62_022349A8.h +++ b/include/overlay062/struct_ov62_022349A8.h @@ -14,7 +14,7 @@ #include "overlay062/struct_ov62_0223CAA4.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkFuncPtr_ov62_022349A8 unk_04; void * unk_08; UnkStruct_ov62_022349A8_sub1 unk_0C; diff --git a/include/overlay062/struct_ov62_02241130.h b/include/overlay062/struct_ov62_02241130.h index e2773cc06d..78431e0de1 100644 --- a/include/overlay062/struct_ov62_02241130.h +++ b/include/overlay062/struct_ov62_02241130.h @@ -8,7 +8,7 @@ typedef struct { int unk_00; int unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_ov62_022349A8_sub2 unk_0C; UnkFuncPtr_ov62_022349A8 unk_38; void * unk_3C; diff --git a/include/overlay065/struct_ov65_0222EBE0_t.h b/include/overlay065/struct_ov65_0222EBE0_t.h index 774a5a86b5..cbefdbaeb3 100644 --- a/include/overlay065/struct_ov65_0222EBE0_t.h +++ b/include/overlay065/struct_ov65_0222EBE0_t.h @@ -37,7 +37,7 @@ struct UnkStruct_ov65_0222EBE0_t { UnkStruct_02013A04 * unk_154; UnkStruct_0200112C * unk_158; UnkStruct_02018340 * unk_15C; - UnkStruct_021C0794 * unk_160; + SaveData * unk_160; UnkStruct_0200B358 * unk_164; MessageLoader * unk_168; MessageLoader * unk_16C; diff --git a/include/overlay066/ov66_0222DDF0.h b/include/overlay066/ov66_0222DDF0.h index 16d420be21..6fb7120da5 100644 --- a/include/overlay066/ov66_0222DDF0.h +++ b/include/overlay066/ov66_0222DDF0.h @@ -17,7 +17,7 @@ #include "enums.h" #include -UnkStruct_ov66_0222DFF8 * ov66_0222DDF0(UnkStruct_021C0794 * param0, u32 param1); +UnkStruct_ov66_0222DFF8 * ov66_0222DDF0(SaveData * param0, u32 param1); void ov66_0222DEEC(UnkStruct_ov66_0222DFF8 * param0); void ov66_0222DF58(UnkStruct_ov66_0222DFF8 * param0); void ov66_0222DFF4(UnkStruct_ov66_0222DFF8 * param0); @@ -30,7 +30,7 @@ BOOL ov66_0222E02C(UnkStruct_ov66_0222DFF8 * param0, u32 param1); BOOL ov66_0222E058(UnkStruct_ov66_0222DFF8 * param0, u32 param1); BOOL ov66_0222E084(UnkStruct_ov66_0222DFF8 * param0, int param1); BOOL ov66_0222E09C(UnkStruct_ov66_0222DFF8 * param0, u32 param1); -UnkStruct_021C0794 * ov66_0222E0C4(UnkStruct_ov66_0222DFF8 * param0); +SaveData * ov66_0222E0C4(UnkStruct_ov66_0222DFF8 * param0); BOOL ov66_0222E0C8(const UnkStruct_ov66_0222DFF8 * param0); BOOL ov66_0222E0DC(const UnkStruct_ov66_0222DFF8 * param0); BOOL ov66_0222E0F4(const UnkStruct_ov66_0222DFF8 * param0); diff --git a/include/overlay066/ov66_02230C44.h b/include/overlay066/ov66_02230C44.h index b76cc82b2b..0974d3a2c4 100644 --- a/include/overlay066/ov66_02230C44.h +++ b/include/overlay066/ov66_02230C44.h @@ -6,7 +6,7 @@ #include "overlay066/struct_ov66_0222DFF8_decl.h" #include "overlay066/struct_ov66_02230C90_decl.h" -UnkStruct_ov66_02230C90 * ov66_02230C44(BOOL param0, UnkStruct_021C0794 * param1, UnkStruct_ov66_0222DCE0_sub1 * param2, UnkStruct_ov66_0222DFF8 * param3, u32 param4); +UnkStruct_ov66_02230C90 * ov66_02230C44(BOOL param0, SaveData * param1, UnkStruct_ov66_0222DCE0_sub1 * param2, UnkStruct_ov66_0222DFF8 * param3, u32 param4); void ov66_02230C90(UnkStruct_ov66_02230C90 * param0); void ov66_02230CAC(UnkStruct_ov66_02230C90 * param0); int ov66_02230CB8(UnkStruct_ov66_02230C90 * param0); diff --git a/include/overlay066/ov66_022324F0.h b/include/overlay066/ov66_022324F0.h index ece83013b9..2759d4e2ac 100644 --- a/include/overlay066/ov66_022324F0.h +++ b/include/overlay066/ov66_022324F0.h @@ -10,7 +10,7 @@ #include #include "enums.h" -void ov66_022324F0(u32 param0, UnkStruct_021C0794 * param1, u32 param2, const UnkStruct_ov66_022324F0 * param3, void * param4); +void ov66_022324F0(u32 param0, SaveData * param1, u32 param2, const UnkStruct_ov66_022324F0 * param3, void * param4); void ov66_02232598(void); UnkEnum_ov66_0223287C ov66_022325D8(void); PPW_LOBBY_ERROR ov66_022326DC(void); diff --git a/include/overlay066/struct_ov66_0222DCE0.h b/include/overlay066/struct_ov66_0222DCE0.h index e87b8a9b85..e35f3f8595 100644 --- a/include/overlay066/struct_ov66_0222DCE0.h +++ b/include/overlay066/struct_ov66_0222DCE0.h @@ -6,7 +6,7 @@ typedef struct { UnkStruct_ov66_0222DCE0_sub1 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; BOOL unk_08; } UnkStruct_ov66_0222DCE0; diff --git a/include/overlay066/struct_ov66_02230E68.h b/include/overlay066/struct_ov66_02230E68.h index f43ccbdfdc..7dbf39782a 100644 --- a/include/overlay066/struct_ov66_02230E68.h +++ b/include/overlay066/struct_ov66_02230E68.h @@ -6,7 +6,7 @@ #include "overlay070/struct_ov70_02263910.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; int unk_04; int unk_08; UnkStruct_ov70_02263910 unk_0C; diff --git a/include/overlay066/struct_ov66_02230F50.h b/include/overlay066/struct_ov66_02230F50.h index a375861cbf..8356e7c90e 100644 --- a/include/overlay066/struct_ov66_02230F50.h +++ b/include/overlay066/struct_ov66_02230F50.h @@ -8,7 +8,7 @@ typedef struct { const UnkStruct_ov66_02231560 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_ov66_02231428 unk_08; UnkStruct_ov66_0222DFF8 * unk_0C; } UnkStruct_ov66_02230F50; diff --git a/include/overlay066/struct_ov66_02231024.h b/include/overlay066/struct_ov66_02231024.h index 04a124d0d4..0c6a01a11e 100644 --- a/include/overlay066/struct_ov66_02231024.h +++ b/include/overlay066/struct_ov66_02231024.h @@ -6,7 +6,7 @@ #include "overlay066/struct_ov66_0222DFF8_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_ov66_0222DFF8 * unk_04; BOOL unk_08; UnkStruct_ov66_0222DCE0_sub1 * unk_0C; diff --git a/include/overlay066/struct_ov66_02231134.h b/include/overlay066/struct_ov66_02231134.h index 689d357917..85dea82019 100644 --- a/include/overlay066/struct_ov66_02231134.h +++ b/include/overlay066/struct_ov66_02231134.h @@ -6,7 +6,7 @@ typedef struct { UnkStruct_ov66_02230DBC unk_00; - UnkStruct_021C0794 * unk_34; + SaveData * unk_34; BOOL unk_38; u32 unk_3C; } UnkStruct_ov66_02231134; diff --git a/include/overlay066/struct_ov66_02231300.h b/include/overlay066/struct_ov66_02231300.h index 567604f4dd..d9c111e676 100644 --- a/include/overlay066/struct_ov66_02231300.h +++ b/include/overlay066/struct_ov66_02231300.h @@ -5,7 +5,7 @@ #include "overlay066/struct_ov66_0222DFF8_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_ov66_0222DFF8 * unk_04; BOOL unk_08; } UnkStruct_ov66_02231300; diff --git a/include/overlay066/struct_ov66_02231374.h b/include/overlay066/struct_ov66_02231374.h index 90666e9f5f..f1261667c1 100644 --- a/include/overlay066/struct_ov66_02231374.h +++ b/include/overlay066/struct_ov66_02231374.h @@ -5,7 +5,7 @@ #include "overlay066/struct_ov66_0222DFF8_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_ov66_0222DFF8 * unk_04; int unk_08; } UnkStruct_ov66_02231374; diff --git a/include/overlay081/struct_ov81_021D1610.h b/include/overlay081/struct_ov81_021D1610.h index 040eea7fc6..1f3626c04c 100644 --- a/include/overlay081/struct_ov81_021D1610.h +++ b/include/overlay081/struct_ov81_021D1610.h @@ -15,7 +15,7 @@ typedef struct { UnkStruct_0205AA50 unk_04[4]; UnkStruct_0202B628 * unk_44; TrainerInfo * unk_48; - UnkStruct_021C0794 * unk_4C; + SaveData * unk_4C; MessageLoader * unk_50; UnkStruct_0200B358 * unk_54; Strbuf* unk_58; diff --git a/include/overlay082/struct_ov82_0223B164.h b/include/overlay082/struct_ov82_0223B164.h index 68d675df99..82d7c4c434 100644 --- a/include/overlay082/struct_ov82_0223B164.h +++ b/include/overlay082/struct_ov82_0223B164.h @@ -12,7 +12,7 @@ typedef struct { u8 padding_00[4]; int unk_04; UnkStruct_0202AB28 * unk_08; - UnkStruct_021C0794 * unk_0C; + SaveData * unk_0C; TrainerInfo * unk_10; UnkStruct_0207D3C0 * unk_14; UnkStruct_020279FC * unk_18; diff --git a/include/overlay088/struct_ov88_0223C370.h b/include/overlay088/struct_ov88_0223C370.h index 964c14832f..4186dafb67 100644 --- a/include/overlay088/struct_ov88_0223C370.h +++ b/include/overlay088/struct_ov88_0223C370.h @@ -18,7 +18,7 @@ typedef struct { TrainerInfo * unk_04; Party * unk_08; UnkStruct_02027F8C * unk_0C; - UnkStruct_021C0794 * unk_10; + SaveData * unk_10; UnkStruct_0202C878 * unk_14; UnkStruct_020279FC * unk_18; UnkStruct_0202B628 * unk_1C; diff --git a/include/overlay090/struct_ov90_021D0D80.h b/include/overlay090/struct_ov90_021D0D80.h index b05ecda90f..0d6335e382 100644 --- a/include/overlay090/struct_ov90_021D0D80.h +++ b/include/overlay090/struct_ov90_021D0D80.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u16 unk_04; u16 unk_06; } UnkStruct_ov90_021D0D80; diff --git a/include/overlay094/ov94_0223FB48.h b/include/overlay094/ov94_0223FB48.h index d87ab77ce8..08c4da1ecc 100644 --- a/include/overlay094/ov94_0223FB48.h +++ b/include/overlay094/ov94_0223FB48.h @@ -10,7 +10,7 @@ int ov94_0223FB48(UnkStruct_ov94_0223FD4C * param0, int param1); int ov94_0223FBBC(UnkStruct_ov94_0223FD4C * param0, int param1); int ov94_0223FBDC(UnkStruct_ov94_0223FD4C * param0, int param1); int ov94_022411D0(int param0); -BoxPokemon * ov94_022411DC(Party * param0, UnkStruct_020797DC * param1, int param2, int param3); +BoxPokemon * ov94_022411DC(Party * param0, PCBoxes * param1, int param2, int param3); BOOL ov94_02241498(Pokemon * param0); #endif // POKEPLATINUM_OV94_0223FB48_H diff --git a/include/overlay097/ov97_0222D04C.h b/include/overlay097/ov97_0222D04C.h index 45cb054e23..1392068387 100644 --- a/include/overlay097/ov97_0222D04C.h +++ b/include/overlay097/ov97_0222D04C.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay097/struct_ov97_0222D04C.h" -void ov97_0222D1C4(UnkStruct_ov97_0222D04C * param0, UnkStruct_021C0794 * param1, int param2); +void ov97_0222D1C4(UnkStruct_ov97_0222D04C * param0, SaveData * param1, int param2); void ov97_0222D1F0(const void * param0, int param1); void ov97_0222D200(UnkStruct_ov97_0222D04C * param0, int param1); void ov97_0222D234(int param0); diff --git a/include/overlay097/ov97_02232054.h b/include/overlay097/ov97_02232054.h index 3397562bbe..2bc435dccc 100644 --- a/include/overlay097/ov97_02232054.h +++ b/include/overlay097/ov97_02232054.h @@ -7,6 +7,6 @@ void ov97_02232054(void); void ov97_02232074(UnkStruct_02018340 * param0); -int ov97_02232148(UnkStruct_021C0794 * param0, UnkStruct_ov97_0223829C * param1); +int ov97_02232148(SaveData * param0, UnkStruct_ov97_0223829C * param1); #endif // POKEPLATINUM_OV97_02232054_H diff --git a/include/overlay097/ov97_02237694.h b/include/overlay097/ov97_02237694.h index d6094067fb..008819c55c 100644 --- a/include/overlay097/ov97_02237694.h +++ b/include/overlay097/ov97_02237694.h @@ -42,7 +42,7 @@ void ov97_02238324(UnkStruct_ov97_0223829C * param0, UnkUnion_ov97_0222D2B0 * pa void ov97_022383C4(UnkStruct_0200112C * param0, u32 param1, u8 param2); void ov97_02238400(BOOL param0); void ov97_02238440(void); -void ov97_0223846C(UnkStruct_021C0794 * param0); +void ov97_0223846C(SaveData * param0); int ov97_0223847C(void); void ov97_022384F4(void); void ov97_0223850C(void); diff --git a/include/overlay097/struct_ov97_0222D04C.h b/include/overlay097/struct_ov97_0222D04C.h index bb423ba237..18d2306e98 100644 --- a/include/overlay097/struct_ov97_0222D04C.h +++ b/include/overlay097/struct_ov97_0222D04C.h @@ -23,7 +23,7 @@ typedef struct { UnkStruct_02018340 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_020279FC * unk_08; UnkStruct_0200B358 * unk_0C; MessageLoader * unk_10; diff --git a/include/overlay098/struct_ov98_02246E88.h b/include/overlay098/struct_ov98_02246E88.h index 750b4f5776..a14f4a55bf 100644 --- a/include/overlay098/struct_ov98_02246E88.h +++ b/include/overlay098/struct_ov98_02246E88.h @@ -13,7 +13,7 @@ typedef struct { UnkStruct_020067E8 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_020279FC * unk_08; void * unk_0C; NNSFndHeapHandle unk_10; diff --git a/include/overlay098/struct_ov98_02247168.h b/include/overlay098/struct_ov98_02247168.h index dbecd2bfbc..2250444a6e 100644 --- a/include/overlay098/struct_ov98_02247168.h +++ b/include/overlay098/struct_ov98_02247168.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; int unk_04; int unk_08; } UnkStruct_ov98_02247168; diff --git a/include/overlay104/ov104_0222DCE0.h b/include/overlay104/ov104_0222DCE0.h index 3a0ef7434b..586ad0bf09 100644 --- a/include/overlay104/ov104_0222DCE0.h +++ b/include/overlay104/ov104_0222DCE0.h @@ -20,8 +20,8 @@ UnkStruct_0204B184 * ov104_0222DD04(UnkStruct_ov104_0223A348_sub1 * param0, int u32 ov104_0222DD6C(UnkStruct_ov104_0223A348_sub2 * param0, u16 param1, u32 param2, u32 param3, u8 param4, u8 param5, BOOL param6, int param7, int param8); void ov104_0222DF40(const UnkStruct_ov104_0223A348_sub2 * param0, Pokemon * param1, u8 param2); u16 ov104_0222E10C(u8 param0); -void ov104_0222E134(UnkStruct_021C0794 * param0, Pokemon * param1); -void ov104_0222E1C0(UnkStruct_021C0794 * param0, Party * param1, Pokemon * param2); +void ov104_0222E134(SaveData * param0, Pokemon * param1); +void ov104_0222E1C0(SaveData * param0, Party * param1, Pokemon * param2); void ov104_0222E1D8(UnkStruct_02022550 * param0, u8 param1); void ov104_0222E204(UnkStruct_02022550 * param0, s16 param1, s16 param2, u8 param3); u8 ov104_0222E240(u16 param0, u16 param1); @@ -34,6 +34,6 @@ BOOL ov104_0222E3E4(UnkStruct_0204B184 * param0, const u16 param1[], const u16 p void ov104_0222E4BC(u8 param0, u16 param1, u16 param2, u16 * param3, UnkStruct_ov104_0223A348_sub2 * param4, u8 * param5, u32 * param6, u8 param7); void ov104_0222E5D0(UnkStruct_0200B358 * param0, u32 param1); int ov104_0222E5F0(const TrainerInfo * param0); -void ov104_0222E630(UnkStruct_021C0794 * param0); +void ov104_0222E630(SaveData * param0); #endif // POKEPLATINUM_OV104_0222DCE0_H diff --git a/include/overlay104/ov104_022339B4.h b/include/overlay104/ov104_022339B4.h index d8815df2e8..2a2839fb6d 100644 --- a/include/overlay104/ov104_022339B4.h +++ b/include/overlay104/ov104_022339B4.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay104/struct_ov104_0223ADA0.h" -UnkStruct_ov104_0223ADA0 * ov104_022339B4(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u8 param3); +UnkStruct_ov104_0223ADA0 * ov104_022339B4(SaveData * param0, u16 param1, u8 param2, u8 param3); void ov104_02233B98(UnkStruct_ov104_0223ADA0 * param0, u16 param1); void ov104_022340D0(UnkStruct_ov104_0223ADA0 * param0); void ov104_0223410C(UnkStruct_ov104_0223ADA0 * param0, void * param1); diff --git a/include/overlay104/ov104_02234DB4.h b/include/overlay104/ov104_02234DB4.h index 6b0a82792b..cecd3eaef2 100644 --- a/include/overlay104/ov104_02234DB4.h +++ b/include/overlay104/ov104_02234DB4.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay104/struct_ov104_0223B5C0.h" -UnkStruct_ov104_0223B5C0 * ov104_02234DB4(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u8 param3, u8 param4); +UnkStruct_ov104_0223B5C0 * ov104_02234DB4(SaveData * param0, u16 param1, u8 param2, u8 param3, u8 param4); void ov104_022350B0(UnkStruct_ov104_0223B5C0 * param0, u16 param1); void ov104_02235190(UnkStruct_ov104_0223B5C0 * param0); void ov104_022351CC(UnkStruct_ov104_0223B5C0 * param0, void * param1); diff --git a/include/overlay104/ov104_022361B4.h b/include/overlay104/ov104_022361B4.h index 55cf3da68f..d4c919c118 100644 --- a/include/overlay104/ov104_022361B4.h +++ b/include/overlay104/ov104_022361B4.h @@ -5,7 +5,7 @@ #include "overlay104/struct_ov104_022320B4_decl.h" #include "overlay104/struct_ov104_0223BA10.h" -UnkStruct_ov104_0223BA10 * ov104_022361B4(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); +UnkStruct_ov104_0223BA10 * ov104_022361B4(SaveData * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); void ov104_02236514(UnkStruct_ov104_0223BA10 * param0, u16 param1); void ov104_022367AC(UnkStruct_ov104_0223BA10 * param0); void ov104_022367DC(UnkStruct_ov104_0223BA10 * param0, void * param1); @@ -20,7 +20,7 @@ void ov104_02236BF0(UnkStruct_ov104_0223BA10 * param0); void ov104_02236BF8(UnkStruct_ov104_0223BA10 * param0); void ov104_02236C50(UnkStruct_ov104_0223BA10 * param0); int ov104_02236D10(UnkStruct_ov104_0223BA10 * param0); -void ov104_02236ED8(UnkStruct_021C0794 * param0, u8 param1, int param2); +void ov104_02236ED8(SaveData * param0, u8 param1, int param2); BOOL ov104_02236F70(UnkStruct_ov104_0223BA10 * param0, u16 param1, u16 param2); void ov104_02236FC0(UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_0223BA10 * param1); void ov104_022370E0(UnkStruct_ov104_022320B4 * param0, UnkStruct_ov104_0223BA10 * param1); diff --git a/include/overlay104/ov104_02237DD8.h b/include/overlay104/ov104_02237DD8.h index 44d8b499fc..008b9e18b3 100644 --- a/include/overlay104/ov104_02237DD8.h +++ b/include/overlay104/ov104_02237DD8.h @@ -6,7 +6,7 @@ #include "overlay104/struct_ov104_0223BFFC.h" #include "overlay104/struct_ov104_0223C4CC_decl.h" -UnkStruct_ov104_0223BFFC * ov104_02237DD8(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); +UnkStruct_ov104_0223BFFC * ov104_02237DD8(SaveData * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); void ov104_0223806C(UnkStruct_ov104_0223BFFC * param0, u16 param1); void ov104_02238210(UnkStruct_ov104_0223BFFC * param0); void ov104_02238240(UnkStruct_ov104_0223BFFC * param0, void * param1); diff --git a/include/overlay104/ov104_022394A4.h b/include/overlay104/ov104_022394A4.h index 15318d5bf9..b52892dd95 100644 --- a/include/overlay104/ov104_022394A4.h +++ b/include/overlay104/ov104_022394A4.h @@ -4,7 +4,7 @@ #include "struct_defs/struct_0204AFC4.h" #include "struct_decls/struct_021C0794_decl.h" -void ov104_022394A4(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); +void ov104_022394A4(UnkStruct_0204AFC4 * param0, SaveData * param1); u16 ov104_02239588(UnkStruct_0204AFC4 * param0, u16 param1); void ov104_022395A0(UnkStruct_0204AFC4 * param0, u16 param1); u16 ov104_022395B4(UnkStruct_0204AFC4 * param0); diff --git a/include/overlay104/ov104_02239C58.h b/include/overlay104/ov104_02239C58.h index af7b7f19e0..f1149a26a5 100644 --- a/include/overlay104/ov104_02239C58.h +++ b/include/overlay104/ov104_02239C58.h @@ -5,7 +5,7 @@ #include "struct_defs/struct_0209BBA4.h" #include "struct_decls/struct_021C0794_decl.h" -UnkStruct_0209BBA4 * ov104_02239C58(UnkStruct_021C0794 * param0); +UnkStruct_0209BBA4 * ov104_02239C58(SaveData * param0); void ov104_02239C7C(UnkStruct_0209BBA4 * param0); BOOL ov104_02239C88(UnkStruct_0209BBA4 * param0, u16 param1, u16 param2, u16 param3); void ov104_02239CD0(UnkStruct_0209B75C * param0, UnkStruct_0209BBA4 * param1, u16 param2); diff --git a/include/overlay104/ov104_0223A0C4.h b/include/overlay104/ov104_0223A0C4.h index d6a076c797..0c439c4f53 100644 --- a/include/overlay104/ov104_0223A0C4.h +++ b/include/overlay104/ov104_0223A0C4.h @@ -9,7 +9,7 @@ #include "overlay104/struct_ov104_0223A348.h" BOOL ov104_0223A0C4(UnkStruct_0204AFC4 * param0, UnkStruct_ov104_0223A348 * param1, u16 param2, int param3, u16 * param4, u16 * param5, UnkStruct_0204B404 * param6, int param7); -void ov104_0223A30C(UnkStruct_021C0794 * param0, UnkStruct_ov104_0223A348 * param1, const u8 param2); +void ov104_0223A30C(SaveData * param0, UnkStruct_ov104_0223A348 * param1, const u8 param2); BattleParams * ov104_0223A580(UnkStruct_0204AFC4 * param0, UnkStruct_ov104_02230BE4 * param1); void ov104_0223A734(UnkStruct_0204AFC4 * param0, u16 param1); u16 ov104_0223A750(UnkStruct_0204AFC4 * param0, const u16 * param1); diff --git a/include/overlay104/struct_ov104_02230BE4.h b/include/overlay104/struct_ov104_02230BE4.h index 05b3a7504e..a43b79c604 100644 --- a/include/overlay104/struct_ov104_02230BE4.h +++ b/include/overlay104/struct_ov104_02230BE4.h @@ -11,7 +11,7 @@ typedef struct { void * unk_00; const UnkStruct_020279FC * unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_0202B628 * unk_0C; UnkStruct_0207D99C * unk_10; int unk_14; diff --git a/include/overlay104/struct_ov104_02234130.h b/include/overlay104/struct_ov104_02234130.h index 21dac06b8c..717cd27dd2 100644 --- a/include/overlay104/struct_ov104_02234130.h +++ b/include/overlay104/struct_ov104_02234130.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 unk_05; u8 unk_06; diff --git a/include/overlay104/struct_ov104_02235208.h b/include/overlay104/struct_ov104_02235208.h index 8fdf9f8f5f..5b17e3ed50 100644 --- a/include/overlay104/struct_ov104_02235208.h +++ b/include/overlay104/struct_ov104_02235208.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 unk_05; u16 unk_06; diff --git a/include/overlay104/struct_ov104_0223597C.h b/include/overlay104/struct_ov104_0223597C.h index 0947069827..29c4321b04 100644 --- a/include/overlay104/struct_ov104_0223597C.h +++ b/include/overlay104/struct_ov104_0223597C.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 unk_05; u8 unk_06; diff --git a/include/overlay104/struct_ov104_02238240.h b/include/overlay104/struct_ov104_02238240.h index 13c543633d..620df50f12 100644 --- a/include/overlay104/struct_ov104_02238240.h +++ b/include/overlay104/struct_ov104_02238240.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 padding_05[2]; u8 unk_07; diff --git a/include/overlay104/struct_ov104_0223ADA0.h b/include/overlay104/struct_ov104_0223ADA0.h index 5182c0b589..c391bde7dc 100644 --- a/include/overlay104/struct_ov104_0223ADA0.h +++ b/include/overlay104/struct_ov104_0223ADA0.h @@ -38,7 +38,7 @@ typedef struct { u16 unk_4DC[6]; u16 unk_4E8[6]; UnkStruct_0202FF58 * unk_4F4; - UnkStruct_021C0794 * unk_4F8; + SaveData * unk_4F8; void * unk_4FC; UnkStruct_0201CD38 * unk_500; u16 unk_504[60]; diff --git a/include/overlay104/struct_ov104_0223B5C0.h b/include/overlay104/struct_ov104_0223B5C0.h index 5166a16fc8..55b899c1c1 100644 --- a/include/overlay104/struct_ov104_0223B5C0.h +++ b/include/overlay104/struct_ov104_0223B5C0.h @@ -30,7 +30,7 @@ typedef struct { u8 unk_6F4; u8 unk_6F5; UnkStruct_02030114 * unk_6F8; - UnkStruct_021C0794 * unk_6FC; + SaveData * unk_6FC; void * unk_700; u8 unk_704[4][9]; u16 unk_728[2]; diff --git a/include/overlay104/struct_ov104_0223BA10.h b/include/overlay104/struct_ov104_0223BA10.h index dc32d2ff27..2e57a8102a 100644 --- a/include/overlay104/struct_ov104_0223BA10.h +++ b/include/overlay104/struct_ov104_0223BA10.h @@ -9,7 +9,7 @@ typedef struct { int unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_020302DC * unk_08; void * unk_0C; u8 unk_10; diff --git a/include/overlay104/struct_ov104_0223BFFC.h b/include/overlay104/struct_ov104_0223BFFC.h index bc92229726..f3e6b60080 100644 --- a/include/overlay104/struct_ov104_0223BFFC.h +++ b/include/overlay104/struct_ov104_0223BFFC.h @@ -10,7 +10,7 @@ typedef struct { int unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_020304A0 * unk_08; void * unk_0C; u8 unk_10; diff --git a/include/overlay107/ov107_02249C98.h b/include/overlay107/ov107_02249C98.h index 8f1c10e8c0..10f4820d26 100644 --- a/include/overlay107/ov107_02249C98.h +++ b/include/overlay107/ov107_02249C98.h @@ -6,7 +6,7 @@ u8 ov107_02249C98(u8 param0, u8 param1); u8 ov107_02249C9C(u8 param0, u8 param1); -u8 ov107_02249CAC(UnkStruct_021C0794 * param0, u8 param1, u8 param2); +u8 ov107_02249CAC(SaveData * param0, u8 param1, u8 param2); void ov107_02249CE0(u32 param0, u16 param1); void ov107_02249CF4(UnkStruct_0200B358 * param0, u32 param1); diff --git a/include/overlay114/ov114_0225C700.h b/include/overlay114/ov114_0225C700.h index 8a57590049..951802fa39 100644 --- a/include/overlay114/ov114_0225C700.h +++ b/include/overlay114/ov114_0225C700.h @@ -11,7 +11,7 @@ #include "overlay114/struct_ov114_0225D678_decl.h" #include "overlay114/struct_ov114_0225E854_decl.h" -void ov114_0225C700(UnkStruct_ov114_0225C76C * param0, BOOL param1, UnkStruct_021C0794 * param2, BOOL param3, UnkStruct_ov66_02230DBC * param4); +void ov114_0225C700(UnkStruct_ov114_0225C76C * param0, BOOL param1, SaveData * param2, BOOL param3, UnkStruct_ov66_02230DBC * param4); u32 ov114_0225C76C(const UnkStruct_ov114_0225C76C * param0, u32 param1); u32 ov114_0225C78C(const UnkStruct_ov114_0225C76C * param0, u32 param1); BOOL ov114_0225C7A4(const UnkStruct_ov114_0225C76C * param0, u32 param1); diff --git a/include/overlay114/struct_ov114_0225C76C.h b/include/overlay114/struct_ov114_0225C76C.h index d0cac26b70..08d7ba46b4 100644 --- a/include/overlay114/struct_ov114_0225C76C.h +++ b/include/overlay114/struct_ov114_0225C76C.h @@ -5,7 +5,7 @@ #include "overlay066/struct_ov66_02230DBC.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04[4]; u8 unk_08; u8 unk_09; diff --git a/include/overlay115/struct_ov115_02260440.h b/include/overlay115/struct_ov115_02260440.h index 9a1aa1ba0d..6fba726662 100644 --- a/include/overlay115/struct_ov115_02260440.h +++ b/include/overlay115/struct_ov115_02260440.h @@ -6,7 +6,7 @@ typedef struct { UnkStruct_ov66_02230DBC unk_00; - UnkStruct_021C0794 * unk_34; + SaveData * unk_34; u8 unk_38; u8 unk_39; u8 padding[2]; diff --git a/include/overlay117/struct_ov117_02260440.h b/include/overlay117/struct_ov117_02260440.h index d8568aad91..762106c499 100644 --- a/include/overlay117/struct_ov117_02260440.h +++ b/include/overlay117/struct_ov117_02260440.h @@ -6,7 +6,7 @@ typedef struct { UnkStruct_ov66_02230DBC unk_00; - UnkStruct_021C0794 * unk_34; + SaveData * unk_34; u8 unk_38; u8 unk_39; u8 padding[2]; diff --git a/include/party.h b/include/party.h index 82d9cfe140..1a424dd32b 100644 --- a/include/party.h +++ b/include/party.h @@ -5,9 +5,9 @@ #include "struct_decls/struct_party_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int Party_sizeof(void); +int Party_SaveSize(void); Party * sub_02079FF4(u32 param0); -void sub_0207A008(Party * param0); +void Party_Init(Party * param0); void Party_InitWithCapacity(Party * party, int capacity); BOOL Party_AddPokemon(Party * party, Pokemon * pokemon); BOOL Party_RemovePokemonBySlotIndex(Party * party, int slot); @@ -18,6 +18,6 @@ void sub_0207A128(Party * party, int slot, Pokemon * param2); BOOL Party_SwapSlots(Party * party, int slotA, int slotB); void Party_cpy(const Party * src, Party * dest); BOOL Party_HasSpecies(const Party * party, int species); -Party * Party_GetFromSavedata(UnkStruct_021C0794 * party); +Party * Party_GetFromSavedata(SaveData * party); #endif // POKEPLATINUM_UNK_02079FEC_H diff --git a/include/poffin.h b/include/poffin.h index 35ad42a01a..cd5e0a00b6 100644 --- a/include/poffin.h +++ b/include/poffin.h @@ -25,9 +25,9 @@ u8 Poffin_GetAttribute(Poffin * poffin, PoffinAttributeID attributeID); int sub_0202A9E4(Poffin * poffin, u8 * param1, u8 param2, BOOL isFoul); void Poffin_StoreAttributesToArray(Poffin * poffin, u8 * dest); u8 Poffin_CalcLevel(Poffin * poffin); -UnkStruct_0202AB28 * Poffin_GetSavedataBlock(UnkStruct_021C0794 * savedata); -int Poffin_GetSizeOfSavedataBlock(void); -void sub_0202AB3C(UnkStruct_0202AB28 * param0); +UnkStruct_0202AB28 * Poffin_GetSavedataBlock(SaveData * savedata); +int Poffin_SaveSize(void); +void Poffin_Init(UnkStruct_0202AB28 * param0); u16 sub_0202AB54(UnkStruct_0202AB28 * param0); u16 sub_0202AB74(UnkStruct_0202AB28 * param0, Poffin * param1); BOOL sub_0202AB98(UnkStruct_0202AB28 * param0, u16 param1); diff --git a/include/roaming_pokemon.h b/include/roaming_pokemon.h index 27ffd268ca..e08e6c46c1 100644 --- a/include/roaming_pokemon.h +++ b/include/roaming_pokemon.h @@ -18,6 +18,6 @@ void sub_0206C37C(UnkStruct_0202D7B0 * param0); int sub_0206C3C8(const u8 param0); BOOL sub_0206C3E0(UnkStruct_0202D7B0 * param0); void sub_0206C404(UnkStruct_0202D7B0 * param0, const int param1); -void RoamingPokemon_ActivateSlot(UnkStruct_021C0794 * saveData, const u8 speciesID); +void RoamingPokemon_ActivateSlot(SaveData * saveData, const u8 speciesID); #endif // POKEPLATINUM_ROAMING_POKEMON_H diff --git a/include/savedata/save_table.h b/include/savedata/save_table.h new file mode 100644 index 0000000000..93fdac3911 --- /dev/null +++ b/include/savedata/save_table.h @@ -0,0 +1,191 @@ +#ifndef POKEPLATINUM_SAVEDATA_LOAD_HELPERS_H +#define POKEPLATINUM_SAVEDATA_LOAD_HELPERS_H + +#include "struct_defs/struct_0202440C.h" +#include "struct_decls/struct_0202442C_decl.h" +#include "struct_decls/struct_02024440_decl.h" +#include "struct_defs/struct_0202DF8C.h" +#include "struct_defs/struct_0202F264.h" +#include "struct_decls/struct_020308A0_decl.h" +#include "struct_decls/struct_020797DC_decl.h" +#include "struct_decls/struct_021C0794_decl.h" + +#define SAVE_PAGE_MAX 32 +#define SAVE_SECTOR_SIZE (0x1000) + +typedef int (*SaveEntrySizeFunc)(void); +typedef void (*SaveEntryInitFunc)(void*); + +typedef struct SaveTableEntry { + int dataID; //< Canonical ID for the entry. Used by external functions to retrieve it from the table. + u32 blockID; //< Block ID for the entry. Specifies what block of the save data the entry is stored in. + SaveEntrySizeFunc sizeFunc; //< Function for determining how large the entry is. + SaveEntryInitFunc initFunc; //< Function for initializing an empty entry. +} SaveTableEntry; + +enum SaveBlockID { + SAVE_BLOCK_ID_NORMAL = 0, + SAVE_BLOCK_ID_BOXES, + + SAVE_BLOCK_ID_MAX +}; + +enum SaveTableEntryID { + SAVE_TABLE_ENTRY_SYSTEM = 0, + SAVE_TABLE_ENTRY_PLAYER, + SAVE_TABLE_ENTRY_PARTY, + SAVE_TABLE_ENTRY_BAG, + SAVE_TABLE_ENTRY_EVENTS, + SAVE_TABLE_ENTRY_POKETCH, + SAVE_TABLE_ENTRY_FIELD_PLAYER_STATE, + SAVE_TABLE_ENTRY_POKEDEX, + SAVE_TABLE_ENTRY_DAYCARE, + SAVE_TABLE_ENTRY_PAL_PAD, + SAVE_TABLE_ENTRY_MISC, + SAVE_TABLE_ENTRY_FIELD_OVERWORLD_STATE, + SAVE_TABLE_ENTRY_UNDERGROUND, + SAVE_TABLE_ENTRY_REGULATION_BATTLES, + SAVE_TABLE_ENTRY_IMAGE_CLIPS, + SAVE_TABLE_ENTRY_MAIL, + SAVE_TABLE_ENTRY_POFFINS, + SAVE_TABLE_ENTRY_RANDOM_GROUP, + SAVE_TABLE_ENTRY_JOURNAL, + SAVE_TABLE_ENTRY_TRAINER_CARD, + SAVE_TABLE_ENTRY_GAME_RECORDS, + SAVE_TABLE_ENTRY_BALL_SEALS, + SAVE_TABLE_ENTRY_CHATOT, + SAVE_TABLE_ENTRY_FRONTIER, + SAVE_TABLE_ENTRY_RIBBONS, + SAVE_TABLE_ENTRY_ENCOUNTERS, + SAVE_TABLE_ENTRY_GLOBAL_TRADE, + SAVE_TABLE_ENTRY_TV_BROADCAST, + SAVE_TABLE_ENTRY_RANKINGS, + SAVE_TABLE_ENTRY_WIFI_LIST, + SAVE_TABLE_ENTRY_WIFI_HISTORY, + SAVE_TABLE_ENTRY_MYSTERY_GIFT, + SAVE_TABLE_ENTRY_PAL_PARK_TRANSFER, + SAVE_TABLE_ENTRY_CONTESTS, + SAVE_TABLE_ENTRY_SENTENCE, + SAVE_TABLE_ENTRY_EMAIL, + SAVE_TABLE_ENTRY_WIFI_QUESTIONS, + SAVE_TABLE_ENTRY_PC_BOXES, + + SAVE_TABLE_ENTRY_MAX +}; + +enum ExtraSaveTableEntryID { + EXTRA_SAVE_TABLE_ENTRY_HALL_OF_FAME = 0, + EXTRA_SAVE_TABLE_ENTRY_FRONTIER, + EXTRA_SAVE_TABLE_ENTRY_MY_RECORDINGS, + EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_0, + EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_1, + EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_2, + + EXTRA_SAVE_TABLE_ENTRY_MAX +}; + +extern const SaveTableEntry gSaveTable[]; +extern const int gSaveTableSize; +extern const SaveTableEntry gExtraSaveTable[]; +extern const int gExtraSaveTableSize; + +/** + * @brief Loads the TVBroadcast sector of the save data. + * + * This routine also performs a standard CRC of the sector before loading it. + * + * @param save + * @return Address of the TVBroadcast sector of the save data. + */ +TVBroadcast* SaveData_TVBroadcast(SaveData *save); + +/** + * @brief Loads the PCBoxes sector of the save data. + * + * This routine does NOT perform any CRC on the sectors before loading them. + * + * @param save + * @return Address of the PCBoxes sector of the save data. + */ +PCBoxes* SaveData_PCBoxes(SaveData *save); + +/** + * @brief Loads the MysteryGift sector of the save data. + * + * This routine also performs a standard CRC of the sector before loading it. + * + * @param save + * @return Address of the MysteryGift sector of the save data. + */ +MysteryGift* SaveData_MysteryGift(SaveData *save); + +/** + * @brief Loads the PalParkTransfer sector of the save data. + * + * This routine does NOT perform any CRC on the sectors before loading them. + * + * @param save + * @return Address of the PalParkTransfer sector of the save data. + */ +PalParkTransfer* SaveData_PalParkTransfer(SaveData *save); + +/** + * @brief Loads the HallOfFame sector from the extended save data. + * + * @param save The save data. + * @param heapID Heap on which to allocate the HallOfFame sector. + * @param resultCode Load-result opcode output. + * @return Address of the allocated HallOfFame data. + */ +HallOfFame* SaveData_HallOfFame(SaveData *save, int heapID, int *resultCode); + +/** + * @brief Saves a mirror of the given HallOfFame data into the extended save. + * + * @param save The save data. + * @param hof The hall-of-fame data to save. + * @return Save-result opcode. + */ +int SaveData_SaveHallOfFame(SaveData *save, HallOfFame *hof); + +/** + * @brief Loads the BattleRecording sector from the extended save data. + * + * @param save The save data. + * @param heapID Heap on which to allocate the BattleRecording sector. + * @param resultCode Load-result opcode output. + * @param recNum Which recording slot to load. + * @return Address of the allocated BattleRecording data. + */ +BattleRecording* SaveData_BattleRecording(SaveData *save, int heapID, int *resultCode, int recNum); + +/** + * @brief Saves a mirror of the given BattleRecording data into the extended save. + * + * @param save The save data. + * @param rec The battle recording data to save. + * @param recNum Which recording slot to save. + * @return Save-result opcode. + */ +int SaveData_SaveBattleRecording(SaveData *save, BattleRecording *rec, int recNum); + +/** + * @brief Loads the BattleFrontierStage sector from the extended save data. + * + * @param save The save data. + * @param heapID Heap on which to allocate the BattleRecording sector. + * @param resultCode Load-result opcode output. + * @return Address of the allocated BattleFrontierStage data. + */ +BattleFrontierStage* SaveData_BattleFrontierStage(SaveData *save, int heapID, int *resultCode); + +/** + * @brief Saves a mirror of the given BattleRecording data into the extended save. + * + * @param save The save data. + * @param frontier The battle frontier data to save. + * @return Save-result opcode. + */ +int SaveData_SaveBattleFrontierStage(SaveData *save, BattleFrontierStage *frontier); + +#endif // POKEPLATINUM_SAVEDATA_LOAD_HELPERS_H diff --git a/include/struct_decls/struct_0202440C_decl.h b/include/struct_decls/struct_0202440C_decl.h index c2d4c520d1..3821e00d5e 100644 --- a/include/struct_decls/struct_0202440C_decl.h +++ b/include/struct_decls/struct_0202440C_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_0202440C_DECL_H #define POKEPLATINUM_STRUCT_0202440C_DECL_H -typedef struct UnkStruct_0202440C_t UnkStruct_0202440C; +typedef struct TVBroadcast TVBroadcast; #endif // POKEPLATINUM_STRUCT_0202440C_DECL_H diff --git a/include/struct_decls/struct_0202442C_decl.h b/include/struct_decls/struct_0202442C_decl.h index 0c870bac06..05bd5964d0 100644 --- a/include/struct_decls/struct_0202442C_decl.h +++ b/include/struct_decls/struct_0202442C_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_0202442C_DECL_H #define POKEPLATINUM_STRUCT_0202442C_DECL_H -typedef struct UnkStruct_0202442C_t UnkStruct_0202442C; +typedef struct MysteryGift MysteryGift; #endif // POKEPLATINUM_STRUCT_0202442C_DECL_H diff --git a/include/struct_decls/struct_02024440_decl.h b/include/struct_decls/struct_02024440_decl.h index e250db87f8..ca7b61de25 100644 --- a/include/struct_decls/struct_02024440_decl.h +++ b/include/struct_decls/struct_02024440_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_02024440_DECL_H #define POKEPLATINUM_STRUCT_02024440_DECL_H -typedef struct UnkStruct_02024440_t UnkStruct_02024440; +typedef struct PalParkTransfer PalParkTransfer; #endif // POKEPLATINUM_STRUCT_02024440_DECL_H diff --git a/include/struct_decls/struct_0202F264_decl.h b/include/struct_decls/struct_0202F264_decl.h index 63d0d7a627..073bc252f4 100644 --- a/include/struct_decls/struct_0202F264_decl.h +++ b/include/struct_decls/struct_0202F264_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_0202F264_DECL_H #define POKEPLATINUM_STRUCT_0202F264_DECL_H -typedef struct UnkStruct_0202F264_t UnkStruct_0202F264; +typedef struct BattleRecording BattleRecording; #endif // POKEPLATINUM_STRUCT_0202F264_DECL_H diff --git a/include/struct_decls/struct_020308A0_decl.h b/include/struct_decls/struct_020308A0_decl.h index 549765b034..bc27677315 100644 --- a/include/struct_decls/struct_020308A0_decl.h +++ b/include/struct_decls/struct_020308A0_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_020308A0_DECL_H #define POKEPLATINUM_STRUCT_020308A0_DECL_H -typedef struct UnkStruct_020308A0_t UnkStruct_020308A0; +typedef struct BattleFrontierStage BattleFrontierStage; #endif // POKEPLATINUM_STRUCT_020308A0_DECL_H diff --git a/include/struct_decls/struct_020797DC_decl.h b/include/struct_decls/struct_020797DC_decl.h index b3ccd17353..cbdd3d6115 100644 --- a/include/struct_decls/struct_020797DC_decl.h +++ b/include/struct_decls/struct_020797DC_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_020797DC_DECL_H #define POKEPLATINUM_STRUCT_020797DC_DECL_H -typedef struct UnkStruct_020797DC_t UnkStruct_020797DC; +typedef struct PCBoxes PCBoxes; #endif // POKEPLATINUM_STRUCT_020797DC_DECL_H diff --git a/include/struct_decls/struct_021C0794_decl.h b/include/struct_decls/struct_021C0794_decl.h index 8b80340dac..b4861148ae 100644 --- a/include/struct_decls/struct_021C0794_decl.h +++ b/include/struct_decls/struct_021C0794_decl.h @@ -1,6 +1,6 @@ #ifndef POKEPLATINUM_STRUCT_021C0794_DECL_H #define POKEPLATINUM_STRUCT_021C0794_DECL_H -typedef struct UnkStruct_021C0794_t UnkStruct_021C0794; +typedef struct SaveData SaveData; #endif // POKEPLATINUM_STRUCT_021C0794_DECL_H diff --git a/include/struct_defs/battle_system.h b/include/struct_defs/battle_system.h index 292193fe9c..95ed7a7f17 100644 --- a/include/struct_defs/battle_system.h +++ b/include/struct_defs/battle_system.h @@ -60,7 +60,7 @@ struct BattleSystem { UnkStruct_0207D3C0 * unk_58; UnkStruct_0207D99C * unk_5C; UnkStruct_02026324 * unk_60; - UnkStruct_020797DC * unk_64; + PCBoxes * unk_64; Party *parties[4]; UnkStruct_0202CC84 * unk_78[4]; UnkStruct_02007768 * unk_88; diff --git a/include/struct_defs/struct_0202440C.h b/include/struct_defs/struct_0202440C.h index 3165d39ba8..0ada6cd34e 100644 --- a/include/struct_defs/struct_0202440C.h +++ b/include/struct_defs/struct_0202440C.h @@ -13,7 +13,7 @@ #include "struct_defs/struct_0202E828.h" #include "struct_defs/struct_0202E834.h" -typedef struct UnkStruct_0202440C_t { +typedef struct TVBroadcast { u8 unk_00[4]; int unk_04; u8 unk_08; @@ -32,6 +32,6 @@ typedef struct UnkStruct_0202440C_t { UnkStruct_0202E81C unk_B2E; UnkStruct_0202E828 unk_B44; UnkStruct_0202E834 unk_B4C; -} UnkStruct_0202440C; +} TVBroadcast; #endif // POKEPLATINUM_STRUCT_0202440C_H diff --git a/include/struct_defs/struct_020251A4.h b/include/struct_defs/struct_020251A4.h deleted file mode 100644 index 9693dcf7d1..0000000000 --- a/include/struct_defs/struct_020251A4.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_020251A4_H -#define POKEPLATINUM_STRUCT_020251A4_H - -#include "functypes/funcptr_020E5894.h" -#include "functypes/funcptr_020E5894_1.h" - -typedef struct { - int unk_00; - int unk_04; - UnkFuncPtr_020E5894 unk_08; - UnkFuncPtr_020E5894_1 unk_0C; -} UnkStruct_020251A4; - -#endif // POKEPLATINUM_STRUCT_020251A4_H diff --git a/include/struct_defs/struct_02025340.h b/include/struct_defs/struct_02025340.h deleted file mode 100644 index 85e11a52ba..0000000000 --- a/include/struct_defs/struct_02025340.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef POKEPLATINUM_STRUCT_02025340_H -#define POKEPLATINUM_STRUCT_02025340_H - -#include "functypes/funcptr_020E5894.h" -#include "functypes/funcptr_020E5894_1.h" - -typedef struct { - int unk_00; - u32 unk_04; - UnkFuncPtr_020E5894 unk_08; - UnkFuncPtr_020E5894_1 unk_0C; -} UnkStruct_02025340; - -#endif // POKEPLATINUM_STRUCT_02025340_H diff --git a/include/struct_defs/struct_0202DF8C.h b/include/struct_defs/struct_0202DF8C.h index 72cb9858ea..de8cbfe03e 100644 --- a/include/struct_defs/struct_0202DF8C.h +++ b/include/struct_defs/struct_0202DF8C.h @@ -3,10 +3,10 @@ #include "struct_defs/struct_0202DFA8.h" -typedef struct { +typedef struct HallOfFame { UnkStruct_0202DFA8 unk_00[30]; u32 unk_2AA8; u32 unk_2AAC; -} UnkStruct_0202DF8C; +} HallOfFame; #endif // POKEPLATINUM_STRUCT_0202DF8C_H diff --git a/include/struct_defs/struct_0202F264.h b/include/struct_defs/struct_0202F264.h index 3e8e0da374..8313d9d28f 100644 --- a/include/struct_defs/struct_0202F264.h +++ b/include/struct_defs/struct_0202F264.h @@ -5,11 +5,11 @@ #include "struct_defs/struct_0202F41C.h" #include "struct_defs/struct_02030A80.h" -typedef struct UnkStruct_0202F264_t { +typedef struct BattleRecording { u32 unk_00; UnkStruct_02030A80 unk_04; UnkStruct_0202F41C unk_84; UnkStruct_0202F298 unk_E8; -} UnkStruct_0202F264; +} BattleRecording; #endif // POKEPLATINUM_STRUCT_0202F264_H diff --git a/include/struct_defs/struct_0203CC84.h b/include/struct_defs/struct_0203CC84.h index b03e69f8d4..addde7fc8b 100644 --- a/include/struct_defs/struct_0203CC84.h +++ b/include/struct_defs/struct_0203CC84.h @@ -6,7 +6,7 @@ typedef struct { int unk_00; BOOL unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; } UnkStruct_0203CC84; #endif // POKEPLATINUM_STRUCT_0203CC84_H diff --git a/include/struct_defs/struct_0203CDB0.h b/include/struct_defs/struct_0203CDB0.h index f39c52da15..7cd0bd3f7e 100644 --- a/include/struct_defs/struct_0203CDB0.h +++ b/include/struct_defs/struct_0203CDB0.h @@ -48,7 +48,7 @@ typedef struct UnkStruct_0203CDB0_t { UnkStruct_0203CDB0_sub1 * unk_00; UnkStruct_0203CDB0_sub2 * unk_04; UnkStruct_02018340 * unk_08; - UnkStruct_021C0794 * unk_0C; + SaveData * unk_0C; UnkStruct_020508D4 * unk_10; UnkStruct_0203A3E8 * unk_14; int unk_18; diff --git a/include/struct_defs/struct_0203DE34.h b/include/struct_defs/struct_0203DE34.h index 6c491bf824..eca39929fc 100644 --- a/include/struct_defs/struct_0203DE34.h +++ b/include/struct_defs/struct_0203DE34.h @@ -8,7 +8,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_0205C22C * unk_04; UnkStruct_020279FC * unk_08; UnkStruct_0202CD88 * unk_0C; diff --git a/include/struct_defs/struct_0203E0FC.h b/include/struct_defs/struct_0203E0FC.h index e6f00ee2d9..fdb392356e 100644 --- a/include/struct_defs/struct_0203E0FC.h +++ b/include/struct_defs/struct_0203E0FC.h @@ -19,12 +19,12 @@ typedef struct { UnkStruct_0202DA40 * unk_00; UnkStruct_02025CCC * unk_04; Party * unk_08; - UnkStruct_020797DC * unk_0C; + PCBoxes * unk_0C; UnkStruct_02026324 * unk_10; UnkStruct_0202B370 * unk_14; UnkStruct_0202C878 * unk_18; TrainerInfo * unk_1C; - UnkStruct_021C0794 * unk_20; + SaveData * unk_20; UnkStruct_020279FC * unk_24; UnkStruct_0202CD88 * unk_28; UnkStruct_0202B628 * unk_2C; diff --git a/include/struct_defs/struct_0203E53C.h b/include/struct_defs/struct_0203E53C.h index 758d4c3984..71e34efded 100644 --- a/include/struct_defs/struct_0203E53C.h +++ b/include/struct_defs/struct_0203E53C.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; int unk_04; } UnkStruct_0203E53C; diff --git a/include/struct_defs/struct_0203E564.h b/include/struct_defs/struct_0203E564.h index d022a158b4..775268e881 100644 --- a/include/struct_defs/struct_0203E564.h +++ b/include/struct_defs/struct_0203E564.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 unk_05; u16 unk_06; diff --git a/include/struct_defs/struct_0203E608.h b/include/struct_defs/struct_0203E608.h index f86510815a..50c92cd9b2 100644 --- a/include/struct_defs/struct_0203E608.h +++ b/include/struct_defs/struct_0203E608.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 padding_05[3]; u16 unk_08[3]; diff --git a/include/struct_defs/struct_0203E6C0.h b/include/struct_defs/struct_0203E6C0.h index fd931f2d1f..3e415deeaf 100644 --- a/include/struct_defs/struct_0203E6C0.h +++ b/include/struct_defs/struct_0203E6C0.h @@ -6,7 +6,7 @@ typedef struct { UnkStruct_0203CDB0 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; int unk_08; u8 unk_0C; u8 padding_0D[3]; diff --git a/include/struct_defs/struct_02042434.h b/include/struct_defs/struct_02042434.h index ff35f09eec..ecdee54d02 100644 --- a/include/struct_defs/struct_02042434.h +++ b/include/struct_defs/struct_02042434.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; int unk_04; BOOL unk_08; } UnkStruct_02042434; diff --git a/include/struct_defs/struct_0206BC70.h b/include/struct_defs/struct_0206BC70.h index 69210a4975..b425bae48a 100644 --- a/include/struct_defs/struct_0206BC70.h +++ b/include/struct_defs/struct_0206BC70.h @@ -13,7 +13,7 @@ typedef struct { UnkStruct_0202D750 * unk_00; UnkStruct_0202D764 * unk_04; UnkStruct_02025CCC * unk_08; - UnkStruct_021C0794 * unk_0C; + SaveData * unk_0C; UnkStruct_020279FC * unk_10; DWCUserData * unk_14; int unk_18; diff --git a/include/struct_defs/struct_0207CB08.h b/include/struct_defs/struct_0207CB08.h index 3d79da7e5c..937a96b420 100644 --- a/include/struct_defs/struct_0207CB08.h +++ b/include/struct_defs/struct_0207CB08.h @@ -5,7 +5,7 @@ #include "overlay084/struct_ov84_0223BE5C.h" typedef struct UnkStruct_0207CB08_t { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_ov84_0223BE5C unk_04[8]; u8 unk_64; u8 unk_65; diff --git a/include/struct_defs/struct_0207DE04.h b/include/struct_defs/struct_0207DE04.h index 437bbbbc7e..e5880b564d 100644 --- a/include/struct_defs/struct_0207DE04.h +++ b/include/struct_defs/struct_0207DE04.h @@ -10,7 +10,7 @@ typedef struct { u8 unk_03; u8 unk_04; u8 unk_05[3]; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; } UnkStruct_0207DE04; #endif // POKEPLATINUM_STRUCT_0207DE04_H diff --git a/include/struct_defs/struct_0208737C.h b/include/struct_defs/struct_0208737C.h index 10a4bfb088..c7ce458848 100644 --- a/include/struct_defs/struct_0208737C.h +++ b/include/struct_defs/struct_0208737C.h @@ -15,7 +15,7 @@ typedef struct { Strbuf* unk_18; u16 unk_1C[20]; int unk_44; - UnkStruct_020797DC * unk_48; + PCBoxes * unk_48; UnkStruct_020279FC * unk_4C; } UnkStruct_0208737C; diff --git a/include/struct_defs/struct_0208C06C.h b/include/struct_defs/struct_0208C06C.h index 6c1d103f73..3587f54a66 100644 --- a/include/struct_defs/struct_0208C06C.h +++ b/include/struct_defs/struct_0208C06C.h @@ -31,7 +31,7 @@ typedef struct { UnkStruct_ov62_02230C28 unk_6F8[6]; const UnkStruct_020F3DCC * unk_818; const UnkStruct_020F3DCC * unk_81C[5]; - UnkStruct_021C0794 * unk_830; + SaveData * unk_830; u16 unk_834; u16 unk_836; UnkStruct_0208C06C_sub1 unk_838; diff --git a/include/struct_defs/struct_02093800.h b/include/struct_defs/struct_02093800.h index 02ade39b77..4c83f7bbf9 100644 --- a/include/struct_defs/struct_02093800.h +++ b/include/struct_defs/struct_02093800.h @@ -21,7 +21,7 @@ typedef struct { const TrainerInfo * unk_10; UnkStruct_0202A750 * unk_14; const UnkStruct_020279FC * unk_18; - UnkStruct_021C0794 * unk_1C; + SaveData * unk_1C; void * unk_20; } UnkStruct_02093800; diff --git a/include/struct_defs/struct_02095C48.h b/include/struct_defs/struct_02095C48.h index 7d1ef9394e..f61d51ed0d 100644 --- a/include/struct_defs/struct_02095C48.h +++ b/include/struct_defs/struct_02095C48.h @@ -31,7 +31,7 @@ typedef struct { u8 unk_969[4][1024]; u8 padding_1969[3]; const UnkStruct_020279FC * unk_196C; - UnkStruct_021C0794 * unk_1970; + SaveData * unk_1970; Pokemon * unk_1974; const TrainerInfo * unk_1978; u8 unk_197C; diff --git a/include/struct_defs/struct_02095E80_t.h b/include/struct_defs/struct_02095E80_t.h index 48c19d5797..8d358abd4e 100644 --- a/include/struct_defs/struct_02095E80_t.h +++ b/include/struct_defs/struct_02095E80_t.h @@ -36,7 +36,7 @@ struct UnkStruct_02095E80_t { UnkStruct_0203CDB0 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_ov88_0223C370 * unk_08; UnkStruct_02098D38 unk_0C; int unk_3C; diff --git a/include/struct_defs/struct_020961E8_t.h b/include/struct_defs/struct_020961E8_t.h index 4ec5d5801c..f435294fd6 100644 --- a/include/struct_defs/struct_020961E8_t.h +++ b/include/struct_defs/struct_020961E8_t.h @@ -71,7 +71,7 @@ struct UnkStruct_020961E8_t { UnkStruct_ov59_021D30E0 unk_418; UnkStruct_ov59_021D30E0 unk_FD8[5]; int unk_4A98; - UnkStruct_021C0794 * unk_4A9C; + SaveData * unk_4A9C; int unk_4AA0; u8 unk_4AA4; volatile int unk_4AA8; diff --git a/include/struct_defs/struct_02097728.h b/include/struct_defs/struct_02097728.h index 9d9b1a14c6..c18fa24cf0 100644 --- a/include/struct_defs/struct_02097728.h +++ b/include/struct_defs/struct_02097728.h @@ -13,7 +13,7 @@ typedef struct { u16 unk_0C; u8 unk_0E; u8 unk_0F; - UnkStruct_021C0794 * unk_10; + SaveData * unk_10; UnkStruct_0202818C * unk_14; UnkStruct_02028430 * unk_18; } UnkStruct_02097728; diff --git a/include/struct_defs/struct_02097F18.h b/include/struct_defs/struct_02097F18.h index 2a391df0fb..9442cfa757 100644 --- a/include/struct_defs/struct_02097F18.h +++ b/include/struct_defs/struct_02097F18.h @@ -13,7 +13,7 @@ typedef struct { Party * unk_1C; UnkStruct_0202CA1C * unk_20; UnkStruct_020279FC * unk_24; - UnkStruct_021C0794 * unk_28; + SaveData * unk_28; u8 unk_2C; u8 unk_2D; u8 padding[2]; diff --git a/include/struct_defs/struct_0209BBA4.h b/include/struct_defs/struct_0209BBA4.h index cc31dbebad..d765b0d955 100644 --- a/include/struct_defs/struct_0209BBA4.h +++ b/include/struct_defs/struct_0209BBA4.h @@ -7,7 +7,7 @@ #include "struct_decls/struct_021C0794_decl.h" typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; void * unk_04; u16 unk_08[40]; u8 unk_58; diff --git a/include/struct_defs/struct_0209C194_1.h b/include/struct_defs/struct_0209C194_1.h index f2d52e0c51..002f6a6da5 100644 --- a/include/struct_defs/struct_0209C194_1.h +++ b/include/struct_defs/struct_0209C194_1.h @@ -11,7 +11,7 @@ typedef struct { int unk_00; int unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_0205C22C * unk_0C; UnkStruct_020279FC * unk_10; UnkStruct_0202CD88 * unk_14; diff --git a/include/unk_0200B358.h b/include/unk_0200B358.h index 8dc9d01cca..4c89d24ab4 100644 --- a/include/unk_0200B358.h +++ b/include/unk_0200B358.h @@ -16,8 +16,8 @@ UnkStruct_0200B358 * sub_0200B368(u32 param0, u32 param1, u32 param2); void sub_0200B3F0(UnkStruct_0200B358 * param0); void sub_0200B48C(UnkStruct_0200B358 * param0, u32 param1, const Strbuf *param2, u32 param3, BOOL param4, u32 param5); void sub_0200B498(UnkStruct_0200B358 * param0, u32 param1, const TrainerInfo * param2); -void sub_0200B4BC(UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_021C0794 * param2); -void sub_0200B4E4(UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_021C0794 * param2); +void sub_0200B4BC(UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2); +void sub_0200B4E4(UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2); void sub_0200B538(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); void sub_0200B578(UnkStruct_0200B358 * param0, u32 param1, BoxPokemon * param2); void sub_0200B594(UnkStruct_0200B358 * param0, u32 param1, u32 param2); @@ -56,7 +56,7 @@ void sub_0200BC48(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BC80(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BCB8(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BCF0(UnkStruct_0200B358 * param0, u32 param1, u8 param2); -void sub_0200BD40(UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_020797DC * param2, u32 param3); +void sub_0200BD40(UnkStruct_0200B358 * param0, u32 param1, const PCBoxes * param2, u32 param3); void sub_0200BD60(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BD98(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BDD0(UnkStruct_0200B358 * param0, u32 param1, u32 param2); @@ -69,7 +69,7 @@ void sub_0200BF74(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BFAC(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200BFE4(UnkStruct_0200B358 * param0, u32 param1, u32 param2); void sub_0200C01C(UnkStruct_0200B358 * param0, u32 param1, u32 param2); -void sub_0200C054(UnkStruct_0200B358 * param0, UnkStruct_021C0794 * param1, int param2, int param3, int param4); +void sub_0200C054(UnkStruct_0200B358 * param0, SaveData * param1, int param2, int param3, int param4); void sub_0200C0B0(UnkStruct_0200B358 * param0, u32 param1, UnkEnum_ov66_022324D0 param2); void sub_0200C0E8(UnkStruct_0200B358 * param0, u32 param1, int param2); void sub_0200C120(UnkStruct_0200B358 * param0, u32 param1, u32 param2); diff --git a/include/unk_02014D38.h b/include/unk_02014D38.h index 0bdc719eb7..7d376f5d63 100644 --- a/include/unk_02014D38.h +++ b/include/unk_02014D38.h @@ -13,9 +13,9 @@ void sub_02014D90(UnkStruct_02014D38 * param0, u16 param1, Strbuf *param2); void sub_02014DB8(u16 param0, Strbuf *param1); u16 sub_02014DFC(u32 param0, u32 param1); BOOL sub_02014E4C(u16 param0, u32 * param1, u32 * param2); -u32 sub_02014E8C(void); -void sub_02014E90(void * param0); -UnkStruct_02014EC4 * sub_02014EC4(UnkStruct_021C0794 * param0); +u32 Sentence_SaveSize(void); +void Sentence_Init(void * param0); +UnkStruct_02014EC4 * sub_02014EC4(SaveData * param0); BOOL sub_02014ED8(const UnkStruct_02014EC4 * param0, u32 param1); u32 sub_02014EE4(UnkStruct_02014EC4 * param0); BOOL sub_02014F48(UnkStruct_02014EC4 * param0); diff --git a/include/unk_0202440C.h b/include/unk_0202440C.h deleted file mode 100644 index 290445b330..0000000000 --- a/include/unk_0202440C.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef POKEPLATINUM_UNK_0202440C_H -#define POKEPLATINUM_UNK_0202440C_H - -#include "struct_decls/struct_0202440C_decl.h" -#include "struct_decls/struct_0202442C_decl.h" -#include "struct_decls/struct_02024440_decl.h" -#include "struct_defs/struct_0202DF8C.h" -#include "struct_decls/struct_0202F264_decl.h" -#include "struct_decls/struct_020308A0_decl.h" -#include "struct_decls/struct_020797DC_decl.h" -#include "struct_decls/struct_021C0794_decl.h" - -UnkStruct_0202440C * sub_0202440C(UnkStruct_021C0794 * param0); -UnkStruct_020797DC * sub_02024420(UnkStruct_021C0794 * param0); -UnkStruct_0202442C * sub_0202442C(UnkStruct_021C0794 * param0); -UnkStruct_02024440 * sub_02024440(UnkStruct_021C0794 * param0); -UnkStruct_0202DF8C * sub_0202444C(UnkStruct_021C0794 * param0, int param1, int * param2); -int sub_02024458(UnkStruct_021C0794 * param0, UnkStruct_0202DF8C * param1); -UnkStruct_0202F264 * sub_02024464(UnkStruct_021C0794 * param0, int param1, int * param2, int param3); -int sub_0202447C(UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1, int param2); -UnkStruct_020308A0 * sub_0202448C(UnkStruct_021C0794 * param0, int param1, int * param2); -int sub_020244A0(UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1); - -#endif // POKEPLATINUM_UNK_0202440C_H diff --git a/include/unk_020244AC.h b/include/unk_020244AC.h index a548a9cc05..bf1a75592b 100644 --- a/include/unk_020244AC.h +++ b/include/unk_020244AC.h @@ -3,37 +3,37 @@ #include "struct_decls/struct_021C0794_decl.h" -UnkStruct_021C0794 * sub_020244AC(void); -UnkStruct_021C0794 * sub_020245A4(void); -void * sub_020245BC(UnkStruct_021C0794 * param0, int param1); -const void * sub_020245E0(const UnkStruct_021C0794 * param0, int param1); -BOOL sub_020245E8(UnkStruct_021C0794 * param0); -BOOL sub_020246A8(UnkStruct_021C0794 * param0); -int sub_020246E0(UnkStruct_021C0794 * param0); -int sub_02024760(UnkStruct_021C0794 * param0, int param1); -void sub_0202479C(UnkStruct_021C0794 * param0); -BOOL sub_020247B8(const UnkStruct_021C0794 * param0); -u32 sub_020247BC(const UnkStruct_021C0794 * param0); -BOOL sub_020247C0(const UnkStruct_021C0794 * param0); -BOOL sub_020247C4(const UnkStruct_021C0794 * param0); -BOOL sub_020247C8(UnkStruct_021C0794 * param0); -BOOL sub_020247E0(const UnkStruct_021C0794 * param0); -BOOL sub_02024800(const UnkStruct_021C0794 * param0); +SaveData * sub_020244AC(void); +SaveData * sub_020245A4(void); +void * SaveData_Get(SaveData * param0, int param1); +const void * sub_020245E0(const SaveData * param0, int param1); +BOOL sub_020245E8(SaveData * param0); +BOOL sub_020246A8(SaveData * param0); +int sub_020246E0(SaveData * param0); +int sub_02024760(SaveData * param0, int param1); +void sub_0202479C(SaveData * param0); +BOOL sub_020247B8(const SaveData * param0); +u32 sub_020247BC(const SaveData * param0); +BOOL sub_020247C0(const SaveData * param0); +BOOL sub_020247C4(const SaveData * param0); +BOOL sub_020247C8(SaveData * param0); +BOOL sub_020247E0(const SaveData * param0); +BOOL sub_02024800(const SaveData * param0); void sub_02024804(void); -void sub_02024814(UnkStruct_021C0794 * param0, int param1); -int sub_02024828(UnkStruct_021C0794 * param0); -void sub_02024850(UnkStruct_021C0794 * param0); -u16 sub_0202486C(const UnkStruct_021C0794 * param0, const void * param1, u32 param2); +void sub_02024814(SaveData * param0, int param1); +int sub_02024828(SaveData * param0); +void sub_02024850(SaveData * param0); +u16 sub_0202486C(const SaveData * param0, const void * param1, u32 param2); int sub_020251A4(int param0); -void sub_02025340(UnkStruct_021C0794 * param0); -int sub_02025428(const UnkStruct_021C0794 * param0, int param1, void * param2); -int sub_02025574(UnkStruct_021C0794 * param0, int param1, void * param2); -void * sub_02025680(UnkStruct_021C0794 * param0, int param1, int param2, int * param3); -void * sub_020257E8(UnkStruct_021C0794 * param0, int param1, int param2, int * param3, BOOL * param4); +void sub_02025340(SaveData * param0); +int SaveDataExtra_Save(const SaveData * param0, int param1, void * param2); +int SaveDataExtra_SaveMirror(SaveData * param0, int param1, void * param2); +void * SaveDataExtra_Get(SaveData * param0, int param1, int param2, int * param3); +void * SaveDataExtra_Mirror(SaveData * param0, int param1, int param2, int * param3, BOOL * param4); BOOL sub_02025A3C(void); BOOL sub_02025A9C(u32 param0, void * param1, u32 param2); BOOL sub_02025AC0(u32 param0, void * param1, u32 param2); -BOOL sub_02025C48(int param0); +BOOL SaveData_CRC(int param0); void sub_02025C84(int param0); #endif // POKEPLATINUM_UNK_020244AC_H diff --git a/include/unk_02025CB0.h b/include/unk_02025CB0.h index 129d1da835..b1e16789e7 100644 --- a/include/unk_02025CB0.h +++ b/include/unk_02025CB0.h @@ -5,10 +5,10 @@ #include "struct_defs/struct_02055BA8.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_02025CB0(void); -void sub_02025CB4(UnkStruct_02025CCC * param0); -UnkStruct_02025CCC * sub_02025CCC(UnkStruct_021C0794 * param0); -UnkStruct_02055BA8 * sub_02025CD8(UnkStruct_021C0794 * param0); +int SystemData_SaveSize(void); +void SystemData_Init(UnkStruct_02025CCC * param0); +UnkStruct_02025CCC * sub_02025CCC(SaveData * param0); +UnkStruct_02055BA8 * sub_02025CD8(SaveData * param0); void sub_02025CE4(UnkStruct_02025CCC * param0); BOOL sub_02025D10(const UnkStruct_02025CCC * param0); BOOL sub_02025D40(const UnkStruct_02025CCC * param0); diff --git a/include/unk_02025E08.h b/include/unk_02025E08.h index 8b1bc9be1f..8cb49ca08d 100644 --- a/include/unk_02025E08.h +++ b/include/unk_02025E08.h @@ -7,11 +7,11 @@ #include "struct_defs/struct_020279FC.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_02025E08(void); -void sub_02025E0C(UnkStruct_02025E0C * param0); -TrainerInfo * sub_02025E38(UnkStruct_021C0794 * param0); -UnkStruct_020279FC * sub_02025E44(UnkStruct_021C0794 * param0); -u16 * sub_02025E50(UnkStruct_021C0794 * param0); -UnkStruct_02025E5C * sub_02025E5C(UnkStruct_021C0794 * param0); +int Player_SaveSize(void); +void Player_Init(UnkStruct_02025E0C * param0); +TrainerInfo * sub_02025E38(SaveData * param0); +UnkStruct_020279FC * sub_02025E44(SaveData * param0); +u16 * sub_02025E50(SaveData * param0); +UnkStruct_02025E5C * sub_02025E5C(SaveData * param0); #endif // POKEPLATINUM_UNK_02025E08_H diff --git a/include/unk_0202602C.h b/include/unk_0202602C.h index 78271e1789..5410722e6c 100644 --- a/include/unk_0202602C.h +++ b/include/unk_0202602C.h @@ -7,13 +7,13 @@ #include "struct_decls/struct_021C0794_decl.h" int sub_0202602C(void); -int sub_02026030(void); +int RegulationBattles_SaveSize(void); void sub_02026034(const UnkStruct_0202610C * param0, UnkStruct_0202610C * param1); -void sub_02026040(UnkStruct_02026030 * param0); +void RegulationBattles_Init(UnkStruct_02026030 * param0); void sub_0202604C(const UnkStruct_0202610C * param0, Strbuf *param1); Strbuf* sub_0202605C(const UnkStruct_0202610C * param0, int param1); int sub_02026074(const UnkStruct_0202610C * param0, int param1); -UnkStruct_0202610C * sub_0202610C(UnkStruct_021C0794 * param0, int param1); -void sub_0202613C(UnkStruct_021C0794 * param0, const UnkStruct_0202610C * param1); +UnkStruct_0202610C * sub_0202610C(SaveData * param0, int param1); +void sub_0202613C(SaveData * param0, const UnkStruct_0202610C * param1); #endif // POKEPLATINUM_UNK_0202602C_H diff --git a/include/unk_02026150.h b/include/unk_02026150.h index b66cc968fb..b4ce115356 100644 --- a/include/unk_02026150.h +++ b/include/unk_02026150.h @@ -5,8 +5,8 @@ #include "struct_defs/struct_0202610C.h" #include "struct_decls/struct_021C0794_decl.h" -const UnkStruct_0202610C * sub_02026150(UnkStruct_021C0794 * param0, int param1); -void sub_0202616C(UnkStruct_021C0794 * param0, int param1, Strbuf *param2, int param3); +const UnkStruct_0202610C * sub_02026150(SaveData * param0, int param1); +void sub_0202616C(SaveData * param0, int param1, Strbuf *param2, int param3); const UnkStruct_0202610C * sub_020261A8(void); int sub_020261B0(const UnkStruct_0202610C * param0); diff --git a/include/unk_020261E4.h b/include/unk_020261E4.h index a1d641cc49..f43909c72d 100644 --- a/include/unk_020261E4.h +++ b/include/unk_020261E4.h @@ -8,8 +8,8 @@ #include "pokemon.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_020261E4(void); -void sub_020261EC(UnkStruct_02026310 * param0); +int Daycare_SaveSize(void); +void Daycare_Init(UnkStruct_02026310 * param0); UnkStruct_02026218 * sub_02026218(UnkStruct_02026310 * param0, int param1); BoxPokemon * sub_02026220(UnkStruct_02026218 * param0); UnkStruct_02026224 * sub_02026224(UnkStruct_02026218 * param0); @@ -26,6 +26,6 @@ BOOL sub_02026280(UnkStruct_02026310 * param0); void sub_020262A8(UnkStruct_02026218 * param0, const UnkStruct_02026218 * param1); void sub_020262C0(UnkStruct_02026224 * param0); void sub_020262F4(UnkStruct_02026218 * param0); -UnkStruct_02026310 * sub_02026310(UnkStruct_021C0794 * param0); +UnkStruct_02026310 * sub_02026310(SaveData * param0); #endif // POKEPLATINUM_UNK_020261E4_H diff --git a/include/unk_0202631C.h b/include/unk_0202631C.h index 1207d7265b..0382a17713 100644 --- a/include/unk_0202631C.h +++ b/include/unk_0202631C.h @@ -5,10 +5,10 @@ #include "pokemon.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202631C(void); +int Pokedex_SaveSize(void); UnkStruct_02026324 * sub_02026324(u32 param0); void sub_02026338(const UnkStruct_02026324 * param0, UnkStruct_02026324 * param1); -void sub_02026D6C(UnkStruct_02026324 * param0); +void Pokedex_Init(UnkStruct_02026324 * param0); u16 sub_02026DD0(const UnkStruct_02026324 * param0); u16 sub_02026E0C(const UnkStruct_02026324 * param0); u16 sub_02026E48(const UnkStruct_02026324 * param0); @@ -45,7 +45,7 @@ void sub_02027508(UnkStruct_02026324 * param0); BOOL sub_02027514(const UnkStruct_02026324 * param0); BOOL sub_02027520(const UnkStruct_02026324 * param0); void sub_02027540(UnkStruct_02026324 * param0); -UnkStruct_02026324 * sub_02027560(UnkStruct_021C0794 * param0); +UnkStruct_02026324 * sub_02027560(SaveData * param0); u32 sub_0202756C(const UnkStruct_02026324 * param0, int param1, int param2); u32 sub_020276C8(const UnkStruct_02026324 * param0, int param1); diff --git a/include/unk_020277A4.h b/include/unk_020277A4.h index 7fda67bacb..38e630a086 100644 --- a/include/unk_020277A4.h +++ b/include/unk_020277A4.h @@ -8,12 +8,12 @@ #include "struct_decls/struct_02027860_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_020277A4(void); -void sub_020277AC(UnkStruct_0202783C * param0); -UnkStruct_0202783C * sub_0202783C(UnkStruct_021C0794 * param0); -const UnkStruct_0202783C * sub_02027848(const UnkStruct_021C0794 * param0); -UnkStruct_02027854 * sub_02027854(UnkStruct_021C0794 * param0); -UnkStruct_02027860 * sub_02027860(UnkStruct_021C0794 * param0); +int MiscSaveBlock_SaveSize(void); +void MiscSaveBlock_Init(UnkStruct_0202783C * param0); +UnkStruct_0202783C * sub_0202783C(SaveData * param0); +const UnkStruct_0202783C * sub_02027848(const SaveData * param0); +UnkStruct_02027854 * sub_02027854(SaveData * param0); +UnkStruct_02027860 * sub_02027860(SaveData * param0); const u16 * sub_02027870(const UnkStruct_0202783C * param0); void sub_0202787C(UnkStruct_0202783C * param0, Strbuf *param1); const u16 * sub_02027894(const UnkStruct_0202783C * param0); diff --git a/include/unk_020279FC.h b/include/unk_020279FC.h index 4142ca0887..7c2f291fca 100644 --- a/include/unk_020279FC.h +++ b/include/unk_020279FC.h @@ -7,7 +7,7 @@ UnkStruct_020279FC * sub_020279FC(u32 param0); void sub_02027A10(const UnkStruct_020279FC * param0, UnkStruct_020279FC * param1); void sub_02027A1C(UnkStruct_020279FC * param0); -void sub_02027A68(UnkStruct_021C0794 * param0, int param1); +void sub_02027A68(SaveData * param0, int param1); int sub_02027AA4(const UnkStruct_020279FC * param0); void sub_02027AAC(UnkStruct_020279FC * param0, int param1); u8 sub_02027AC0(const UnkStruct_020279FC * param0); diff --git a/include/unk_02027F84.h b/include/unk_02027F84.h index c5cde4f9f3..555804c9d2 100644 --- a/include/unk_02027F84.h +++ b/include/unk_02027F84.h @@ -4,9 +4,9 @@ #include "struct_decls/struct_02027F8C_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_02027F84(void); -UnkStruct_02027F8C * sub_02027F8C(UnkStruct_021C0794 * param0); -void sub_02027F98(UnkStruct_02027F8C * param0); +int PalPad_SaveSize(void); +UnkStruct_02027F8C * sub_02027F8C(SaveData * param0); +void PalPad_Init(UnkStruct_02027F8C * param0); const u16 * sub_02027FBC(const UnkStruct_02027F8C * param0, int param1); u8 sub_02027FC4(const UnkStruct_02027F8C * param0, int param1); BOOL sub_02027FCC(const UnkStruct_02027F8C * param0, const UnkStruct_02027F8C * param1); diff --git a/include/unk_02028124.h b/include/unk_02028124.h index 38b32f2ef8..83227c2cf1 100644 --- a/include/unk_02028124.h +++ b/include/unk_02028124.h @@ -10,7 +10,7 @@ void sub_02028124(UnkStruct_0202818C * param0); BOOL sub_0202817C(UnkStruct_0202818C * param0); UnkStruct_0202818C * sub_0202818C(int param0); void sub_020281A0(UnkStruct_0202818C * param0, UnkStruct_0202818C * param1); -void sub_020281AC(UnkStruct_0202818C * param0, u8 param1, u8 param2, UnkStruct_021C0794 * param3); +void sub_020281AC(UnkStruct_0202818C * param0, u8 param1, u8 param2, SaveData * param3); u32 sub_02028308(const UnkStruct_0202818C * param0); u16 * sub_0202830C(UnkStruct_0202818C * param0); u8 sub_02028310(const UnkStruct_0202818C * param0); @@ -22,9 +22,9 @@ u16 sub_02028328(const UnkStruct_0202818C * param0, u8 param1, u8 param2, u16 pa u16 sub_02028408(const UnkStruct_0202818C * param0); UnkStruct_02014A84 * sub_0202840C(UnkStruct_0202818C * param0, u8 param1); void sub_0202841C(UnkStruct_0202818C * param0, UnkStruct_02014A84 * param1, u8 param2); -UnkStruct_02028430 * sub_02028430(UnkStruct_021C0794 * param0); -int sub_0202843C(void); -void sub_02028444(UnkStruct_02028430 * param0); +UnkStruct_02028430 * sub_02028430(SaveData * param0); +int Mail_SaveSize(void); +void Mail_Init(UnkStruct_02028430 * param0); int sub_0202845C(UnkStruct_02028430 * param0, int param1); void sub_02028470(UnkStruct_02028430 * param0, int param1, int param2); void sub_02028480(UnkStruct_02028430 * param0, int param1, int param2, UnkStruct_0202818C * param3); diff --git a/include/unk_0202854C.h b/include/unk_0202854C.h index 58adeb4ef2..628e8c1a9e 100644 --- a/include/unk_0202854C.h +++ b/include/unk_0202854C.h @@ -7,17 +7,17 @@ #include "struct_decls/struct_020298B0_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202854C(void); +int Underground_SaveSize(void); int sub_02028554(void); int sub_02028558(void); UnkStruct_0202855C * sub_0202855C(u32 param0); -void sub_02028574(UnkStruct_020298B0 * param0); -void sub_02028658(UnkStruct_021C0794 * param0, int param1); -void sub_02028758(UnkStruct_021C0794 * param0, s32 param1, BOOL param2); -void sub_0202878C(UnkStruct_021C0794 * param0); -void sub_020287E0(UnkStruct_021C0794 * param0); -void sub_020287F8(UnkStruct_021C0794 * param0); -BOOL sub_02028810(UnkStruct_021C0794 * param0); +void Underground_Init(UnkStruct_020298B0 * param0); +void sub_02028658(SaveData * param0, int param1); +void sub_02028758(SaveData * param0, s32 param1, BOOL param2); +void sub_0202878C(SaveData * param0); +void sub_020287E0(SaveData * param0); +void sub_020287F8(SaveData * param0); +BOOL sub_02028810(SaveData * param0); void sub_02028828(UnkStruct_020298B0 * param0); void sub_02028830(UnkStruct_020298B0 * param0, const TrainerInfo * param1); TrainerInfo * sub_020288C8(const UnkStruct_020298B0 * param0, int param1, int param2); @@ -127,9 +127,9 @@ int sub_02029874(const UnkStruct_02029894 * param0); int sub_0202987C(const UnkStruct_02029894 * param0); int sub_02029884(const UnkStruct_02029894 * param0); BOOL sub_0202988C(const UnkStruct_02029894 * param0); -UnkStruct_02029894 * sub_02029894(UnkStruct_021C0794 * param0); -UnkStruct_0202855C * sub_020298A0(UnkStruct_021C0794 * param0); +UnkStruct_02029894 * sub_02029894(SaveData * param0); +UnkStruct_0202855C * sub_020298A0(SaveData * param0); UnkStruct_0202855C * sub_020298AC(UnkStruct_02029894 * param0); -UnkStruct_020298B0 * sub_020298B0(UnkStruct_021C0794 * param0); +UnkStruct_020298B0 * sub_020298B0(SaveData * param0); #endif // POKEPLATINUM_UNK_0202854C_H diff --git a/include/unk_020298BC.h b/include/unk_020298BC.h index 71deb4e282..16c225efe3 100644 --- a/include/unk_020298BC.h +++ b/include/unk_020298BC.h @@ -14,8 +14,8 @@ #include "overlay022/struct_ov22_02255040.h" #include "overlay061/struct_ov61_0222AE80.h" -void sub_02029BFC(UnkStruct_0202A750 * param0); -int sub_02029C58(void); +void ImageClip_Init(UnkStruct_0202A750 * param0); +int ImageClip_SaveSize(void); int sub_02029C60(void); int sub_02029C64(void); UnkStruct_02029C68 * sub_02029C68(u32 param0); @@ -84,7 +84,7 @@ u8 sub_0202A628(const UnkStruct_0202A150 * param0); u8 sub_0202A62C(const UnkStruct_0202A150 * param0); s8 sub_0202A630(const UnkStruct_0202A150 * param0); void sub_0202A6A8(u8 param0, int param1, UnkStruct_0202A750 * param2, const void ** param3); -UnkStruct_0202A750 * sub_0202A750(UnkStruct_021C0794 * param0); +UnkStruct_0202A750 * sub_0202A750(SaveData * param0); void sub_0202A75C(const UnkStruct_02029C68 * param0, UnkStruct_ov61_0222AE80 * param1); void sub_0202A824(const UnkStruct_ov61_0222AE80 * param0, UnkStruct_02029C68 * param1); diff --git a/include/unk_0202ACE0.h b/include/unk_0202ACE0.h index e2ea98d0ed..41be661f5e 100644 --- a/include/unk_0202ACE0.h +++ b/include/unk_0202ACE0.h @@ -7,8 +7,8 @@ #include -int sub_0202ACE0(void); -void sub_0202ACE8(UnkStruct_0202B370 * param0); +int WiFiList_SaveSize(void); +void WiFiList_Init(UnkStruct_0202B370 * param0); DWCUserData * sub_0202AD28(UnkStruct_0202B370 * param0); u32 sub_0202AD2C(UnkStruct_0202B370 * param0, int param1, int param2); void sub_0202AE2C(UnkStruct_0202B370 * param0, int param1, int param2, u32 param3); @@ -29,6 +29,6 @@ void sub_0202B1F8(UnkStruct_0202B370 * param0, int param1, int param2); void sub_0202B220(UnkStruct_0202B370 * param0, int param1, int param2); void sub_0202B248(UnkStruct_0202B370 * param0, int param1, int param2); void sub_0202B270(UnkStruct_0202B370 * param0, int param1, int param2); -UnkStruct_0202B370 * sub_0202B370(UnkStruct_021C0794 * param0); +UnkStruct_0202B370 * sub_0202B370(SaveData * param0); #endif // POKEPLATINUM_UNK_0202ACE0_H diff --git a/include/unk_0202B37C.h b/include/unk_0202B37C.h index 73cb24596b..5c7069b564 100644 --- a/include/unk_0202B37C.h +++ b/include/unk_0202B37C.h @@ -6,9 +6,9 @@ #include "struct_defs/struct_0202B510.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202B37C(void); +int RandomGroup_SaveSize(void); void sub_0202B384(UnkStruct_0202B4A0 * param0, int param1, int param2); -void sub_0202B3A8(UnkStruct_0202B4A0 * param0); +void RandomGroup_Init(UnkStruct_0202B4A0 * param0); void sub_0202B3D8(UnkStruct_0202B4A0 * param0, u32 param1); u32 sub_0202B400(UnkStruct_0202B4A0 * param0, int param1); void sub_0202B40C(UnkStruct_0202B4A0 * param0, int param1, u32 param2); @@ -19,7 +19,7 @@ void sub_0202B470(UnkStruct_0202B4A0 * param0, int param1, int param2); int sub_0202B47C(const UnkStruct_0202B4A0 * param0, int param1); int sub_0202B488(const UnkStruct_0202B4A0 * param0, int param1); void sub_0202B494(UnkStruct_0202B4A0 * param0, int param1, int param2); -UnkStruct_0202B4A0 * sub_0202B4A0(UnkStruct_021C0794 * param0); +UnkStruct_0202B4A0 * sub_0202B4A0(SaveData * param0); BOOL sub_0202B4AC(const UnkStruct_0202B4A0 * param0, int param1); BOOL sub_0202B4C4(const UnkStruct_0202B4A0 * param0, int param1); BOOL sub_0202B4D8(const UnkStruct_0202B4A0 * param0, const u16 * param1); diff --git a/include/unk_0202B604.h b/include/unk_0202B604.h index a7d9946940..21ee45ac28 100644 --- a/include/unk_0202B604.h +++ b/include/unk_0202B604.h @@ -6,9 +6,9 @@ #include "struct_decls/struct_0202B628_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202B604(void); -void sub_0202B618(UnkStruct_0202B628 * param0); -UnkStruct_0202B628 * sub_0202B628(UnkStruct_021C0794 * param0); +int Journal_SaveSize(void); +void Journal_Init(UnkStruct_0202B628 * param0); +UnkStruct_0202B628 * sub_0202B628(SaveData * param0); UnkStruct_0202B628 * sub_0202B634(UnkStruct_0202B628 * param0, BOOL param1); BOOL sub_0202B6A4(UnkStruct_0202B628 * param0, BOOL param1); void sub_0202B758(UnkStruct_0202B628 * param0, void * param1, u8 param2); diff --git a/include/unk_0202C7FC.h b/include/unk_0202C7FC.h index 5b01076cf4..78f678ece8 100644 --- a/include/unk_0202C7FC.h +++ b/include/unk_0202C7FC.h @@ -5,9 +5,9 @@ #include "struct_decls/struct_0202C844_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202C7FC(void); -void sub_0202C804(UnkStruct_0202C834 * param0); -UnkStruct_0202C834 * sub_0202C834(UnkStruct_021C0794 * param0); +int TrainerCard_SaveSize(void); +void TrainerCard_Init(UnkStruct_0202C834 * param0); +UnkStruct_0202C834 * sub_0202C834(SaveData * param0); u8 * sub_0202C840(UnkStruct_0202C834 * param0); UnkStruct_0202C844 * sub_0202C844(UnkStruct_0202C834 * param0); int sub_0202C848(const u8 param0, UnkStruct_0202C844 * param1); diff --git a/include/unk_0202C858.h b/include/unk_0202C858.h index daceb88daa..59953bbaa6 100644 --- a/include/unk_0202C858.h +++ b/include/unk_0202C858.h @@ -4,9 +4,9 @@ #include "struct_decls/struct_0202C878_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202C858(void); -void sub_0202C860(UnkStruct_0202C878 * param0); -UnkStruct_0202C878 * sub_0202C878(UnkStruct_021C0794 * param0); +int WiFiHistory_SaveSize(void); +void WiFiHistory_Init(UnkStruct_0202C878 * param0); +UnkStruct_0202C878 * sub_0202C878(SaveData * param0); void sub_0202C88C(UnkStruct_0202C878 * param0, int param1, int param2); int sub_0202C8C0(const UnkStruct_0202C878 * param0); int sub_0202C8C4(const UnkStruct_0202C878 * param0); diff --git a/include/unk_0202C9F4.h b/include/unk_0202C9F4.h index 4fa57e539e..e33534f205 100644 --- a/include/unk_0202C9F4.h +++ b/include/unk_0202C9F4.h @@ -7,10 +7,10 @@ #include "struct_decls/struct_0202CA88_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202C9F4(void); -void sub_0202C9FC(UnkStruct_0202CA1C * param0); +int BallSeal_SaveSize(void); +void BallSeal_Init(UnkStruct_0202CA1C * param0); void sub_0202CA10(const UnkStruct_0202CA28 * param0, UnkStruct_0202CA28 * param1); -UnkStruct_0202CA1C * sub_0202CA1C(UnkStruct_021C0794 * param0); +UnkStruct_0202CA1C * sub_0202CA1C(SaveData * param0); UnkStruct_0202CA28 * sub_0202CA28(UnkStruct_0202CA1C * param0, int param1); void sub_0202CA40(UnkStruct_0202CA1C * param0, UnkStruct_0202CA28 * param1, int param2); UnkStruct_0202CA64 * sub_0202CA64(UnkStruct_0202CA28 * param0, int param1); diff --git a/include/unk_0202CC64.h b/include/unk_0202CC64.h index fe93473b4c..091097227d 100644 --- a/include/unk_0202CC64.h +++ b/include/unk_0202CC64.h @@ -4,10 +4,10 @@ #include "struct_decls/struct_0202CC84_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202CC64(void); -void sub_0202CC6C(UnkStruct_0202CC84 * param0); +int ChatotCry_SaveSize(void); +void ChatotCry_Init(UnkStruct_0202CC84 * param0); UnkStruct_0202CC84 * sub_0202CC84(int param0); -UnkStruct_0202CC84 * sub_0202CC98(UnkStruct_021C0794 * param0); +UnkStruct_0202CC84 * sub_0202CC98(SaveData * param0); BOOL sub_0202CCA4(const UnkStruct_0202CC84 * param0); void sub_0202CCA8(UnkStruct_0202CC84 * param0); const void * sub_0202CCB0(const UnkStruct_0202CC84 * param0); diff --git a/include/unk_0202CD50.h b/include/unk_0202CD50.h index 51f3f7bc15..e8a09087ea 100644 --- a/include/unk_0202CD50.h +++ b/include/unk_0202CD50.h @@ -5,9 +5,9 @@ #include "struct_decls/struct_0202CD88_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202CD50(void); -void sub_0202CD58(UnkStruct_0202CD88 * param0); -UnkStruct_0202CD88 * sub_0202CD88(UnkStruct_021C0794 * param0); +int GameRecord_SaveSize(void); +void GameRecord_Init(UnkStruct_0202CD88 * param0); +UnkStruct_0202CD88 * sub_0202CD88(SaveData * param0); u32 sub_0202CE90(UnkStruct_0202CD88 * param0, int param1, u32 param2); u32 sub_0202CED0(UnkStruct_0202CD88 * param0, int param1, u32 param2); u32 sub_0202CF28(UnkStruct_0202CD88 * param0, int param1); diff --git a/include/unk_0202D05C.h b/include/unk_0202D05C.h index 153c7e8cb8..5376ad9006 100644 --- a/include/unk_0202D05C.h +++ b/include/unk_0202D05C.h @@ -40,8 +40,8 @@ u16 sub_0202D3FC(UnkStruct_0202D750 * param0, u16 param1, u16 param2); BOOL sub_0202D414(UnkStruct_0202D750 * param0, u16 param1, int param2); void sub_0202D470(UnkStruct_0202D750 * param0, u32 param1); u32 sub_0202D474(UnkStruct_0202D750 * param0); -void sub_0202D478(UnkStruct_021C0794 * param0, int param1, UnkStruct_02014A84 * param2); -UnkStruct_02014A84 * sub_0202D498(UnkStruct_021C0794 * param0, int param1); +void sub_0202D478(SaveData * param0, int param1, UnkStruct_02014A84 * param2); +UnkStruct_02014A84 * sub_0202D498(SaveData * param0, int param1); void sub_0202D4B0(UnkStruct_0202D764 * param0, u8 param1, u8 param2, RTCDate * param3); void sub_0202D514(UnkStruct_0202D764 * param0); BOOL sub_0202D558(UnkStruct_0202D764 * param0, u8 param1, u8 param2, RTCDate * param3); @@ -53,8 +53,8 @@ void sub_0202D63C(UnkStruct_0202D764 * param0, UnkStruct_ov104_0223A348 * param1 void sub_0202D6DC(UnkStruct_0202D764 * param0, UnkStruct_ov96_0223B450_sub2 * param1, u8 param2, u8 param3); void sub_0202D708(UnkStruct_0202D764 * param0, UnkStruct_02049A68 * param1); UnkStruct_ov90_021D1750 * sub_0202D71C(UnkStruct_0202D764 *, int); -UnkStruct_0202D060 * sub_0202D740(UnkStruct_021C0794 * param0); -UnkStruct_0202D750 * sub_0202D750(UnkStruct_021C0794 * param0); -UnkStruct_0202D764 * sub_0202D764(UnkStruct_021C0794 * param0); +UnkStruct_0202D060 * sub_0202D740(SaveData * param0); +UnkStruct_0202D750 * sub_0202D750(SaveData * param0); +UnkStruct_0202D764 * sub_0202D764(SaveData * param0); #endif // POKEPLATINUM_UNK_0202D05C_H diff --git a/include/unk_0202D778.h b/include/unk_0202D778.h index 7ae5393b7c..0f625e5eb2 100644 --- a/include/unk_0202D778.h +++ b/include/unk_0202D778.h @@ -3,8 +3,8 @@ #include "struct_decls/struct_021C0794_decl.h" -int sub_0202D778(void); -void sub_0202D77C(u8 * param0); -u8 * sub_0202D79C(UnkStruct_021C0794 * param0); +int Ribbons_SaveSize(void); +void Ribbons_Init(u8 * param0); +u8 * sub_0202D79C(SaveData * param0); #endif // POKEPLATINUM_UNK_0202D778_H diff --git a/include/unk_0202D7A8.h b/include/unk_0202D7A8.h index 591e01742c..0b1bfcf979 100644 --- a/include/unk_0202D7A8.h +++ b/include/unk_0202D7A8.h @@ -8,18 +8,18 @@ #include "struct_defs/struct_0206C638.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202D7A8(void); -void sub_0202D7B0(UnkStruct_0202D7B0 * param0); +int SpecialEncounter_SaveSize(void); +void SpecialEncounter_Init(UnkStruct_0202D7B0 * param0); void sub_0202D80C(UnkStruct_0202D7B0 * param0, const u32 param1); u32 sub_0202D814(UnkStruct_0202D7B0 * param0, const u8 param1); UnkStruct_020698E4 * sub_0202D830(UnkStruct_0202D7B0 * param0); -UnkStruct_0202D7B0 * sub_0202D834(UnkStruct_021C0794 * param0); +UnkStruct_0202D7B0 * sub_0202D834(SaveData * param0); UnkStruct_0202D844 * sub_0202D840(UnkStruct_0202D7B0 * param0); const int sub_0202D844(UnkStruct_0202D844 * param0); void sub_0202D848(const u8 param0, UnkStruct_0202D844 * param1); UnkStruct_0202D84C * sub_0202D84C(const u8 param0, UnkStruct_0202D844 * param1); -void sub_0202D854(UnkStruct_021C0794 * param0, const int param1); -void sub_0202D884(UnkStruct_021C0794 * param0); +void sub_0202D854(SaveData * param0, const int param1); +void sub_0202D884(SaveData * param0); u8 sub_0202D898(UnkStruct_0202D7B0 * param0); void sub_0202D8A4(UnkStruct_0202D7B0 * param0, const int param1); int sub_0202D8BC(UnkStruct_0202D7B0 * param0); @@ -35,7 +35,7 @@ u8 * sub_0202D9CC(UnkStruct_0202D7B0 * param0); BOOL sub_0202D9D8(UnkStruct_0202D7B0 * param0); void sub_0202D9EC(UnkStruct_0202D7B0 * param0, const u8 param1); u8 sub_0202DA04(UnkStruct_0202D7B0 * param0); -void sub_0202DA10(UnkStruct_021C0794 * param0, u16 * param1, u16 * param2); -void sub_0202DA24(UnkStruct_021C0794 * param0, const u16 param1); +void sub_0202DA10(SaveData * param0, u16 * param1, u16 * param2); +void sub_0202DA24(SaveData * param0, const u16 param1); #endif // POKEPLATINUM_UNK_0202D7A8_H diff --git a/include/unk_0202DA40.h b/include/unk_0202DA40.h index f17d723b75..76ca16217e 100644 --- a/include/unk_0202DA40.h +++ b/include/unk_0202DA40.h @@ -5,9 +5,9 @@ #include "pokemon.h" #include "struct_decls/struct_021C0794_decl.h" -UnkStruct_0202DA40 * sub_0202DA40(UnkStruct_021C0794 * param0); -int sub_0202DA4C(void); -void sub_0202DA50(UnkStruct_0202DA40 * param0); +UnkStruct_0202DA40 * sub_0202DA40(SaveData * param0); +int GlobalTrade_SaveSize(void); +void GlobalTrade_Init(UnkStruct_0202DA40 * param0); int sub_0202DA60(UnkStruct_0202DA40 * param0); void sub_0202DA68(UnkStruct_0202DA40 * param0, int param1); void sub_0202DA70(UnkStruct_0202DA40 * param0, Pokemon * param1); diff --git a/include/unk_0202DAB4.h b/include/unk_0202DAB4.h index 8741ca5328..ef856b3939 100644 --- a/include/unk_0202DAB4.h +++ b/include/unk_0202DAB4.h @@ -7,29 +7,29 @@ #include "struct_defs/union_0204C4D0.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202DAB4(void); -void sub_0202DABC(UnkStruct_0202442C * param0); -UnkStruct_0202DF40 * sub_0202DAD8(UnkStruct_0202442C * param0, int param1); -UnkStruct_0202DBAC * sub_0202DB00(UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DB2C(UnkStruct_0202442C * param0, const void * param1, int param2); -BOOL sub_0202DBAC(UnkStruct_0202442C * param0, const void * param1); -BOOL sub_0202DC48(UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DC7C(UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DCB8(UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DCE0(UnkStruct_0202442C * param0); -BOOL sub_0202DD08(UnkStruct_0202442C * param0); -BOOL sub_0202DD30(const UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DD5C(const UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DD88(const UnkStruct_0202442C * param0); -BOOL sub_0202DDA8(const UnkStruct_0202442C * param0, int param1); -void sub_0202DDE8(const UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DE2C(UnkStruct_0202442C * param0, int param1); -void sub_0202DE5C(UnkStruct_0202442C * param0, int param1); -void sub_0202DE8C(UnkStruct_0202442C * param0, int param1); -BOOL sub_0202DEC4(UnkStruct_0202442C * param0); -void sub_0202DED4(UnkStruct_0202442C * param0); -void sub_0202DEE4(UnkStruct_021C0794 * param0, int param1); -void sub_0202DF04(UnkStruct_021C0794 * param0, int param1); +int MysteryGift_SaveSize(void); +void MysteryGift_Init(MysteryGift * param0); +UnkStruct_0202DF40 * sub_0202DAD8(MysteryGift * param0, int param1); +UnkStruct_0202DBAC * sub_0202DB00(MysteryGift * param0, int param1); +BOOL sub_0202DB2C(MysteryGift * param0, const void * param1, int param2); +BOOL sub_0202DBAC(MysteryGift * param0, const void * param1); +BOOL sub_0202DC48(MysteryGift * param0, int param1); +BOOL sub_0202DC7C(MysteryGift * param0, int param1); +BOOL sub_0202DCB8(MysteryGift * param0, int param1); +BOOL sub_0202DCE0(MysteryGift * param0); +BOOL sub_0202DD08(MysteryGift * param0); +BOOL sub_0202DD30(const MysteryGift * param0, int param1); +BOOL sub_0202DD5C(const MysteryGift * param0, int param1); +BOOL sub_0202DD88(const MysteryGift * param0); +BOOL sub_0202DDA8(const MysteryGift * param0, int param1); +void sub_0202DDE8(const MysteryGift * param0, int param1); +BOOL sub_0202DE2C(MysteryGift * param0, int param1); +void sub_0202DE5C(MysteryGift * param0, int param1); +void sub_0202DE8C(MysteryGift * param0, int param1); +BOOL sub_0202DEC4(MysteryGift * param0); +void sub_0202DED4(MysteryGift * param0); +void sub_0202DEE4(SaveData * param0, int param1); +void sub_0202DF04(SaveData * param0, int param1); int sub_0202DF18(void); int sub_0202DF40(int param0); UnkUnion_0204C4D0 * sub_0202DF5C(int param0); diff --git a/include/unk_0202DF8C.h b/include/unk_0202DF8C.h index 80879fe4e4..0dd767bf36 100644 --- a/include/unk_0202DF8C.h +++ b/include/unk_0202DF8C.h @@ -7,13 +7,13 @@ #include -int sub_0202DF8C(void); -void sub_0202DF94(UnkStruct_0202DF8C * param0); -void sub_0202DFA8(UnkStruct_0202DF8C * param0, const Party * param1, const RTCDate * param2); -u32 sub_0202E148(const UnkStruct_0202DF8C * param0); -u32 sub_0202E174(const UnkStruct_0202DF8C * param0, int param1); -u32 sub_0202E1A8(const UnkStruct_0202DF8C * param0, int param1); -void sub_0202E1F4(const UnkStruct_0202DF8C * param0, int param1, int param2, UnkStruct_ov87_021D1640 * param3); -void sub_0202E274(const UnkStruct_0202DF8C * param0, int param1, RTCDate * param2); +int HallOfFame_SaveSize(void); +void HallOfFame_Init(HallOfFame * param0); +void sub_0202DFA8(HallOfFame * param0, const Party * param1, const RTCDate * param2); +u32 sub_0202E148(const HallOfFame * param0); +u32 sub_0202E174(const HallOfFame * param0, int param1); +u32 sub_0202E1A8(const HallOfFame * param0, int param1); +void sub_0202E1F4(const HallOfFame * param0, int param1, int param2, UnkStruct_ov87_021D1640 * param3); +void sub_0202E274(const HallOfFame * param0, int param1, RTCDate * param2); #endif // POKEPLATINUM_UNK_0202DF8C_H diff --git a/include/unk_0202E2CC.h b/include/unk_0202E2CC.h index 2364a22f2c..6f5c464087 100644 --- a/include/unk_0202E2CC.h +++ b/include/unk_0202E2CC.h @@ -15,17 +15,17 @@ #include "struct_defs/struct_0202E828.h" #include "struct_defs/struct_0202E834.h" -int sub_0202E2CC(void); -void sub_0202E2D4(UnkStruct_0202440C * param0); -void sub_0202E2EC(UnkStruct_0202440C * param0); -void sub_0202E324(UnkStruct_0202440C * param0, int param1, int param2); -void sub_0202E35C(UnkStruct_0202440C * param0); -void sub_0202E374(UnkStruct_0202440C * param0, BOOL param1); -BOOL sub_0202E380(const UnkStruct_0202440C * param0); -void sub_0202E384(UnkStruct_0202440C * param0, int param1); -BOOL sub_0202E3C4(const UnkStruct_0202440C * param0, int param1); -int sub_0202E3DC(const UnkStruct_0202440C * param0); -BOOL sub_0202E43C(UnkStruct_0202440C * param0, int param1, int param2, const u8 * param3); +int TVBroadcast_SaveSize(void); +void TVBroadcast_Init(TVBroadcast * param0); +void sub_0202E2EC(TVBroadcast * param0); +void sub_0202E324(TVBroadcast * param0, int param1, int param2); +void sub_0202E35C(TVBroadcast * param0); +void sub_0202E374(TVBroadcast * param0, BOOL param1); +BOOL sub_0202E380(const TVBroadcast * param0); +void sub_0202E384(TVBroadcast * param0, int param1); +BOOL sub_0202E3C4(const TVBroadcast * param0, int param1); +int sub_0202E3DC(const TVBroadcast * param0); +BOOL sub_0202E43C(TVBroadcast * param0, int param1, int param2, const u8 * param3); const u16 * sub_0202E4C8(const UnkStruct_0202E794 * param0); int sub_0202E4CC(const UnkStruct_0202E794 * param0); int sub_0202E4D0(const UnkStruct_0202E794 * param0); @@ -34,20 +34,20 @@ UnkStruct_0202E4D4 * sub_0202E4D8(UnkStruct_0202E768 * param0); int sub_0202E55C(const UnkStruct_0202E4D4 * param0); void sub_0202E560(UnkStruct_0202E4D4 * param0); void * sub_0202E574(UnkStruct_0202E4D4 * param0); -int sub_0202E614(const UnkStruct_0202440C * param0, int param1, int param2, BOOL param3, BOOL param4, u8 * param5); -BOOL sub_0202E6B0(UnkStruct_0202440C * param0, int param1, int param2); -UnkStruct_0202E768 * sub_0202E768(UnkStruct_0202440C * param0, int param1, int param2); -UnkStruct_0202E794 * sub_0202E794(UnkStruct_0202440C * param0, int param1, int param2); +int sub_0202E614(const TVBroadcast * param0, int param1, int param2, BOOL param3, BOOL param4, u8 * param5); +BOOL sub_0202E6B0(TVBroadcast * param0, int param1, int param2); +UnkStruct_0202E768 * sub_0202E768(TVBroadcast * param0, int param1, int param2); +UnkStruct_0202E794 * sub_0202E794(TVBroadcast * param0, int param1, int param2); BOOL sub_0202E7C0(int param0); int sub_0202E7D0(int param0); -UnkStruct_0202E7D8 * sub_0202E7D8(UnkStruct_0202440C * param0); -UnkStruct_0202E7E4 * sub_0202E7E4(UnkStruct_0202440C * param0); -UnkStruct_0202E7F0 * sub_0202E7F0(UnkStruct_0202440C * param0); -UnkStruct_0202E7FC * sub_0202E7FC(UnkStruct_0202440C * param0); -UnkStruct_0202E808 * sub_0202E808(UnkStruct_0202440C * param0); -UnkStruct_0202E810 * sub_0202E810(UnkStruct_0202440C * param0); -UnkStruct_0202E81C * sub_0202E81C(UnkStruct_0202440C * param0); -UnkStruct_0202E828 * sub_0202E828(UnkStruct_0202440C * param0); -UnkStruct_0202E834 * sub_0202E834(UnkStruct_0202440C * param0); +UnkStruct_0202E7D8 * sub_0202E7D8(TVBroadcast * param0); +UnkStruct_0202E7E4 * sub_0202E7E4(TVBroadcast * param0); +UnkStruct_0202E7F0 * sub_0202E7F0(TVBroadcast * param0); +UnkStruct_0202E7FC * sub_0202E7FC(TVBroadcast * param0); +UnkStruct_0202E808 * sub_0202E808(TVBroadcast * param0); +UnkStruct_0202E810 * sub_0202E810(TVBroadcast * param0); +UnkStruct_0202E81C * sub_0202E81C(TVBroadcast * param0); +UnkStruct_0202E828 * sub_0202E828(TVBroadcast * param0); +UnkStruct_0202E834 * sub_0202E834(TVBroadcast * param0); #endif // POKEPLATINUM_UNK_0202E2CC_H diff --git a/include/unk_0202E840.h b/include/unk_0202E840.h index fe959c5b7e..4b405959d2 100644 --- a/include/unk_0202E840.h +++ b/include/unk_0202E840.h @@ -10,14 +10,14 @@ u8 sub_0202E840(int param0); u8 sub_0202E84C(int param0); void sub_0202E858(UnkStruct_0202E858 * param0); BOOL sub_0202E870(UnkStruct_0202E858 * param0); -int sub_0202E884(void); -void sub_0202E88C(UnkStruct_0202E8C0 * param0); -UnkStruct_0202E8C0 * sub_0202E8C0(UnkStruct_021C0794 * param0); +int Rankings_SaveSize(void); +void Rankings_Init(UnkStruct_0202E8C0 * param0); +UnkStruct_0202E8C0 * sub_0202E8C0(SaveData * param0); void sub_0202E8D4(UnkStruct_0202E8C0 * param0, int param1, u8 param2); int sub_0202E91C(void); -void * sub_0202E9FC(UnkStruct_021C0794 * param0, int param1); -void sub_0202ED0C(UnkStruct_021C0794 * param0, int param1, u8 param2, const void ** param3, int param4); -UnkStruct_0202EE10 * sub_0202ED8C(UnkStruct_021C0794 * param0, int param1, int param2); +void * sub_0202E9FC(SaveData * param0, int param1); +void sub_0202ED0C(SaveData * param0, int param1, u8 param2, const void ** param3, int param4); +UnkStruct_0202EE10 * sub_0202ED8C(SaveData * param0, int param1, int param2); UnkStruct_0202EE10 * sub_0202EE10(UnkStruct_0202E8C0 * param0, int param1, int param2); void sub_0202EE8C(UnkStruct_0202EE10 * param0); diff --git a/include/unk_0202EEC0.h b/include/unk_0202EEC0.h index e730c6c799..40d19ee8ad 100644 --- a/include/unk_0202EEC0.h +++ b/include/unk_0202EEC0.h @@ -4,16 +4,16 @@ #include "struct_decls/struct_02024440_decl.h" #include "pokemon.h" -int sub_0202EEC0(void); -void sub_0202EEC8(UnkStruct_02024440 * param0); -void sub_0202EF04(UnkStruct_02024440 * param0); -void sub_0202EFA4(UnkStruct_02024440 * param0, BoxPokemon * param1, int param2); -void sub_0202EFB8(UnkStruct_02024440 * param0, u32 param1); -void sub_0202F000(const UnkStruct_02024440 * param0, int param1, Pokemon * param2); -int sub_0202F028(const UnkStruct_02024440 * param0); -int sub_0202F050(const UnkStruct_02024440 * param0, u32 param1); -BOOL sub_0202F088(const UnkStruct_02024440 * param0); -BOOL sub_0202F0BC(const UnkStruct_02024440 * param0); -BOOL sub_0202F0E0(const UnkStruct_02024440 * param0); +int PalParkTransfer_SaveSize(void); +void PalParkTransfer_Init(PalParkTransfer * param0); +void sub_0202EF04(PalParkTransfer * param0); +void sub_0202EFA4(PalParkTransfer * param0, BoxPokemon * param1, int param2); +void sub_0202EFB8(PalParkTransfer * param0, u32 param1); +void sub_0202F000(const PalParkTransfer * param0, int param1, Pokemon * param2); +int sub_0202F028(const PalParkTransfer * param0); +int sub_0202F050(const PalParkTransfer * param0, u32 param1); +BOOL sub_0202F088(const PalParkTransfer * param0); +BOOL sub_0202F0BC(const PalParkTransfer * param0); +BOOL sub_0202F0E0(const PalParkTransfer * param0); #endif // POKEPLATINUM_UNK_0202EEC0_H diff --git a/include/unk_0202F108.h b/include/unk_0202F108.h index 8604cbc613..6b875f964e 100644 --- a/include/unk_0202F108.h +++ b/include/unk_0202F108.h @@ -4,9 +4,9 @@ #include "struct_defs/struct_0202F10C.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0202F108(void); -void sub_0202F10C(UnkStruct_0202F10C * param0); -void sub_0202F134(UnkStruct_021C0794 * param0, int param1, int param2); -u16 sub_0202F160(UnkStruct_021C0794 * param0, int param1, int param2); +int Contest_SaveSize(void); +void Contest_Init(UnkStruct_0202F10C * param0); +void sub_0202F134(SaveData * param0, int param1, int param2); +u16 sub_0202F160(SaveData * param0, int param1, int param2); #endif // POKEPLATINUM_UNK_0202F108_H diff --git a/include/unk_0202F180.h b/include/unk_0202F180.h index 2a9466b47d..d53fab398a 100644 --- a/include/unk_0202F180.h +++ b/include/unk_0202F180.h @@ -4,6 +4,6 @@ #include "pokemon.h" #include "struct_decls/struct_021C0794_decl.h" -void sub_0202F180(UnkStruct_021C0794 * param0, const Pokemon * param1); +void sub_0202F180(SaveData * param0, const Pokemon * param1); #endif // POKEPLATINUM_UNK_0202F180_H diff --git a/include/unk_0202F1D4.h b/include/unk_0202F1D4.h index 107c6160b3..ccf582ac5a 100644 --- a/include/unk_0202F1D4.h +++ b/include/unk_0202F1D4.h @@ -8,17 +8,17 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay006/battle_params.h" -int sub_0202F1D4(void); -void sub_0202F1DC(UnkStruct_0202F264 * param0); -void sub_0202F1F8(UnkStruct_021C0794 * param0, int param1, int * param2); +int BattleRecording_SaveSize(void); +void BattleRecording_Init(BattleRecording * param0); +void sub_0202F1F8(SaveData * param0, int param1, int * param2); void sub_0202F22C(void); BOOL sub_0202F250(void); -UnkStruct_0202F264 * sub_0202F264(void); +BattleRecording * sub_0202F264(void); void * sub_0202F27C(void); -BOOL sub_0202F298(UnkStruct_021C0794 * param0, int param1, int * param2, BattleParams * param3, int param4); -BOOL sub_0202F330(UnkStruct_021C0794 * param0, int param1, int * param2, int param3); -int sub_0202F3AC(UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1, int param2, u16 * param3); -int sub_0202F41C(UnkStruct_021C0794 * param0, int param1, int param2, int param3, u16 * param4, u16 * param5); +BOOL sub_0202F298(SaveData * param0, int param1, int * param2, BattleParams * param3, int param4); +BOOL sub_0202F330(SaveData * param0, int param1, int * param2, int param3); +int sub_0202F3AC(SaveData * param0, BattleRecording * param1, int param2, u16 * param3); +int sub_0202F41C(SaveData * param0, int param1, int param2, int param3, u16 * param4, u16 * param5); void sub_0202F4C0(int param0, int * param1, int * param2); void sub_0202F858(void * param0, u32 param1, u32 param2); void sub_0202F868(int param0, int param1, u8 param2); @@ -26,12 +26,12 @@ u8 sub_0202F884(int param0, int param1); void sub_0202F8AC(BattleParams * param0); void sub_0202FAA8(int param0, u32 param1); BOOL sub_0202FAC0(void); -void sub_0202FAFC(BattleParams * param0, UnkStruct_021C0794 * param1); +void sub_0202FAFC(BattleParams * param0, SaveData * param1); UnkStruct_0202F41C * sub_0202FD88(int param0); UnkStruct_02030A80 * sub_0202FDB8(int param0); UnkStruct_02030A80 * sub_0202FDE8(void); UnkStruct_0202F41C * sub_0202FE04(void); -void sub_0202FE20(UnkStruct_02030A80 * param0, UnkStruct_0202F41C * param1, UnkStruct_0202F298 * param2, BattleParams * param3, UnkStruct_021C0794 * param4); +void sub_0202FE20(UnkStruct_02030A80 * param0, UnkStruct_0202F41C * param1, UnkStruct_0202F298 * param2, BattleParams * param3, SaveData * param4); u64 sub_0202FE98(UnkStruct_0202F41C * param0, int param1, int param2); UnkStruct_0202F41C * sub_0202FF2C(int param0); void sub_0202FF44(UnkStruct_0202F41C * param0); diff --git a/include/unk_0202FF4C.h b/include/unk_0202FF4C.h index e0da9c1020..71a31467ec 100644 --- a/include/unk_0202FF4C.h +++ b/include/unk_0202FF4C.h @@ -6,7 +6,7 @@ #include "struct_decls/struct_021C0794_decl.h" void sub_0202FF4C(UnkStruct_0202FF58 * param0); -UnkStruct_0202FF58 * sub_0202FF58(UnkStruct_021C0794 * param0); +UnkStruct_0202FF58 * sub_0202FF58(SaveData * param0); BOOL sub_0202FF68(UnkStruct_0202FF58 * param0); void sub_0202FF70(UnkStruct_0202FF58 * param0, BOOL param1); void sub_0202FF84(UnkStruct_0202FF58 * param0, u8 param1, u8 param2, const void * param3); @@ -14,6 +14,6 @@ u32 sub_02030030(UnkStruct_0202FF58 * param0, u8 param1, u8 param2, void * param void sub_020300A4(UnkStruct_020300F4 * param0); void sub_020300B0(UnkStruct_020300F4 * param0, u8 param1, u8 param2, const void * param3); u32 sub_020300E0(UnkStruct_020300F4 * param0, u8 param1, u8 param2, void * param3); -UnkStruct_020300F4 * sub_020300F4(UnkStruct_021C0794 * param0); +UnkStruct_020300F4 * sub_020300F4(SaveData * param0); #endif // POKEPLATINUM_UNK_0202FF4C_H diff --git a/include/unk_02030108.h b/include/unk_02030108.h index 7575574446..7a2fdb595a 100644 --- a/include/unk_02030108.h +++ b/include/unk_02030108.h @@ -6,7 +6,7 @@ #include "struct_decls/struct_021C0794_decl.h" void sub_02030108(UnkStruct_02030114 * param0); -UnkStruct_02030114 * sub_02030114(UnkStruct_021C0794 * param0); +UnkStruct_02030114 * sub_02030114(SaveData * param0); BOOL sub_02030124(UnkStruct_02030114 * param0); void sub_0203012C(UnkStruct_02030114 * param0, BOOL param1); void sub_02030140(UnkStruct_02030114 * param0, u8 param1, u8 param2, u8 param3, const void * param4); @@ -15,7 +15,7 @@ u8 sub_020301E0(u8 param0, u8 * param1); void sub_02030204(u8 param0, u8 * param1, u8 param2); void sub_02030244(u8 * param0); void sub_02030260(UnkStruct_0203026C * param0); -UnkStruct_0203026C * sub_0203026C(UnkStruct_021C0794 * param0); +UnkStruct_0203026C * sub_0203026C(SaveData * param0); void sub_02030280(UnkStruct_0203026C * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_020302B4(UnkStruct_0203026C * param0, u8 param1, u8 param2, u8 param3, void * param4); diff --git a/include/unk_020302D0.h b/include/unk_020302D0.h index 2f720056fb..17d1fc49c4 100644 --- a/include/unk_020302D0.h +++ b/include/unk_020302D0.h @@ -6,13 +6,13 @@ #include "struct_decls/struct_021C0794_decl.h" void sub_020302D0(UnkStruct_020302DC * param0); -UnkStruct_020302DC * sub_020302DC(UnkStruct_021C0794 * param0); +UnkStruct_020302DC * sub_020302DC(SaveData * param0); BOOL sub_020302EC(UnkStruct_020302DC * param0); void sub_020302F4(UnkStruct_020302DC * param0, BOOL param1); void sub_02030308(UnkStruct_020302DC * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_02030398(UnkStruct_020302DC * param0, u8 param1, u8 param2, u8 param3, void * param4); void sub_02030410(UnkStruct_0203041C * param0); -UnkStruct_0203041C * sub_0203041C(UnkStruct_021C0794 * param0); +UnkStruct_0203041C * sub_0203041C(SaveData * param0); void sub_02030430(UnkStruct_0203041C * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_02030470(UnkStruct_0203041C * param0, u8 param1, u8 param2, u8 param3, void * param4); diff --git a/include/unk_02030494.h b/include/unk_02030494.h index 6114fdb09a..962004e4ab 100644 --- a/include/unk_02030494.h +++ b/include/unk_02030494.h @@ -6,13 +6,13 @@ #include "struct_decls/struct_021C0794_decl.h" void sub_02030494(UnkStruct_020304A0 * param0); -UnkStruct_020304A0 * sub_020304A0(UnkStruct_021C0794 * param0); +UnkStruct_020304A0 * sub_020304A0(SaveData * param0); BOOL sub_020304B0(UnkStruct_020304A0 * param0); void sub_020304B8(UnkStruct_020304A0 * param0, BOOL param1); void sub_020304CC(UnkStruct_020304A0 * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_0203054C(UnkStruct_020304A0 * param0, u8 param1, u8 param2, u8 param3, void * param4); void sub_020305AC(UnkStruct_020305B8 * param0); -UnkStruct_020305B8 * sub_020305B8(UnkStruct_021C0794 * param0); +UnkStruct_020305B8 * sub_020305B8(SaveData * param0); void sub_020305CC(UnkStruct_020305B8 * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_02030600(UnkStruct_020305B8 * param0, u8 param1, u8 param2, u8 param3, void * param4); diff --git a/include/unk_0203061C.h b/include/unk_0203061C.h index d101f032aa..0bf72e6aa0 100644 --- a/include/unk_0203061C.h +++ b/include/unk_0203061C.h @@ -4,9 +4,9 @@ #include "struct_decls/struct_0203068C_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0203061C(void); -void sub_02030624(UnkStruct_0203068C * param0); -UnkStruct_0203068C * sub_0203068C(UnkStruct_021C0794 * param0); +int Frontier_SaveSize(void); +void Frontier_Init(UnkStruct_0203068C * param0); +UnkStruct_0203068C * sub_0203068C(SaveData * param0); u16 sub_02030698(UnkStruct_0203068C * param0, int param1, int param2); u16 sub_020306E4(UnkStruct_0203068C * param0, int param1, int param2, u16 param3); void sub_02030764(UnkStruct_0203068C * param0); diff --git a/include/unk_02030880.h b/include/unk_02030880.h index ef7a375eee..ab5153dbd1 100644 --- a/include/unk_02030880.h +++ b/include/unk_02030880.h @@ -4,11 +4,11 @@ #include "struct_decls/struct_020308A0_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_02030880(void); -void sub_02030888(UnkStruct_020308A0 * param0); -UnkStruct_020308A0 * sub_020308A0(UnkStruct_021C0794 * param0, int param1, int * param2); -int sub_020308A8(UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1); -u16 sub_020308BC(UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1, int param2, int param3); -BOOL sub_020309A0(UnkStruct_021C0794 * param0, int param1, int param2, int param3, int param4, int param5, int * param6, int * param7); +int Frontier_Extra_SaveSize(void); +void Frontier_Extra_Init(BattleFrontierStage * param0); +BattleFrontierStage * sub_020308A0(SaveData * param0, int param1, int * param2); +int sub_020308A8(SaveData * param0, BattleFrontierStage * param1); +u16 sub_020308BC(SaveData * param0, BattleFrontierStage * param1, int param2, int param3); +BOOL sub_020309A0(SaveData * param0, int param1, int param2, int param3, int param4, int param5, int * param6, int * param7); #endif // POKEPLATINUM_UNK_02030880_H diff --git a/include/unk_02030A80.h b/include/unk_02030A80.h index 5c19699c72..a34ad33a2b 100644 --- a/include/unk_02030A80.h +++ b/include/unk_02030A80.h @@ -8,7 +8,7 @@ UnkStruct_02030A80 * sub_02030A80(int param0); void sub_02030A98(UnkStruct_02030A80 * param0); -void sub_02030AA0(UnkStruct_02030A80 * param0, UnkStruct_021C0794 * param1); +void sub_02030AA0(UnkStruct_02030A80 * param0, SaveData * param1); Strbuf* sub_02030B94(const UnkStruct_02030A80 * param0, int param1); u32 sub_02030BAC(const UnkStruct_02030A80 * param0); int sub_02030BBC(const UnkStruct_02030A80 * param0); diff --git a/include/unk_02030CE8.h b/include/unk_02030CE8.h index e2a82a9a49..5508916864 100644 --- a/include/unk_02030CE8.h +++ b/include/unk_02030CE8.h @@ -5,15 +5,15 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay096/struct_ov96_0223B574.h" -int sub_02030CE8(void); -void sub_02030CEC(UnkStruct_02030CEC * param0); -void sub_02030D10(UnkStruct_021C0794 * param0); -BOOL sub_02030D20(UnkStruct_021C0794 * param0); -void sub_02030D38(UnkStruct_021C0794 * param0, const char * param1); -char * sub_02030D50(UnkStruct_021C0794 * param0); -void sub_02030D5C(UnkStruct_021C0794 * param0, int param1, u32 param2); -u32 sub_02030D98(UnkStruct_021C0794 * param0, int param1); -u32 sub_02030E48(UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1); -void sub_02030E78(UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1); +int Email_SaveSize(void); +void Email_Init(UnkStruct_02030CEC * param0); +void sub_02030D10(SaveData * param0); +BOOL sub_02030D20(SaveData * param0); +void sub_02030D38(SaveData * param0, const char * param1); +char * sub_02030D50(SaveData * param0); +void sub_02030D5C(SaveData * param0, int param1, u32 param2); +u32 sub_02030D98(SaveData * param0, int param1); +u32 sub_02030E48(SaveData * param0, UnkStruct_ov96_0223B574 * param1); +void sub_02030E78(SaveData * param0, UnkStruct_ov96_0223B574 * param1); #endif // POKEPLATINUM_UNK_02030CE8_H diff --git a/include/unk_02030EA4.h b/include/unk_02030EA4.h index 2618685d11..da725e4ecb 100644 --- a/include/unk_02030EA4.h +++ b/include/unk_02030EA4.h @@ -4,9 +4,9 @@ #include "struct_decls/struct_02030EC4_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_02030EA4(void); -void sub_02030EA8(UnkStruct_02030EC4 * param0); -UnkStruct_02030EC4 * sub_02030EC4(UnkStruct_021C0794 * param0); +int WiFiQuestion_SaveSize(void); +void WiFiQuestion_Init(UnkStruct_02030EC4 * param0); +UnkStruct_02030EC4 * sub_02030EC4(SaveData * param0); u32 sub_02030ED0(const UnkStruct_02030EC4 * param0); u32 sub_02030ED4(const UnkStruct_02030EC4 * param0); void sub_02030ED8(UnkStruct_02030EC4 * param0, u32 param1); diff --git a/include/unk_020329E0.h b/include/unk_020329E0.h index f5fa13a81b..01dacb8e4a 100644 --- a/include/unk_020329E0.h +++ b/include/unk_020329E0.h @@ -7,7 +7,7 @@ #include -void sub_020329E0(UnkStruct_021C0794 * param0, const UnkStruct_0202610C * param1); +void sub_020329E0(SaveData * param0, const UnkStruct_0202610C * param1); void sub_02032A70(void); BOOL sub_02032AAC(void); void sub_02032AC0(void); @@ -35,9 +35,9 @@ int sub_02032F78(int param0); int sub_02032F9C(int param0); int sub_02032FC0(int param0); BOOL sub_02032FE4(void); -void sub_02033114(UnkStruct_021C0794 * param0); -void sub_020331B4(UnkStruct_021C0794 * param0, int param1); -void sub_020331E0(UnkStruct_021C0794 * param0, int param1); +void sub_02033114(SaveData * param0); +void sub_020331B4(SaveData * param0, int param1); +void sub_020331E0(SaveData * param0, int param1); void sub_020331F4(TrainerInfo * param0); #endif // POKEPLATINUM_UNK_020329E0_H diff --git a/include/unk_020366A0.h b/include/unk_020366A0.h index 0b2f1b96ec..436536d749 100644 --- a/include/unk_020366A0.h +++ b/include/unk_020366A0.h @@ -9,7 +9,7 @@ #include "enums.h" BOOL sub_02036780(void); -void sub_02036794(UnkStruct_021C0794 * param0); +void sub_02036794(SaveData * param0); void sub_020367D0(void); void sub_020367F0(void); void sub_02036814(BOOL param0); @@ -18,14 +18,14 @@ BOOL sub_02036834(void); void sub_02036884(void); void sub_02036894(void); void sub_020368A4(void); -void sub_020368B8(UnkStruct_021C0794 * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4); -void sub_02036900(UnkStruct_021C0794 * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4); +void sub_020368B8(SaveData * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4); +void sub_02036900(SaveData * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4); void sub_02036948(int param0); void sub_02036964(void); void sub_02036978(void); void sub_02036994(BOOL param0); BOOL sub_0203699C(void); -void sub_020369EC(UnkStruct_021C0794 * param0); +void sub_020369EC(SaveData * param0); void sub_02036A38(int param0); int sub_02036A68(void); BOOL sub_02036AA0(void); @@ -36,8 +36,8 @@ void sub_02036B84(void); void sub_02036BA0(void); void sub_02036BC8(void); void sub_02036BD8(void); -void sub_02036BE8(UnkStruct_021C0794 * param0, int param1); -void sub_02036C1C(UnkStruct_021C0794 * param0, int param1); +void sub_02036BE8(SaveData * param0, int param1); +void sub_02036C1C(SaveData * param0, int param1); void sub_02036C50(void); void sub_0203781C(void); void sub_02037854(int param0); @@ -49,10 +49,10 @@ void sub_02037A78(int param0, int param1, void * param2, void * param3); void sub_02037AD8(int param0, int param1, void * param2, void * param3); int sub_02037B54(void); void sub_02037B58(int param0); -void sub_02037BC0(UnkStruct_021C0794 * param0); +void sub_02037BC0(SaveData * param0); void sub_02037BFC(void); BOOL sub_02037C18(void); -void sub_02037D48(UnkStruct_021C0794 * param0); +void sub_02037D48(SaveData * param0); void sub_02037D84(void); u8 sub_02037DA0(void); BOOL sub_02037DB0(void); @@ -69,15 +69,15 @@ void sub_02038378(void); void sub_02038398(void); void sub_020383D4(void); BOOL sub_020383E8(void); -void sub_02038438(UnkStruct_021C0794 * param0); +void sub_02038438(SaveData * param0); void sub_0203848C(void); -void sub_020384C0(UnkStruct_021C0794 * param0); +void sub_020384C0(SaveData * param0); void sub_02038514(void); -void sub_02038548(UnkStruct_021C0794 * param0); +void sub_02038548(SaveData * param0); void sub_0203859C(void); BOOL sub_020385D0(void); -void * sub_0203871C(UnkStruct_021C0794 * param0, int param1); -void sub_0203878C(UnkStruct_021C0794 * param0, const void * param1); +void * sub_0203871C(SaveData * param0, int param1); +void sub_0203878C(SaveData * param0, const void * param1); void sub_020387E8(void); BOOL sub_02038804(void); BOOL sub_0203881C(void); diff --git a/include/unk_02038ED4.h b/include/unk_02038ED4.h index f375565191..a385c00905 100644 --- a/include/unk_02038ED4.h +++ b/include/unk_02038ED4.h @@ -4,6 +4,6 @@ #include "struct_decls/struct_021C0794_decl.h" void sub_02038ED4(int * param0); -int sub_02038EDC(UnkStruct_021C0794 * param0, int param1, int * param2); +int sub_02038EDC(SaveData * param0, int param1, int * param2); #endif // POKEPLATINUM_UNK_02038ED4_H diff --git a/include/unk_02038FFC.h b/include/unk_02038FFC.h index c8fa687c51..1d65f0cfd2 100644 --- a/include/unk_02038FFC.h +++ b/include/unk_02038FFC.h @@ -7,6 +7,6 @@ int sub_02038FFC(int param0); void sub_02039034(UnkStruct_0202B370 * param0); int sub_02039058(UnkStruct_0202B370 * param0); -BOOL sub_02039074(UnkStruct_021C0794 * param0); +BOOL sub_02039074(SaveData * param0); #endif // POKEPLATINUM_UNK_02038FFC_H diff --git a/include/unk_0203909C.h b/include/unk_0203909C.h index 613f1e5b94..573defe091 100644 --- a/include/unk_0203909C.h +++ b/include/unk_0203909C.h @@ -5,10 +5,10 @@ #include -int sub_0203909C(UnkStruct_021C0794 * param0, DWCFriendData * param1, int * param2); -int sub_02039140(UnkStruct_021C0794 * param0, u64 param1, int * param2); -BOOL sub_020391DC(UnkStruct_021C0794 * param0, int * param1, int param2); -void sub_02039298(UnkStruct_021C0794 * param0, int param1, int param2, int param3, int param4); -int sub_02039390(UnkStruct_021C0794 * param0, int param1); +int sub_0203909C(SaveData * param0, DWCFriendData * param1, int * param2); +int sub_02039140(SaveData * param0, u64 param1, int * param2); +BOOL sub_020391DC(SaveData * param0, int * param1, int param2); +void sub_02039298(SaveData * param0, int param1, int param2, int param3, int param4); +int sub_02039390(SaveData * param0, int param1); #endif // POKEPLATINUM_UNK_0203909C_H diff --git a/include/unk_0203A6DC.h b/include/unk_0203A6DC.h index 15a9dc06a9..a959879ff1 100644 --- a/include/unk_0203A6DC.h +++ b/include/unk_0203A6DC.h @@ -9,10 +9,10 @@ #include "struct_defs/struct_0205EC34.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0203A6DC(void); -int sub_0203A6E0(void); -void sub_0203A6E8(UnkStruct_0203A79C * param0); -void sub_0203A6F8(UnkStruct_0203A790 * param0); +int FieldPlayerState_SaveSize(void); +int FieldOWState_SaveSize(void); +void FieldOWState_Init(UnkStruct_0203A79C * param0); +void FieldPlayerState_Init(UnkStruct_0203A790 * param0); UnkStruct_02049FA8 * sub_0203A720(UnkStruct_0203A790 * param0); UnkStruct_02049FA8 * sub_0203A724(UnkStruct_0203A790 * param0); UnkStruct_02049FA8 * sub_0203A728(UnkStruct_0203A790 * param0); @@ -31,8 +31,8 @@ UnkStruct_0205EC34 * sub_0203A780(UnkStruct_0203A790 * param0); u16 * sub_0203A784(UnkStruct_0203A790 * param0); u16 * sub_0203A788(UnkStruct_0203A790 * param0); u16 * sub_0203A78C(UnkStruct_0203A790 * param0); -UnkStruct_0203A790 * sub_0203A790(UnkStruct_021C0794 * param0); -UnkStruct_0203A79C * sub_0203A79C(UnkStruct_021C0794 * param0); +UnkStruct_0203A790 * sub_0203A790(SaveData * param0); +UnkStruct_0203A79C * sub_0203A79C(SaveData * param0); void sub_0203A7A8(UnkStruct_0203CDB0 * param0); void sub_0203A7C0(UnkStruct_0203CDB0 * param0); diff --git a/include/unk_0203CC84.h b/include/unk_0203CC84.h index ab178b626e..5bc7f8f7bc 100644 --- a/include/unk_0203CC84.h +++ b/include/unk_0203CC84.h @@ -17,6 +17,6 @@ void sub_0203D128(void); void sub_0203D140(void); UnkStruct_ov25_02253CE0 * sub_0203D158(void); UnkStruct_02018340 * sub_0203D170(void * param0); -UnkStruct_021C0794 * sub_0203D174(void * param0); +SaveData * sub_0203D174(void * param0); #endif // POKEPLATINUM_UNK_0203CC84_H diff --git a/include/unk_0203D178.h b/include/unk_0203D178.h index 35db8691ea..dee43fed77 100644 --- a/include/unk_0203D178.h +++ b/include/unk_0203D178.h @@ -6,6 +6,6 @@ void sub_0203D178(UnkStruct_02049FA8 * param0); void sub_0203D190(UnkStruct_02049FA8 * param0); -void sub_0203D1A8(UnkStruct_021C0794 * param0); +void sub_0203D1A8(SaveData * param0); #endif // POKEPLATINUM_UNK_0203D178_H diff --git a/include/unk_0203D1B8.h b/include/unk_0203D1B8.h index 00ef8de24f..34251e043b 100644 --- a/include/unk_0203D1B8.h +++ b/include/unk_0203D1B8.h @@ -56,15 +56,15 @@ UnkStruct_02097728 * sub_0203D94C(UnkStruct_0203CDB0 * param0, int param1, u8 pa UnkStruct_02097728 * sub_0203D984(UnkStruct_0203CDB0 * param0, Pokemon * param1, int param2); UnkStruct_0203D9B8 * sub_0203D9B8(UnkStruct_0203CDB0 * param0, int param1); void sub_0203D9D8(UnkStruct_0203CDB0 * param0, UnkStruct_ov90_021D0D80 * param1); -void sub_0203DAC0(UnkStruct_020508D4 * param0, u16 * param1, UnkStruct_021C0794 * param2, u16 param3, u16 param4); +void sub_0203DAC0(UnkStruct_020508D4 * param0, u16 * param1, SaveData * param2, u16 param3, u16 param4); BOOL sub_0203DB10(UnkStruct_0203CDB0 * param0, void * param1); BOOL sub_0203DB24(UnkStruct_0203CDB0 * param0, void * param1); BOOL sub_0203DBF0(UnkStruct_020508D4 * param0); void sub_0203DDDC(UnkStruct_020508D4 * param0); void sub_0203DDFC(UnkStruct_0203CDB0 * param0); void * sub_0203DE34(UnkStruct_0203CDB0 * param0); -void sub_0203DE78(UnkStruct_0203CDB0 * param0, UnkStruct_021C0794 * param1); -void sub_0203DE88(UnkStruct_0203CDB0 * param0, UnkStruct_021C0794 * param1); +void sub_0203DE78(UnkStruct_0203CDB0 * param0, SaveData * param1); +void sub_0203DE88(UnkStruct_0203CDB0 * param0, SaveData * param1); void sub_0203DFE8(UnkStruct_020508D4 * param0, int param1, int param2, int param3, int param4, const u16 * param5, u16 * param6); void sub_0203E09C(UnkStruct_0203CDB0 * param0, UnkStruct_02072014 * param1); BOOL sub_0203E0AC(UnkStruct_0203CDB0 * param0, void * param1); diff --git a/include/unk_02049D08.h b/include/unk_02049D08.h index db901eaac2..8feb00f4ef 100644 --- a/include/unk_02049D08.h +++ b/include/unk_02049D08.h @@ -9,39 +9,39 @@ #include "struct_decls/struct_021C0794_decl.h" u16 sub_02049D08(u16 param0); -BOOL sub_02049EC4(u16 param0, UnkStruct_021C0794 * param1, u8 param2); +BOOL sub_02049EC4(u16 param0, SaveData * param1, u8 param2); void sub_02049F8C(void); void sub_02049F98(UnkStruct_0202D060 * param0); BOOL sub_02049FA0(UnkStruct_0202D060 * param0); void sub_02049FA8(UnkStruct_0203CDB0 * param0); void sub_02049FE8(UnkStruct_0203CDB0 * param0); -u16 sub_02049FF8(UnkStruct_021C0794 * param0, u16 param1); -void sub_0204A030(UnkStruct_021C0794 * param0, u8 param1); -u16 sub_0204A050(UnkStruct_021C0794 * param0); -u16 sub_0204A064(UnkStruct_021C0794 * param0); -u16 sub_0204A100(UnkStruct_021C0794 * param0); +u16 sub_02049FF8(SaveData * param0, u16 param1); +void sub_0204A030(SaveData * param0, u8 param1); +u16 sub_0204A050(SaveData * param0); +u16 sub_0204A064(SaveData * param0); +u16 sub_0204A100(SaveData * param0); void sub_0204A110(UnkStruct_0204AFC4 ** param0); -UnkStruct_0204AFC4 * sub_0204A124(UnkStruct_021C0794 * param0, u16 param1, u16 param2); +UnkStruct_0204AFC4 * sub_0204A124(SaveData * param0, u16 param1, u16 param2); void sub_0204A32C(UnkStruct_0204AFC4 * param0); void sub_0204A358(UnkStruct_0204AFC4 * param0, UnkStruct_020508D4 * param1, void ** param2); -BOOL sub_0204A378(UnkStruct_0204AFC4 * param0, void ** param1, UnkStruct_021C0794 * param2); -int sub_0204A410(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); -void sub_0204A4C8(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); +BOOL sub_0204A378(UnkStruct_0204AFC4 * param0, void ** param1, SaveData * param2); +int sub_0204A410(UnkStruct_0204AFC4 * param0, SaveData * param1); +void sub_0204A4C8(UnkStruct_0204AFC4 * param0, SaveData * param1); u16 sub_0204A578(UnkStruct_0204AFC4 * param0); BOOL sub_0204A57C(UnkStruct_0204AFC4 * param0); -void sub_0204A660(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); -void sub_0204A7A4(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, UnkStruct_0202B628 * param2); +void sub_0204A660(UnkStruct_0204AFC4 * param0, SaveData * param1); +void sub_0204A7A4(UnkStruct_0204AFC4 * param0, SaveData * param1, UnkStruct_0202B628 * param2); void sub_0204A8C8(UnkStruct_0204AFC4 * param0); void sub_0204A97C(UnkStruct_0204AFC4 * param0); u16 sub_0204A9E0(UnkStruct_0204AFC4 * param0, u16 param1); u16 sub_0204A9F8(UnkStruct_0204AFC4 * param0); u16 sub_0204A9FC(UnkStruct_0204AFC4 * param0); u16 sub_0204AA04(UnkStruct_0204AFC4 * param0); -u16 sub_0204AA7C(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); -u16 sub_0204AABC(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, u8 param2); -u16 sub_0204AB68(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); -u16 sub_0204ABA0(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); -u16 sub_0204ABF4(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); +u16 sub_0204AA7C(UnkStruct_0204AFC4 * param0, SaveData * param1); +u16 sub_0204AABC(UnkStruct_0204AFC4 * param0, SaveData * param1, u8 param2); +u16 sub_0204AB68(UnkStruct_0204AFC4 * param0, SaveData * param1); +u16 sub_0204ABA0(UnkStruct_0204AFC4 * param0, SaveData * param1); +u16 sub_0204ABF4(UnkStruct_0204AFC4 * param0, SaveData * param1); u8 sub_0204AE84(u16 param0); u16 sub_0204AEC0(UnkStruct_0204AFC4 * param0); diff --git a/include/unk_0204AEE8.h b/include/unk_0204AEE8.h index b7d37cc39f..d96571d0fa 100644 --- a/include/unk_0204AEE8.h +++ b/include/unk_0204AEE8.h @@ -8,12 +8,12 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay104/struct_ov104_0223A348.h" -UnkStruct_0200B358 * sub_0204AEE8(UnkStruct_021C0794 * param0, u16 param1, u16 param2, u8 param3, u8 * param4); +UnkStruct_0200B358 * sub_0204AEE8(SaveData * param0, u16 param1, u16 param2, u8 param3, u8 * param4); u16 sub_0204AF9C(u8 param0); u16 sub_0204AFC4(UnkStruct_0203CDB0 * param0, const u16 * param1); u16 sub_0204B020(UnkStruct_0203CDB0 * param0, const u16 * param1); u16 sub_0204B044(UnkStruct_0203CDB0 * param0, const u16 * param1); -void sub_0204B060(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); +void sub_0204B060(UnkStruct_0204AFC4 * param0, SaveData * param1); void sub_0204B0BC(UnkStruct_0204AFC4 * param0); void sub_0204B0D4(UnkStruct_0204AFC4 * param0, u16 param1); u16 sub_0204B0F0(UnkStruct_0204AFC4 * param0, u8 param1, u8 param2, int param3); diff --git a/include/unk_0204FA34.h b/include/unk_0204FA34.h index 73b47d609c..ed90de8f24 100644 --- a/include/unk_0204FA34.h +++ b/include/unk_0204FA34.h @@ -5,6 +5,6 @@ #include "struct_decls/struct_021C0794_decl.h" void sub_0204FA34(int param0, int param1, void * param2, void * param3); -void sub_0204FA50(UnkStruct_021C0794 * param0, UnkStruct_0203026C * param1, u8 param2); +void sub_0204FA50(SaveData * param0, UnkStruct_0203026C * param1, u8 param2); #endif // POKEPLATINUM_UNK_0204FA34_H diff --git a/include/unk_020507CC.h b/include/unk_020507CC.h index ad473a8897..b3cd4734b1 100644 --- a/include/unk_020507CC.h +++ b/include/unk_020507CC.h @@ -4,9 +4,9 @@ #include "struct_decls/struct_020507E4_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_020507CC(void); -void sub_020507D4(UnkStruct_020507E4 * param0); -UnkStruct_020507E4 * sub_020507E4(UnkStruct_021C0794 * param0); +int FieldEvents_SaveSize(void); +void FieldEvents_Init(UnkStruct_020507E4 * param0); +UnkStruct_020507E4 * sub_020507E4(SaveData * param0); BOOL sub_020507F0(UnkStruct_020507E4 * param0, u16 param1); void sub_0205081C(UnkStruct_020507E4 * param0, u16 param1); void sub_02050844(UnkStruct_020507E4 * param0, u16 param1); diff --git a/include/unk_02051D8C.h b/include/unk_02051D8C.h index 830d24152a..28b5082912 100644 --- a/include/unk_02051D8C.h +++ b/include/unk_02051D8C.h @@ -21,7 +21,7 @@ void sub_0205213C(BattleParams * param0, Pokemon * param1, int param2); void sub_02052164(BattleParams * param0, const Party * param1, int param2); void sub_02052184(BattleParams * param0, const TrainerInfo * param1, int param2); void sub_020521A4(BattleParams * param0, const UnkStruct_0202CC84 * param1, int param2); -void sub_020521B8(BattleParams * param0, const UnkStruct_0203CDB0 * param1, UnkStruct_021C0794 * param2, int param3, UnkStruct_0202B628 * param4, UnkStruct_0207D99C * param5, UnkStruct_0209C370 * param6); +void sub_020521B8(BattleParams * param0, const UnkStruct_0203CDB0 * param1, SaveData * param2, int param3, UnkStruct_0202B628 * param4, UnkStruct_0207D99C * param5, UnkStruct_0209C370 * param6); void sub_02052314(BattleParams * param0, const UnkStruct_0203CDB0 * param1); void sub_02052348(BattleParams * param0, const UnkStruct_0203CDB0 * param1, int param2); void sub_020524E4(BattleParams * param0, const UnkStruct_0203CDB0 * param1, const Party * param2, const u8 * param3); diff --git a/include/unk_02054884.h b/include/unk_02054884.h index 714b5a61f2..cfa0c11852 100644 --- a/include/unk_02054884.h +++ b/include/unk_02054884.h @@ -6,8 +6,8 @@ #include "struct_decls/struct_021C0794_decl.h" BOOL sub_02054884(Pokemon * param0); -BOOL sub_020548B0(int param0, UnkStruct_021C0794 * param1, u16 param2, u8 param3, u16 param4, int param5, int param6); -BOOL sub_02054930(int param0, UnkStruct_021C0794 * param1, u16 param2, u8 param3, int param4, int param5); +BOOL sub_020548B0(int param0, SaveData * param1, u16 param2, u8 param3, u16 param4, int param5, int param6); +BOOL sub_02054930(int param0, SaveData * param1, u16 param2, u8 param3, int param4, int param5); void sub_02054988(Party * param0, int param1, int param2, u16 param3); int sub_020549A0(Party * param0, u16 param1); int sub_02054A10(const Party * param0); diff --git a/include/unk_02056720.h b/include/unk_02056720.h index 33e51773e8..7740bef3a7 100644 --- a/include/unk_02056720.h +++ b/include/unk_02056720.h @@ -5,8 +5,8 @@ #include "pokemon.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_02056720(void); -void sub_02056728(UnkStruct_02056B24 * param0); +int Poketch_SaveSize(void); +void Poketch_Init(UnkStruct_02056B24 * param0); void sub_020567D0(UnkStruct_02056B24 * param0); BOOL sub_020567E0(UnkStruct_02056B24 * param0); BOOL sub_020567E8(UnkStruct_02056B24 * param0, int param1); @@ -33,6 +33,6 @@ void sub_02056A48(UnkStruct_02056B24 * param0, const BoxPokemon * param1); int sub_02056AAC(const UnkStruct_02056B24 * param0); void sub_02056AC8(const UnkStruct_02056B24 * param0, int param1, int * param2, int * param3); u32 sub_02056AFC(const UnkStruct_02056B24 * param0, int param1); -UnkStruct_02056B24 * sub_02056B24(UnkStruct_021C0794 * param0); +UnkStruct_02056B24 * sub_02056B24(SaveData * param0); #endif // POKEPLATINUM_UNK_02056720_H diff --git a/include/unk_0205964C.h b/include/unk_0205964C.h index 99219859b0..bf128ab18a 100644 --- a/include/unk_0205964C.h +++ b/include/unk_0205964C.h @@ -20,7 +20,7 @@ void sub_02059D0C(int param0, int param1, void * param2, void * param3); BOOL sub_02059D2C(void); void sub_02059EAC(int param0, int param1, void * param2, void * param3); u8 * sub_02059EBC(int param0, void * param1, int param2); -UnkStruct_02029894 * sub_0205A080(UnkStruct_021C0794 * param0); +UnkStruct_02029894 * sub_0205A080(SaveData * param0); void sub_0205A0A0(void); void sub_0205A0BC(void); diff --git a/include/unk_0205DFC4.h b/include/unk_0205DFC4.h index aa62e575d0..7bc5e720ed 100644 --- a/include/unk_0205DFC4.h +++ b/include/unk_0205DFC4.h @@ -9,8 +9,8 @@ u16 sub_0205DFC4(u32 param0); u16 sub_0205E060(u16 param0); u16 sub_0205E078(u16 param0, u16 param1); u16 sub_0205E0E4(u16 param0, u16 param1); -u16 sub_0205E1B4(UnkStruct_021C0794 * param0); -BOOL HasAllLegendaryTitansInParty(UnkStruct_021C0794 * param0); +u16 sub_0205E1B4(SaveData * param0); +BOOL HasAllLegendaryTitansInParty(SaveData * param0); void sub_0205E318(UnkStruct_020508D4 * param0, UnkStruct_02061AB4 * param1, u16 param2, u16 param3, u16 param4, u16 param5); void sub_0205E3F4(UnkStruct_020508D4 * param0, UnkStruct_02061AB4 * param1, u16 param2, u16 param3); int sub_0205E430(u8 param0, u8 param1); @@ -30,7 +30,7 @@ int sub_0205E658(u8 param0); int sub_0205E680(u8 param0); int sub_0205E6A8(u32 param0); u8 sub_0205E6B8(void); -u8 sub_0205E6D8(UnkStruct_021C0794 * param0); +u8 sub_0205E6D8(SaveData * param0); int sub_0205E700(u8 param0); int sub_0205E728(u8 param0); int sub_0205E750(u8 param0); diff --git a/include/unk_0206AFE0.h b/include/unk_0206AFE0.h index 40e1adf7ad..73b6e217b5 100644 --- a/include/unk_0206AFE0.h +++ b/include/unk_0206AFE0.h @@ -30,10 +30,10 @@ BOOL sub_0206B270(UnkStruct_020507E4 * param0, u16 param1); void sub_0206B280(UnkStruct_020507E4 * param0, u32 param1); u32 sub_0206B2A4(UnkStruct_020507E4 * param0); void sub_0206B2C8(UnkStruct_020507E4 * param0); -void sub_0206B2E4(UnkStruct_021C0794 * param0, u16 param1); +void sub_0206B2E4(SaveData * param0, u16 param1); u16 sub_0206B314(UnkStruct_020507E4 * param0); BOOL sub_0206B324(UnkStruct_020507E4 * param0, u16 param1); -void sub_0206B334(UnkStruct_021C0794 * param0); +void sub_0206B334(SaveData * param0); u16 sub_0206B354(UnkStruct_020507E4 * param0); BOOL sub_0206B364(UnkStruct_020507E4 * param0, u16 param1); u16 sub_0206B374(UnkStruct_020507E4 * param0); @@ -53,7 +53,7 @@ void sub_0206B45C(UnkStruct_020507E4 * param0, u16 param1); void sub_0206B46C(UnkStruct_020507E4 * param0, u16 param1); u16 sub_0206B47C(UnkStruct_020507E4 * param0); void sub_0206B48C(UnkStruct_020507E4 * param0, u16 param1); -void sub_0206B514(UnkStruct_021C0794 * param0); +void sub_0206B514(SaveData * param0); void sub_0206B558(UnkStruct_020507E4 * param0, u16 param1); u16 sub_0206B588(UnkStruct_020507E4 * param0); u16 sub_0206B598(UnkStruct_020507E4 * param0); diff --git a/include/unk_0206B9D8.h b/include/unk_0206B9D8.h index 9c81fd18b1..4c4bf3b57d 100644 --- a/include/unk_0206B9D8.h +++ b/include/unk_0206B9D8.h @@ -8,13 +8,13 @@ void sub_0206BBFC(UnkStruct_020508D4 * param0, void ** param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6, u8 param7); void sub_0206BCE4(UnkStruct_020508D4 * param0, u16 param1, u16 param2, u16 param3); void sub_0206BD88(UnkStruct_020508D4 * param0, u16 param1, u16 param2); -u16 sub_0206BDBC(UnkStruct_021C0794 * param0); -u16 sub_0206BF04(UnkStruct_021C0794 * param0); +u16 sub_0206BDBC(SaveData * param0); +u16 sub_0206BF04(SaveData * param0); u32 sub_0206BFF0(u32 param0); u32 sub_0206BFFC(u32 param0); -u32 sub_0206C008(UnkStruct_021C0794 * param0); -u32 sub_0206C02C(UnkStruct_021C0794 * param0); -u32 sub_0206C068(UnkStruct_021C0794 * param0); +u32 sub_0206C008(SaveData * param0); +u32 sub_0206C02C(SaveData * param0); +u32 sub_0206C068(SaveData * param0); BOOL sub_0206C0D0(UnkStruct_0203CDB0 * param0); #endif // POKEPLATINUM_UNK_0206B9D8_H diff --git a/include/unk_0206C2D0.h b/include/unk_0206C2D0.h index 43e416061c..a011863204 100644 --- a/include/unk_0206C2D0.h +++ b/include/unk_0206C2D0.h @@ -3,6 +3,6 @@ #include "struct_decls/struct_021C0794_decl.h" -void sub_0206C2D0(UnkStruct_021C0794 * param0, const s32 param1); +void sub_0206C2D0(SaveData * param0, const s32 param1); #endif // POKEPLATINUM_UNK_0206C2D0_H diff --git a/include/unk_0206CCB0.h b/include/unk_0206CCB0.h index 71f705ef00..d97fb2ed67 100644 --- a/include/unk_0206CCB0.h +++ b/include/unk_0206CCB0.h @@ -12,20 +12,20 @@ int sub_0206CD00(int param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200B358 * param2, UnkStruct_ov6_022465F4 * param3, u16 * param4); BOOL sub_0206CD2C(int param0, UnkStruct_0203CDB0 * param1, UnkStruct_ov6_022465F4 * param2); -void sub_0206CF14(UnkStruct_0202440C * param0, Pokemon * param1, int param2, int param3, int param4); -void sub_0206CF48(UnkStruct_0202440C * param0, Pokemon * param1, int param2); -void sub_0206CF9C(UnkStruct_0202440C * param0, int param1); -void sub_0206CFB4(UnkStruct_0202440C * param0, int param1); -void sub_0206CFCC(UnkStruct_0202440C * param0, int param1); -void sub_0206CFE4(UnkStruct_0202440C * param0, BOOL param1, u16 param2); -void sub_0206D000(UnkStruct_0202440C * param0); -void sub_0206D018(UnkStruct_0202440C * param0, Pokemon * param1); -void sub_0206D048(UnkStruct_0202440C * param0, Pokemon * param1); -void sub_0206D088(UnkStruct_0202440C * param0, u8 param1, const TrainerInfo * param2); -void sub_0206D0C8(UnkStruct_0202440C * param0, u16 param1); -void sub_0206D0F0(UnkStruct_0202440C * param0); -void sub_0206D104(UnkStruct_0202440C * param0); -void sub_0206D12C(UnkStruct_0202440C * param0); +void sub_0206CF14(TVBroadcast * param0, Pokemon * param1, int param2, int param3, int param4); +void sub_0206CF48(TVBroadcast * param0, Pokemon * param1, int param2); +void sub_0206CF9C(TVBroadcast * param0, int param1); +void sub_0206CFB4(TVBroadcast * param0, int param1); +void sub_0206CFCC(TVBroadcast * param0, int param1); +void sub_0206CFE4(TVBroadcast * param0, BOOL param1, u16 param2); +void sub_0206D000(TVBroadcast * param0); +void sub_0206D018(TVBroadcast * param0, Pokemon * param1); +void sub_0206D048(TVBroadcast * param0, Pokemon * param1); +void sub_0206D088(TVBroadcast * param0, u8 param1, const TrainerInfo * param2); +void sub_0206D0C8(TVBroadcast * param0, u16 param1); +void sub_0206D0F0(TVBroadcast * param0); +void sub_0206D104(TVBroadcast * param0); +void sub_0206D12C(TVBroadcast * param0); UnkStruct_0206D140 * sub_0206D140(int param0); void sub_0206D158(UnkStruct_0206D140 * param0); void sub_0206D160(UnkStruct_0206D140 * param0, Pokemon * param1, int param2, int param3, u32 param4); @@ -34,27 +34,27 @@ void sub_0206D340(UnkStruct_0203CDB0 * param0, BOOL param1, u16 param2, Pokemon void sub_0206D424(UnkStruct_0203CDB0 * param0); void sub_0206D430(UnkStruct_0203CDB0 * param0); void sub_0206D4AC(UnkStruct_0203CDB0 * param0, u16 param1); -void sub_0206D504(UnkStruct_021C0794 * param0, u16 param1, u8 param2); +void sub_0206D504(SaveData * param0, u16 param1, u8 param2); void sub_0206D578(UnkStruct_0203CDB0 * param0, Pokemon * param1); void sub_0206D60C(UnkStruct_0203CDB0 * param0, Pokemon * param1); void sub_0206D6C8(UnkStruct_0203CDB0 * param0, int param1, int param2); void sub_0206D720(UnkStruct_0203CDB0 * param0); void sub_0206D7C4(UnkStruct_0203CDB0 * param0); -void sub_0206D90C(UnkStruct_0202440C * param0, Pokemon * param1, u16 param2); +void sub_0206D90C(TVBroadcast * param0, Pokemon * param1, u16 param2); void sub_0206D914(UnkStruct_0203CDB0 * param0, u16 param1, u8 param2, u16 param3); -void sub_0206D9B4(UnkStruct_0202440C * param0, Pokemon * param1, u8 param2); +void sub_0206D9B4(TVBroadcast * param0, Pokemon * param1, u8 param2); void sub_0206DAB8(UnkStruct_0203CDB0 * param0, const TrainerInfo * param1); void sub_0206DAD4(UnkStruct_0203CDB0 * param0, const TrainerInfo * param1); void sub_0206DB20(UnkStruct_0203CDB0 * param0); void sub_0206DB5C(UnkStruct_0203CDB0 * param0, u8 param1); -void sub_0206DBB0(UnkStruct_021C0794 * param0, u32 param1, Pokemon * param2, BOOL param3); +void sub_0206DBB0(SaveData * param0, u32 param1, Pokemon * param2, BOOL param3); void sub_0206DC6C(UnkStruct_0203CDB0 * param0, u32 param1, Pokemon * param2); void sub_0206DD38(UnkStruct_0203CDB0 * param0, u32 param1, u32 param2, u32 param3); -void sub_0206DDB8(UnkStruct_021C0794 * param0, Pokemon * param1, u32 param2); +void sub_0206DDB8(SaveData * param0, Pokemon * param1, u32 param2); void sub_0206DEEC(UnkStruct_0203CDB0 * param0, u16 param1, u16 param2); void sub_0206DF60(UnkStruct_0203CDB0 * param0, u16 param1); -void sub_0206DFE0(UnkStruct_021C0794 * param0); -void sub_0206E060(UnkStruct_021C0794 * param0); +void sub_0206DFE0(SaveData * param0); +void sub_0206E060(SaveData * param0); void sub_0206E0E0(UnkStruct_0203CDB0 * param0, u16 param1); void sub_0206E174(UnkStruct_0203CDB0 * param0, u16 param1); void sub_0206E264(UnkStruct_0203CDB0 * param0, u16 param1); @@ -69,6 +69,6 @@ void sub_0206E6A8(UnkStruct_0203CDB0 * param0, u16 param1); void sub_0206E6E8(UnkStruct_0203CDB0 * param0, u16 param1); void sub_0206E728(UnkStruct_0203CDB0 * param0, u16 param1); void sub_0206E768(UnkStruct_0203CDB0 * param0, u16 param1); -void sub_0206F2F0(UnkStruct_021C0794 * param0); +void sub_0206F2F0(SaveData * param0); #endif // POKEPLATINUM_UNK_0206CCB0_H diff --git a/include/unk_020711C8.h b/include/unk_020711C8.h index 8ce6db09f0..40e2bbad78 100644 --- a/include/unk_020711C8.h +++ b/include/unk_020711C8.h @@ -4,6 +4,6 @@ #include "struct_defs/struct_020711C8.h" #include "struct_decls/struct_021C0794_decl.h" -UnkStruct_020711C8 * sub_020711C8(const int param0, const u8 param1, UnkStruct_021C0794 * param2); +UnkStruct_020711C8 * sub_020711C8(const int param0, const u8 param1, SaveData * param2); #endif // POKEPLATINUM_UNK_020711C8_H diff --git a/include/unk_02073700.h b/include/unk_02073700.h index 48179abeb2..3ec52004cd 100644 --- a/include/unk_02073700.h +++ b/include/unk_02073700.h @@ -4,6 +4,6 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay096/struct_ov96_0223B450_sub1.h" -void sub_02073700(UnkStruct_021C0794 * param0, int param1, UnkStruct_ov96_0223B450_sub1 * param2); +void sub_02073700(SaveData * param0, int param1, UnkStruct_ov96_0223B450_sub1 * param2); #endif // POKEPLATINUM_UNK_02073700_H diff --git a/include/unk_02079170.h b/include/unk_02079170.h index 9bcd536874..fb12dc624f 100644 --- a/include/unk_02079170.h +++ b/include/unk_02079170.h @@ -6,7 +6,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay006/battle_params.h" -void sub_02079170(BattleParams * param0, const UnkStruct_021C0794 * param1, int param2); +void sub_02079170(BattleParams * param0, const SaveData * param1, int param2); u32 sub_02079220(int param0, int param1); BOOL sub_02079280(int param0, int param1, int param2); void sub_020792F8(int param0, int param1, Strbuf *param2, int param3); diff --git a/include/unk_020797C8.h b/include/unk_020797C8.h index 9c2e1283e3..9152b4e3ba 100644 --- a/include/unk_020797C8.h +++ b/include/unk_020797C8.h @@ -5,29 +5,29 @@ #include "pokemon.h" #include "struct_decls/struct_020797DC_decl.h" -void sub_020797C8(UnkStruct_020797DC * param0); -u32 sub_020797D4(void); -BOOL sub_02079868(UnkStruct_020797DC * param0, BoxPokemon * param1); -BOOL sub_020798A0(UnkStruct_020797DC * param0, u32 param1, BoxPokemon * param2); -BOOL sub_02079914(UnkStruct_020797DC * param0, u32 param1, u32 param2, BoxPokemon * param3); -void sub_02079968(UnkStruct_020797DC * param0, u32 param1, u32 param2); -u32 sub_0207999C(const UnkStruct_020797DC * param0); -u32 sub_020799A0(const UnkStruct_020797DC * param0); -BOOL sub_020799F0(const UnkStruct_020797DC * param0, int * param1, int * param2); -u32 sub_02079A50(const UnkStruct_020797DC * param0); -void sub_02079A94(UnkStruct_020797DC * param0, u32 param1); -u32 sub_02079AA8(const UnkStruct_020797DC * param0, u32 param1); -void sub_02079AC4(UnkStruct_020797DC * param0, u32 param1, u32 param2); -void sub_02079AF4(const UnkStruct_020797DC * param0, u32 param1, Strbuf *param2); -void sub_02079B24(UnkStruct_020797DC * param0, u32 param1, const Strbuf *param2); -u32 sub_02079B54(const UnkStruct_020797DC * param0, u32 param1); -u32 sub_02079B98(const UnkStruct_020797DC * param0, u32 param1); -u32 sub_02079BEC(const UnkStruct_020797DC * param0); -u32 sub_02079C08(const UnkStruct_020797DC * param0, u32 param1, u32 param2, int param3, void * param4); -void sub_02079C50(UnkStruct_020797DC * param0, u32 param1, u32 param2, int param3, void * param4); -BoxPokemon * sub_02079C9C(const UnkStruct_020797DC * param0, u32 param1, u32 param2); -void sub_02079CD8(UnkStruct_020797DC * param0, u32 param1); -BOOL sub_02079CFC(const UnkStruct_020797DC * param0, u32 param1); -u32 sub_02079D20(const UnkStruct_020797DC * param0); +void PCBoxes_Init(PCBoxes * param0); +u32 PCBoxes_SaveSize(void); +BOOL sub_02079868(PCBoxes * param0, BoxPokemon * param1); +BOOL sub_020798A0(PCBoxes * param0, u32 param1, BoxPokemon * param2); +BOOL sub_02079914(PCBoxes * param0, u32 param1, u32 param2, BoxPokemon * param3); +void sub_02079968(PCBoxes * param0, u32 param1, u32 param2); +u32 sub_0207999C(const PCBoxes * param0); +u32 sub_020799A0(const PCBoxes * param0); +BOOL sub_020799F0(const PCBoxes * param0, int * param1, int * param2); +u32 sub_02079A50(const PCBoxes * param0); +void sub_02079A94(PCBoxes * param0, u32 param1); +u32 sub_02079AA8(const PCBoxes * param0, u32 param1); +void sub_02079AC4(PCBoxes * param0, u32 param1, u32 param2); +void sub_02079AF4(const PCBoxes * param0, u32 param1, Strbuf *param2); +void sub_02079B24(PCBoxes * param0, u32 param1, const Strbuf *param2); +u32 sub_02079B54(const PCBoxes * param0, u32 param1); +u32 sub_02079B98(const PCBoxes * param0, u32 param1); +u32 sub_02079BEC(const PCBoxes * param0); +u32 sub_02079C08(const PCBoxes * param0, u32 param1, u32 param2, int param3, void * param4); +void sub_02079C50(PCBoxes * param0, u32 param1, u32 param2, int param3, void * param4); +BoxPokemon * sub_02079C9C(const PCBoxes * param0, u32 param1, u32 param2); +void sub_02079CD8(PCBoxes * param0, u32 param1); +BOOL sub_02079CFC(const PCBoxes * param0, u32 param1); +u32 sub_02079D20(const PCBoxes * param0); #endif // POKEPLATINUM_UNK_020797C8_H diff --git a/include/unk_0207A274.h b/include/unk_0207A274.h index 52d8225ca1..8df3807893 100644 --- a/include/unk_0207A274.h +++ b/include/unk_0207A274.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_02026324_decl.h" #include "struct_decls/struct_021C0794_decl.h" -u32 sub_0207A274(UnkStruct_021C0794 * param0); +u32 sub_0207A274(SaveData * param0); u32 sub_0207A280(const UnkStruct_02026324 * param0); u32 sub_0207A294(u32 param0, u32 param1); diff --git a/include/unk_0207CB08.h b/include/unk_0207CB08.h index 51f29a026f..d870895b81 100644 --- a/include/unk_0207CB08.h +++ b/include/unk_0207CB08.h @@ -9,7 +9,7 @@ UnkStruct_0207CB08 * sub_0207CB08(u8 param0); u32 sub_0207CB20(void); void sub_0207CB24(UnkStruct_0207CB08 * param0, u8 param1); -void sub_0207CB2C(UnkStruct_0207CB08 * param0, UnkStruct_021C0794 * param1, u8 param2, void * param3); +void sub_0207CB2C(UnkStruct_0207CB08 * param0, SaveData * param1, u8 param2, void * param3); void sub_0207CB48(UnkStruct_0207CB08 * param0, BagItem * param1, u8 param2, u8 param3); void sub_0207CB58(UnkStruct_0207CB08 * param0); void sub_0207CB6C(UnkStruct_0207CB08 * param0, void * param1); @@ -19,7 +19,7 @@ u16 sub_0207CB94(UnkStruct_0207CB08 * param0); u16 sub_0207CB9C(UnkStruct_0207CB08 * param0); u8 sub_0207CBA4(UnkStruct_0207CB08 * param0); u8 sub_0207CBAC(UnkStruct_0207CB08 * param0); -BOOL sub_0207CC10(UnkStruct_021C0794 * param0, Strbuf *param1, u16 param2, u32 param3); +BOOL sub_0207CC10(SaveData * param0, Strbuf *param1, u16 param2, u32 param3); void sub_0207CD34(void * param0, Strbuf *param1, u16 param2, u32 param3, u32 param4); #endif // POKEPLATINUM_UNK_0207CB08_H diff --git a/include/unk_0207D3B8.h b/include/unk_0207D3B8.h index 1c713ede1a..a738460664 100644 --- a/include/unk_0207D3B8.h +++ b/include/unk_0207D3B8.h @@ -6,9 +6,9 @@ #include "struct_decls/struct_0207D99C_decl.h" #include "struct_decls/struct_021C0794_decl.h" -int sub_0207D3B8(void); +int Bag_SaveSize(void); UnkStruct_0207D3C0 * sub_0207D3C0(int param0); -void sub_0207D3D8(UnkStruct_0207D3C0 * param0); +void Bag_Init(UnkStruct_0207D3C0 * param0); void sub_0207D3EC(const UnkStruct_0207D3C0 * param0, UnkStruct_0207D3C0 * param1); u32 sub_0207D3FC(const UnkStruct_0207D3C0 * param0); void sub_0207D404(UnkStruct_0207D3C0 * param0, u32 param1); @@ -24,7 +24,7 @@ void sub_0207D780(BagItem * param0, const u32 param1); void sub_0207D7CC(BagItem * param0, const u32 param1); void * sub_0207D824(UnkStruct_0207D3C0 * param0, const u8 * param1, u32 param2); BagItem * sub_0207D910(UnkStruct_0207D3C0 * param0, u16 param1, u16 param2); -UnkStruct_0207D3C0 * sub_0207D990(UnkStruct_021C0794 * param0); +UnkStruct_0207D3C0 * sub_0207D990(SaveData * param0); UnkStruct_0207D99C * sub_0207D99C(u32 param0); void sub_0207D9B4(UnkStruct_0207D99C * param0, u32 param1, u8 * param2, u8 * param3); u16 sub_0207D9C4(UnkStruct_0207D99C * param0); diff --git a/include/unk_0208C324.h b/include/unk_0208C324.h index e37374716e..5ecbbd5b4c 100644 --- a/include/unk_0208C324.h +++ b/include/unk_0208C324.h @@ -7,7 +7,7 @@ #include "struct_defs/struct_02098D38.h" #include "struct_decls/struct_021C0794_decl.h" -BOOL sub_0208C324(UnkStruct_021C0794 * param0); +BOOL sub_0208C324(SaveData * param0); void sub_0208D720(UnkStruct_02098D38 * param0, const u8 * param1); u8 sub_0208D790(UnkStruct_0208D7BC * param0, u32 param1); u8 sub_0208D7BC(UnkStruct_0208D7BC * param0); diff --git a/include/unk_020933F8.h b/include/unk_020933F8.h index a4a332cd9f..6663f33e76 100644 --- a/include/unk_020933F8.h +++ b/include/unk_020933F8.h @@ -38,7 +38,7 @@ u32 sub_02094904(UnkStruct_02095C48 * param0); void sub_02094A58(UnkStruct_02095C48 * param0, int param1); BOOL sub_02094B1C(UnkStruct_02095C48 * param0); void sub_02094BB4(UnkStruct_02095C48 * param0, int * param1, int * param2, int * param3, int * param4, int * param5); -void sub_02094C44(UnkStruct_02095C48 * param0, UnkStruct_021C0794 * param1, u32 param2, UnkStruct_0202B628 * param3); +void sub_02094C44(UnkStruct_02095C48 * param0, SaveData * param1, u32 param2, UnkStruct_0202B628 * param3); u16 sub_02094E98(UnkStruct_02095C48 * param0); u16 sub_02094EA0(u32 param0, u32 * param1); diff --git a/include/unk_0209747C.h b/include/unk_0209747C.h index 37add6d888..632c4af366 100644 --- a/include/unk_0209747C.h +++ b/include/unk_0209747C.h @@ -7,7 +7,7 @@ #include "struct_decls/struct_0209747C_decl.h" #include "struct_decls/struct_021C0794_decl.h" -UnkStruct_0209747C * sub_0209747C(u32 param0, u32 param1, UnkStruct_021C0794 * param2, u32 param3); +UnkStruct_0209747C * sub_0209747C(u32 param0, u32 param1, SaveData * param2, u32 param3); void sub_020974EC(UnkStruct_0209747C * param0); void sub_020974F4(UnkStruct_0209747C * param0, u16 param1); void sub_020974F8(UnkStruct_0209747C * param0, u16 param1, u16 param2); diff --git a/include/unk_02097624.h b/include/unk_02097624.h index c997203ae9..67432a82ce 100644 --- a/include/unk_02097624.h +++ b/include/unk_02097624.h @@ -6,10 +6,10 @@ #include "struct_defs/struct_02097728.h" #include "struct_decls/struct_021C0794_decl.h" -UnkStruct_02097728 * sub_02097624(UnkStruct_021C0794 * param0, int param1, u8 param2, u8 param3, int param4); -UnkStruct_02097728 * sub_0209767C(UnkStruct_021C0794 * param0, int param1, u16 param2, int param3); -UnkStruct_02097728 * sub_020976BC(UnkStruct_021C0794 * param0, Pokemon * param1, int param2); -UnkStruct_02097728 * sub_020976F4(UnkStruct_021C0794 * param0, u8 param1, int param2); +UnkStruct_02097728 * sub_02097624(SaveData * param0, int param1, u8 param2, u8 param3, int param4); +UnkStruct_02097728 * sub_0209767C(SaveData * param0, int param1, u16 param2, int param3); +UnkStruct_02097728 * sub_020976BC(SaveData * param0, Pokemon * param1, int param2); +UnkStruct_02097728 * sub_020976F4(SaveData * param0, u8 param1, int param2); BOOL sub_02097728(UnkStruct_02097728 * param0); int sub_0209772C(UnkStruct_02097728 * param0, int param1, u8 param2); int sub_02097750(UnkStruct_02097728 * param0, Pokemon * param1); diff --git a/include/unk_02097B18.h b/include/unk_02097B18.h index 11ebe4e557..e77a6783c6 100644 --- a/include/unk_02097B18.h +++ b/include/unk_02097B18.h @@ -11,7 +11,7 @@ u8 sub_02097F18(UnkStruct_02097F18 * param0); void sub_02097F20(UnkStruct_02097F18 * param0, u8 param1); u8 sub_02097F28(UnkStruct_02097F18 * param0); void sub_02097F30(UnkStruct_02097F18 * param0, u8 param1); -void sub_020980DC(UnkStruct_020508D4 * param0, UnkStruct_021C0794 * param1); +void sub_020980DC(UnkStruct_020508D4 * param0, SaveData * param1); int sub_02098140(u8 param0); int sub_02098164(u8 param0); int sub_02098188(u8 param0); diff --git a/include/unk_020985E4.h b/include/unk_020985E4.h index f0e510b989..ee01ae1d7f 100644 --- a/include/unk_020985E4.h +++ b/include/unk_020985E4.h @@ -4,7 +4,7 @@ #include "struct_decls/struct_020508D4_decl.h" #include "struct_decls/struct_021C0794_decl.h" -void sub_020985E4(UnkStruct_020508D4 * param0, UnkStruct_021C0794 * param1); +void sub_020985E4(UnkStruct_020508D4 * param0, SaveData * param1); BOOL sub_0209862C(UnkStruct_020508D4 * param0); #endif // POKEPLATINUM_UNK_020985E4_H diff --git a/include/unk_020989DC.h b/include/unk_020989DC.h index aacdf27f60..49cf2ab324 100644 --- a/include/unk_020989DC.h +++ b/include/unk_020989DC.h @@ -8,7 +8,7 @@ #include "enums.h" -UnkStruct_0203D9B8 * sub_020989DC(UnkStruct_021C0794 * param0, int param1); +UnkStruct_0203D9B8 * sub_020989DC(SaveData * param0, int param1); void sub_02098AF0(UnkStruct_0203D9B8 * param0); UnkEnum_02098EAC sub_02098EAC(Poffin * param0, u8 param1); void sub_02098EF8(Poffin * param0, Pokemon * param1); diff --git a/include/unk_02099550.h b/include/unk_02099550.h index 68e5f72d04..2eb2f60ce3 100644 --- a/include/unk_02099550.h +++ b/include/unk_02099550.h @@ -7,7 +7,7 @@ void sub_02099550(void); void sub_02099560(void); void sub_02099570(void); void sub_02099580(void); -void sub_02099590(UnkStruct_021C0794 * param0, int param1); +void sub_02099590(SaveData * param0, int param1); void sub_020995B4(void); void sub_020995C4(void); diff --git a/include/unk_02099604.h b/include/unk_02099604.h index 71ab5cb9fe..e1c3d36da6 100644 --- a/include/unk_02099604.h +++ b/include/unk_02099604.h @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "overlay082/struct_ov82_0223B164.h" -UnkStruct_ov82_0223B164 * sub_02099604(int param0, UnkStruct_021C0794 * param1, int param2); +UnkStruct_ov82_0223B164 * sub_02099604(int param0, SaveData * param1, int param2); UnkStruct_ov82_0223B164 * sub_02099674(UnkStruct_0203CDB0 * param0, int param1, int param2); UnkStruct_ov82_0223B164 * sub_020996A0(UnkStruct_0203CDB0 * param0, int param1, BOOL param2); diff --git a/platinum.us/main.lsf b/platinum.us/main.lsf index 1c7983504b..e6d06f55af 100644 --- a/platinum.us/main.lsf +++ b/platinum.us/main.lsf @@ -101,7 +101,7 @@ Static main Object main.nef.p/src_unk_020241F0.c.o Object main.nef.p/src_unk_02024220.c.o Object main.nef.p/src_unk_02024358.c.o - Object main.nef.p/src_unk_0202440C.c.o + Object main.nef.p/src_savedata_save_table.c.o Object main.nef.p/src_unk_020244AC.c.o Object main.nef.p/src_unk_02025CB0.c.o Object main.nef.p/src_unk_02025E08.c.o diff --git a/src/meson.build b/src/meson.build index 638bdd918f..988575146c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -93,7 +93,7 @@ pokeplatinum_c = files( 'unk_020241F0.c', 'unk_02024220.c', 'unk_02024358.c', - 'unk_0202440C.c', + 'savedata/save_table.c', 'unk_020244AC.c', 'unk_02025CB0.c', 'unk_02025E08.c', diff --git a/src/overlay004/ov4_021D0D80.c b/src/overlay004/ov4_021D0D80.c index 8eb5e9fec8..51af3a5c75 100644 --- a/src/overlay004/ov4_021D0D80.c +++ b/src/overlay004/ov4_021D0D80.c @@ -26,7 +26,7 @@ typedef struct { DWCFriendsMatchControl unk_104; DWCUserData * unk_F08; DWCInetControl unk_F0C; - UnkStruct_021C0794 * unk_F6C; + SaveData * unk_F6C; void * unk_F70; void * unk_F74[4]; void * unk_F84; @@ -101,7 +101,7 @@ static void ov4_021D24AC(int param0, void * param1); static UnkStruct_ov4_0221A400 * Unk_ov4_0221A400 = NULL; -int ov4_021D0D80 (UnkStruct_021C0794 * param0, int param1, int param2, int param3) +int ov4_021D0D80 (SaveData * param0, int param1, int param2, int param3) { void * v0; diff --git a/src/overlay005/ov5_021E1D20.c b/src/overlay005/ov5_021E1D20.c index be03227011..e2acf2a473 100644 --- a/src/overlay005/ov5_021E1D20.c +++ b/src/overlay005/ov5_021E1D20.c @@ -75,7 +75,7 @@ static const int Unk_ov5_021F9CBC[] = { static void ov5_021E1D20 (UnkStruct_ov5_021E1D20 * param0, const UnkStruct_0203CDB0 * param1) { - UnkStruct_021C0794 * v0 = param1->unk_0C; + SaveData * v0 = param1->unk_0C; UnkStruct_02049FA8 * v1 = sub_0203A720(sub_0203A790(v0)); UnkStruct_02026324 * v2 = sub_02027560(v0); diff --git a/src/overlay005/ov5_021E622C.c b/src/overlay005/ov5_021E622C.c index 90aec268bd..dc347e9c0c 100644 --- a/src/overlay005/ov5_021E622C.c +++ b/src/overlay005/ov5_021E622C.c @@ -1966,7 +1966,7 @@ u8 ov5_021E6640(UnkStruct_02026310 * param0, int param1, UnkStruct_0200B358 * pa u16 ov5_021E73A0(Party * param0, int param1, UnkStruct_0200B358 * param2); u8 ov5_021E73C8(UnkStruct_02026310 * param0); void ov5_021E72BC(UnkStruct_02026310 * param0, UnkStruct_0200B358 * param1); -static void ov5_021E62C4(Party * param0, int param1, UnkStruct_02026218 * param2, UnkStruct_021C0794 * param3); +static void ov5_021E62C4(Party * param0, int param1, UnkStruct_02026218 * param2, SaveData * param3); static int ov5_021E7110(UnkStruct_0203CDB0 * param0); static BoxPokemon * ov5_021E622C (UnkStruct_02026310 * param0, int param1) @@ -2018,7 +2018,7 @@ static int ov5_021E62B0 (BoxPokemon * param0) return Item_IsMail(v0); } -static void ov5_021E62C4 (Party * param0, int param1, UnkStruct_02026218 * param2, UnkStruct_021C0794 * param3) +static void ov5_021E62C4 (Party * param0, int param1, UnkStruct_02026218 * param2, SaveData * param3) { int v0; Pokemon * v1 = Party_GetPokemonBySlotIndex(param0, param1); @@ -2046,7 +2046,7 @@ static void ov5_021E62C4 (Party * param0, int param1, UnkStruct_02026218 * param } } -void ov5_021E6358 (Party * param0, int param1, UnkStruct_02026310 * param2, UnkStruct_021C0794 * param3) +void ov5_021E6358 (Party * param0, int param1, UnkStruct_02026310 * param2, SaveData * param3) { int v0; UnkStruct_0202CD88 * v1 = sub_0202CD88(param3); diff --git a/src/overlay005/ov5_021EA874.c b/src/overlay005/ov5_021EA874.c index 2567f66377..4506d0ce25 100644 --- a/src/overlay005/ov5_021EA874.c +++ b/src/overlay005/ov5_021EA874.c @@ -51,7 +51,7 @@ typedef struct { UnkStruct_0205AA50 unk_10; UnkStruct_0205AA50 unk_20; UnkStruct_0203CDB0 * unk_30; - UnkStruct_021C0794 * unk_34; + SaveData * unk_34; UnkStruct_0200B358 * unk_38; MessageLoader * unk_3C; int unk_40; diff --git a/src/overlay005/ov5_021F6454.c b/src/overlay005/ov5_021F6454.c index 3925386290..91b951d86c 100644 --- a/src/overlay005/ov5_021F6454.c +++ b/src/overlay005/ov5_021F6454.c @@ -135,7 +135,7 @@ static u16 Unk_ov5_0220210C[] = { BOOL ov5_021F6454 (UnkStruct_0203E724 * param0) { int v0; - UnkStruct_020308A0 * v1; + BattleFrontierStage * v1; u16 v2; u16 * v3; int v4, v5; diff --git a/src/overlay006/ov6_02246444.c b/src/overlay006/ov6_02246444.c index 214014d413..e5a1665620 100644 --- a/src/overlay006/ov6_02246444.c +++ b/src/overlay006/ov6_02246444.c @@ -12,7 +12,7 @@ #include "unk_020021B0.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "trainer_info.h" #include "unk_0202E2CC.h" @@ -136,7 +136,7 @@ static UnkStruct_ov6_022465F4 * ov6_02246550 (UnkStruct_0203CDB0 * param0, int p UnkStruct_ov6_022465F4 * ov6_022465A0 (UnkStruct_0203CDB0 * param0, int param1, int param2) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_0C); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_0C); if ((param1 == 4) || (param1 == 5)) { return ov6_02246550(param0, param2); diff --git a/src/overlay006/ov6_022465FC.c b/src/overlay006/ov6_022465FC.c index d57bd133cd..aa9537bb68 100644 --- a/src/overlay006/ov6_022465FC.c +++ b/src/overlay006/ov6_022465FC.c @@ -10,7 +10,7 @@ #include "narc.h" #include "unk_0201378C.h" #include "unk_0201D15C.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_0202E2CC.h" #include "unk_020559DC.h" #include "unk_0206CCB0.h" @@ -41,14 +41,14 @@ static const UnkStruct_ov6_02249470 Unk_ov6_02249470[] = { void ov6_022465FC (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_0C); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_0C); sub_0202E374(v0, 1); } int ov6_0224660C (UnkStruct_0203CDB0 * param0) { int v0; - UnkStruct_0202440C * v1 = sub_0202440C(param0->unk_0C); + TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); if (sub_0202E380(v1) == 1) { return 0; @@ -114,7 +114,7 @@ static void ov6_022466EC (int param0, UnkStruct_0203CDB0 * param1, u8 * param2) { u8 v0[11]; int v1, v2; - UnkStruct_0202440C * v3 = sub_0202440C(param1->unk_0C); + TVBroadcast * v3 = SaveData_TVBroadcast(param1->unk_0C); ov6_022466C8(param0, v0); MI_CpuClear8(param2, sizeof(u8) * 11); @@ -154,7 +154,7 @@ static int ov6_0224673C (UnkStruct_0203CDB0 * param0, const u8 * param1) return v0[MTRNG_Next() % v2]; } -static int ov6_0224678C (UnkStruct_0202440C * param0, int param1, int param2, BOOL param3, BOOL param4, u8 * param5) +static int ov6_0224678C (TVBroadcast * param0, int param1, int param2, BOOL param3, BOOL param4, u8 * param5) { if ((param1 != 4) && (param1 != 5)) { return sub_0202E614(param0, param1, param2, param3, param4, param5); @@ -179,7 +179,7 @@ static int ov6_0224678C (UnkStruct_0202440C * param0, int param1, int param2, BO static int ov6_022467DC (int param0, UnkStruct_0203CDB0 * param1, BOOL param2, BOOL param3, const u8 * param4, u8 * param5) { u8 v0[16]; - UnkStruct_0202440C * v1 = sub_0202440C(param1->unk_0C); + TVBroadcast * v1 = SaveData_TVBroadcast(param1->unk_0C); int v2, v3; int v4 = 0; @@ -217,7 +217,7 @@ static void ov6_02246844 (UnkStruct_0203CDB0 * param0, int param1, u8 * param2) static void ov6_02246884 (UnkStruct_0203CDB0 * param0, u8 * param1) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_0C); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_0C); while (*param1 != 0) { if (sub_0202E3C4(v0, *param1)) { @@ -294,7 +294,7 @@ static const UnkStruct_ov6_02249470 * ov6_02246958 (UnkStruct_0203CDB0 * param0) int ov6_02246978 (UnkStruct_0203CDB0 * param0, int param1) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_0C); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_0C); const UnkStruct_ov6_02249470 * v1 = ov6_02246958(param0); switch (param1) { @@ -326,7 +326,7 @@ BOOL ov6_022469E0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1, int { int v0 = ov6_0224663C(param0); int v1 = ov6_0224669C(v0); - UnkStruct_0202440C * v2 = sub_0202440C(param0->unk_0C); + TVBroadcast * v2 = SaveData_TVBroadcast(param0->unk_0C); UnkStruct_ov6_022465F4 * v3; sub_0202E384(v2, param2); diff --git a/src/overlay006/ov6_02246BF4.c b/src/overlay006/ov6_02246BF4.c index 7b5802662d..6cfadf6bcd 100644 --- a/src/overlay006/ov6_02246BF4.c +++ b/src/overlay006/ov6_02246BF4.c @@ -8,7 +8,7 @@ #include "unk_0203E880.h" #include "overlay006/ov6_02246BF4.h" -BOOL ov6_02246BF4 (UnkStruct_021C0794 * param0, UnkStruct_0203CDB0 * param1) +BOOL ov6_02246BF4 (SaveData * param0, UnkStruct_0203CDB0 * param1) { u8 * v0; diff --git a/src/overlay006/ov6_022475B0.c b/src/overlay006/ov6_022475B0.c index 919dab477b..b73c7b709e 100644 --- a/src/overlay006/ov6_022475B0.c +++ b/src/overlay006/ov6_022475B0.c @@ -10,7 +10,7 @@ #include "unk_0202D7A8.h" #include "overlay006/ov6_022475B0.h" -void ov6_022475B0 (UnkStruct_021C0794 * param0) +void ov6_022475B0 (SaveData * param0) { u16 v0; u16 v1, v2; @@ -45,7 +45,7 @@ void ov6_022475B0 (UnkStruct_021C0794 * param0) Heap_FreeToHeap(v4); } -int ov6_02247624 (UnkStruct_021C0794 * param0) +int ov6_02247624 (SaveData * param0) { int v0; int * v1; diff --git a/src/overlay006/ov6_02247A0C.c b/src/overlay006/ov6_02247A0C.c index acad647c09..6c5070cd62 100644 --- a/src/overlay006/ov6_02247A0C.c +++ b/src/overlay006/ov6_02247A0C.c @@ -135,7 +135,7 @@ void * ov6_02247A90 (void * param0) UnkStruct_02018340 * v1; Strbuf* v2, * v3; int v4, v5, v6, v7; - UnkStruct_021C0794 * v8; + SaveData * v8; v1 = sub_0203D170(param0); v8 = sub_0203D174(param0); diff --git a/src/overlay006/ov6_022489E4.c b/src/overlay006/ov6_022489E4.c index 5f6a2dd428..ae1b733e26 100644 --- a/src/overlay006/ov6_022489E4.c +++ b/src/overlay006/ov6_022489E4.c @@ -296,7 +296,7 @@ void ov6_02248D38 (int param0, int param1, void * param2, void * param3) int v2; u8 * v3; - v1 = sub_0202CC64(); + v1 = ChatotCry_SaveSize(); v3 = param2; v2 = v3[v1]; @@ -311,7 +311,7 @@ BOOL ov6_02248D64 (UnkStruct_02095C48 * param0, int param1, void * param2) int v1; int v2; - v1 = sub_0202CC64(); + v1 = ChatotCry_SaveSize(); v0 = param0->unk_569; if (param2 != NULL) { diff --git a/src/overlay007/ov7_0224BE9C.c b/src/overlay007/ov7_0224BE9C.c index 070e2e859b..84f06ae6f1 100644 --- a/src/overlay007/ov7_0224BE9C.c +++ b/src/overlay007/ov7_0224BE9C.c @@ -137,7 +137,7 @@ typedef struct { typedef struct UnkStruct_ov7_0224BEFC_t { u32 unk_00; u32 unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_02029D04 * unk_0C; UnkStruct_0207D3C0 * unk_10; UnkStruct_02018340 * unk_14; @@ -186,7 +186,7 @@ static BOOL ov7_0224CCB8(UnkStruct_0207D3C0 * param0, const UnkStruct_ov7_0224F1 static BOOL ov7_0224CCE4(const UnkStruct_02029D04 * param0, const UnkStruct_ov7_0224F1B4 * param1, u32 param2); static void ov7_0224CCF4(UnkStruct_02029D04 * param0, UnkStruct_0207D3C0 * param1, const UnkStruct_ov7_0224F1B4 * param2, u32 param3, u32 param4); -UnkStruct_ov7_0224BEFC * ov7_0224BE9C (u32 param0, UnkStruct_021C0794 * param1, UnkStruct_02018340 * param2) +UnkStruct_ov7_0224BEFC * ov7_0224BE9C (u32 param0, SaveData * param1, UnkStruct_02018340 * param2) { UnkStruct_ov7_0224BEFC * v0 = Heap_AllocFromHeap(param0, sizeof(UnkStruct_ov7_0224BEFC)); diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index b276241966..5f7eb018b8 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -477,7 +477,7 @@ static u8 ov13_02226A5C (UnkStruct_ov13_02227244 * param0) { Party * v7 = ov16_0223DF20(v0->unk_00, v0->unk_10); - UnkStruct_020797DC * v8 = ov16_0223E228(v0->unk_00); + PCBoxes * v8 = ov16_0223E228(v0->unk_00); if ((Party_GetCurrentCount(v7) == 6) && (sub_020799A0(v8) == 18)) { MessageLoader_GetStrbuf(param0->unk_10, 45, param0->unk_18); diff --git a/src/overlay016/ov16_0223DF00.c b/src/overlay016/ov16_0223DF00.c index 84bcd1cf6a..8f971f4dd1 100644 --- a/src/overlay016/ov16_0223DF00.c +++ b/src/overlay016/ov16_0223DF00.c @@ -118,7 +118,7 @@ int ov16_0223E1C4(BattleSystem * param0, int param1); u8 BattleSystem_BattlerSlot(BattleSystem *battleSys, int battler); u8 Battler_Side(BattleSystem * param0, int param1); void * ov16_0223E220(BattleSystem * param0); -UnkStruct_020797DC * ov16_0223E228(BattleSystem * param0); +PCBoxes * ov16_0223E228(BattleSystem * param0); int ov16_0223E22C(BattleSystem * param0); int ov16_0223E240(BattleSystem * param0); int ov16_0223E24C(BattleSystem * param0); @@ -496,7 +496,7 @@ void * ov16_0223E220 (BattleSystem * param0) return param0->unk_1AC; } -UnkStruct_020797DC * ov16_0223E228 (BattleSystem * param0) +PCBoxes * ov16_0223E228 (BattleSystem * param0) { return param0->unk_64; } diff --git a/src/overlay016/ov16_022405FC.c b/src/overlay016/ov16_022405FC.c index 19c063ba23..7777a52727 100644 --- a/src/overlay016/ov16_022405FC.c +++ b/src/overlay016/ov16_022405FC.c @@ -8625,7 +8625,7 @@ static void ov16_02249B80 (UnkStruct_0201CD38 * param0, void * param1) v2->unk_28 = 32; } else { { - UnkStruct_020797DC * v24; + PCBoxes * v24; u32 v25; u32 v26; int v27; diff --git a/src/overlay019/ov19_021D0D80.c b/src/overlay019/ov19_021D0D80.c index 43bcfbcc84..79f79eb36d 100644 --- a/src/overlay019/ov19_021D0D80.c +++ b/src/overlay019/ov19_021D0D80.c @@ -50,7 +50,7 @@ #include "heap.h" #include "strbuf.h" #include "unk_02023FCC.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "unk_020279FC.h" @@ -116,7 +116,7 @@ typedef struct { u8 unk_04[NELEMS(Unk_ov19_021DFDF0)]; u16 unk_08[NELEMS(Unk_ov19_021DFDF0)]; BoxPokemon * unk_10; - UnkStruct_020797DC * unk_14; + PCBoxes * unk_14; Party * unk_18; BOOL unk_1C; } UnkStruct_ov19_021D38E0; @@ -125,8 +125,8 @@ typedef struct UnkStruct_ov19_021D5DF8_t { UnkStruct_ov19_021D4DF0 unk_00; UnkStruct_ov19_021D61B0 * unk_114; UnkStruct_02042434 * unk_118; - UnkStruct_021C0794 * unk_11C; - UnkStruct_020797DC * unk_120; + SaveData * unk_11C; + PCBoxes * unk_120; Party * unk_124; UnkStruct_0208737C * unk_128; UnkStruct_02098D38 unk_12C; @@ -221,15 +221,15 @@ static void ov19_021D4DE4(UnkStruct_ov19_021D4DE4 * param0, int param1); static void ov19_021D4DF0(UnkStruct_ov19_021D5DF8 * param0); static void ov19_021D4E30(UnkStruct_ov19_021D5594 * param0); static void ov19_021D4E50(UnkStruct_ov19_021D5594 * param0); -static void ov19_021D4E5C(UnkStruct_020797DC * param0, UnkStruct_ov19_021D4F5C * param1); +static void ov19_021D4E5C(PCBoxes * param0, UnkStruct_ov19_021D4F5C * param1); static void ov19_021D4E7C(UnkStruct_ov19_021D4F5C * param0); static void ov19_021D4E88(UnkStruct_ov19_021D5BAC * param0); static void ov19_021D4EC0(UnkStruct_ov19_021D5BAC * param0); static void ov19_021D4EE4(UnkStruct_ov19_021D4EE4 * param0); static void ov19_021D4F18(UnkStruct_ov19_021D4EE4 * param0); static void ov19_021D4F34(UnkStruct_ov19_021D4F34 * param0); -static void ov19_021D4F40(const UnkStruct_020797DC * param0, UnkStruct_ov19_021D4F5C * param1); -static void ov19_021D4F5C(UnkStruct_ov19_021D4DF0 * param0, UnkStruct_020797DC * param1); +static void ov19_021D4F40(const PCBoxes * param0, UnkStruct_ov19_021D4F5C * param1); +static void ov19_021D4F5C(UnkStruct_ov19_021D4DF0 * param0, PCBoxes * param1); static BOOL ov19_021D4F74(u32 param0, UnkStruct_ov19_021D5DF8 * param1); static BOOL ov19_021D4FDC(UnkStruct_ov19_021D4DF0 * param0, int param1, int param2); static int ov19_021D5150(u32 param0, UnkStruct_ov19_021D5DF8 * param1); @@ -3309,7 +3309,7 @@ static void ov19_021D4BB0 (u32 param0, u32 param1, void * param2) static void ov19_021D4BE0 (UnkStruct_ov19_021D5DF8 * param0, UnkStruct_02042434 * param1) { - param0->unk_120 = sub_02024420(param1->unk_00); + param0->unk_120 = SaveData_PCBoxes(param1->unk_00); param0->unk_11C = param1->unk_00; param0->unk_124 = Party_GetFromSavedata(param1->unk_00); param0->unk_1A4 = sub_02025E44(param1->unk_00); @@ -3415,7 +3415,7 @@ static void ov19_021D4E50 (UnkStruct_ov19_021D5594 * param0) Heap_FreeToHeap(param0->unk_00); } -static void ov19_021D4E5C (UnkStruct_020797DC * param0, UnkStruct_ov19_021D4F5C * param1) +static void ov19_021D4E5C (PCBoxes * param0, UnkStruct_ov19_021D4F5C * param1) { param1->unk_00 = sub_0207999C(param0); param1->unk_04 = Strbuf_Init(20, 9); @@ -3478,13 +3478,13 @@ static void ov19_021D4F34 (UnkStruct_ov19_021D4F34 * param0) param0->unk_04 = 0; } -static void ov19_021D4F40 (const UnkStruct_020797DC * param0, UnkStruct_ov19_021D4F5C * param1) +static void ov19_021D4F40 (const PCBoxes * param0, UnkStruct_ov19_021D4F5C * param1) { param1->unk_01 = sub_02079AA8(param0, param1->unk_00); sub_02079AF4(param0, param1->unk_00, param1->unk_04); } -static void ov19_021D4F5C (UnkStruct_ov19_021D4DF0 * param0, UnkStruct_020797DC * param1) +static void ov19_021D4F5C (UnkStruct_ov19_021D4DF0 * param0, PCBoxes * param1) { UnkStruct_ov19_021D4F5C * v0 = &(param0->unk_40); v0->unk_01 = sub_02079AA8(param1, v0->unk_00); @@ -4525,7 +4525,7 @@ const UnkStruct_ov19_021D4F5C * ov19_021D5E8C (const UnkStruct_ov19_021D4DF0 * p return &(param0->unk_40); } -const UnkStruct_020797DC * ov19_021D5E90 (const UnkStruct_ov19_021D4DF0 * param0) +const PCBoxes * ov19_021D5E90 (const UnkStruct_ov19_021D4DF0 * param0) { return param0->unk_00; } diff --git a/src/overlay019/ov19_021D79F8.c b/src/overlay019/ov19_021D79F8.c index 81c31c2330..7bd00ff9cf 100644 --- a/src/overlay019/ov19_021D79F8.c +++ b/src/overlay019/ov19_021D79F8.c @@ -382,7 +382,7 @@ static void ov19_021D7F9C (UnkStruct_ov19_021D8318 * param0, fx32 param1) static void ov19_021D803C (UnkStruct_ov19_021D8318 * param0, UnkStruct_ov19_021DCD18 * param1, int param2, int param3) { - const UnkStruct_020797DC * v0; + const PCBoxes * v0; BoxPokemon * v1; int v2, v3; u32 v4; @@ -425,7 +425,7 @@ static void ov19_021D8114 (UnkStruct_ov19_021D8318 * param0, UnkStruct_ov19_021D static void ov19_021D813C (UnkStruct_ov19_021D8318 * param0, u32 param1) { - const UnkStruct_020797DC * v0; + const PCBoxes * v0; BoxPokemon * v1; u32 v2, v3; diff --git a/src/overlay019/ov19_021DB8E4.c b/src/overlay019/ov19_021DB8E4.c index 146207629d..05233db649 100644 --- a/src/overlay019/ov19_021DB8E4.c +++ b/src/overlay019/ov19_021DB8E4.c @@ -231,7 +231,7 @@ BOOL ov19_021DBBA0 (UnkStruct_ov19_021DBA9C * param0) void ov19_021DBBA8 (UnkStruct_ov19_021DBA9C * param0, u32 param1, u32 param2, NNS_G2D_VRAM_TYPE param3, NNSG2dImageProxy * param4) { - const UnkStruct_020797DC * v0; + const PCBoxes * v0; BoxPokemon * v1; u32 v2, v3, v4, v5; u8 v6, v7; @@ -416,7 +416,7 @@ static void ov19_021DBF18 (UnkStruct_ov19_021DBA9C * param0) static void ov19_021DBF4C (UnkStruct_ov19_021DBA9C * param0) { - const UnkStruct_020797DC * v0; + const PCBoxes * v0; UnkStruct_0205AA50 * v1; u32 v2, v3; diff --git a/src/overlay019/ov19_021DF964.c b/src/overlay019/ov19_021DF964.c index a164240d61..c97e74bf49 100644 --- a/src/overlay019/ov19_021DF964.c +++ b/src/overlay019/ov19_021DF964.c @@ -121,7 +121,7 @@ void ov19_021DFAD0 (UnkStruct_ov19_021D4DF0 * param0) void ov19_021DFB50 (UnkStruct_ov19_021D4DF0 * param0) { UnkStruct_ov19_021DF964 * v0 = &(param0->unk_74); - const UnkStruct_020797DC * v1 = ov19_021D5E90(param0); + const PCBoxes * v1 = ov19_021D5E90(param0); ov19_021DFCF8(v0); ov19_021DFD08(v0, UnkEnum_021DFB94_00); @@ -139,7 +139,7 @@ void ov19_021DFB50 (UnkStruct_ov19_021D4DF0 * param0) void ov19_021DFB94 (UnkStruct_ov19_021D4DF0 * param0, UnkEnum_021DFB94 param1) { UnkStruct_ov19_021DF964 * v0 = &(param0->unk_74); - const UnkStruct_020797DC * v1 = ov19_021D5E90(param0); + const PCBoxes * v1 = ov19_021D5E90(param0); u32 v2; ov19_021DFCF8(v0); @@ -176,7 +176,7 @@ void ov19_021DFC04 (UnkStruct_ov19_021D4DF0 * param0, UnkEnum_021DFB94 param1) {UnkEnum_021DFB94_22, UnkEnum_021DFB94_23, UnkEnum_021DFB94_24, UnkEnum_021DFB94_25}, }; UnkStruct_ov19_021DF964 * v1 = &(param0->unk_74); - const UnkStruct_020797DC * v2 = ov19_021D5E90(param0); + const PCBoxes * v2 = ov19_021D5E90(param0); int v3; ov19_021DFCF8(v1); diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index dffd838d09..6e68ae31ef 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -1789,7 +1789,7 @@ static BOOL ov23_0223F838 (int param0, int param1, int param2) static int ov23_0223F970 (UnkStruct_ov23_02256EB0 * param0) { - UnkStruct_021C0794 * v0 = sub_0203D174(Unk_ov23_02257740->unk_00); + SaveData * v0 = sub_0203D174(Unk_ov23_02257740->unk_00); UnkStruct_020298B0 * v1 = sub_020298B0(v0); BOOL v2 = TrainerInfo_ID(sub_02025E38(v0)) % 2; BOOL v3 = sub_02027474(sub_02027560(v0)); diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 096f747afb..275100304a 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -885,7 +885,7 @@ BOOL ov23_02242D60 (Strbuf *param0) return 0; } -UnkStruct_02029894 * ov23_02242E10 (UnkStruct_021C0794 * param0) +UnkStruct_02029894 * ov23_02242E10 (SaveData * param0) { if (!Unk_ov23_02257748) { return NULL; diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index f61a29bd2d..006cfc23a4 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -2092,7 +2092,7 @@ BOOL ov23_0224D020 (Strbuf *param0) return 0; } -UnkStruct_02029894 * ov23_0224D130 (UnkStruct_021C0794 * param0) +UnkStruct_02029894 * ov23_0224D130 (SaveData * param0) { if (Unk_ov23_022577AC) { if (Unk_ov23_022577AC->unk_A00) { diff --git a/src/overlay023/ov23_022521F0.c b/src/overlay023/ov23_022521F0.c index d84a029078..d40306478c 100644 --- a/src/overlay023/ov23_022521F0.c +++ b/src/overlay023/ov23_022521F0.c @@ -136,7 +136,7 @@ static void ov23_022522F0 (UnkStruct_ov23_02250CD4 * param0, int param1) { MATHRandContext16 v0; int v1, v2, v3, v4, v5; - UnkStruct_021C0794 * v6 = sub_0203D174(param0->unk_0C); + SaveData * v6 = sub_0203D174(param0->unk_0C); UnkStruct_020298B0 * v7 = sub_020298B0(v6); BOOL v8 = sub_02027474(sub_02027560(v6)); diff --git a/src/overlay023/ov23_02253598.c b/src/overlay023/ov23_02253598.c index d420cf321a..de68629fee 100644 --- a/src/overlay023/ov23_02253598.c +++ b/src/overlay023/ov23_02253598.c @@ -56,7 +56,7 @@ typedef struct { typedef struct UnkStruct_ov23_02253598_t { UnkStruct_ov23_022537D4 * unk_00; UnkStruct_0201CD38 * unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_0202855C * unk_0C; UnkStruct_0202855C * unk_10; MATHRandContext32 unk_14; @@ -66,7 +66,7 @@ typedef struct UnkStruct_ov23_02253598_t { static UnkStruct_ov23_02253598 * Unk_ov23_022577BC = NULL; static void ov23_022537D4(UnkStruct_0201CD38 * param0, void * param1); -void ov23_02253598 (UnkStruct_ov23_02253598 * param0, UnkStruct_0202855C * param1, UnkStruct_021C0794 * param2) +void ov23_02253598 (UnkStruct_ov23_02253598 * param0, UnkStruct_0202855C * param1, SaveData * param2) { MI_CpuFill8(param0, 0, sizeof(UnkStruct_ov23_02253598)); diff --git a/src/overlay025/ov25_02253CE0.c b/src/overlay025/ov25_02253CE0.c index 667c268a23..921eb9d038 100644 --- a/src/overlay025/ov25_02253CE0.c +++ b/src/overlay025/ov25_02253CE0.c @@ -99,7 +99,7 @@ typedef struct UnkStruct_ov25_02253CE0_t { void * unk_48; UnkStruct_02018340 * unk_4C; NNSG2dOamManagerInstance * unk_50; - UnkStruct_021C0794 * unk_54; + SaveData * unk_54; UnkStruct_02056B24 * unk_58; UnkStruct_0203CDB0 * unk_5C; int unk_60; @@ -165,7 +165,7 @@ static UnkStruct_ov25_02253CE0 * ov25_02253CE0 (void) return sub_0203D158(); } -void ov25_02253CE8 (UnkStruct_0203CDB0 * param0, UnkStruct_ov25_02253CE0 ** param1, UnkStruct_021C0794 * param2, UnkStruct_02018340 * param3, NNSG2dOamManagerInstance * param4) +void ov25_02253CE8 (UnkStruct_0203CDB0 * param0, UnkStruct_ov25_02253CE0 ** param1, SaveData * param2, UnkStruct_02018340 * param3, NNSG2dOamManagerInstance * param4) { UnkStruct_ov25_02253CE0 * v0; @@ -817,9 +817,9 @@ UnkStruct_02056B24 * ov25_02254540 (const UnkStruct_ov25_0225424C * param0) return (UnkStruct_02056B24 *)(param0->unk_58); } -UnkStruct_021C0794 * ov25_02254544 (const UnkStruct_ov25_0225424C * param0) +SaveData * ov25_02254544 (const UnkStruct_ov25_0225424C * param0) { - return (UnkStruct_021C0794 *)(param0->unk_54); + return (SaveData *)(param0->unk_54); } int ov25_02254548 (const UnkStruct_ov25_0225424C * param0) diff --git a/src/overlay057/ov57_021D0D80.c b/src/overlay057/ov57_021D0D80.c index e7802817a4..d3b93a210e 100644 --- a/src/overlay057/ov57_021D0D80.c +++ b/src/overlay057/ov57_021D0D80.c @@ -46,7 +46,7 @@ static int ov57_021D0E00(UnkStruct_020067E8 * param0, int * param1); static int ov57_021D0E1C(UnkStruct_020067E8 * param0, int * param1); static int ov57_021D0E34(UnkStruct_020067E8 * param0, int * param1); static int ov57_021D0E90(UnkStruct_020067E8 * param0, int * param1); -static void ov57_021D0EAC(int param0, UnkStruct_021C0794 * param1, BOOL param2); +static void ov57_021D0EAC(int param0, SaveData * param1, BOOL param2); const UnkStruct_0208BE5C Unk_ov57_021D0F90 = { ov57_021D0D80, @@ -79,7 +79,7 @@ static int ov57_021D0D80 (UnkStruct_020067E8 * param0, int * param1) static int ov57_021D0D98 (UnkStruct_020067E8 * param0, int * param1) { - UnkStruct_021C0794 * v0 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; + SaveData * v0 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; ov57_021D0F44(77, v0); return 1; @@ -103,7 +103,7 @@ static int ov57_021D0DC8 (UnkStruct_020067E8 * param0, int * param1) static int ov57_021D0DE0 (UnkStruct_020067E8 * param0, int * param1) { - UnkStruct_021C0794 * v0 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; + SaveData * v0 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; ov57_021D0EAC(77, v0, 1); sub_02017434(sub_02025E5C(v0)); @@ -128,7 +128,7 @@ static int ov57_021D0E1C (UnkStruct_020067E8 * param0, int * param1) static int ov57_021D0E34 (UnkStruct_020067E8 * param0, int * param1) { - UnkStruct_021C0794 * v0 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; + SaveData * v0 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; UnkStruct_02025CCC * v1 = sub_02025CCC(v0); ov57_021D0F30(77, v0); @@ -390,7 +390,7 @@ static const u16 Unk_ov57_021D0FA0[] = { 0x1 }; -static void ov57_021D0EAC (int param0, UnkStruct_021C0794 * param1, BOOL param2) +static void ov57_021D0EAC (int param0, SaveData * param1, BOOL param2) { u32 v0; UnkStruct_02027854 * v1; diff --git a/src/overlay057/ov57_021D0F30.c b/src/overlay057/ov57_021D0F30.c index 2f9ccdbbd1..d47678f5ca 100644 --- a/src/overlay057/ov57_021D0F30.c +++ b/src/overlay057/ov57_021D0F30.c @@ -12,14 +12,14 @@ #include "unk_0206A8DC.h" #include "overlay057/ov57_021D0F30.h" -void ov57_021D0F30 (int param0, UnkStruct_021C0794 * param1) +void ov57_021D0F30 (int param0, SaveData * param1) { if (!sub_020246A8(param1)) { OS_ResetSystem(0); } } -void ov57_021D0F44 (int param0, UnkStruct_021C0794 * param1) +void ov57_021D0F44 (int param0, SaveData * param1) { TrainerInfo * v0; diff --git a/src/overlay059/ov59_021D2B44.c b/src/overlay059/ov59_021D2B44.c index 195f7bc83d..7a160b77c1 100644 --- a/src/overlay059/ov59_021D2B44.c +++ b/src/overlay059/ov59_021D2B44.c @@ -10,7 +10,7 @@ #include "unk_020021B0.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -120,17 +120,17 @@ static const u8 * const Unk_ov59_021D33E4[] = { Unk_ov59_021D3390 }; -u32 ov59_021D2B44 (const UnkStruct_021C0794 * param0) +u32 ov59_021D2B44 (const SaveData * param0) { return sizeof(UnkStruct_0202E794) * 4; } -u32 ov59_021D2B4C (const UnkStruct_021C0794 * param0) +u32 ov59_021D2B4C (const SaveData * param0) { return sizeof(UnkStruct_0202E794) * 4; } -u32 ov59_021D2B54 (const UnkStruct_021C0794 * param0) +u32 ov59_021D2B54 (const SaveData * param0) { return sizeof(UnkStruct_0202E794) * 4; } @@ -148,7 +148,7 @@ static BOOL ov59_021D2B5C (int param0, int param1) return 0; } -static void ov59_021D2B90 (UnkStruct_021C0794 * param0, UnkStruct_0202E794 * param1, UnkStruct_0202E768 * param2, int param3, int param4, int param5) +static void ov59_021D2B90 (SaveData * param0, UnkStruct_0202E794 * param1, UnkStruct_0202E768 * param2, int param3, int param4, int param5) { int v0; TrainerInfo * v1 = sub_02025E38(param0); @@ -172,13 +172,13 @@ static void ov59_021D2B90 (UnkStruct_021C0794 * param0, UnkStruct_0202E794 * par } } -UnkStruct_0202E794 * ov59_021D2C28 (UnkStruct_021C0794 * param0, int param1, u32 param2) +UnkStruct_0202E794 * ov59_021D2C28 (SaveData * param0, int param1, u32 param2) { UnkStruct_0202E794 * v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; v0 = Heap_AllocFromHeapAtEnd(param1, param2); - v1 = sub_0202440C(param0); + v1 = SaveData_TVBroadcast(param0); GF_ASSERT(param2 == ov59_021D2B44(param0)); ov59_021D2B90(param0, v0, v1->unk_17C, 4, 1, 3); @@ -186,13 +186,13 @@ UnkStruct_0202E794 * ov59_021D2C28 (UnkStruct_021C0794 * param0, int param1, u32 return v0; } -UnkStruct_0202E794 * ov59_021D2C70 (UnkStruct_021C0794 * param0, int param1, u32 param2) +UnkStruct_0202E794 * ov59_021D2C70 (SaveData * param0, int param1, u32 param2) { UnkStruct_0202E794 * v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; v0 = Heap_AllocFromHeapAtEnd(param1, param2); - v1 = sub_0202440C(param0); + v1 = SaveData_TVBroadcast(param0); GF_ASSERT(param2 == ov59_021D2B4C(param0)); ov59_021D2B90(param0, v0, v1->unk_0C, 4, 1, 4); @@ -200,13 +200,13 @@ UnkStruct_0202E794 * ov59_021D2C70 (UnkStruct_021C0794 * param0, int param1, u32 return v0; } -UnkStruct_0202E794 * ov59_021D2CB4 (UnkStruct_021C0794 * param0, int param1, u32 param2) +UnkStruct_0202E794 * ov59_021D2CB4 (SaveData * param0, int param1, u32 param2) { UnkStruct_0202E794 * v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; v0 = Heap_AllocFromHeapAtEnd(param1, param2); - v1 = sub_0202440C(param0); + v1 = SaveData_TVBroadcast(param0); GF_ASSERT(param2 == ov59_021D2B54(param0)); ov59_021D2B90(param0, v0, v1->unk_C4, 4, 1, 5); @@ -214,13 +214,13 @@ UnkStruct_0202E794 * ov59_021D2CB4 (UnkStruct_021C0794 * param0, int param1, u32 return v0; } -UnkStruct_0202E794 * ov59_021D2CF8 (UnkStruct_021C0794 * param0, int param1, u32 param2) +UnkStruct_0202E794 * ov59_021D2CF8 (SaveData * param0, int param1, u32 param2) { UnkStruct_0202E794 * v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; v0 = Heap_AllocFromHeapAtEnd(param1, param2); - v1 = sub_0202440C(param0); + v1 = SaveData_TVBroadcast(param0); GF_ASSERT(param2 == ov59_021D2B44(param0)); ov59_021D2B90(param0, v0, v1->unk_17C, 4, 0, 0); @@ -228,13 +228,13 @@ UnkStruct_0202E794 * ov59_021D2CF8 (UnkStruct_021C0794 * param0, int param1, u32 return v0; } -UnkStruct_0202E794 * ov59_021D2D3C (UnkStruct_021C0794 * param0, int param1, u32 param2) +UnkStruct_0202E794 * ov59_021D2D3C (SaveData * param0, int param1, u32 param2) { UnkStruct_0202E794 * v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; v0 = Heap_AllocFromHeapAtEnd(param1, param2); - v1 = sub_0202440C(param0); + v1 = SaveData_TVBroadcast(param0); GF_ASSERT(param2 == ov59_021D2B4C(param0)); ov59_021D2B90(param0, v0, v1->unk_0C, 4, 0, 1); @@ -242,13 +242,13 @@ UnkStruct_0202E794 * ov59_021D2D3C (UnkStruct_021C0794 * param0, int param1, u32 return v0; } -UnkStruct_0202E794 * ov59_021D2D80 (UnkStruct_021C0794 * param0, int param1, u32 param2) +UnkStruct_0202E794 * ov59_021D2D80 (SaveData * param0, int param1, u32 param2) { UnkStruct_0202E794 * v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; v0 = Heap_AllocFromHeapAtEnd(param1, param2); - v1 = sub_0202440C(param0); + v1 = SaveData_TVBroadcast(param0); GF_ASSERT(param2 == ov59_021D2B54(param0)); ov59_021D2B90(param0, v0, v1->unk_C4, 4, 0, 2); @@ -342,17 +342,17 @@ static void ov59_021D2E60 (UnkStruct_0202E794 * param0, int param1, int param2, sub_02025C84(27); } -void ov59_021D2F10 (UnkStruct_0202440C * param0, int param1, int param2, const void ** param3, const void ** param4) +void ov59_021D2F10 (TVBroadcast * param0, int param1, int param2, const void ** param3, const void ** param4) { ov59_021D2E60(param0->unk_234, 16, param1, param2, param3, param4, 1); } -void ov59_021D2F38 (UnkStruct_0202440C * param0, int param1, int param2, const void ** param3, const void ** param4) +void ov59_021D2F38 (TVBroadcast * param0, int param1, int param2, const void ** param3, const void ** param4) { ov59_021D2E60(param0->unk_684, 8, param1, param2, param3, param4, 2); } -void ov59_021D2F60 (UnkStruct_0202440C * param0, int param1, int param2, const void ** param3, const void ** param4) +void ov59_021D2F60 (TVBroadcast * param0, int param1, int param2, const void ** param3, const void ** param4) { ov59_021D2E60(param0->unk_8AC, 8, param1, param2, param3, param4, 0); } diff --git a/src/overlay059/ov59_021D2F88.c b/src/overlay059/ov59_021D2F88.c index a2561b3c79..e1a64e1bd5 100644 --- a/src/overlay059/ov59_021D2F88.c +++ b/src/overlay059/ov59_021D2F88.c @@ -12,7 +12,7 @@ #include "overlay096/struct_ov96_0223B450_sub1.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020298BC.h" #include "unk_0202B37C.h" #include "unk_0202D05C.h" @@ -27,15 +27,15 @@ typedef struct { int unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; int unk_08; int unk_0C; const void ** unk_10; const void ** unk_14; } UnkStruct_ov59_021D2FBC; -typedef u32 (* UnkFuncPtr_ov59_021D33FC)(UnkStruct_021C0794 *); -typedef void *(* UnkFuncPtr_ov59_021D33FC_1)(UnkStruct_021C0794 *, int, u32); +typedef u32 (* UnkFuncPtr_ov59_021D33FC)(SaveData *); +typedef void *(* UnkFuncPtr_ov59_021D33FC_1)(SaveData *, int, u32); typedef void (* UnkFuncPtr_ov59_021D33FC_2)(const UnkStruct_ov59_021D2FBC *); typedef struct { @@ -44,13 +44,13 @@ typedef struct { UnkFuncPtr_ov59_021D33FC_2 unk_08; } UnkStruct_ov59_021D33FC; -static u32 ov59_021D2F88 (UnkStruct_021C0794 * param0) +static u32 ov59_021D2F88 (SaveData * param0) { UnkStruct_0202B4A0 * v0 = sub_0202B4A0(param0); return ov59_021D2A2C(v0); } -static void * ov59_021D2F94 (UnkStruct_021C0794 * param0, int param1, u32 param2) +static void * ov59_021D2F94 (SaveData * param0, int param1, u32 param2) { UnkStruct_0202B4A0 * v0 = sub_0202B4A0(param0); void * v1 = Heap_AllocFromHeapAtEnd(param1, param2); @@ -66,13 +66,13 @@ static void ov59_021D2FBC (const UnkStruct_ov59_021D2FBC * param0) ov59_021D2AC4(param0->unk_08, param0->unk_0C, v0, param0->unk_10); } -static u32 ov59_021D2FD4 (UnkStruct_021C0794 * param0) +static u32 ov59_021D2FD4 (SaveData * param0) { UnkStruct_0202A750 * v0 = sub_0202A750(param0); return sub_02029C60(); } -static void * ov59_021D2FE0 (UnkStruct_021C0794 * param0, int param1, u32 param2) +static void * ov59_021D2FE0 (SaveData * param0, int param1, u32 param2) { UnkStruct_02029C68 * v0; UnkStruct_0202A750 * v1 = sub_0202A750(param0); @@ -92,23 +92,23 @@ static void ov59_021D300C (const UnkStruct_ov59_021D2FBC * param0) static void ov59_021D3028 (const UnkStruct_ov59_021D2FBC * param0) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_04); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_04); ov59_021D2F10(v0, param0->unk_08, param0->unk_0C, param0->unk_10, param0->unk_14); } static void ov59_021D3048 (const UnkStruct_ov59_021D2FBC * param0) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_04); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_04); ov59_021D2F38(v0, param0->unk_08, param0->unk_0C, param0->unk_10, param0->unk_14); } static void ov59_021D3068 (const UnkStruct_ov59_021D2FBC * param0) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_04); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_04); ov59_021D2F60(v0, param0->unk_08, param0->unk_0C, param0->unk_10, param0->unk_14); } -static void * ov59_021D3088 (UnkStruct_021C0794 * param0, int param1, u32 param2) +static void * ov59_021D3088 (SaveData * param0, int param1, u32 param2) { return sub_0202E9FC(param0, param1); } @@ -120,7 +120,7 @@ static void ov59_021D3090 (const UnkStruct_ov59_021D2FBC * param0) sub_0202ED0C(param0->unk_04, param0->unk_0C, param0->unk_08, param0->unk_10, param0->unk_00); } -static void * ov59_021D30B4 (UnkStruct_021C0794 * param0, int param1, u32 param2) +static void * ov59_021D30B4 (SaveData * param0, int param1, u32 param2) { UnkStruct_ov96_0223B450_sub1 * v0; @@ -149,7 +149,7 @@ static const UnkStruct_ov59_021D33FC Unk_ov59_021D33FC[] = { {(UnkFuncPtr_ov59_021D33FC)ov59_021D2B44, (UnkFuncPtr_ov59_021D33FC_1)ov59_021D2CF8, ov59_021D3068} }; -void ov59_021D30E0 (UnkStruct_021C0794 * param0, UnkStruct_ov59_021D30E0 * param1) +void ov59_021D30E0 (SaveData * param0, UnkStruct_ov59_021D30E0 * param1) { u32 v0; void * v1; @@ -174,7 +174,7 @@ void ov59_021D30E0 (UnkStruct_021C0794 * param0, UnkStruct_ov59_021D30E0 * param } } -void ov59_021D313C (UnkStruct_021C0794 * param0, const UnkStruct_ov59_021D30E0 * param1) +void ov59_021D313C (SaveData * param0, const UnkStruct_ov59_021D30E0 * param1) { UnkStruct_ov59_021D2FBC v0; u32 v1; @@ -243,7 +243,7 @@ void ov59_021D313C (UnkStruct_021C0794 * param0, const UnkStruct_ov59_021D30E0 * } { - UnkStruct_0202440C * v10 = sub_0202440C(param0); + TVBroadcast * v10 = SaveData_TVBroadcast(param0); sub_0202E2EC(v10); sub_0202E35C(v10); } diff --git a/src/overlay061/ov61_0222AE60.c b/src/overlay061/ov61_0222AE60.c index 6e3f04cee9..ddadbd9430 100644 --- a/src/overlay061/ov61_0222AE60.c +++ b/src/overlay061/ov61_0222AE60.c @@ -19,7 +19,7 @@ #include "unk_020797C8.h" #include "overlay061/ov61_0222AE60.h" -void ov61_0222AE60 (UnkStruct_021C0794 * param0, const UnkStruct_02029C68 * param1, UnkStruct_ov61_0222AE80 * param2) +void ov61_0222AE60 (SaveData * param0, const UnkStruct_02029C68 * param1, UnkStruct_ov61_0222AE80 * param2) { sub_0202A75C(param1, param2); param2->unk_5C.unk_00 = sub_0202486C(param0, param2, sizeof(UnkStruct_ov61_0222AE80) - (sizeof(UnkStruct_ov62_02239DA4_sub1))); @@ -30,7 +30,7 @@ void ov61_0222AE80 (const UnkStruct_ov61_0222AE80 * param0, UnkStruct_02029C68 * sub_0202A824(param0, param1); } -void ov61_0222AE88 (UnkStruct_021C0794 * param0, const UnkStruct_020797DC * param1, int param2, UnkStruct_ov62_02239DA4 * param3, int param4) +void ov61_0222AE88 (SaveData * param0, const PCBoxes * param1, int param2, UnkStruct_ov62_02239DA4 * param3, int param4) { Strbuf* v0; int v1; @@ -59,13 +59,13 @@ void ov61_0222AE88 (UnkStruct_021C0794 * param0, const UnkStruct_020797DC * para param3->unk_198.unk_00 = sub_0202486C(param0, param3, sizeof(UnkStruct_ov62_02239DA4) - (sizeof(UnkStruct_ov62_02239DA4_sub1))); } -void ov61_0222AF88 (UnkStruct_021C0794 * param0, UnkStruct_ov62_02239DA4 * param1, int param2) +void ov61_0222AF88 (SaveData * param0, UnkStruct_ov62_02239DA4 * param1, int param2) { param1->unk_177 = param2; param1->unk_198.unk_00 = sub_0202486C(param0, param1, sizeof(UnkStruct_ov62_02239DA4) - (sizeof(UnkStruct_ov62_02239DA4_sub1))); } -void ov61_0222AFA4 (UnkStruct_021C0794 * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFC0 * param2) +void ov61_0222AFA4 (SaveData * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFC0 * param2) { GF_ASSERT(sizeof(UnkStruct_ov61_0222AFC0) == sizeof(UnkStruct_02030A80)); MI_CpuClear8(param2, sizeof(UnkStruct_ov61_0222AFC0)); @@ -78,7 +78,7 @@ void ov61_0222AFC0 (const UnkStruct_ov61_0222AFC0 * param0, UnkStruct_02030A80 * MI_CpuCopy8(param0, param1, sizeof(UnkStruct_ov61_0222AFC0)); } -void ov61_0222AFCC (UnkStruct_021C0794 * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFCC * param2) +void ov61_0222AFCC (SaveData * param0, const UnkStruct_02030A80 * param1, UnkStruct_ov61_0222AFCC * param2) { MI_CpuClear8(param2, sizeof(UnkStruct_ov61_0222AFCC)); diff --git a/src/overlay061/ov61_0222B008.c b/src/overlay061/ov61_0222B008.c index dd42a557ae..386435b85f 100644 --- a/src/overlay061/ov61_0222B008.c +++ b/src/overlay061/ov61_0222B008.c @@ -191,7 +191,7 @@ int ov61_0222B1FC (UnkStruct_ov62_022349A8 * param0, int param1) return 1; } -int ov61_0222B224 (UnkStruct_ov62_022349A8 * param0, int param1, UnkStruct_02030A80 * param2, const UnkStruct_020797DC * param3, int param4) +int ov61_0222B224 (UnkStruct_ov62_022349A8 * param0, int param1, UnkStruct_02030A80 * param2, const PCBoxes * param3, int param4) { if (ov61_0222BBBC(param0) == 0) { return 0; @@ -261,7 +261,7 @@ int ov61_0222B338 (UnkStruct_ov62_022349A8 * param0, UnkStruct_02030A80 * param1 return 0; } - GF_ASSERT((sub_0202F1D4() - sizeof(u32)) == sizeof(UnkStruct_ov62_022349A8_sub3_sub3)); + GF_ASSERT((BattleRecording_SaveSize() - sizeof(u32)) == sizeof(UnkStruct_ov62_022349A8_sub3_sub3)); GF_ASSERT(sizeof(UnkStruct_ov61_0222AFC0) == sizeof(UnkStruct_02030A80)); param0->unk_190.unk_00_val4 = (UnkStruct_ov62_022349A8_sub3_sub3 *)sub_0202F27C(); diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index 6761cb7846..ef4d89f6e6 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -43,7 +43,7 @@ #include "unk_02022594.h" #include "strbuf.h" #include "unk_02023FCC.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02030A80.h" #include "pokemon.h" #include "unk_020797C8.h" @@ -65,7 +65,7 @@ typedef struct { } UnkStruct_ov62_02239DBC_sub1; typedef struct { - UnkStruct_020797DC * unk_00; + PCBoxes * unk_00; UnkStruct_ov62_02239DA4 unk_04; int unk_1A0; int unk_1A4; @@ -102,7 +102,7 @@ static void ov62_02239F98(u32 param0, u32 param1, void * param2); static void ov62_0223A0AC(UnkStruct_0208C06C * param0); static void ov62_0223A110(UnkStruct_0208C06C * param0); static void ov62_0223A138(UnkStruct_ov62_02239DBC * param0); -static void ov62_0223A154(UnkStruct_021C0794 * param0, const UnkStruct_020797DC * param1, int param2, UnkStruct_ov62_02239DA4 * param3); +static void ov62_0223A154(SaveData * param0, const PCBoxes * param1, int param2, UnkStruct_ov62_02239DA4 * param3); static BOOL ov62_0223A17C(UnkStruct_0208C06C * param0); static BOOL ov62_0223A2A8(UnkStruct_0208C06C * param0); static BOOL ov62_0223A394(UnkStruct_0208C06C * param0); @@ -446,7 +446,7 @@ static void ov62_0223A138 (UnkStruct_ov62_02239DBC * param0) } } -static void ov62_0223A154 (UnkStruct_021C0794 * param0, const UnkStruct_020797DC * param1, int param2, UnkStruct_ov62_02239DA4 * param3) +static void ov62_0223A154 (SaveData * param0, const PCBoxes * param1, int param2, UnkStruct_ov62_02239DA4 * param3) { memset(param3, 0, sizeof(UnkStruct_ov62_02239DA4)); ov61_0222AE88(param0, param1, param2, param3, 102); @@ -465,7 +465,7 @@ static BOOL ov62_0223A17C (UnkStruct_0208C06C * param0) sub_02019EBC(param0->unk_14.unk_10, 6); sub_02019EBC(param0->unk_14.unk_10, 7); - v0->unk_00 = sub_02024420(param0->unk_830); + v0->unk_00 = SaveData_PCBoxes(param0->unk_830); ov62_0223A154(param0->unk_830, v0->unk_00, v0->unk_1A0, &v0->unk_04); ov62_0223A138(v0); ov62_022315C8(&v0->unk_1A4, &v0->unk_1A8, 0); @@ -1237,7 +1237,7 @@ static void ov62_0223B158 (UnkStruct_0208C06C * param0) UnkStruct_ov62_02239DBC * v0 = param0->unk_860; { - UnkStruct_020797DC * v1 = sub_02024420(param0->unk_830); + PCBoxes * v1 = SaveData_PCBoxes(param0->unk_830); if ((v0->unk_04.unk_176 >= 16) && (v0->unk_04.unk_176 < (16 + 8))) { v0->unk_04.unk_176 = 0; @@ -1269,7 +1269,7 @@ static void ov62_0223B230 (UnkStruct_0208C06C * param0) UnkStruct_ov62_02239DBC * v0 = param0->unk_860; { - UnkStruct_020797DC * v1 = sub_02024420(param0->unk_830); + PCBoxes * v1 = SaveData_PCBoxes(param0->unk_830); if ((v0->unk_04.unk_176 >= 16) && (v0->unk_04.unk_176 < (16 + 8))) { v0->unk_04.unk_176 = 0; diff --git a/src/overlay062/ov62_02248408.c b/src/overlay062/ov62_02248408.c index 24872b1f0e..80888968ef 100644 --- a/src/overlay062/ov62_02248408.c +++ b/src/overlay062/ov62_02248408.c @@ -15,7 +15,7 @@ #include "unk_02017728.h" #include "heap.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_0202F1D4.h" #include "pokemon.h" @@ -24,9 +24,9 @@ static void ov62_0224856C(Strbuf *param0, int param1); -extern UnkStruct_0202F264 * Unk_021C07A4; +extern BattleRecording * Unk_021C07A4; -void ov62_02248408 (UnkStruct_0202F264 * param0, BattleParams * param1, int param2) +void ov62_02248408 (BattleRecording * param0, BattleParams * param1, int param2) { UnkStruct_0202F298 * v0 = ¶m0->unk_E8; UnkStruct_0202F41C * v1 = ¶m0->unk_84; @@ -105,7 +105,7 @@ static void ov62_0224856C (Strbuf *param0, int param1) MessageLoader_Free(v0); } -int ov62_02248598 (UnkStruct_021C0794 * param0, int param1, u8 param2, u16 * param3, u16 * param4) +int ov62_02248598 (SaveData * param0, int param1, u8 param2, u16 * param3, u16 * param4) { int v0; @@ -131,13 +131,13 @@ int ov62_02248598 (UnkStruct_021C0794 * param0, int param1, u8 param2, u16 * par return 0; } -void ov62_02248624 (UnkStruct_021C0794 * param0) +void ov62_02248624 (SaveData * param0) { GF_ASSERT(Unk_021C07A4); sub_0202F858(&Unk_021C07A4->unk_E8, sizeof(UnkStruct_0202F298) - (sizeof(UnkStruct_0202F298_sub1)), Unk_021C07A4->unk_E8.unk_1BEC.unk_00 + ((Unk_021C07A4->unk_E8.unk_1BEC.unk_00 ^ 0xffff) << 16)); } -int ov62_02248658 (UnkStruct_021C0794 * param0, u64 param1, u16 * param2, u16 * param3) +int ov62_02248658 (SaveData * param0, u64 param1, u16 * param2, u16 * param3) { int v0; @@ -156,7 +156,7 @@ int ov62_02248658 (UnkStruct_021C0794 * param0, u64 param1, u16 * param2, u16 * return 0; } -int ov62_022486A4 (UnkStruct_021C0794 * param0, int param1) +int ov62_022486A4 (SaveData * param0, int param1) { int v0; @@ -169,7 +169,7 @@ int ov62_022486A4 (UnkStruct_021C0794 * param0, int param1) sub_0202F858(&Unk_021C07A4->unk_E8, sizeof(UnkStruct_0202F298) - (sizeof(UnkStruct_0202F298_sub1)), Unk_021C07A4->unk_E8.unk_1BEC.unk_00 + ((Unk_021C07A4->unk_E8.unk_1BEC.unk_00 ^ 0xffff) << 16)); sub_02017DE0(8); - v0 = sub_0202447C(param0, Unk_021C07A4, param1); + v0 = SaveData_SaveBattleRecording(param0, Unk_021C07A4, param1); if (v0 == 2) { v0 = sub_020246E0(param0); diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index 23816d5aa9..22a818128c 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -128,7 +128,7 @@ typedef struct { } UnkStruct_ov64_022301B4; typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u8 unk_04; u8 unk_05; u8 unk_06; @@ -288,9 +288,9 @@ static void ov64_0222E71C(UnkStruct_ov64_0222E21C * param0); static void ov64_0222E738(UnkStruct_ov64_0222E21C * param0, u32 param1); static void ov64_0222E7C8(UnkStruct_ov64_0222E21C * param0); static void ov64_0222E7F8(UnkStruct_ov64_0222E21C * param0, u64 param1); -static void ov64_0222E880(UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 * param1, u32 param2, u32 param3); -static void ov64_0222E8C0(UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 * param1, u32 param2, u32 param3); -static BOOL ov64_0222E8FC(UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 * param1, u32 param2); +static void ov64_0222E880(UnkStruct_ov64_0222E21C * param0, SaveData * param1, u32 param2, u32 param3); +static void ov64_0222E8C0(UnkStruct_ov64_0222E21C * param0, SaveData * param1, u32 param2, u32 param3); +static BOOL ov64_0222E8FC(UnkStruct_ov64_0222E21C * param0, SaveData * param1, u32 param2); static void ov64_0222E970(UnkStruct_ov64_0222E21C * param0, u32 param1); static void ov64_0222E990(UnkStruct_ov64_0222E21C * param0, u32 param1); static void ov64_0222E9A4(UnkStruct_ov64_0222E21C * param0, u32 param1); @@ -1155,7 +1155,7 @@ static void ov64_0222E7F8 (UnkStruct_ov64_0222E21C * param0, u64 param1) sub_0200B60C(param0->unk_214, 3, v0, 4, 2, 1); } -static void ov64_0222E880 (UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 * param1, u32 param2, u32 param3) +static void ov64_0222E880 (UnkStruct_ov64_0222E21C * param0, SaveData * param1, u32 param2, u32 param3) { UnkStruct_0202B370 * v0; TrainerInfo * v1; @@ -1168,7 +1168,7 @@ static void ov64_0222E880 (UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 Heap_FreeToHeap(v1); } -static void ov64_0222E8C0 (UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 * param1, u32 param2, u32 param3) +static void ov64_0222E8C0 (UnkStruct_ov64_0222E21C * param0, SaveData * param1, u32 param2, u32 param3) { TrainerInfo * v0 = TrainerInfo_New(param3); UnkStruct_0202B370 * v1 = sub_0202B370(param1); @@ -1178,7 +1178,7 @@ static void ov64_0222E8C0 (UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 Heap_FreeToHeap(v0); } -static BOOL ov64_0222E8FC (UnkStruct_ov64_0222E21C * param0, UnkStruct_021C0794 * param1, u32 param2) +static BOOL ov64_0222E8FC (UnkStruct_ov64_0222E21C * param0, SaveData * param1, u32 param2) { UnkStruct_0202B370 * v0 = sub_0202B370(param1); u32 v1; diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index b237fae6a5..4d8b7c7045 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -1748,8 +1748,8 @@ static int ov65_0222F304 (UnkStruct_ov65_0222EBE0 * param0, int param1) sub_0201A8FC(¶m0->unk_360); if (v1 == 0) { - sub_0202ACE8(param0->unk_00); - sub_02030CEC(sub_020245BC(param0->unk_160, 35)); + WiFiList_Init(param0->unk_00); + Email_Init(SaveData_Get(param0->unk_160, 35)); sub_02030764(sub_0203068C(param0->unk_160)); param0->unk_3A8 = 14; param0->unk_04 = sub_0203871C(param0->unk_160, sizeof(UnkStruct_0207DFAC)); diff --git a/src/overlay066/ov66_0222DCE0.c b/src/overlay066/ov66_0222DCE0.c index b0d4fafab0..68d08e5684 100644 --- a/src/overlay066/ov66_0222DCE0.c +++ b/src/overlay066/ov66_0222DCE0.c @@ -23,7 +23,7 @@ FS_EXTERN_OVERLAY(overlay63); typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_ov66_0222DFF8 * unk_04; UnkStruct_ov66_02230C90 * unk_08; UnkStruct_0201CD38 * unk_0C; diff --git a/src/overlay066/ov66_0222DDF0.c b/src/overlay066/ov66_0222DDF0.c index a36278b2be..721719a4a6 100644 --- a/src/overlay066/ov66_0222DDF0.c +++ b/src/overlay066/ov66_0222DDF0.c @@ -215,7 +215,7 @@ typedef struct { u8 unk_41; u8 unk_42; u8 unk_43; - const UnkStruct_021C0794 * unk_44; + const SaveData * unk_44; u16 unk_48; u16 unk_4A; } UnkStruct_ov66_02230A6C; @@ -231,7 +231,7 @@ typedef struct { } UnkStruct_ov66_0222DFF8_sub3; typedef struct UnkStruct_ov66_0222DFF8_t { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_ov66_0222DFF8_sub1 unk_04; UnkStruct_ov66_0222FA80 unk_F8; UnkStruct_ov66_0222F6C4 unk_108; @@ -272,10 +272,10 @@ static void ov66_0222F4C8(PPW_LOBBY_TIME_EVENT param0, void * param1); static void ov66_0222F684(const void * param0, u32 param1, void * param2); static void ov66_0222F6C4(UnkStruct_ov66_0222F6C4 * param0, UnkStruct_ov66_02231560 * param1); static void ov66_0222F768(UnkStruct_ov66_0222DFF8 * param0); -static void ov66_0222F7C8(UnkStruct_ov66_0222F6C4 * param0, UnkStruct_021C0794 * param1, u32 param2); +static void ov66_0222F7C8(UnkStruct_ov66_0222F6C4 * param0, SaveData * param1, u32 param2); static void ov66_0222F964(UnkStruct_ov66_0222DFF8 * param0); -static void ov66_0222F9EC(UnkStruct_ov66_0222F6C4 * param0, const UnkStruct_021C0794 * param1); -static BOOL ov66_0222FA04(const UnkStruct_ov66_0222F6C4 * param0, const UnkStruct_021C0794 * param1); +static void ov66_0222F9EC(UnkStruct_ov66_0222F6C4 * param0, const SaveData * param1); +static BOOL ov66_0222FA04(const UnkStruct_ov66_0222F6C4 * param0, const SaveData * param1); static void ov66_0222FA28(UnkStruct_ov66_0222F6C4 * param0, const UnkStruct_ov66_0222E71C * param1, u32 param2); static void ov66_0222FA80(UnkStruct_ov66_0222FA80 * param0); static void ov66_0222FA88(UnkStruct_ov66_0222FB64 * param0, UnkStruct_ov66_0222FA80 * param1, UnkStruct_ov66_022302B0 * param2, UnkStruct_ov66_022309A4 * param3); @@ -355,7 +355,7 @@ static void ov66_022309B4(UnkStruct_ov66_022309A4 * param0); static void ov66_022309C8(UnkStruct_ov66_022309A4 * param0); static u32 ov66_02230A64(const UnkStruct_ov66_022309A4 * param0); static int ov66_02230A68(const UnkStruct_ov66_022309A4 * param0); -static void ov66_02230A6C(UnkStruct_ov66_02230A6C * param0, const UnkStruct_021C0794 * param1); +static void ov66_02230A6C(UnkStruct_ov66_02230A6C * param0, const SaveData * param1); static void ov66_02230A9C(UnkStruct_ov66_02230A6C * param0, int param1, s32 param2); static BOOL ov66_02230AF8(UnkStruct_ov66_02230A6C * param0, s32 param1, s32 param2); static int ov66_02230B28(UnkStruct_ov66_02230A6C * param0); @@ -417,7 +417,7 @@ static const UnkStruct_ov66_022589B4 Unk_ov66_022589B4[8] = { {ov66_022307B4, sizeof(u32)} }; -UnkStruct_ov66_0222DFF8 * ov66_0222DDF0 (UnkStruct_021C0794 * param0, u32 param1) +UnkStruct_ov66_0222DFF8 * ov66_0222DDF0 (SaveData * param0, u32 param1) { UnkStruct_ov66_0222DFF8 * v0; @@ -607,7 +607,7 @@ BOOL ov66_0222E09C (UnkStruct_ov66_0222DFF8 * param0, u32 param1) return 0; } -UnkStruct_021C0794 * ov66_0222E0C4 (UnkStruct_ov66_0222DFF8 * param0) +SaveData * ov66_0222E0C4 (UnkStruct_ov66_0222DFF8 * param0) { return param0->unk_00; } @@ -2311,7 +2311,7 @@ static void ov66_0222F768 (UnkStruct_ov66_0222DFF8 * param0) } } -static void ov66_0222F7C8 (UnkStruct_ov66_0222F6C4 * param0, UnkStruct_021C0794 * param1, u32 param2) +static void ov66_0222F7C8 (UnkStruct_ov66_0222F6C4 * param0, SaveData * param1, u32 param2) { TrainerInfo * v0; Party * v1; @@ -2416,12 +2416,12 @@ static void ov66_0222F964 (UnkStruct_ov66_0222DFF8 * param0) ov66_0222F9EC(¶m0->unk_108, param0->unk_00); } -static void ov66_0222F9EC (UnkStruct_ov66_0222F6C4 * param0, const UnkStruct_021C0794 * param1) +static void ov66_0222F9EC (UnkStruct_ov66_0222F6C4 * param0, const SaveData * param1) { param0->unk_B4 = sub_0202486C(param1, ¶m0->unk_20, sizeof(UnkStruct_ov66_0222E71C)); } -static BOOL ov66_0222FA04 (const UnkStruct_ov66_0222F6C4 * param0, const UnkStruct_021C0794 * param1) +static BOOL ov66_0222FA04 (const UnkStruct_ov66_0222F6C4 * param0, const SaveData * param1) { u32 v0; @@ -3607,7 +3607,7 @@ static int ov66_02230A68 (const UnkStruct_ov66_022309A4 * param0) return param0->unk_14; } -static void ov66_02230A6C (UnkStruct_ov66_02230A6C * param0, const UnkStruct_021C0794 * param1) +static void ov66_02230A6C (UnkStruct_ov66_02230A6C * param0, const SaveData * param1) { int v0; diff --git a/src/overlay066/ov66_02230C44.c b/src/overlay066/ov66_02230C44.c index 6d174a4ab1..79e208b14e 100644 --- a/src/overlay066/ov66_02230C44.c +++ b/src/overlay066/ov66_02230C44.c @@ -58,7 +58,7 @@ typedef struct UnkStruct_ov66_02230C90_t { u8 unk_39; u16 unk_3A; UnkStruct_ov66_0222DFF8 * unk_3C; - UnkStruct_021C0794 * unk_40; + SaveData * unk_40; UnkStruct_ov66_0222DCE0_sub1 * unk_44; } UnkStruct_ov66_02230C90; @@ -115,7 +115,7 @@ static void ov66_022313E8(UnkStruct_ov66_02230E4C * param0); static void ov66_022313F4(UnkStruct_ov66_02230C90 * param0, UnkStruct_ov66_02230E4C * param1); static int ov66_02231404(UnkStruct_ov66_02230C90 * param0, UnkStruct_ov66_02230E4C * param1); -UnkStruct_ov66_02230C90 * ov66_02230C44 (BOOL param0, UnkStruct_021C0794 * param1, UnkStruct_ov66_0222DCE0_sub1 * param2, UnkStruct_ov66_0222DFF8 * param3, u32 param4) +UnkStruct_ov66_02230C90 * ov66_02230C44 (BOOL param0, SaveData * param1, UnkStruct_ov66_0222DCE0_sub1 * param2, UnkStruct_ov66_0222DFF8 * param3, u32 param4) { UnkStruct_ov66_02230C90 * v0; diff --git a/src/overlay066/ov66_022324F0.c b/src/overlay066/ov66_022324F0.c index 4adee0446b..82177e09c4 100644 --- a/src/overlay066/ov66_022324F0.c +++ b/src/overlay066/ov66_022324F0.c @@ -56,7 +56,7 @@ typedef struct { } UnkStruct_ov66_0223439C; typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; UnkStruct_0202B370 * unk_04; UnkStruct_0202C878 * unk_08; UnkStruct_ov66_022324F0 unk_0C; @@ -152,7 +152,7 @@ static const char * Unk_ov66_02258DF0[1] = { static UnkStruct_ov66_022336C4 * Unk_ov66_0225B6C0 = NULL; -void ov66_022324F0 (u32 param0, UnkStruct_021C0794 * param1, u32 param2, const UnkStruct_ov66_022324F0 * param3, void * param4) +void ov66_022324F0 (u32 param0, SaveData * param1, u32 param2, const UnkStruct_ov66_022324F0 * param3, void * param4) { GF_ASSERT(Unk_ov66_0225B6C0 == NULL); GF_ASSERT(param2 < PPW_LOBBY_MAX_BINARY_SIZE); diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index 8e981978ef..b627a14acd 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -66,7 +66,7 @@ typedef struct { } UnkStruct_ov67_0225D210; typedef struct { - UnkStruct_021C0794 * unk_00; + SaveData * unk_00; u32 unk_04; u32 unk_08; UnkStruct_02018340 * unk_0C; @@ -82,7 +82,7 @@ static void ov67_0225CE28(void * param0); static void ov67_0225CE30(UnkStruct_ov67_0225D154 * param0, u32 param1); static void ov67_0225D154(UnkStruct_ov67_0225D154 * param0); static void ov67_0225D17C(UnkStruct_ov67_0225D154 * param0); -static void ov67_0225D188(UnkStruct_ov67_0225D210 * param0, UnkStruct_02018340 * param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, UnkStruct_021C0794 * param9, u32 param10); +static void ov67_0225D188(UnkStruct_ov67_0225D210 * param0, UnkStruct_02018340 * param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, SaveData * param9, u32 param10); static void ov67_0225D210(UnkStruct_ov67_0225D210 * param0, u32 param1); static void ov67_0225D294(UnkStruct_ov67_0225D210 * param0); static void ov67_0225D2EC(UnkStruct_ov67_0225D210 * param0); @@ -643,7 +643,7 @@ static void ov67_0225D17C (UnkStruct_ov67_0225D154 * param0) sub_0201C2B8(param0->unk_0C); } -static void ov67_0225D188 (UnkStruct_ov67_0225D210 * param0, UnkStruct_02018340 * param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, UnkStruct_021C0794 * param9, u32 param10) +static void ov67_0225D188 (UnkStruct_ov67_0225D210 * param0, UnkStruct_02018340 * param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, SaveData * param9, u32 param10) { param0->unk_00 = sub_0200B358(param10); param0->unk_04 = MessageLoader_Init(0, 26, param3, param10); diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index b0f139172c..4b46489d1e 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -142,7 +142,7 @@ typedef struct { } UnkStruct_ov68_0225C700; static void ov68_0225C914(void * param0); -static void ov68_0225C91C(UnkStruct_ov68_0225C91C * param0, UnkStruct_021C0794 * param1, u32 param2); +static void ov68_0225C91C(UnkStruct_ov68_0225C91C * param0, SaveData * param1, u32 param2); static void ov68_0225C960(UnkStruct_ov68_0225C91C * param0); static void ov68_0225C980(UnkStruct_ov68_0225C91C * param0); static void ov68_0225C98C(UnkStruct_ov68_0225C91C * param0); @@ -183,7 +183,7 @@ static void ov68_0225D8F0(UnkStruct_ov68_0225D388 * param0, const UnkStruct_ov68 static void ov68_0225DA30(UnkStruct_ov68_0225D388 * param0, const UnkStruct_ov68_0225DC74 * param1, UnkStruct_ov68_0225C91C * param2, u32 param3); static BOOL ov68_0225DA74(UnkStruct_ov68_0225D388 * param0, UnkStruct_ov68_0225C91C * param1); static void ov68_0225DB3C(UnkStruct_ov68_0225D388 * param0, UnkStruct_ov68_0225CB70 * param1, UnkStruct_ov68_0225C91C * param2, u32 param3); -static void ov68_0225D128(UnkStruct_ov68_0225D128 * param0, UnkStruct_ov68_0225C91C * param1, UnkStruct_021C0794 * param2, u32 param3); +static void ov68_0225D128(UnkStruct_ov68_0225D128 * param0, UnkStruct_ov68_0225C91C * param1, SaveData * param2, u32 param3); static void ov68_0225D178(UnkStruct_ov68_0225D128 * param0, u32 param1); static void ov68_0225D1B4(UnkStruct_ov68_0225D128 * param0, const Strbuf *param1); static void ov68_0225D218(UnkStruct_ov68_0225D128 * param0, const Strbuf *param1); @@ -451,7 +451,7 @@ static void ov68_0225C914 (void * param0) ov68_0225C98C(&v0->unk_00); } -static void ov68_0225C91C (UnkStruct_ov68_0225C91C * param0, UnkStruct_021C0794 * param1, u32 param2) +static void ov68_0225C91C (UnkStruct_ov68_0225C91C * param0, SaveData * param1, u32 param2) { UnkStruct_020279FC * v0; @@ -913,7 +913,7 @@ static void ov68_0225D11C (UnkStruct_ov68_0225D0F8 * param0) sub_02021CC8(param0->unk_14, 1); } -static void ov68_0225D128 (UnkStruct_ov68_0225D128 * param0, UnkStruct_ov68_0225C91C * param1, UnkStruct_021C0794 * param2, u32 param3) +static void ov68_0225D128 (UnkStruct_ov68_0225D128 * param0, UnkStruct_ov68_0225C91C * param1, SaveData * param2, u32 param3) { sub_0201A7E8(param1->unk_00, ¶m0->unk_08, 1, 2, 19, 27, 4, 4, ((((1 + (18 + 12))) + 9))); sub_0201ADA4(¶m0->unk_08, 15); diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 7887527fa7..a9a8a1d580 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -342,7 +342,7 @@ static void ov69_0225DC54(UnkStruct_ov69_0225DC48 * param0); static int ov69_0225DD10(const UnkStruct_ov69_0225DC48 * param0, u32 param1); static void ov69_0225DD2C(UnkStruct_ov69_0225DC48 * param0); static void ov69_0225DD44(UnkStruct_ov69_0225DC48 * param0); -static void ov69_0225DD60(UnkStruct_ov69_0225DDC8 * param0, UnkStruct_ov69_0225D35C * param1, UnkStruct_ov69_0225EF54 * param2, UnkStruct_021C0794 * param3, u32 param4); +static void ov69_0225DD60(UnkStruct_ov69_0225DDC8 * param0, UnkStruct_ov69_0225D35C * param1, UnkStruct_ov69_0225EF54 * param2, SaveData * param3, u32 param4); static void ov69_0225DDC8(UnkStruct_ov69_0225DDC8 * param0); static void ov69_0225DDFC(UnkStruct_ov69_0225DDC8 * param0); static u32 ov69_0225DE40(UnkStruct_ov69_0225DDC8 * param0); @@ -1957,7 +1957,7 @@ static void ov69_0225DD44 (UnkStruct_ov69_0225DC48 * param0) sub_0200DC48(¶m0->unk_1C, 0, ((1 + (18 + 12))), 0); } -static void ov69_0225DD60 (UnkStruct_ov69_0225DDC8 * param0, UnkStruct_ov69_0225D35C * param1, UnkStruct_ov69_0225EF54 * param2, UnkStruct_021C0794 * param3, u32 param4) +static void ov69_0225DD60 (UnkStruct_ov69_0225DDC8 * param0, UnkStruct_ov69_0225D35C * param1, UnkStruct_ov69_0225EF54 * param2, SaveData * param3, u32 param4) { memset(param0, 0, sizeof(UnkStruct_ov69_0225DC48)); diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index caf6970621..0d2dbe7d8e 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -252,7 +252,7 @@ typedef struct UnkStruct_ov70_0225DEE8_t { } UnkStruct_ov70_0225DEE8; static void ov70_0225E4C8(void * param0); -static void ov70_0225E4EC(UnkStruct_ov70_0225E4EC * param0, UnkStruct_021C0794 * param1, u32 param2); +static void ov70_0225E4EC(UnkStruct_ov70_0225E4EC * param0, SaveData * param1, u32 param2); static void ov70_0225E6C0(UnkStruct_ov70_0225E4EC * param0); static void ov70_0225E6D0(UnkStruct_ov70_0225E4EC * param0); static void ov70_0225E740(UnkStruct_ov70_0225E4EC * param0); @@ -260,7 +260,7 @@ static void ov70_0225E754(void); static void ov70_0225E88C(UnkStruct_ov70_0225DEE8 * param0); static void ov70_0225E92C(UnkStruct_ov70_0225DEE8 * param0); static void ov70_0225E970(UnkStruct_ov70_0225DEE8 * param0); -static void ov70_0225E9C8(UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, UnkStruct_021C0794 * param2, u32 param3); +static void ov70_0225E9C8(UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, SaveData * param2, u32 param3); static void ov70_0225EA14(UnkStruct_ov70_0225E9C8 * param0); static void ov70_0225EA44(UnkStruct_ov70_0225E9C8 * param0, const Strbuf *param1); static void ov70_0225EAA4(UnkStruct_ov70_0225E9C8 * param0, const Strbuf *param1); @@ -270,7 +270,7 @@ static void ov70_0225EB38(UnkStruct_ov70_0225E9C8 * param0); static BOOL ov70_0225EB4C(const UnkStruct_ov70_0225E9C8 * param0); static BOOL ov70_0225EB5C(const UnkStruct_ov70_0225E9C8 * param0); static void ov70_0225EB74(UnkStruct_ov70_0225E9C8 * param0); -static void ov70_0225EBA8(UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, UnkStruct_021C0794 * param2, u32 param3); +static void ov70_0225EBA8(UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, SaveData * param2, u32 param3); static void ov70_0225EBBC(UnkStruct_ov70_0225E9C8 * param0); static void ov70_0225EBC4(UnkStruct_ov70_0225E9C8 * param0, const Strbuf *param1); static void ov70_0225EC20(UnkStruct_ov70_0225EC20 * param0, UnkStruct_ov70_0225E4EC * param1, u32 param2); @@ -1286,7 +1286,7 @@ static void ov70_0225E4C8 (void * param0) ov70_0225E740(&v0->unk_3C); } -static void ov70_0225E4EC (UnkStruct_ov70_0225E4EC * param0, UnkStruct_021C0794 * param1, u32 param2) +static void ov70_0225E4EC (UnkStruct_ov70_0225E4EC * param0, SaveData * param1, u32 param2) { G2_BlendNone(); G2S_BlendNone(); @@ -1541,7 +1541,7 @@ static void ov70_0225E970 (UnkStruct_ov70_0225DEE8 * param0) } } -static void ov70_0225E9C8 (UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, UnkStruct_021C0794 * param2, u32 param3) +static void ov70_0225E9C8 (UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, SaveData * param2, u32 param3) { sub_0201A7E8(param1->unk_00, ¶m0->unk_00, Unk_ov70_0226D5CC[0], 2, 19, 27, 4, 4, ((((1 + (18 + 12)) + ((18 + 12) + 24)) + 9))); sub_0201ADA4(¶m0->unk_00, 15); @@ -1647,7 +1647,7 @@ static void ov70_0225EB74 (UnkStruct_ov70_0225E9C8 * param0) sub_0201AD10(¶m0->unk_00); } -static void ov70_0225EBA8 (UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, UnkStruct_021C0794 * param2, u32 param3) +static void ov70_0225EBA8 (UnkStruct_ov70_0225E9C8 * param0, UnkStruct_ov70_0225E4EC * param1, SaveData * param2, u32 param3) { ov70_0225E9C8(param0, param1, param2, param3); sub_0201C2B4(¶m0->unk_00, 2); diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index 70df7f872e..05e50d4878 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -147,11 +147,11 @@ int ov72_0223D7A0 (UnkStruct_020067E8 * param0, int * param1) sub_0200F174(0, 1, 1, 0x0, 16, 1, 39); { - UnkStruct_021C0794 * v2 = (UnkStruct_021C0794 *)sub_02006840(param0); + SaveData * v2 = (SaveData *)sub_02006840(param0); v0->unk_5BFC = (u8 *)sub_0202C840(sub_0202C834(v2)); - v0->unk_08 = (UnkStruct_0202CD88 *)sub_0202CD88((UnkStruct_021C0794 *)sub_02006840(param0)); - v0->unk_0C = (UnkStruct_020279FC *)sub_02025E44((UnkStruct_021C0794 *)sub_02006840(param0)); + v0->unk_08 = (UnkStruct_0202CD88 *)sub_0202CD88((SaveData *)sub_02006840(param0)); + v0->unk_0C = (UnkStruct_020279FC *)sub_02025E44((SaveData *)sub_02006840(param0)); } ov72_0223DCA8(v0, v1); diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index 8409a6bcac..6381eb3a4e 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -67,7 +67,7 @@ FS_EXTERN_OVERLAY(overlay57); typedef struct { int unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_020279FC * unk_08; int unk_0C; int unk_10; diff --git a/src/overlay081/ov81_021D0D80.c b/src/overlay081/ov81_021D0D80.c index 8fb192e9c4..d95719c9c8 100644 --- a/src/overlay081/ov81_021D0D80.c +++ b/src/overlay081/ov81_021D0D80.c @@ -70,7 +70,7 @@ static const u8 Unk_ov81_021D33E8[9][32] = { int ov81_021D0D80 (UnkStruct_020067E8 * param0, int * param1) { UnkStruct_ov81_021D1610 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; sub_02017798(NULL, NULL); sub_020177A4(); diff --git a/src/overlay083/ov83_0223B5A0.c b/src/overlay083/ov83_0223B5A0.c index 2e394b9c6b..16fca448bf 100644 --- a/src/overlay083/ov83_0223B5A0.c +++ b/src/overlay083/ov83_0223B5A0.c @@ -22,7 +22,7 @@ #include "unk_0201DBEC.h" #include "gx_layers.h" #include "unk_020218BC.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020279FC.h" #include "poffin.h" #include "unk_0202ACE0.h" @@ -1092,7 +1092,7 @@ static BOOL ov83_0223C8B0 (UnkStruct_ov83_0223C344 * param0, Poffin * param1, in u16 v1; int v2; BOOL v3 = 1; - UnkStruct_0202440C * v4 = sub_0202440C(param0->unk_10->unk_0C); + TVBroadcast * v4 = SaveData_TVBroadcast(param0->unk_10->unk_0C); for (v0 = 0; v0 < param2; v0++) { v1 = sub_0202AB74(param0->unk_10->unk_08, param1); diff --git a/src/overlay087/ov87_021D0D80.c b/src/overlay087/ov87_021D0D80.c index 913a5fa409..2c6766020f 100644 --- a/src/overlay087/ov87_021D0D80.c +++ b/src/overlay087/ov87_021D0D80.c @@ -19,7 +19,7 @@ typedef struct UnkStruct_ov87_021D0D80_t { UnkStruct_ov87_021D12C0 unk_00; UnkStruct_ov87_021D106C * unk_C8; - UnkStruct_0202DF8C * unk_CC; + HallOfFame * unk_CC; int unk_D0; int unk_D4; BOOL unk_D8; @@ -28,9 +28,9 @@ typedef struct UnkStruct_ov87_021D0D80_t { static void ov87_021D0F38(UnkStruct_ov87_021D0D80 * param0, int param1); static BOOL ov87_021D0F4C(UnkStruct_ov87_021D0D80 * param0); static BOOL ov87_021D0F88(UnkStruct_ov87_021D0D80 * param0); -static void ov87_021D0FC4(UnkStruct_ov87_021D12C0 * param0, UnkStruct_0202DF8C * param1); +static void ov87_021D0FC4(UnkStruct_ov87_021D12C0 * param0, HallOfFame * param1); static void ov87_021D1000(UnkStruct_ov87_021D12C0 * param0); -static void ov87_021D101C(UnkStruct_ov87_021D12C0 * param0, UnkStruct_0202DF8C * param1, int param2); +static void ov87_021D101C(UnkStruct_ov87_021D12C0 * param0, HallOfFame * param1, int param2); int ov87_021D0D80 (UnkStruct_020067E8 * param0, int * param1) { @@ -165,7 +165,7 @@ static BOOL ov87_021D0F88 (UnkStruct_ov87_021D0D80 * param0) return 1; } -static void ov87_021D0FC4 (UnkStruct_ov87_021D12C0 * param0, UnkStruct_0202DF8C * param1) +static void ov87_021D0FC4 (UnkStruct_ov87_021D12C0 * param0, HallOfFame * param1) { int v0; @@ -189,7 +189,7 @@ static void ov87_021D1000 (UnkStruct_ov87_021D12C0 * param0) } } -static void ov87_021D101C (UnkStruct_ov87_021D12C0 * param0, UnkStruct_0202DF8C * param1, int param2) +static void ov87_021D101C (UnkStruct_ov87_021D12C0 * param0, HallOfFame * param1, int param2) { int v0; diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index e0e53d944e..e67fb45a0d 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -141,7 +141,7 @@ static void ov88_0223CB34(UnkStruct_0205AA50 * param0, int param1, UnkStruct_020 static void ov88_0223BD18(Pokemon * param0, UnkStruct_ov88_0223C8AC * param1); static void ov88_0223E87C(UnkStruct_02022550 * param0, int param1, int param2); static int ov88_0223C8AC(UnkStruct_ov88_0223C8AC * param0, Party * param1, int param2, int param3); -static void ov88_0223D0C0(UnkStruct_021C0794 * param0); +static void ov88_0223D0C0(SaveData * param0); static int ov88_0223B914(UnkStruct_02095E80 * param0); static int ov88_0223BED8(UnkStruct_02095E80 * param0); static void ov88_0223B7A0(Party * param0, int param1, UnkStruct_02095E80 * param2); @@ -1162,10 +1162,10 @@ static void ov88_0223C370 (UnkStruct_02095E80 * param0, UnkStruct_020067E8 * par param0->unk_2270 = v0->unk_08; param0->unk_227C = v0->unk_0C; param0->unk_04 = v0->unk_10; - param0->unk_2274 = Heap_AllocFromHeap(26, Party_sizeof()); + param0->unk_2274 = Heap_AllocFromHeap(26, Party_SaveSize()); Party_InitWithCapacity(param0->unk_2274, 6); - memset(param0->unk_2274, 0xff, Party_sizeof()); + memset(param0->unk_2274, 0xff, Party_SaveSize()); param0->unk_18C = TrainerInfo_NameNewStrbuf(v0->unk_04, 26); param0->unk_190 = MessageLoader_GetNewStrbuf(param0->unk_184, 42); @@ -1668,7 +1668,7 @@ void ov88_0223D098 (int param0, Party * param1, int param2) } } -static void ov88_0223D0C0 (UnkStruct_021C0794 * param0) +static void ov88_0223D0C0 (SaveData * param0) { u8 * v0 = sub_0202D79C(param0); int v1; diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index 2b797c387a..778b276e71 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -342,7 +342,7 @@ int ov92_021D0D80 (UnkStruct_020067E8 * param0, int * param1) } { - UnkStruct_021C0794 * v2 = sub_02006840(param0); + SaveData * v2 = sub_02006840(param0); v0->unk_04 = sub_0202C878(v2); v0->unk_BB14 = sub_0202C8C0(v0->unk_04); diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index 0b6680338a..2d33bb1be6 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -95,8 +95,8 @@ static void ov94_02240EAC(BoxPokemon * param0, UnkStruct_02022550 * param1, UnkS void * ov94_02240DD0(NARC * param0, u32 param1, NNSG2dCharacterData ** param2, u32 param3); static int ov94_02241328(UnkStruct_ov94_0223BA88_sub2 * param0, UnkStruct_ov94_0223BA88_sub3 * param1); static void ov94_02241464(UnkStruct_ov94_0223BA88_sub2 * param0, UnkStruct_02022550 ** param1, UnkStruct_ov94_0223BA88_sub3 * param2, UnkStruct_ov94_02240FA0 * param3); -static int ov94_0224121C(Party * param0, UnkStruct_020797DC * param1, int param2, int param3); -static int ov94_022412F4(Party * param0, UnkStruct_020797DC * param1, int param2, int param3); +static int ov94_0224121C(Party * param0, PCBoxes * param1, int param2, int param3); +static int ov94_022412F4(Party * param0, PCBoxes * param1, int param2, int param3); static int ov94_02240BB0(UnkStruct_ov94_0223FD4C * param0); static int ov94_0224123C(BoxPokemon * param0); static int ov94_02241278(BoxPokemon * param0); @@ -1139,7 +1139,7 @@ static void ov94_02240FA0 (UnkStruct_ov94_0223FD4C * param0, int param1) u16 v0[30], v1, v2; Pokemon * v3; BoxPokemon * v4; - UnkStruct_020797DC * v5 = param0->unk_00->unk_0C; + PCBoxes * v5 = param0->unk_00->unk_0C; NARC * v6; UnkStruct_ov94_02240FA0 * v7; @@ -1213,7 +1213,7 @@ int ov94_022411D0 (int param0) } } -BoxPokemon * ov94_022411DC (Party * param0, UnkStruct_020797DC * param1, int param2, int param3) +BoxPokemon * ov94_022411DC (Party * param0, PCBoxes * param1, int param2, int param3) { if (ov94_022411D0(param2)) { if (param3 > (Party_GetCurrentCount(param0) - 1)) { @@ -1226,7 +1226,7 @@ BoxPokemon * ov94_022411DC (Party * param0, UnkStruct_020797DC * param1, int par return sub_02079C9C(param1, param2, param3); } -static int ov94_0224121C (Party * param0, UnkStruct_020797DC * param1, int param2, int param3) +static int ov94_0224121C (Party * param0, PCBoxes * param1, int param2, int param3) { if (ov94_022411D0(param2)) { if (Party_GetCurrentCount(param0) < 2) { @@ -1316,7 +1316,7 @@ static int ov94_022412C8 (BoxPokemon * param0) return 0; } -static int ov94_022412F4 (Party * param0, UnkStruct_020797DC * param1, int param2, int param3) +static int ov94_022412F4 (Party * param0, PCBoxes * param1, int param2, int param3) { BoxPokemon * v0 = ov94_022411DC(param0, param1, param2, param3); diff --git a/src/overlay094/ov94_02242AD0.c b/src/overlay094/ov94_02242AD0.c index 6f9fcc585e..8bbdfff830 100644 --- a/src/overlay094/ov94_02242AD0.c +++ b/src/overlay094/ov94_02242AD0.c @@ -28,7 +28,7 @@ #include "unk_0201D670.h" #include "gx_layers.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_020279FC.h" #include "unk_0202B604.h" @@ -661,9 +661,9 @@ static int ov94_022431F0 (UnkStruct_ov94_0223FD4C * param0) sub_0202CF28(param0->unk_00->unk_28, (1 + 23)); { - UnkStruct_0202440C * v2; + TVBroadcast * v2; - v2 = sub_0202440C(param0->unk_00->unk_20); + v2 = SaveData_TVBroadcast(param0->unk_00->unk_20); sub_0206D104(v2); } break; @@ -940,9 +940,9 @@ static int ov94_02243658 (UnkStruct_ov94_0223FD4C * param0) sub_0202CF28(param0->unk_00->unk_28, (1 + 23)); { - UnkStruct_0202440C * v0; + TVBroadcast * v0; - v0 = sub_0202440C(param0->unk_00->unk_20); + v0 = SaveData_TVBroadcast(param0->unk_00->unk_20); sub_0206D104(v0); } diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index 1156e9f4ed..e8a2d526f8 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -49,7 +49,7 @@ #include "unk_020218BC.h" #include "strbuf.h" #include "unk_02024358.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025CB0.h" #include "unk_02025E08.h" @@ -95,11 +95,11 @@ typedef struct { typedef struct { UnkStruct_02018340 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_02026324 * unk_08; TrainerInfo * unk_0C; UnkStruct_02025E5C * unk_10; - UnkStruct_0202442C * unk_14; + MysteryGift * unk_14; int unk_18; int unk_1C; int unk_20; @@ -144,7 +144,7 @@ static BOOL ov97_0222B8E4(void * param0, int param1, UnkStruct_ov97_02237808 * p static BOOL ov97_0222B934(void * param0, int param1, UnkStruct_ov97_02237808 * param2, int param3); static BOOL ov97_0222B978(void * param0, int param1, UnkStruct_ov97_02237808 * param2, int param3); static BOOL ov97_0222B5C0(void * param0, int param1, UnkStruct_ov97_02237808 * param2, int param3); -UnkStruct_0202442C * sub_0202442C(UnkStruct_021C0794 * param0); +MysteryGift * SaveData_MysteryGift(SaveData * param0); int ov23_0224AC0C(void); int TrainerInfo_Size(void); @@ -994,7 +994,7 @@ static int ov97_0222BD70 (UnkStruct_020067E8 * param0, int * param1) sub_0200F344(1, 0x0); v0->unk_04 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; - v0->unk_14 = sub_0202442C(v0->unk_04); + v0->unk_14 = SaveData_MysteryGift(v0->unk_04); v0->unk_11C = FX32_ONE * 0; v0->unk_120 = FX32_ONE * 0; v0->unk_0C = sub_02025E38(v0->unk_04); diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index 79db60912b..6a5431d7f7 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -47,7 +47,7 @@ #include "gx_layers.h" #include "unk_020218BC.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "trainer_info.h" #include "unk_0202631C.h" @@ -363,7 +363,7 @@ UnkStruct_ov97_0223E0B0 Unk_ov97_0223E0B0[] = { typedef struct { int unk_00; UnkStruct_02018340 * unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_02026324 * unk_0C; TrainerInfo * unk_10; UnkStruct_020279FC * unk_14; @@ -386,7 +386,7 @@ typedef struct { u8 unk_16C[12288]; UnkStruct_020067E8 * unk_316C; UnkStruct_02022550 * unk_3170; - UnkStruct_0202442C * unk_3174; + MysteryGift * unk_3174; int unk_3178; int unk_317C; UnkStruct_0202DBAC unk_3180; @@ -448,7 +448,7 @@ enum { static void ov97_0222C388(UnkStruct_ov97_0222C388 * param0); int ov97_0222CB10(UnkStruct_ov97_0222C388 * param0); -UnkStruct_0202442C * sub_0202442C(UnkStruct_021C0794 * param0); +MysteryGift * SaveData_MysteryGift(SaveData * param0); void ov97_02231FFC(UnkStruct_02018340 * param0, void *, int param2); static u16 ov97_0222C174 (u16 param0) @@ -698,7 +698,7 @@ static int ov97_0222C6F8 (UnkStruct_020067E8 * param0, int * param1) ov97_02237694(v0->unk_00); - v0->unk_3174 = sub_0202442C(v0->unk_08); + v0->unk_3174 = SaveData_MysteryGift(v0->unk_08); v0->unk_14C = UnkEnum_ov97_0222C78C_09; v0->unk_144 = ((1 + 9) + (18 + 12)); v0->unk_154 = 0; diff --git a/src/overlay097/ov97_0222D04C.c b/src/overlay097/ov97_0222D04C.c index b9347831f2..fa4dfcb2fc 100644 --- a/src/overlay097/ov97_0222D04C.c +++ b/src/overlay097/ov97_0222D04C.c @@ -160,7 +160,7 @@ void ov97_0222D19C (UnkStruct_0201CD38 * param0, void * param1) } } -void ov97_0222D1C4 (UnkStruct_ov97_0222D04C * param0, UnkStruct_021C0794 * param1, int param2) +void ov97_0222D1C4 (UnkStruct_ov97_0222D04C * param0, SaveData * param1, int param2) { if (sub_02035E38()) { return; @@ -179,7 +179,7 @@ void ov97_0222D1F0 (const void * param0, int param1) void ov97_0222D200 (UnkStruct_ov97_0222D04C * param0, int param1) { - UnkStruct_021C0794 * v0; + SaveData * v0; if (sub_02035E38()) { return; diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index d236ee71d8..4b2b5a23bd 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -60,7 +60,7 @@ #include "gx_layers.h" #include "unk_020218BC.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "unk_020279FC.h" #include "unk_0202DAB4.h" @@ -126,7 +126,7 @@ typedef struct { void Strbuf_ToChars(const Strbuf *param0, u16 * param1, u32 param2); void Strbuf_CopyNumChars(Strbuf *param0, const u16 * param1, u32 param2); -UnkStruct_0202442C * sub_0202442C(UnkStruct_021C0794 * param0); +MysteryGift * SaveData_MysteryGift(SaveData * param0); void ov97_02231FFC(UnkStruct_02018340 * param0, void *, int param2); static int ov97_0222D474(UnkStruct_020067E8 * param0); static int ov97_0222D4D8(UnkStruct_020067E8 * param0); @@ -445,8 +445,8 @@ static void ov97_0222D658 (UnkStruct_020067E8 * param0) UnkStruct_ov97_0222D04C * v2 = sub_0200682C(param0); UnkStruct_ov97_0222D250 * v3 = &v2->unk_8C.unk_00; UnkUnion_ov97_0222D2B0 * v4 = &v2->unk_8C.unk_50; - UnkStruct_021C0794 * v5 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; - UnkStruct_0202442C * v6; + SaveData * v5 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; + MysteryGift * v6; if (v3->unk_4E_2 == 0) { v0 = 0; @@ -464,7 +464,7 @@ static void ov97_0222D658 (UnkStruct_020067E8 * param0) v4->val2.unk_354 = RTC_ConvertDateToDay(&v7); } - v6 = sub_0202442C(v5); + v6 = SaveData_MysteryGift(v5); sub_0202DE5C(v6, v3->unk_4C); if (v0 == 0) { @@ -682,7 +682,7 @@ static int ov97_0222DA84 (UnkStruct_020067E8 * param0) UnkStruct_0205AA50 * v0; UnkStruct_02025CCC * v1; UnkStruct_ov97_0222D04C * v2 = sub_0200682C(param0); - UnkStruct_0202442C * v3 = sub_0202442C(v2->unk_04); + MysteryGift * v3 = SaveData_MysteryGift(v2->unk_04); if (v2->unk_62C == 30) { v2->unk_630 = 1; @@ -833,7 +833,7 @@ static void ov97_0222DDD0 (UnkStruct_020067E8 * param0, int param1, u32 param2) UnkStruct_0205AA50 * v1; UnkStruct_ov97_0223E5B8 v2[4]; int v3, v4 = 0; - UnkStruct_0202442C * v5 = sub_0202442C(v0->unk_04); + MysteryGift * v5 = SaveData_MysteryGift(v0->unk_04); v1 = &v0->unk_28[0]; v2[v4++] = Unk_ov97_0223E5B8[0]; diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index af1cd96837..9f605004d7 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -53,7 +53,7 @@ #include "gx_layers.h" #include "unk_020218BC.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -92,8 +92,8 @@ typedef struct { int unk_2BA8[20]; int unk_2BF8; void * unk_2BFC; - UnkStruct_0202442C * unk_2C00; - UnkStruct_021C0794 * unk_2C04; + MysteryGift * unk_2C00; + SaveData * unk_2C04; UnkStruct_020279FC * unk_2C08; int unk_2C0C; int unk_2C10; @@ -149,7 +149,7 @@ typedef struct { } UnkStruct_ov97_0223E680; void Strbuf_CopyNumChars(Strbuf *param0, const u16 * param1, u32 param2); -UnkStruct_0202442C * sub_0202442C(UnkStruct_021C0794 * param0); +MysteryGift * SaveData_MysteryGift(SaveData * param0); void ov97_02231FFC(UnkStruct_02018340 * param0, void *, int param2); static int ov97_02230728(UnkStruct_020067E8 * param0); static int ov97_022306F4(UnkStruct_020067E8 * param0); @@ -972,7 +972,7 @@ static void ov97_02231464 (void * param0) static void ov97_02231488 (UnkStruct_ov97_02230868 * param0) { GF_ASSERT(param0->unk_2C20 < 3); - sub_02025C48(31); + SaveData_CRC(31); if (param0->unk_2C14[param0->unk_2C20]->unk_350 != 255) { param0->unk_2C14[param0->unk_2C20]->unk_350++; @@ -1046,7 +1046,7 @@ static int ov97_0223161C (UnkStruct_020067E8 * param0, int * param1) switch (*param1) { case 0: v4->unk_2C04 = ((UnkStruct_0203CC84 *)sub_02006840(param0))->unk_08; - v4->unk_2C00 = sub_0202442C(v4->unk_2C04); + v4->unk_2C00 = SaveData_MysteryGift(v4->unk_2C04); v4->unk_2C08 = sub_02025E44(v4->unk_2C04); v4->unk_2C0C = sub_02027B50(v4->unk_2C08); diff --git a/src/overlay097/ov97_02232054.c b/src/overlay097/ov97_02232054.c index 5a22243cd1..a2bebda8d5 100644 --- a/src/overlay097/ov97_02232054.c +++ b/src/overlay097/ov97_02232054.c @@ -12,7 +12,7 @@ #include "unk_02018340.h" #include "gx_layers.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_0202DAB4.h" #include "overlay097/ov97_02232054.h" @@ -133,15 +133,15 @@ void ov97_02232074 (UnkStruct_02018340 * param0) } } -int ov97_02232148 (UnkStruct_021C0794 * param0, UnkStruct_ov97_0223829C * param1) +int ov97_02232148 (SaveData * param0, UnkStruct_ov97_0223829C * param1) { u32 v0; - UnkStruct_0202442C * v1 = sub_0202442C(param0); + MysteryGift * v1 = SaveData_MysteryGift(param0); v0 = param1->unk_00.unk_48; if ((v0 == 0xFFFFFFFF) && (param1->unk_00.unk_4C == 0xFFFF)) { - sub_0202DABC(v1); + MysteryGift_Init(v1); sub_02024760(param0, 0); OS_ResetSystem(0); diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 035c108b8e..81ae8f762c 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -65,7 +65,7 @@ #include "unk_020218BC.h" #include "unk_02022594.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "unk_020279FC.h" @@ -137,7 +137,7 @@ typedef struct { int unk_04; int unk_08; int unk_0C; - UnkStruct_021C0794 * unk_10; + SaveData * unk_10; TrainerInfo * unk_14; UnkStruct_020279FC * unk_18; int unk_1C; @@ -278,13 +278,13 @@ static int ov97_02233B8C (UnkStruct_ov97_02234A2C * param0) int v0; u8 v1[16]; int v2; - UnkStruct_02024440 * v3; + PalParkTransfer * v3; UnkStruct_ov97_02233B8C * v4 = ¶m0->unk_E8F0; switch (v4->unk_00) { case 0: ov97_02233D10(param0); - v3 = sub_02024440(param0->unk_10); + v3 = SaveData_PalParkTransfer(param0->unk_10); sub_0202EFB8(v3, ov97_0223635C()); v4->unk_00++; break; @@ -375,10 +375,10 @@ static int ov97_02233B8C (UnkStruct_ov97_02234A2C * param0) static void ov97_02233CE4 (UnkStruct_ov97_02234A2C * param0) { - UnkStruct_02024440 * v0; + PalParkTransfer * v0; int v1; - v0 = sub_02024440(param0->unk_10); + v0 = SaveData_PalParkTransfer(param0->unk_10); sub_0202EFB8(v0, ov97_0223635C()); sub_02017DE0(4); @@ -394,9 +394,9 @@ static void ov97_02233D10 (UnkStruct_ov97_02234A2C * param0) BoxPokemon * v4; BoxPokemonGBA * v5; Pokemon v6; - UnkStruct_02024440 * v7; + PalParkTransfer * v7; - v7 = sub_02024440(param0->unk_10); + v7 = SaveData_PalParkTransfer(param0->unk_10); v4 = Pokemon_GetBoxPokemon(&v6); for (v0 = 0; v0 < 6; v0++) { @@ -1667,9 +1667,9 @@ static int ov97_02235408 (UnkStruct_ov97_02234A2C * param0) { int v0; u32 v1; - UnkStruct_02024440 * v2; + PalParkTransfer * v2; - v2 = sub_02024440(param0->unk_10); + v2 = SaveData_PalParkTransfer(param0->unk_10); if (sub_0202F0E0(v2) == 0) { if (sub_0202F088(v2) == 0) { diff --git a/src/overlay097/ov97_02237694.c b/src/overlay097/ov97_02237694.c index 625cd22823..e741eb3396 100644 --- a/src/overlay097/ov97_02237694.c +++ b/src/overlay097/ov97_02237694.c @@ -63,7 +63,7 @@ typedef struct { int unk_0C; int unk_10; int unk_14; - UnkStruct_021C0794 * unk_18; + SaveData * unk_18; void * unk_1C; int unk_20; BOOL unk_24[4]; @@ -835,7 +835,7 @@ void ov97_02238440 (void) OS_EnableIrq(); } -void ov97_0223846C (UnkStruct_021C0794 * param0) +void ov97_0223846C (SaveData * param0) { UnkStruct_ov97_0223F550 * v0 = &Unk_ov97_0223F550; diff --git a/src/overlay102/ov102_021D0D80.c b/src/overlay102/ov102_021D0D80.c index 5e465d9eaf..416df27ff1 100644 --- a/src/overlay102/ov102_021D0D80.c +++ b/src/overlay102/ov102_021D0D80.c @@ -38,7 +38,7 @@ typedef struct { int unk_00; int unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; TrainerInfo * unk_0C; UnkStruct_02018340 * unk_10; UnkStruct_0205AA50 unk_14; diff --git a/src/overlay104/ov104_0222DCE0.c b/src/overlay104/ov104_0222DCE0.c index 6bbfcc7da9..bbdfe0cb86 100644 --- a/src/overlay104/ov104_0222DCE0.c +++ b/src/overlay104/ov104_0222DCE0.c @@ -41,7 +41,7 @@ #include "flags.h" #include "overlay104/ov104_0222DCE0.h" -void ov104_0222E1C0(UnkStruct_021C0794 * param0, Party * param1, Pokemon * param2); +void ov104_0222E1C0(SaveData * param0, Party * param1, Pokemon * param2); void ov104_0222E1D8(UnkStruct_02022550 * param0, u8 param1); void ov104_0222E204(UnkStruct_02022550 * param0, s16 param1, s16 param2, u8 param3); u8 ov104_0222E240(u16 param0, u16 param1); @@ -349,9 +349,9 @@ u16 ov104_0222E10C (u8 param0) return 0x3; } -void ov104_0222E134(UnkStruct_021C0794 * param0, Pokemon * param1); +void ov104_0222E134(SaveData * param0, Pokemon * param1); -void ov104_0222E134 (UnkStruct_021C0794 * param0, Pokemon * param1) +void ov104_0222E134 (SaveData * param0, Pokemon * param1) { u32 v0; Strbuf* v1; @@ -378,7 +378,7 @@ void ov104_0222E134 (UnkStruct_021C0794 * param0, Pokemon * param1) return; } -void ov104_0222E1C0 (UnkStruct_021C0794 * param0, Party * param1, Pokemon * param2) +void ov104_0222E1C0 (SaveData * param0, Party * param1, Pokemon * param2) { ov104_0222E134(param0, param2); Party_AddPokemon(param1, param2); @@ -642,7 +642,7 @@ int ov104_0222E5F0 (const TrainerInfo * param0) return v1; } -void ov104_0222E630 (UnkStruct_021C0794 * param0) +void ov104_0222E630 (SaveData * param0) { UnkStruct_0202C878 * v0 = sub_0202C878(param0); diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index 9264590469..eacccaab53 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -70,7 +70,7 @@ #include "unk_0201D15C.h" #include "unk_0201D670.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -1916,11 +1916,11 @@ static BOOL ov104_02230EFC (UnkStruct_ov104_0222E930 * param0) static BOOL ov104_02230F28 (UnkStruct_ov104_0222E930 * param0) { - UnkStruct_0202440C * v0; + TVBroadcast * v0; UnkStruct_ov104_02230BE4 * v1 = sub_0209B970(param0->unk_00->unk_00); u16 v2 = ov104_0222FC00(param0); - v0 = sub_0202440C(v1->unk_08); + v0 = SaveData_TVBroadcast(v1->unk_08); sub_0206D0C8(v0, v2); sub_0202CF70(sub_0202CD88(v1->unk_08), (1 + 67), v2); @@ -2866,12 +2866,12 @@ static BOOL ov104_02231ED8 (UnkStruct_ov104_0222E930 * param0) static BOOL ov104_02231EFC (UnkStruct_ov104_0222E930 * param0) { u16 v0; - UnkStruct_0202440C * v1; + TVBroadcast * v1; TrainerInfo * v2; UnkStruct_ov104_02230BE4 * v3; v3 = sub_0209B970(param0->unk_00->unk_00); - v1 = sub_0202440C(v3->unk_08); + v1 = SaveData_TVBroadcast(v3->unk_08); v0 = ov104_0222FC00(param0); v2 = sub_02032EE8(1 - sub_0203608C()); diff --git a/src/overlay104/ov104_022339B4.c b/src/overlay104/ov104_022339B4.c index 8f54c86980..a00c20349e 100644 --- a/src/overlay104/ov104_022339B4.c +++ b/src/overlay104/ov104_022339B4.c @@ -29,7 +29,7 @@ #include "overlay104/ov104_022339B4.h" #include "overlay104/ov104_0223A7F4.h" -UnkStruct_ov104_0223ADA0 * ov104_022339B4(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u8 param3); +UnkStruct_ov104_0223ADA0 * ov104_022339B4(SaveData * param0, u16 param1, u8 param2, u8 param3); void ov104_02233B98(UnkStruct_ov104_0223ADA0 * param0, u16 param1); static void ov104_02233BAC(UnkStruct_ov104_0223ADA0 * param0); static void ov104_02233F1C(UnkStruct_ov104_0223ADA0 * param0); @@ -51,7 +51,7 @@ void ov104_02234474(UnkStruct_ov104_0223ADA0 * param0); void ov104_02234480(UnkStruct_ov104_0223ADA0 * param0); u16 ov104_022347F8(UnkStruct_ov104_0223ADA0 * param0); -UnkStruct_ov104_0223ADA0 * ov104_022339B4 (UnkStruct_021C0794 * param0, u16 param1, u8 param2, u8 param3) +UnkStruct_ov104_0223ADA0 * ov104_022339B4 (SaveData * param0, u16 param1, u8 param2, u8 param3) { UnkStruct_0202FF58 * v0; UnkStruct_020300F4 * v1; @@ -497,7 +497,7 @@ void ov104_0223449C (UnkStruct_ov104_0223ADA0 * param0) v1 = ov104_0223AA50(param0->unk_04); v2 = ov104_0223AA74(param0->unk_04, 1); - sub_0207A008(param0->unk_4D4); + Party_Init(param0->unk_4D4); v3 = Pokemon_New(11); @@ -588,7 +588,7 @@ void ov104_0223470C (UnkStruct_ov104_0223ADA0 * param0) v1 = ov104_0223AA50(param0->unk_04); v2 = ov104_0223AA74(param0->unk_04, 1); - sub_0207A008(param0->unk_4D8); + Party_Init(param0->unk_4D8); v3 = Pokemon_New(11); diff --git a/src/overlay104/ov104_02234838.c b/src/overlay104/ov104_02234838.c index b1acae2a2e..94db049308 100644 --- a/src/overlay104/ov104_02234838.c +++ b/src/overlay104/ov104_02234838.c @@ -19,7 +19,7 @@ #include "unk_020041CC.h" #include "heap.h" #include "gx_layers.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02030108.h" #include "unk_02051D8C.h" #include "unk_0206CCB0.h" @@ -125,7 +125,7 @@ BOOL ov104_022348BC (UnkStruct_ov104_0222E930 * param0) v4->unk_05 = v3->unk_6F5; v4->unk_14 = &v3->unk_D84[0]; - sub_0207A008(v4->unk_0C); + Party_Init(v4->unk_0C); v1 = Party_GetFromSavedata(v5->unk_08); v2 = Party_GetPokemonBySlotIndex(v1, v3->unk_260[0]); @@ -404,7 +404,7 @@ BOOL ov104_02234D50 (UnkStruct_ov104_0222E930 * param0) BOOL ov104_02234D6C (UnkStruct_ov104_0222E930 * param0) { - UnkStruct_0202440C * v0; + TVBroadcast * v0; u16 v1; Party * v2; Pokemon * v3; @@ -417,7 +417,7 @@ BOOL ov104_02234D6C (UnkStruct_ov104_0222E930 * param0) v1 = Pokemon_GetValue(v3, MON_DATA_SPECIES, NULL); if (v4->unk_04 == 0) { - v0 = sub_0202440C(v5->unk_08); + v0 = SaveData_TVBroadcast(v5->unk_08); sub_0206D048(v0, v3); } diff --git a/src/overlay104/ov104_02234DB4.c b/src/overlay104/ov104_02234DB4.c index 8c7ad4bb73..5b8f5792cb 100644 --- a/src/overlay104/ov104_02234DB4.c +++ b/src/overlay104/ov104_02234DB4.c @@ -27,7 +27,7 @@ #include "overlay104/ov104_02234DB4.h" #include "overlay104/ov104_0223AF58.h" -UnkStruct_ov104_0223B5C0 * ov104_02234DB4(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u8 param3, u8 param4); +UnkStruct_ov104_0223B5C0 * ov104_02234DB4(SaveData * param0, u16 param1, u8 param2, u8 param3, u8 param4); void ov104_022350B0(UnkStruct_ov104_0223B5C0 * param0, u16 param1); static void ov104_022350B8(UnkStruct_ov104_0223B5C0 * param0); void ov104_02235190(UnkStruct_ov104_0223B5C0 * param0); @@ -35,8 +35,8 @@ void ov104_022351CC(UnkStruct_ov104_0223B5C0 * param0, void * param1); u16 ov104_02235208(void * param0, u8 param1); void ov104_0223520C(UnkStruct_ov104_0223B5C0 * param0, u16 * param1); BOOL ov104_02235534(UnkStruct_ov104_0223B5C0 * param0, u16 param1, u16 param2); -static u16 ov104_022355C0(UnkStruct_021C0794 * param0, u8 param1, u8 param2, u16 * param3, u16 * param4); -static void ov104_02235620(UnkStruct_021C0794 * param0, u8 param1, u8 param2, u8 param3); +static u16 ov104_022355C0(SaveData * param0, u8 param1, u8 param2, u16 * param3, u16 * param4); +static void ov104_02235620(SaveData * param0, u8 param1, u8 param2, u8 param3); void ov104_022356A0(UnkStruct_ov104_0223B5C0 * param0); static u16 ov104_02235704(UnkStruct_ov104_0223B5C0 * param0); void ov104_0223526C(UnkStruct_ov104_0223B5C0 * param0, u8 param1); @@ -47,7 +47,7 @@ void ov104_022354F4(UnkStruct_ov104_0223B5C0 * param0); void ov104_02235518(UnkStruct_ov104_0223B5C0 * param0); u16 ov104_02235578(UnkStruct_ov104_0223B5C0 * param0); -UnkStruct_ov104_0223B5C0 * ov104_02234DB4 (UnkStruct_021C0794 * param0, u16 param1, u8 param2, u8 param3, u8 param4) +UnkStruct_ov104_0223B5C0 * ov104_02234DB4 (SaveData * param0, u16 param1, u8 param2, u8 param3, u8 param4) { UnkStruct_02030114 * v0; UnkStruct_0203026C * v1; @@ -424,7 +424,7 @@ u16 ov104_02235578 (UnkStruct_ov104_0223B5C0 * param0) return v0; } -static u16 ov104_022355C0 (UnkStruct_021C0794 * param0, u8 param1, u8 param2, u16 * param3, u16 * param4) +static u16 ov104_022355C0 (SaveData * param0, u8 param1, u8 param2, u16 * param3, u16 * param4) { u16 v0; @@ -441,7 +441,7 @@ static u16 ov104_022355C0 (UnkStruct_021C0794 * param0, u8 param1, u8 param2, u1 } } -static void ov104_02235620 (UnkStruct_021C0794 * param0, u8 param1, u8 param2, u8 param3) +static void ov104_02235620 (SaveData * param0, u8 param1, u8 param2, u8 param3) { u8 v0; u8 v1; diff --git a/src/overlay104/ov104_022361B4.c b/src/overlay104/ov104_022361B4.c index 2f9fb4f57c..950a983cda 100644 --- a/src/overlay104/ov104_022361B4.c +++ b/src/overlay104/ov104_022361B4.c @@ -46,7 +46,7 @@ #include "overlay104/ov104_022361B4.h" #include "overlay104/ov104_0223B6F4.h" -UnkStruct_ov104_0223BA10 * ov104_022361B4(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); +UnkStruct_ov104_0223BA10 * ov104_022361B4(SaveData * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); void ov104_02236514(UnkStruct_ov104_0223BA10 * param0, u16 param1); static void ov104_02236528(UnkStruct_ov104_0223BA10 * param0); static void ov104_022365F8(UnkStruct_ov104_0223BA10 * param0); @@ -66,7 +66,7 @@ static void ov104_022370C0(UnkStruct_02018340 * param0, UnkStruct_0205AA50 * par static void ov104_02237284(UnkStruct_ov104_022320B4 * param0, UnkStruct_0205AA50 * param1, TrainerInfo * param2, u16 param3); u16 ov104_02237338(UnkStruct_ov104_0223BA10 * param0); -UnkStruct_ov104_0223BA10 * ov104_022361B4 (UnkStruct_021C0794 * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6) +UnkStruct_ov104_0223BA10 * ov104_022361B4 (SaveData * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6) { u32 v0, v1; Party * v2; @@ -656,7 +656,7 @@ int ov104_02236D10 (UnkStruct_ov104_0223BA10 * param0) return v11; } -void ov104_02236ED8 (UnkStruct_021C0794 * param0, u8 param1, int param2) +void ov104_02236ED8 (SaveData * param0, u8 param1, int param2) { u16 v0; diff --git a/src/overlay104/ov104_02237DD8.c b/src/overlay104/ov104_02237DD8.c index 3ff31446a9..0031743493 100644 --- a/src/overlay104/ov104_02237DD8.c +++ b/src/overlay104/ov104_02237DD8.c @@ -44,7 +44,7 @@ typedef struct { typedef void (* UnkFuncPtr_ov104_02238B88)(UnkStruct_ov104_0223BFFC *, Party *, u8); -UnkStruct_ov104_0223BFFC * ov104_02237DD8(UnkStruct_021C0794 * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); +UnkStruct_ov104_0223BFFC * ov104_02237DD8(SaveData * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6); void ov104_0223806C(UnkStruct_ov104_0223BFFC * param0, u16 param1); static void ov104_02238080(UnkStruct_ov104_0223BFFC * param0); static void ov104_02238114(UnkStruct_ov104_0223BFFC * param0); @@ -140,7 +140,7 @@ static const u8 Unk_ov104_0223FAF8[][2] = { {0x0, 0x3} }; -UnkStruct_ov104_0223BFFC * ov104_02237DD8 (UnkStruct_021C0794 * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6) +UnkStruct_ov104_0223BFFC * ov104_02237DD8 (SaveData * param0, u16 param1, u8 param2, u16 param3, u16 param4, u16 param5, u16 * param6) { u32 v0, v1; Party * v2; diff --git a/src/overlay104/ov104_02239130.c b/src/overlay104/ov104_02239130.c index b2d9ded3bb..411370b0f9 100644 --- a/src/overlay104/ov104_02239130.c +++ b/src/overlay104/ov104_02239130.c @@ -15,7 +15,7 @@ #include "overlay104/struct_ov104_022320B4_t.h" #include "unk_020041CC.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_0202CD50.h" #include "unk_02034198.h" #include "unk_020363E8.h" @@ -40,11 +40,11 @@ BOOL ov104_0223939C(UnkStruct_ov104_0222E930 * param0); BOOL ov104_02239400(UnkStruct_ov104_0222E930 * param0); static BOOL ov104_0223942C(UnkStruct_ov104_0222E930 * param0); static u16 ov104_0223927C(UnkStruct_0204AFC4 * param0, u8 param1); -static BOOL ov104_02239464(UnkStruct_ov104_0222E930 * param0, UnkStruct_0204AFC4 * param1, UnkStruct_021C0794 * param2, u16 param3, u16 param4); +static BOOL ov104_02239464(UnkStruct_ov104_0222E930 * param0, UnkStruct_0204AFC4 * param1, SaveData * param2, u16 param3, u16 param4); BOOL ov104_02239130 (UnkStruct_ov104_0222E930 * param0) { - UnkStruct_0202440C * v0; + TVBroadcast * v0; Pokemon * v1; UnkStruct_0204AFC4 * v2; int v3, v4; @@ -63,7 +63,7 @@ BOOL ov104_02239130 (UnkStruct_ov104_0222E930 * param0) break; case (30 + 16): *v7 = sub_0204AA04(v2); - v0 = sub_0202440C(v8->unk_08); + v0 = SaveData_TVBroadcast(v8->unk_08); sub_0206D0C8(v0, *v7); sub_0202CF70(sub_0202CD88(v8->unk_08), (1 + 67), *v7); break; @@ -276,7 +276,7 @@ static BOOL ov104_0223942C (UnkStruct_ov104_0222E930 * param0) return 0; } -static BOOL ov104_02239464 (UnkStruct_ov104_0222E930 * param0, UnkStruct_0204AFC4 * param1, UnkStruct_021C0794 * param2, u16 param3, u16 param4) +static BOOL ov104_02239464 (UnkStruct_ov104_0222E930 * param0, UnkStruct_0204AFC4 * param1, SaveData * param2, u16 param3, u16 param4) { u16 * v0; const void * v1; diff --git a/src/overlay104/ov104_022394A4.c b/src/overlay104/ov104_022394A4.c index 6a249c262e..323f2a181b 100644 --- a/src/overlay104/ov104_022394A4.c +++ b/src/overlay104/ov104_022394A4.c @@ -9,13 +9,13 @@ #include "overlay104/ov104_0222DCE0.h" #include "overlay104/ov104_0223A0C4.h" -void ov104_022394A4(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1); +void ov104_022394A4(UnkStruct_0204AFC4 * param0, SaveData * param1); u16 ov104_02239588(UnkStruct_0204AFC4 * param0, u16 param1); void ov104_022395A0(UnkStruct_0204AFC4 * param0, u16 param1); u16 ov104_022395B4(UnkStruct_0204AFC4 * param0); u16 ov104_022395D8(UnkStruct_0204AFC4 * param0); -void ov104_022394A4 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +void ov104_022394A4 (UnkStruct_0204AFC4 * param0, SaveData * param1) { int v0; u16 v1[2]; diff --git a/src/overlay104/ov104_02239C58.c b/src/overlay104/ov104_02239C58.c index 95b089fe76..4c02f9e2be 100644 --- a/src/overlay104/ov104_02239C58.c +++ b/src/overlay104/ov104_02239C58.c @@ -24,7 +24,7 @@ #include "unk_0209BA80.h" #include "overlay104/ov104_02239C58.h" -UnkStruct_0209BBA4 * ov104_02239C58(UnkStruct_021C0794 * param0); +UnkStruct_0209BBA4 * ov104_02239C58(SaveData * param0); void ov104_02239C7C(UnkStruct_0209BBA4 * param0); BOOL ov104_02239C88(UnkStruct_0209BBA4 * param0, u16 param1, u16 param2, u16 param3); void ov104_02239CD0(UnkStruct_0209B75C * param0, UnkStruct_0209BBA4 * param1, u16 param2); @@ -33,7 +33,7 @@ static void ov104_02239F38(UnkStruct_0209B75C * param0, UnkStruct_0209BBA4 * par static void ov104_02239FB0(UnkStruct_0209B75C * param0, UnkStruct_0209BBA4 * param1, UnkStruct_0203CDB0 * param2, int param3); static void ov104_0223A090(UnkStruct_0209B75C * param0, UnkStruct_0209BBA4 * param1, UnkStruct_0203CDB0 * param2, int param3); -UnkStruct_0209BBA4 * ov104_02239C58 (UnkStruct_021C0794 * param0) +UnkStruct_0209BBA4 * ov104_02239C58 (SaveData * param0) { static UnkStruct_0209BBA4 * v0; diff --git a/src/overlay104/ov104_0223A0C4.c b/src/overlay104/ov104_0223A0C4.c index 91d5b82d7b..d141891b32 100644 --- a/src/overlay104/ov104_0223A0C4.c +++ b/src/overlay104/ov104_0223A0C4.c @@ -630,7 +630,7 @@ static const UnkStruct_ov104_0223FCB4 Unk_ov104_0223FCB4[] = { void sub_02052894(BattleParams * param0); BOOL ov104_0223A0C4(UnkStruct_0204AFC4 * param0, UnkStruct_ov104_0223A348 * param1, u16 param2, int param3, u16 * param4, u16 * param5, UnkStruct_0204B404 * param6, int param7); -void ov104_0223A30C(UnkStruct_021C0794 * param0, UnkStruct_ov104_0223A348 * param1, const u8 param2); +void ov104_0223A30C(SaveData * param0, UnkStruct_ov104_0223A348 * param1, const u8 param2); BattleParams * ov104_0223A580(UnkStruct_0204AFC4 * param0, UnkStruct_ov104_02230BE4 * param1); void ov104_0223A734(UnkStruct_0204AFC4 * param0, u16 param1); u16 ov104_0223A750(UnkStruct_0204AFC4 * param0, const u16 * param1); @@ -764,7 +764,7 @@ static BOOL ov104_0223A118 (UnkStruct_0204AFC4 * param0, UnkStruct_0204B184 * pa return v10; } -void ov104_0223A30C (UnkStruct_021C0794 * param0, UnkStruct_ov104_0223A348 * param1, const u8 param2) +void ov104_0223A30C (SaveData * param0, UnkStruct_ov104_0223A348 * param1, const u8 param2) { int v0; UnkStruct_0202D764 * v1; @@ -905,7 +905,7 @@ BattleParams * ov104_0223A580 (UnkStruct_0204AFC4 * param0, UnkStruct_ov104_0223 u8 v1; u32 v2; BattleParams * v3; - UnkStruct_021C0794 * v4; + SaveData * v4; Party * v5; Pokemon * v6; diff --git a/src/overlay104/ov104_0223A7F4.c b/src/overlay104/ov104_0223A7F4.c index 297240bdcb..f15e23be87 100644 --- a/src/overlay104/ov104_0223A7F4.c +++ b/src/overlay104/ov104_0223A7F4.c @@ -451,7 +451,7 @@ void ov104_0223ADB0 (UnkStruct_ov104_0223ADA0 * param0) Pokemon * v1; ov104_0222E330(param0->unk_280, param0->unk_254, param0->unk_260, param0->unk_268, NULL, 6, 11, 179); - sub_0207A008(param0->unk_4D4); + Party_Init(param0->unk_4D4); v1 = Pokemon_New(11); diff --git a/src/overlay104/ov104_0223B6F4.c b/src/overlay104/ov104_0223B6F4.c index 9f0034ca17..99ca6f6e81 100644 --- a/src/overlay104/ov104_0223B6F4.c +++ b/src/overlay104/ov104_0223B6F4.c @@ -325,7 +325,7 @@ void ov104_0223BAB8 (UnkStruct_ov104_0223BA10 * param0) u8 v2; Pokemon * v3; - sub_0207A008(param0->unk_2C); + Party_Init(param0->unk_2C); v2 = ov104_0223B7DC(param0->unk_10, 1); v3 = Pokemon_New(11); diff --git a/src/overlay104/ov104_0223BCBC.c b/src/overlay104/ov104_0223BCBC.c index b0aef41cb5..cd549a5bbe 100644 --- a/src/overlay104/ov104_0223BCBC.c +++ b/src/overlay104/ov104_0223BCBC.c @@ -314,7 +314,7 @@ void ov104_0223C04C (UnkStruct_ov104_0223BFFC * param0) Pokemon * v5; Pokemon * v6; - sub_0207A008(param0->unk_74); + Party_Init(param0->unk_74); v3 = ov104_0223BDA4(param0->unk_10, 1); v5 = Pokemon_New(11); diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index cbbd78b817..ca48005fd3 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -121,7 +121,7 @@ struct UnkStruct_ov105_02241FF4_t { UnkStruct_02007768 * unk_128; UnkStruct_02007C7C * unk_12C[3]; UnkStruct_020279FC * unk_138; - UnkStruct_021C0794 * unk_13C; + SaveData * unk_13C; UnkStruct_02098D38 * unk_140; UnkStruct_ov105_02245AAC unk_144; UnkStruct_ov105_02245EA8 * unk_2F4[6]; diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index dc68fa7289..f472023f44 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -110,7 +110,7 @@ struct UnkStruct_ov106_02243118_t { UnkStruct_02002F38 * unk_AC; UnkStruct_0200C440 * unk_B0; UnkStruct_020279FC * unk_B4; - UnkStruct_021C0794 * unk_B8; + SaveData * unk_B8; UnkStruct_02098D38 * unk_BC; UnkStruct_ov106_02243310 unk_C0; UnkStruct_ov106_02243650 * unk_280; diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index fb36372cea..32365dc78c 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -271,7 +271,7 @@ struct UnkStruct_ov107_02241D6C_t { UnkStruct_02002F38 * unk_1C0; UnkStruct_0200C440 * unk_1C4; UnkStruct_020279FC * unk_1C8; - UnkStruct_021C0794 * unk_1CC; + SaveData * unk_1CC; UnkStruct_020302DC * unk_1D0; UnkStruct_0203041C * unk_1D4; UnkStruct_ov107_02249954 unk_1D8; diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index a8ce0b4808..479462652e 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -125,7 +125,7 @@ struct UnkStruct_ov107_02246170_t { UnkStruct_02002F38 * unk_140; UnkStruct_0200C440 * unk_144; UnkStruct_020279FC * unk_148; - UnkStruct_021C0794 * unk_14C; + SaveData * unk_14C; UnkStruct_020302DC * unk_150; UnkStruct_0203041C * unk_154; UnkStruct_ov107_02249954 unk_158; diff --git a/src/overlay107/ov107_02249C98.c b/src/overlay107/ov107_02249C98.c index 6ba4b5b09c..8393715407 100644 --- a/src/overlay107/ov107_02249C98.c +++ b/src/overlay107/ov107_02249C98.c @@ -17,7 +17,7 @@ FS_EXTERN_OVERLAY(overlay104); u8 ov107_02249C98(u8 param0, u8 param1); u8 ov107_02249C9C(u8 param0, u8 param1); -u8 ov107_02249CAC(UnkStruct_021C0794 * param0, u8 param1, u8 param2); +u8 ov107_02249CAC(SaveData * param0, u8 param1, u8 param2); void ov107_02249CE0(u32 param0, u16 param1); void ov107_02249CF4(UnkStruct_0200B358 * param0, u32 param1); @@ -35,7 +35,7 @@ u8 ov107_02249C9C (u8 param0, u8 param1) return param1 - param0; } -u8 ov107_02249CAC (UnkStruct_021C0794 * param0, u8 param1, u8 param2) +u8 ov107_02249CAC (SaveData * param0, u8 param1, u8 param2) { return sub_02030698(sub_0203068C(param0), sub_0205E5B4(param1, param2), sub_0205E6A8(sub_0205E5B4(param1, param2))); } diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 41ae6f73e6..f134a152b4 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -213,7 +213,7 @@ struct UnkStruct_ov108_02241DB0_t { UnkStruct_02013A04 unk_C4[2]; UnkStruct_02002F38 * unk_D4; UnkStruct_020279FC * unk_D8; - UnkStruct_021C0794 * unk_DC; + SaveData * unk_DC; UnkStruct_020304A0 * unk_E0; UnkStruct_020305B8 * unk_E4; UnkStruct_ov108_02243030 unk_E8; diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index fc1ed8ee41..4d440495e0 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -134,7 +134,7 @@ static int ov109_021D4D20(UnkStruct_ov109_021D5140 * param0, int param1); static int ov109_021D4D80(UnkStruct_ov109_021D5140 * param0, int param1); static int ov109_021D4F28(UnkStruct_ov109_021D5140 * param0, int param1); static int ov109_021D510C(UnkStruct_ov109_021D5140 * param0, int param1); -static void ov109_021D59A8(UnkStruct_021C0794 * param0, const UnkStruct_ov109_021D5140_sub2 * param1); +static void ov109_021D59A8(SaveData * param0, const UnkStruct_ov109_021D5140_sub2 * param1); static int(*const Unk_ov109_021D5E9C[])(UnkStruct_ov109_021D5140 *, int) = { ov109_021D474C, @@ -1789,7 +1789,7 @@ static int ov109_021D58AC (UnkStruct_ov109_021D5140 * param0, int param1) return 1; } -void ov109_021D59A8 (UnkStruct_021C0794 * param0, const UnkStruct_ov109_021D5140_sub2 * param1) +void ov109_021D59A8 (SaveData * param0, const UnkStruct_ov109_021D5140_sub2 * param1) { return; } diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index 4648b747f7..742b77206f 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -63,7 +63,7 @@ typedef struct { Strbuf* unk_11C; UnkStruct_02002F38 * unk_120; const UnkStruct_020279FC * unk_124; - UnkStruct_021C0794 * unk_128; + SaveData * unk_128; UnkStruct_0203068C * unk_12C; } UnkStruct_ov110_021D0F78; diff --git a/src/overlay111/ov111_021D0D80.c b/src/overlay111/ov111_021D0D80.c index c3b04cfc48..9af4111f01 100644 --- a/src/overlay111/ov111_021D0D80.c +++ b/src/overlay111/ov111_021D0D80.c @@ -95,7 +95,7 @@ struct UnkStruct_ov111_021D0F7C_t { UnkStruct_02002F38 * unk_15C; UnkStruct_0200C440 * unk_160; UnkStruct_020279FC * unk_164; - UnkStruct_021C0794 * unk_168; + SaveData * unk_168; UnkStruct_ov111_021D2F80 unk_16C; UnkStruct_ov111_021D33F4 * unk_35C[4]; UnkStruct_ov111_021D33F4 * unk_36C[9]; diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index d3dfbdeb7f..a9fd02f62a 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -103,7 +103,7 @@ typedef struct { typedef struct UnkStruct_ov113_0225DBCC_t { UnkStruct_ov66_0223127C * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; UnkStruct_02018340 * unk_08; UnkStruct_02002F38 * unk_0C; UnkStruct_02012744 * unk_10; @@ -168,7 +168,7 @@ static void ov113_0225DB08(UnkStruct_ov113_0225DBCC * param0); static void ov113_0225E364(UnkStruct_ov113_0225DBCC * param0); static void ov113_0225DD14(UnkStruct_ov113_0225DBCC * param0); static void ov113_0225DD24(UnkStruct_ov113_0225DBCC * param0, UnkStruct_ov113_0225CA04 * param1); -static void ov113_0225DD4C(int param0, UnkStruct_021C0794 * param1, UnkStruct_ov113_02260818 * param2); +static void ov113_0225DD4C(int param0, SaveData * param1, UnkStruct_ov113_02260818 * param2); static void ov113_0225D304(UnkStruct_ov113_0225DBCC * param0, NARC * param1); static void ov113_0225D630(UnkStruct_ov113_0225DBCC * param0, NARC * param1); static void ov113_0225D484(UnkStruct_ov113_0225DBCC * param0); @@ -1337,7 +1337,7 @@ UnkStruct_ov113_022607EC * ov113_0225DD44 (UnkStruct_ov113_0225DBCC * param0) return ¶m0->unk_168; } -static void ov113_0225DD4C (int param0, UnkStruct_021C0794 * param1, UnkStruct_ov113_02260818 * param2) +static void ov113_0225DD4C (int param0, SaveData * param1, UnkStruct_ov113_02260818 * param2) { Party * v0; int v1; diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index a393813289..c968499925 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -311,7 +311,7 @@ static void ov114_0225D1AC(UnkStruct_ov114_0225D084 * param0, u32 param1, UnkStr static void ov114_0225D1C8(UnkStruct_ov114_0225D084 * param0, u32 param1, UnkStruct_0205AA50 * param2, u8 param3, u8 param4); static u32 ov114_0225D218(UnkStruct_ov114_0225D084 * param0, u32 param1, UnkStruct_0205AA50 * param2, Strbuf *param3, u32 param4); static void ov114_0225D254(UnkStruct_ov114_0225D084 * param0, u32 param1, UnkStruct_0205AA50 * param2, u8 param3, u8 param4, u32 param5); -static void ov114_0225D290(UnkStruct_ov114_0225D338 * param0, UnkStruct_ov114_0225CEF0 * param1, UnkStruct_021C0794 * param2, BOOL param3, u32 param4); +static void ov114_0225D290(UnkStruct_ov114_0225D338 * param0, UnkStruct_ov114_0225CEF0 * param1, SaveData * param2, BOOL param3, u32 param4); static void ov114_0225D338(UnkStruct_ov114_0225D338 * param0); static void ov114_0225D368(UnkStruct_ov114_0225D338 * param0, UnkStruct_ov114_0225D084 * param1, u32 param2, u32 param3); static void ov114_0225D400(UnkStruct_ov114_0225D338 * param0, u32 param1); @@ -793,7 +793,7 @@ static const UnkStruct_ov114_02260234 Unk_ov114_02260234[] = { {0x13, 0x13} }; -void ov114_0225C700 (UnkStruct_ov114_0225C76C * param0, BOOL param1, UnkStruct_021C0794 * param2, BOOL param3, UnkStruct_ov66_02230DBC * param4) +void ov114_0225C700 (UnkStruct_ov114_0225C76C * param0, BOOL param1, SaveData * param2, BOOL param3, UnkStruct_ov66_02230DBC * param4) { int v0; int v1; @@ -1534,7 +1534,7 @@ static void ov114_0225D254 (UnkStruct_ov114_0225D084 * param0, u32 param1, UnkSt sub_0201D78C(param2, 0, param0->unk_08, param3, param4, 0xff, param5, NULL); } -static void ov114_0225D290 (UnkStruct_ov114_0225D338 * param0, UnkStruct_ov114_0225CEF0 * param1, UnkStruct_021C0794 * param2, BOOL param3, u32 param4) +static void ov114_0225D290 (UnkStruct_ov114_0225D338 * param0, UnkStruct_ov114_0225CEF0 * param1, SaveData * param2, BOOL param3, u32 param4) { u32 v0 = sub_02027B50(sub_02025E44(param2)); u32 v1; diff --git a/src/party.c b/src/party.c index e451998bcc..cad799abc6 100644 --- a/src/party.c +++ b/src/party.c @@ -17,7 +17,7 @@ GF_ASSERT(slot < (party)->capacity); \ } -int Party_sizeof (void) +int Party_SaveSize (void) { return sizeof(Party); } @@ -27,12 +27,12 @@ Party * sub_02079FF4 (u32 param0) Party * v0; v0 = Heap_AllocFromHeap(param0, sizeof(Party)); - sub_0207A008(v0); + Party_Init(v0); return v0; } -void sub_0207A008 (Party * param0) +void Party_Init (Party * param0) { Party_InitWithCapacity(param0, 6); } @@ -144,10 +144,10 @@ BOOL Party_HasSpecies (const Party * party, int species) return i != party->currentCount; } -Party * Party_GetFromSavedata (UnkStruct_021C0794 * param0) +Party * Party_GetFromSavedata (SaveData * param0) { Party * v0; - v0 = (Party *)sub_020245BC(param0, 2); + v0 = (Party *)SaveData_Get(param0, 2); return v0; } diff --git a/src/poffin.c b/src/poffin.c index 1172f172c4..a44250c47b 100644 --- a/src/poffin.c +++ b/src/poffin.c @@ -225,17 +225,17 @@ u8 Poffin_CalcLevel (Poffin * poffin) return level; } -UnkStruct_0202AB28 * Poffin_GetSavedataBlock (UnkStruct_021C0794 * savedata) +UnkStruct_0202AB28 * Poffin_GetSavedataBlock (SaveData * savedata) { - return sub_020245BC(savedata, 16); + return SaveData_Get(savedata, 16); } -int Poffin_GetSizeOfSavedataBlock (void) +int Poffin_SaveSize (void) { return sizeof(Poffin) * 100; } -void sub_0202AB3C (UnkStruct_0202AB28 * param0) +void Poffin_Init (UnkStruct_0202AB28 * param0) { int i = 0; diff --git a/src/roaming_pokemon.c b/src/roaming_pokemon.c index b88fc95a0b..c43a4abf76 100644 --- a/src/roaming_pokemon.c +++ b/src/roaming_pokemon.c @@ -242,7 +242,7 @@ void sub_0206C404 (UnkStruct_0202D7B0 * param0, const int param1) } } -void RoamingPokemon_ActivateSlot (UnkStruct_021C0794 * saveData, const u8 slot) +void RoamingPokemon_ActivateSlot (SaveData * saveData, const u8 slot) { Pokemon * v0; UnkStruct_0206C638 * v1; diff --git a/src/savedata/save_table.c b/src/savedata/save_table.c new file mode 100644 index 0000000000..1528fc4274 --- /dev/null +++ b/src/savedata/save_table.c @@ -0,0 +1,154 @@ +#include +#include + +#include "savedata/save_table.h" + +#include "unk_02014D38.h" +#include "unk_020244AC.h" +#include "unk_02025CB0.h" +#include "unk_02025E08.h" +#include "unk_0202602C.h" +#include "unk_020261E4.h" +#include "unk_0202631C.h" +#include "unk_020277A4.h" +#include "unk_02027F84.h" +#include "unk_02028124.h" +#include "unk_0202854C.h" +#include "unk_020298BC.h" +#include "poffin.h" +#include "unk_0202ACE0.h" +#include "unk_0202B37C.h" +#include "unk_0202B604.h" +#include "unk_0202C7FC.h" +#include "unk_0202C858.h" +#include "unk_0202C9F4.h" +#include "unk_0202CC64.h" +#include "unk_0202CD50.h" +#include "unk_0202D778.h" +#include "unk_0202D7A8.h" +#include "unk_0202DA40.h" +#include "unk_0202DAB4.h" +#include "unk_0202DF8C.h" +#include "unk_0202E2CC.h" +#include "unk_0202E840.h" +#include "unk_0202EEC0.h" +#include "unk_0202F108.h" +#include "unk_0202F1D4.h" +#include "unk_0203061C.h" +#include "unk_02030880.h" +#include "unk_02030CE8.h" +#include "unk_02030EA4.h" +#include "unk_0203A6DC.h" +#include "unk_020507CC.h" +#include "unk_02056720.h" +#include "unk_020797C8.h" +#include "party.h" +#include "unk_0207D3B8.h" + +const SaveTableEntry gSaveTable[] = { + { SAVE_TABLE_ENTRY_SYSTEM, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)SystemData_SaveSize, (SaveEntryInitFunc)SystemData_Init }, + { SAVE_TABLE_ENTRY_PLAYER, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Player_SaveSize, (SaveEntryInitFunc)Player_Init }, + { SAVE_TABLE_ENTRY_PARTY, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Party_SaveSize, (SaveEntryInitFunc)Party_Init }, + { SAVE_TABLE_ENTRY_BAG, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Bag_SaveSize, (SaveEntryInitFunc)Bag_Init }, + { SAVE_TABLE_ENTRY_EVENTS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)FieldEvents_SaveSize, (SaveEntryInitFunc)FieldEvents_Init }, + { SAVE_TABLE_ENTRY_POKETCH, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Poketch_SaveSize, (SaveEntryInitFunc)Poketch_Init }, + { SAVE_TABLE_ENTRY_FIELD_PLAYER_STATE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)FieldPlayerState_SaveSize, (SaveEntryInitFunc)FieldPlayerState_Init }, + { SAVE_TABLE_ENTRY_POKEDEX, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Pokedex_SaveSize, (SaveEntryInitFunc)Pokedex_Init }, + { SAVE_TABLE_ENTRY_DAYCARE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Daycare_SaveSize, (SaveEntryInitFunc)Daycare_Init }, + { SAVE_TABLE_ENTRY_PAL_PAD, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)PalPad_SaveSize, (SaveEntryInitFunc)PalPad_Init }, + { SAVE_TABLE_ENTRY_MISC, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)MiscSaveBlock_SaveSize, (SaveEntryInitFunc)MiscSaveBlock_Init }, + { SAVE_TABLE_ENTRY_FIELD_OVERWORLD_STATE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)FieldOWState_SaveSize, (SaveEntryInitFunc)FieldOWState_Init }, + { SAVE_TABLE_ENTRY_UNDERGROUND, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Underground_SaveSize, (SaveEntryInitFunc)Underground_Init }, + { SAVE_TABLE_ENTRY_REGULATION_BATTLES, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)RegulationBattles_SaveSize, (SaveEntryInitFunc)RegulationBattles_Init }, + { SAVE_TABLE_ENTRY_IMAGE_CLIPS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)ImageClip_SaveSize, (SaveEntryInitFunc)ImageClip_Init }, + { SAVE_TABLE_ENTRY_MAIL, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Mail_SaveSize, (SaveEntryInitFunc)Mail_Init }, + { SAVE_TABLE_ENTRY_POFFINS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Poffin_SaveSize, (SaveEntryInitFunc)Poffin_Init }, + { SAVE_TABLE_ENTRY_RANDOM_GROUP, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)RandomGroup_SaveSize, (SaveEntryInitFunc)RandomGroup_Init }, + { SAVE_TABLE_ENTRY_JOURNAL, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Journal_SaveSize, (SaveEntryInitFunc)Journal_Init }, + { SAVE_TABLE_ENTRY_TRAINER_CARD, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)TrainerCard_SaveSize, (SaveEntryInitFunc)TrainerCard_Init }, + { SAVE_TABLE_ENTRY_GAME_RECORDS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)GameRecord_SaveSize, (SaveEntryInitFunc)GameRecord_Init }, + { SAVE_TABLE_ENTRY_BALL_SEALS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)BallSeal_SaveSize, (SaveEntryInitFunc)BallSeal_Init }, + { SAVE_TABLE_ENTRY_CHATOT, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)ChatotCry_SaveSize, (SaveEntryInitFunc)ChatotCry_Init }, + { SAVE_TABLE_ENTRY_FRONTIER, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Frontier_SaveSize, (SaveEntryInitFunc)Frontier_Init }, + { SAVE_TABLE_ENTRY_RIBBONS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Ribbons_SaveSize, (SaveEntryInitFunc)Ribbons_Init }, + { SAVE_TABLE_ENTRY_ENCOUNTERS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)SpecialEncounter_SaveSize, (SaveEntryInitFunc)SpecialEncounter_Init }, + { SAVE_TABLE_ENTRY_GLOBAL_TRADE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)GlobalTrade_SaveSize, (SaveEntryInitFunc)GlobalTrade_Init }, + { SAVE_TABLE_ENTRY_TV_BROADCAST, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)TVBroadcast_SaveSize, (SaveEntryInitFunc)TVBroadcast_Init }, + { SAVE_TABLE_ENTRY_RANKINGS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Rankings_SaveSize, (SaveEntryInitFunc)Rankings_Init }, + { SAVE_TABLE_ENTRY_WIFI_LIST, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)WiFiList_SaveSize, (SaveEntryInitFunc)WiFiList_Init }, + { SAVE_TABLE_ENTRY_WIFI_HISTORY, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)WiFiHistory_SaveSize, (SaveEntryInitFunc)WiFiHistory_Init }, + { SAVE_TABLE_ENTRY_MYSTERY_GIFT, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)MysteryGift_SaveSize, (SaveEntryInitFunc)MysteryGift_Init }, + { SAVE_TABLE_ENTRY_PAL_PARK_TRANSFER, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)PalParkTransfer_SaveSize, (SaveEntryInitFunc)PalParkTransfer_Init }, + { SAVE_TABLE_ENTRY_CONTESTS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Contest_SaveSize, (SaveEntryInitFunc)Contest_Init }, + { SAVE_TABLE_ENTRY_SENTENCE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Sentence_SaveSize, (SaveEntryInitFunc)Sentence_Init }, + { SAVE_TABLE_ENTRY_EMAIL, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Email_SaveSize, (SaveEntryInitFunc)Email_Init }, + { SAVE_TABLE_ENTRY_WIFI_QUESTIONS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)WiFiQuestion_SaveSize, (SaveEntryInitFunc)WiFiQuestion_Init }, + { SAVE_TABLE_ENTRY_PC_BOXES, SAVE_BLOCK_ID_BOXES, (SaveEntrySizeFunc)PCBoxes_SaveSize, (SaveEntryInitFunc)PCBoxes_Init }, +}; + +const int gSaveTableSize = NELEMS(gSaveTable); + +TVBroadcast* SaveData_TVBroadcast(SaveData *save) +{ + SaveData_CRC(SAVE_TABLE_ENTRY_TV_BROADCAST); + return SaveData_Get(save, SAVE_TABLE_ENTRY_TV_BROADCAST); +} + +PCBoxes* SaveData_PCBoxes(SaveData *save) +{ + return SaveData_Get(save, SAVE_TABLE_ENTRY_PC_BOXES); +} + +MysteryGift* SaveData_MysteryGift(SaveData *save) +{ + SaveData_CRC(SAVE_TABLE_ENTRY_MYSTERY_GIFT); + return SaveData_Get(save, SAVE_TABLE_ENTRY_MYSTERY_GIFT); +} + +PalParkTransfer* SaveData_PalParkTransfer(SaveData *save) +{ + return SaveData_Get(save, SAVE_TABLE_ENTRY_PAL_PARK_TRANSFER); +} + +const SaveTableEntry gExtraSaveTable[] = { + { EXTRA_SAVE_TABLE_ENTRY_HALL_OF_FAME, SAVE_PAGE_MAX, (SaveEntrySizeFunc)HallOfFame_SaveSize, (SaveEntryInitFunc)HallOfFame_Init }, + { EXTRA_SAVE_TABLE_ENTRY_FRONTIER, SAVE_PAGE_MAX + 3, (SaveEntrySizeFunc)Frontier_Extra_SaveSize, (SaveEntryInitFunc)Frontier_Extra_Init }, + { EXTRA_SAVE_TABLE_ENTRY_MY_RECORDINGS, SAVE_PAGE_MAX + 4, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, + { EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_0, SAVE_PAGE_MAX + 6, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, + { EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_1, SAVE_PAGE_MAX + 8, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, + { EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_2, SAVE_PAGE_MAX + 10, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, +}; + +const int gExtraSaveTableSize = NELEMS(gExtraSaveTable); + +HallOfFame* SaveData_HallOfFame(SaveData *save, int heapID, int *resultCode) +{ + return SaveDataExtra_Get(save, heapID, EXTRA_SAVE_TABLE_ENTRY_HALL_OF_FAME, resultCode); +} + +int SaveData_SaveHallOfFame(SaveData *save, HallOfFame *hof) +{ + return SaveDataExtra_Save(save, EXTRA_SAVE_TABLE_ENTRY_HALL_OF_FAME, hof); +} + +BattleRecording* SaveData_BattleRecording(SaveData *save, int heapID, int *resultCode, int recNum) +{ + BOOL tmp; + return SaveDataExtra_Mirror(save, heapID, EXTRA_SAVE_TABLE_ENTRY_MY_RECORDINGS + recNum, resultCode, &tmp); +} + +int SaveData_SaveBattleRecording(SaveData *save, BattleRecording *rec, int recNum) +{ + return SaveDataExtra_SaveMirror(save, EXTRA_SAVE_TABLE_ENTRY_MY_RECORDINGS + recNum, rec); +} + +BattleFrontierStage* SaveData_BattleFrontierStage(SaveData *save, int heapID, int *resultCode) +{ + BOOL tmp; + return SaveDataExtra_Mirror(save, heapID, EXTRA_SAVE_TABLE_ENTRY_FRONTIER, resultCode, &tmp); +} + +int SaveData_SaveBattleFrontierStage(SaveData *save, BattleFrontierStage *frontier) +{ + return SaveDataExtra_SaveMirror(save, EXTRA_SAVE_TABLE_ENTRY_FRONTIER, frontier); +} diff --git a/src/unk_0200B358.c b/src/unk_0200B358.c index abba384561..1487104dcd 100644 --- a/src/unk_0200B358.c +++ b/src/unk_0200B358.c @@ -178,7 +178,7 @@ void sub_0200B498 (UnkStruct_0200B358 * param0, u32 param1, const TrainerInfo * sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B4BC (UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_021C0794 * param2) +void sub_0200B4BC (UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2) { const u16 * v0 = sub_02027870(sub_02027848(param2)); @@ -186,9 +186,9 @@ void sub_0200B4BC (UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_021C sub_0200B448(param0, param1, param0->unk_0C, NULL); } -void sub_0200B4E4 (UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_021C0794 * param2) +void sub_0200B4E4 (UnkStruct_0200B358 * param0, u32 param1, const SaveData * param2) { - const TrainerInfo * v0 = sub_02025E38((UnkStruct_021C0794 *)param2); + const TrainerInfo * v0 = sub_02025E38((SaveData *)param2); MessageLoader * v1; v1 = MessageLoader_Init(1, 26, 553, param0->unk_04); @@ -616,7 +616,7 @@ void sub_0200BCF0 (UnkStruct_0200B358 * param0, u32 param1, u8 param2) MessageLoader_Free(v0); } -void sub_0200BD40 (UnkStruct_0200B358 * param0, u32 param1, const UnkStruct_020797DC * param2, u32 param3) +void sub_0200BD40 (UnkStruct_0200B358 * param0, u32 param1, const PCBoxes * param2, u32 param3) { sub_02079AF4(param2, param3, param0->unk_0C); sub_0200B448(param0, param1, param0->unk_0C, NULL); @@ -788,7 +788,7 @@ void sub_0200C01C (UnkStruct_0200B358 * param0, u32 param1, u32 param2) } } -void sub_0200C054 (UnkStruct_0200B358 * param0, UnkStruct_021C0794 * param1, int param2, int param3, int param4) +void sub_0200C054 (UnkStruct_0200B358 * param0, SaveData * param1, int param2, int param3, int param4) { int v0, v1; Strbuf* v2; diff --git a/src/unk_02014D38.c b/src/unk_02014D38.c index 708e07608c..b8f97112ac 100644 --- a/src/unk_02014D38.c +++ b/src/unk_02014D38.c @@ -226,12 +226,12 @@ BOOL sub_02014E4C (u16 param0, u32 * param1, u32 * param2) return 0; } -u32 sub_02014E8C (void) +u32 Sentence_SaveSize (void) { return sizeof(UnkStruct_02014EC4); } -void sub_02014E90 (void * param0) +void Sentence_Init (void * param0) { static const struct { u8 unk_00; @@ -260,10 +260,10 @@ void sub_02014E90 (void * param0) sub_02025C84(34); } -UnkStruct_02014EC4 * sub_02014EC4 (UnkStruct_021C0794 * param0) +UnkStruct_02014EC4 * sub_02014EC4 (SaveData * param0) { - sub_02025C48(34); - return sub_020245BC(param0, 34); + SaveData_CRC(34); + return SaveData_Get(param0, 34); } BOOL sub_02014ED8 (const UnkStruct_02014EC4 * param0, u32 param1) diff --git a/src/unk_0202440C.c b/src/unk_0202440C.c index d432901738..a14501debf 100644 --- a/src/unk_0202440C.c +++ b/src/unk_0202440C.c @@ -9,19 +9,11 @@ #include "struct_decls/struct_020797DC_decl.h" #include "struct_decls/struct_021C0794_decl.h" -#include "constdata/const_020E5830.h" -#include "constdata/const_020E5894.h" -#include "constdata/const_020E5834.h" -#include "constdata/const_020E582C.h" - -#include "struct_defs/struct_020251A4.h" -#include "struct_defs/struct_02025340.h" #include "struct_defs/struct_0202DF8C.h" -#include "functypes/funcptr_020E5894.h" -#include "functypes/funcptr_020E5894_1.h" + +#include "savedata/save_table.h" #include "unk_02014D38.h" -#include "unk_0202440C.h" #include "unk_020244AC.h" #include "unk_02025CB0.h" #include "unk_02025E08.h" @@ -63,110 +55,110 @@ #include "party.h" #include "unk_0207D3B8.h" -const UnkStruct_020251A4 Unk_020E5894[] = { - {0x0, 0x0, (UnkFuncPtr_020E5894)sub_02025CB0, (UnkFuncPtr_020E5894_1)sub_02025CB4}, - {0x1, 0x0, (UnkFuncPtr_020E5894)sub_02025E08, (UnkFuncPtr_020E5894_1)sub_02025E0C}, - {0x2, 0x0, (UnkFuncPtr_020E5894)Party_sizeof, (UnkFuncPtr_020E5894_1)sub_0207A008}, - {0x3, 0x0, (UnkFuncPtr_020E5894)sub_0207D3B8, (UnkFuncPtr_020E5894_1)sub_0207D3D8}, - {0x4, 0x0, (UnkFuncPtr_020E5894)sub_020507CC, (UnkFuncPtr_020E5894_1)sub_020507D4}, - {0x5, 0x0, (UnkFuncPtr_020E5894)sub_02056720, (UnkFuncPtr_020E5894_1)sub_02056728}, - {0x6, 0x0, (UnkFuncPtr_020E5894)sub_0203A6DC, (UnkFuncPtr_020E5894_1)sub_0203A6F8}, - {0x7, 0x0, (UnkFuncPtr_020E5894)sub_0202631C, (UnkFuncPtr_020E5894_1)sub_02026D6C}, - {0x8, 0x0, (UnkFuncPtr_020E5894)sub_020261E4, (UnkFuncPtr_020E5894_1)sub_020261EC}, - {0x9, 0x0, (UnkFuncPtr_020E5894)sub_02027F84, (UnkFuncPtr_020E5894_1)sub_02027F98}, - {0xA, 0x0, (UnkFuncPtr_020E5894)sub_020277A4, (UnkFuncPtr_020E5894_1)sub_020277AC}, - {0xB, 0x0, (UnkFuncPtr_020E5894)sub_0203A6E0, (UnkFuncPtr_020E5894_1)sub_0203A6E8}, - {0xC, 0x0, (UnkFuncPtr_020E5894)sub_0202854C, (UnkFuncPtr_020E5894_1)sub_02028574}, - {0xD, 0x0, (UnkFuncPtr_020E5894)sub_02026030, (UnkFuncPtr_020E5894_1)sub_02026040}, - {0xE, 0x0, (UnkFuncPtr_020E5894)sub_02029C58, (UnkFuncPtr_020E5894_1)sub_02029BFC}, - {0xF, 0x0, (UnkFuncPtr_020E5894)sub_0202843C, (UnkFuncPtr_020E5894_1)sub_02028444}, - {0x10, 0x0, (UnkFuncPtr_020E5894)Poffin_GetSizeOfSavedataBlock, (UnkFuncPtr_020E5894_1)sub_0202AB3C}, - {0x11, 0x0, (UnkFuncPtr_020E5894)sub_0202B37C, (UnkFuncPtr_020E5894_1)sub_0202B3A8}, - {0x12, 0x0, (UnkFuncPtr_020E5894)sub_0202B604, (UnkFuncPtr_020E5894_1)sub_0202B618}, - {0x13, 0x0, (UnkFuncPtr_020E5894)sub_0202C7FC, (UnkFuncPtr_020E5894_1)sub_0202C804}, - {0x14, 0x0, (UnkFuncPtr_020E5894)sub_0202CD50, (UnkFuncPtr_020E5894_1)sub_0202CD58}, - {0x15, 0x0, (UnkFuncPtr_020E5894)sub_0202C9F4, (UnkFuncPtr_020E5894_1)sub_0202C9FC}, - {0x16, 0x0, (UnkFuncPtr_020E5894)sub_0202CC64, (UnkFuncPtr_020E5894_1)sub_0202CC6C}, - {0x17, 0x0, (UnkFuncPtr_020E5894)sub_0203061C, (UnkFuncPtr_020E5894_1)sub_02030624}, - {0x18, 0x0, (UnkFuncPtr_020E5894)sub_0202D778, (UnkFuncPtr_020E5894_1)sub_0202D77C}, - {0x19, 0x0, (UnkFuncPtr_020E5894)sub_0202D7A8, (UnkFuncPtr_020E5894_1)sub_0202D7B0}, - {0x1A, 0x0, (UnkFuncPtr_020E5894)sub_0202DA4C, (UnkFuncPtr_020E5894_1)sub_0202DA50}, - {0x1B, 0x0, (UnkFuncPtr_020E5894)sub_0202E2CC, (UnkFuncPtr_020E5894_1)sub_0202E2D4}, - {0x1C, 0x0, (UnkFuncPtr_020E5894)sub_0202E884, (UnkFuncPtr_020E5894_1)sub_0202E88C}, - {0x1D, 0x0, (UnkFuncPtr_020E5894)sub_0202ACE0, (UnkFuncPtr_020E5894_1)sub_0202ACE8}, - {0x1E, 0x0, (UnkFuncPtr_020E5894)sub_0202C858, (UnkFuncPtr_020E5894_1)sub_0202C860}, - {0x1F, 0x0, (UnkFuncPtr_020E5894)sub_0202DAB4, (UnkFuncPtr_020E5894_1)sub_0202DABC}, - {0x20, 0x0, (UnkFuncPtr_020E5894)sub_0202EEC0, (UnkFuncPtr_020E5894_1)sub_0202EEC8}, - {0x21, 0x0, (UnkFuncPtr_020E5894)sub_0202F108, (UnkFuncPtr_020E5894_1)sub_0202F10C}, - {0x22, 0x0, (UnkFuncPtr_020E5894)sub_02014E8C, (UnkFuncPtr_020E5894_1)sub_02014E90}, - {0x23, 0x0, (UnkFuncPtr_020E5894)sub_02030CE8, (UnkFuncPtr_020E5894_1)sub_02030CEC}, - {0x24, 0x0, (UnkFuncPtr_020E5894)sub_02030EA4, (UnkFuncPtr_020E5894_1)sub_02030EA8}, - {0x25, 0x1, (UnkFuncPtr_020E5894)sub_020797D4, (UnkFuncPtr_020E5894_1)sub_020797C8} +const SaveTableEntry gSaveTable[] = { + { SAVE_TABLE_ENTRY_SYSTEM, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)SystemData_SaveSize, (SaveEntryInitFunc)SystemData_Init }, + { SAVE_TABLE_ENTRY_PLAYER, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Player_SaveSize, (SaveEntryInitFunc)Player_Init }, + { SAVE_TABLE_ENTRY_PARTY, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Party_SaveSize, (SaveEntryInitFunc)Party_Init }, + { SAVE_TABLE_ENTRY_BAG, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Bag_SaveSize, (SaveEntryInitFunc)Bag_Init }, + { SAVE_TABLE_ENTRY_EVENTS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)FieldEvents_SaveSize, (SaveEntryInitFunc)FieldEvents_Init }, + { SAVE_TABLE_ENTRY_POKETCH, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Poketch_SaveSize, (SaveEntryInitFunc)Poketch_Init }, + { SAVE_TABLE_ENTRY_FIELD_PLAYER_STATE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)FieldPlayerState_SaveSize, (SaveEntryInitFunc)FieldPlayerState_Init }, + { SAVE_TABLE_ENTRY_POKEDEX, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Pokedex_SaveSize, (SaveEntryInitFunc)Pokedex_Init }, + { SAVE_TABLE_ENTRY_DAYCARE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Daycare_SaveSize, (SaveEntryInitFunc)Daycare_Init }, + { SAVE_TABLE_ENTRY_PAL_PAD, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)PalPad_SaveSize, (SaveEntryInitFunc)PalPad_Init }, + { SAVE_TABLE_ENTRY_MISC, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)MiscSaveBlock_SaveSize, (SaveEntryInitFunc)MiscSaveBlock_Init }, + { SAVE_TABLE_ENTRY_FIELD_OVERWORLD_STATE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)FieldOWState_SaveSize, (SaveEntryInitFunc)FieldOWState_Init }, + { SAVE_TABLE_ENTRY_UNDERGROUND, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Underground_SaveSize, (SaveEntryInitFunc)Underground_Init }, + { SAVE_TABLE_ENTRY_REGULATION_BATTLES, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)RegulationBattles_SaveSize, (SaveEntryInitFunc)RegulationBattles_Init }, + { SAVE_TABLE_ENTRY_IMAGE_CLIPS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)ImageClip_SaveSize, (SaveEntryInitFunc)ImageClip_Init }, + { SAVE_TABLE_ENTRY_MAIL, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Mail_SaveSize, (SaveEntryInitFunc)Mail_Init }, + { SAVE_TABLE_ENTRY_POFFINS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Poffin_SaveSize, (SaveEntryInitFunc)Poffin_Init }, + { SAVE_TABLE_ENTRY_RANDOM_GROUP, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)RandomGroup_SaveSize, (SaveEntryInitFunc)RandomGroup_Init }, + { SAVE_TABLE_ENTRY_JOURNAL, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Journal_SaveSize, (SaveEntryInitFunc)Journal_Init }, + { SAVE_TABLE_ENTRY_TRAINER_CARD, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)TrainerCard_SaveSize, (SaveEntryInitFunc)TrainerCard_Init }, + { SAVE_TABLE_ENTRY_GAME_RECORDS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)GameRecord_SaveSize, (SaveEntryInitFunc)GameRecord_Init }, + { SAVE_TABLE_ENTRY_BALL_SEALS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)BallSeal_SaveSize, (SaveEntryInitFunc)BallSeal_Init }, + { SAVE_TABLE_ENTRY_CHATOT, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)ChatotCry_SaveSize, (SaveEntryInitFunc)ChatotCry_Init }, + { SAVE_TABLE_ENTRY_FRONTIER, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Frontier_SaveSize, (SaveEntryInitFunc)Frontier_Init }, + { SAVE_TABLE_ENTRY_RIBBONS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Ribbons_SaveSize, (SaveEntryInitFunc)Ribbons_Init }, + { SAVE_TABLE_ENTRY_ENCOUNTERS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)SpecialEncounter_SaveSize, (SaveEntryInitFunc)SpecialEncounter_Init }, + { SAVE_TABLE_ENTRY_GLOBAL_TRADE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)GlobalTrade_SaveSize, (SaveEntryInitFunc)GlobalTrade_Init }, + { SAVE_TABLE_ENTRY_TV_BROADCAST, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)TVBroadcast_SaveSize, (SaveEntryInitFunc)TVBroadcast_Init }, + { SAVE_TABLE_ENTRY_RANKINGS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Rankings_SaveSize, (SaveEntryInitFunc)Rankings_Init }, + { SAVE_TABLE_ENTRY_WIFI_LIST, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)WiFiList_SaveSize, (SaveEntryInitFunc)WiFiList_Init }, + { SAVE_TABLE_ENTRY_WIFI_HISTORY, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)WiFiHistory_SaveSize, (SaveEntryInitFunc)WiFiHistory_Init }, + { SAVE_TABLE_ENTRY_MYSTERY_GIFT, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)MysteryGift_SaveSize, (SaveEntryInitFunc)MysteryGift_Init }, + { SAVE_TABLE_ENTRY_PAL_PARK_TRANSFER, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)PalParkTransfer_SaveSize, (SaveEntryInitFunc)PalParkTransfer_Init }, + { SAVE_TABLE_ENTRY_CONTESTS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Contest_SaveSize, (SaveEntryInitFunc)Contest_Init }, + { SAVE_TABLE_ENTRY_SENTENCE, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Sentence_SaveSize, (SaveEntryInitFunc)Sentence_Init }, + { SAVE_TABLE_ENTRY_EMAIL, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)Email_SaveSize, (SaveEntryInitFunc)Email_Init }, + { SAVE_TABLE_ENTRY_WIFI_QUESTIONS, SAVE_BLOCK_ID_NORMAL, (SaveEntrySizeFunc)WiFiQuestion_SaveSize, (SaveEntryInitFunc)WiFiQuestion_Init }, + { SAVE_TABLE_ENTRY_PC_BOXES, SAVE_BLOCK_ID_BOXES, (SaveEntrySizeFunc)PCBoxes_SaveSize, (SaveEntryInitFunc)PCBoxes_Init }, }; -const int Unk_020E5830 = NELEMS(Unk_020E5894); +const int gSaveTableSize = NELEMS(gSaveTable); -UnkStruct_0202440C * sub_0202440C (UnkStruct_021C0794 * param0) +TVBroadcast * SaveData_TVBroadcast (SaveData * param0) { - sub_02025C48(27); - return sub_020245BC(param0, 27); + SaveData_CRC(27); + return SaveData_Get(param0, 27); } -UnkStruct_020797DC * sub_02024420 (UnkStruct_021C0794 * param0) +PCBoxes * SaveData_PCBoxes (SaveData * param0) { - return sub_020245BC(param0, 37); + return SaveData_Get(param0, 37); } -UnkStruct_0202442C * sub_0202442C (UnkStruct_021C0794 * param0) +MysteryGift * SaveData_MysteryGift (SaveData * param0) { - sub_02025C48(31); - return sub_020245BC(param0, 31); + SaveData_CRC(31); + return SaveData_Get(param0, 31); } -UnkStruct_02024440 * sub_02024440 (UnkStruct_021C0794 * param0) +PalParkTransfer * SaveData_PalParkTransfer (SaveData * param0) { - return sub_020245BC(param0, 32); + return SaveData_Get(param0, 32); } -const UnkStruct_02025340 Unk_020E5834[] = { - {0x0, 0x20, (UnkFuncPtr_020E5894)sub_0202DF8C, (UnkFuncPtr_020E5894_1)sub_0202DF94}, - {0x1, 0x23, (UnkFuncPtr_020E5894)sub_02030880, (UnkFuncPtr_020E5894_1)sub_02030888}, - {0x2, 0x24, (UnkFuncPtr_020E5894)sub_0202F1D4, (UnkFuncPtr_020E5894_1)sub_0202F1DC}, - {0x3, 0x26, (UnkFuncPtr_020E5894)sub_0202F1D4, (UnkFuncPtr_020E5894_1)sub_0202F1DC}, - {0x4, 0x28, (UnkFuncPtr_020E5894)sub_0202F1D4, (UnkFuncPtr_020E5894_1)sub_0202F1DC}, - {0x5, 0x2A, (UnkFuncPtr_020E5894)sub_0202F1D4, (UnkFuncPtr_020E5894_1)sub_0202F1DC} +const SaveTableEntry gExtraSaveTable[] = { + { EXTRA_SAVE_TABLE_ENTRY_HALL_OF_FAME, SAVE_PAGE_MAX, (SaveEntrySizeFunc)HallOfFame_SaveSize, (SaveEntryInitFunc)HallOfFame_Init }, + { EXTRA_SAVE_TABLE_ENTRY_FRONTIER, SAVE_PAGE_MAX + 3, (SaveEntrySizeFunc)Frontier_Extra_SaveSize, (SaveEntryInitFunc)Frontier_Extra_Init }, + { EXTRA_SAVE_TABLE_ENTRY_MY_RECORDINGS, SAVE_PAGE_MAX + 4, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, + { EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_0, SAVE_PAGE_MAX + 6, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, + { EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_1, SAVE_PAGE_MAX + 8, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, + { EXTRA_SAVE_TABLE_ENTRY_DL_RECORDINGS_2, SAVE_PAGE_MAX + 10, (SaveEntrySizeFunc)BattleRecording_SaveSize, (SaveEntryInitFunc)BattleRecording_Init }, }; -const int Unk_020E582C = NELEMS(Unk_020E5834); +const int gExtraSaveTableSize = NELEMS(gExtraSaveTable); -UnkStruct_0202DF8C * sub_0202444C (UnkStruct_021C0794 * param0, int param1, int * param2) +HallOfFame * SaveData_HallOfFame (SaveData * param0, int param1, int * param2) { - return sub_02025680(param0, param1, 0, param2); + return SaveDataExtra_Get(param0, param1, 0, param2); } -int sub_02024458 (UnkStruct_021C0794 * param0, UnkStruct_0202DF8C * param1) +int SaveData_SaveHallOfFame (SaveData * param0, HallOfFame * param1) { - return sub_02025428(param0, 0, param1); + return SaveDataExtra_Save(param0, 0, param1); } -UnkStruct_0202F264 * sub_02024464 (UnkStruct_021C0794 * param0, int param1, int * param2, int param3) +BattleRecording * SaveData_BattleRecording (SaveData * param0, int param1, int * param2, int param3) { BOOL v0; - return sub_020257E8(param0, param1, 2 + param3, param2, &v0); + return SaveDataExtra_Mirror(param0, param1, 2 + param3, param2, &v0); } -int sub_0202447C (UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1, int param2) +int SaveData_SaveBattleRecording (SaveData * param0, BattleRecording * param1, int param2) { - return sub_02025574(param0, 2 + param2, param1); + return SaveDataExtra_SaveMirror(param0, 2 + param2, param1); } -UnkStruct_020308A0 * sub_0202448C (UnkStruct_021C0794 * param0, int param1, int * param2) +BattleFrontierStage * SaveData_BattleFrontierStage (SaveData * param0, int param1, int * param2) { BOOL v0; - return sub_020257E8(param0, param1, 1, param2, &v0); + return SaveDataExtra_Mirror(param0, param1, 1, param2, &v0); } -int sub_020244A0 (UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1) +int SaveData_SaveBattleFrontierStage (SaveData * param0, BattleFrontierStage * param1) { - return sub_02025574(param0, 1, param1); + return SaveDataExtra_SaveMirror(param0, 1, param1); } diff --git a/src/unk_020244AC.c b/src/unk_020244AC.c index 05a260d1f1..d9e7beebbc 100644 --- a/src/unk_020244AC.c +++ b/src/unk_020244AC.c @@ -5,13 +5,7 @@ #include "struct_decls/struct_0202783C_decl.h" -#include "constdata/const_020E5830.h" -#include "constdata/const_020E5894.h" -#include "constdata/const_020E5834.h" -#include "constdata/const_020E582C.h" - -#include "struct_defs/struct_020251A4.h" -#include "struct_defs/struct_02025340.h" +#include "savedata/save_table.h" #include "unk_02017728.h" #include "heap.h" @@ -62,7 +56,7 @@ typedef struct { volatile BOOL unk_24; } UnkStruct_020250DC; -typedef struct UnkStruct_021C0794_t { +typedef struct SaveData { BOOL unk_00; BOOL unk_04; BOOL unk_08; @@ -77,7 +71,7 @@ typedef struct UnkStruct_021C0794_t { UnkStruct_020250DC unk_2029C; int unk_202C4; u32 unk_202C8; -} UnkStruct_021C0794; +} SaveData; typedef struct { BOOL unk_00; @@ -96,30 +90,30 @@ typedef struct { static void sub_020252EC(UnkStruct_020252EC * param0, const UnkStruct_020251DC * param1); static void sub_020251DC(UnkStruct_020251DC * param0); static void sub_02025258(UnkStruct_02025258 * param0, const UnkStruct_020251DC * param1); -static BOOL sub_0202513C(UnkStruct_021C0794 * param0); -static BOOL sub_02024DBC(UnkStruct_021C0794 * param0); -static int sub_02024ABC(UnkStruct_021C0794 * param0); -static void sub_02024CD4(UnkStruct_021C0794 * param0, int * param1, int * param2); -static void sub_02024EC8(UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1, int param2); -static int sub_02024F44(UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1); -static void sub_0202506C(UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1, int param2); -static void sub_020250DC(UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1); -static BOOL sub_0202516C(const UnkStruct_021C0794 * param0, int param1, int param2); +static BOOL sub_0202513C(SaveData * param0); +static BOOL sub_02024DBC(SaveData * param0); +static int sub_02024ABC(SaveData * param0); +static void sub_02024CD4(SaveData * param0, int * param1, int * param2); +static void sub_02024EC8(SaveData * param0, UnkStruct_020250DC * param1, int param2); +static int sub_02024F44(SaveData * param0, UnkStruct_020250DC * param1); +static void sub_0202506C(SaveData * param0, UnkStruct_020250DC * param1, int param2); +static void sub_020250DC(SaveData * param0, UnkStruct_020250DC * param1); +static BOOL sub_0202516C(const SaveData * param0, int param1, int param2); static s32 sub_02025B3C(u32 param0, void * param1, u32 param2); static BOOL sub_02025BB8(s32 param0, BOOL param1, BOOL * param2); static void sub_02025C1C(s32 param0, int param1); -static void sub_020259F8(UnkStruct_021C0794 * param0, int param1, u32 * param2, u32 * param3, u8 * param4); -static void sub_02025A18(UnkStruct_021C0794 * param0, int param1, u32 param2, u32 param3, u8 param4); +static void sub_020259F8(SaveData * param0, int param1, u32 * param2, u32 * param3, u8 * param4); +static void sub_02025A18(SaveData * param0, int param1, u32 param2, u32 param3, u8 param4); -static UnkStruct_021C0794 * Unk_021C0794 = NULL; +static SaveData * Unk_021C0794 = NULL; -UnkStruct_021C0794 * sub_020244AC (void) +SaveData * sub_020244AC (void) { - UnkStruct_021C0794 * v0; + SaveData * v0; int v1; - v0 = Heap_AllocFromHeap(1, sizeof(UnkStruct_021C0794)); - MI_CpuClearFast(v0, sizeof(UnkStruct_021C0794)); + v0 = Heap_AllocFromHeap(1, sizeof(SaveData)); + MI_CpuClearFast(v0, sizeof(SaveData)); Unk_021C0794 = v0; @@ -177,24 +171,24 @@ UnkStruct_021C0794 * sub_020244AC (void) return v0; } -UnkStruct_021C0794 * sub_020245A4 (void) +SaveData * sub_020245A4 (void) { GF_ASSERT(Unk_021C0794 != NULL); return Unk_021C0794; } -void * sub_020245BC (UnkStruct_021C0794 * param0, int param1) +void * SaveData_Get (SaveData * param0, int param1) { GF_ASSERT(param1 < 38); return &(param0->unk_14.unk_00[param0->unk_20024[param1].unk_08]); } -const void * sub_020245E0 (const UnkStruct_021C0794 * param0, int param1) +const void * sub_020245E0 (const SaveData * param0, int param1) { - return sub_020245BC((UnkStruct_021C0794 *)param0, param1); + return SaveData_Get((SaveData *)param0, param1); } -BOOL sub_020245E8 (UnkStruct_021C0794 * param0) +BOOL sub_020245E8 (SaveData * param0) { int v0, v1; u8 * v2 = Heap_AllocFromHeapAtEnd(3, 0x1000); @@ -222,7 +216,7 @@ BOOL sub_020245E8 (UnkStruct_021C0794 * param0) return 1; } -BOOL sub_020246A8 (UnkStruct_021C0794 * param0) +BOOL sub_020246A8 (SaveData * param0) { BOOL v0; @@ -248,7 +242,7 @@ BOOL sub_020246A8 (UnkStruct_021C0794 * param0) } } -int sub_020246E0 (UnkStruct_021C0794 * param0) +int sub_020246E0 (SaveData * param0) { int v0; @@ -277,7 +271,7 @@ int sub_020246E0 (UnkStruct_021C0794 * param0) return v0; } -int sub_02024760 (UnkStruct_021C0794 * param0, int param1) +int sub_02024760 (SaveData * param0, int param1) { int v0; @@ -294,7 +288,7 @@ int sub_02024760 (UnkStruct_021C0794 * param0, int param1) return v0; } -void sub_0202479C (UnkStruct_021C0794 * param0) +void sub_0202479C (SaveData * param0) { param0->unk_08 = 1; param0->unk_0C = 1; @@ -302,27 +296,27 @@ void sub_0202479C (UnkStruct_021C0794 * param0) sub_020252EC(¶m0->unk_14, param0->unk_20024); } -BOOL sub_020247B8 (const UnkStruct_021C0794 * param0) +BOOL sub_020247B8 (const SaveData * param0) { return param0->unk_00; } -u32 sub_020247BC (const UnkStruct_021C0794 * param0) +u32 sub_020247BC (const SaveData * param0) { return param0->unk_10; } -BOOL sub_020247C0 (const UnkStruct_021C0794 * param0) +BOOL sub_020247C0 (const SaveData * param0) { return param0->unk_04; } -BOOL sub_020247C4 (const UnkStruct_021C0794 * param0) +BOOL sub_020247C4 (const SaveData * param0) { return param0->unk_08; } -BOOL sub_020247C8 (UnkStruct_021C0794 * param0) +BOOL sub_020247C8 (SaveData * param0) { UnkStruct_0202783C * v0; @@ -330,7 +324,7 @@ BOOL sub_020247C8 (UnkStruct_021C0794 * param0) return sub_020278CC(v0); } -static void sub_020247D4 (UnkStruct_021C0794 * param0) +static void sub_020247D4 (SaveData * param0) { UnkStruct_0202783C * v0; @@ -338,7 +332,7 @@ static void sub_020247D4 (UnkStruct_021C0794 * param0) sub_020278B8(v0); } -BOOL sub_020247E0 (const UnkStruct_021C0794 * param0) +BOOL sub_020247E0 (const SaveData * param0) { if (sub_020247C4(param0) && sub_020247C0(param0)) { return 1; @@ -347,7 +341,7 @@ BOOL sub_020247E0 (const UnkStruct_021C0794 * param0) } } -BOOL sub_02024800 (const UnkStruct_021C0794 * param0) +BOOL sub_02024800 (const SaveData * param0) { return param0->unk_0C; } @@ -357,12 +351,12 @@ void sub_02024804 (void) Unk_021C0794->unk_0C = 1; } -void sub_02024814 (UnkStruct_021C0794 * param0, int param1) +void sub_02024814 (SaveData * param0, int param1) { sub_02024EC8(param0, ¶m0->unk_2029C, param1); } -int sub_02024828 (UnkStruct_021C0794 * param0) +int sub_02024828 (SaveData * param0) { int v0; @@ -375,7 +369,7 @@ int sub_02024828 (UnkStruct_021C0794 * param0) return v0; } -void sub_02024850 (UnkStruct_021C0794 * param0) +void sub_02024850 (SaveData * param0) { sub_020250DC(param0, ¶m0->unk_2029C); } @@ -387,12 +381,12 @@ static void sub_02024860 (UnkStruct_02024860 * param0) param0->unk_08 = 0; } -u16 sub_0202486C (const UnkStruct_021C0794 * param0, const void * param1, u32 param2) +u16 sub_0202486C (const SaveData * param0, const void * param1, u32 param2) { return sub_0201D628(param1, param2); } -static u16 sub_02024878 (const UnkStruct_021C0794 * param0, void * param1, u32 param2) +static u16 sub_02024878 (const SaveData * param0, void * param1, u32 param2) { return sub_0201D628(param1, param2 - sizeof(UnkStruct_02024920)); } @@ -411,7 +405,7 @@ static u32 sub_02024888 (int param0, const UnkStruct_02025258 * param1) return v0; } -static UnkStruct_02024920 * sub_0202489C (UnkStruct_021C0794 * param0, u32 param1, int param2) +static UnkStruct_02024920 * sub_0202489C (SaveData * param0, u32 param1, int param2) { u32 v0; const UnkStruct_02025258 * v1 = ¶m0->unk_20284[param2]; @@ -425,7 +419,7 @@ static UnkStruct_02024920 * sub_0202489C (UnkStruct_021C0794 * param0, u32 param return (UnkStruct_02024920 *)v0; } -static BOOL sub_020248C4 (UnkStruct_021C0794 * param0, u32 param1, int param2) +static BOOL sub_020248C4 (SaveData * param0, u32 param1, int param2) { const UnkStruct_02025258 * v0 = ¶m0->unk_20284[param2]; UnkStruct_02024920 * v1 = sub_0202489C(param0, param1, param2); @@ -450,7 +444,7 @@ static BOOL sub_020248C4 (UnkStruct_021C0794 * param0, u32 param1, int param2) return 1; } -static void sub_02024920 (UnkStruct_02024860 * param0, UnkStruct_021C0794 * param1, u32 param2, int param3) +static void sub_02024920 (UnkStruct_02024860 * param0, SaveData * param1, u32 param2, int param3) { UnkStruct_02024920 * v0 = sub_0202489C(param1, param2, param3); @@ -459,7 +453,7 @@ static void sub_02024920 (UnkStruct_02024860 * param0, UnkStruct_021C0794 * para param0->unk_08 = v0->unk_04; } -static void sub_0202494C (UnkStruct_021C0794 * param0, u32 param1, int param2) +static void sub_0202494C (SaveData * param0, u32 param1, int param2) { const UnkStruct_02025258 * v0 = ¶m0->unk_20284[param2]; UnkStruct_02024920 * v1 = sub_0202489C(param0, param1, param2); @@ -531,7 +525,7 @@ static int sub_020249D4 (const UnkStruct_02024860 * param0, const UnkStruct_0202 } } -static void inline_02024ABC (UnkStruct_021C0794 * param0, const UnkStruct_02024860 * param1, const UnkStruct_02024860 * param2, int param3, int param4) +static void inline_02024ABC (SaveData * param0, const UnkStruct_02024860 * param1, const UnkStruct_02024860 * param2, int param3, int param4) { param0->unk_20014 = param1[param3].unk_04; param0->unk_20018[0] = param1[param3].unk_08; @@ -540,7 +534,7 @@ static void inline_02024ABC (UnkStruct_021C0794 * param0, const UnkStruct_020248 param0->unk_20020[1] = param4; } -static int sub_02024ABC (UnkStruct_021C0794 * param0) +static int sub_02024ABC (SaveData * param0) { UnkStruct_02024860 v0[2]; UnkStruct_02024860 v1[2]; @@ -628,7 +622,7 @@ static int sub_02024ABC (UnkStruct_021C0794 * param0) } } -static void sub_02024CD4 (UnkStruct_021C0794 * param0, int * param1, int * param2) +static void sub_02024CD4 (SaveData * param0, int * param1, int * param2) { void * v0; int v1; @@ -648,7 +642,7 @@ static void sub_02024CD4 (UnkStruct_021C0794 * param0, int * param1, int * param sub_020279A8(v4, 1, &v5, &v6, &v7); if ((v5 != 0xffffffff) || (v6 != 0xffffffff)) { - v0 = sub_020257E8( + v0 = SaveDataExtra_Mirror( param0, 3, 1, &v1, &v2); Heap_FreeToHeap(v0); @@ -663,7 +657,7 @@ static void sub_02024CD4 (UnkStruct_021C0794 * param0, int * param1, int * param sub_020279A8(v4, v3, &v5, &v6, &v7); if ((v5 != 0xffffffff) || (v6 != 0xffffffff)) { - v0 = sub_020257E8(param0, 3, v3, &v1, &v2); + v0 = SaveDataExtra_Mirror(param0, 3, v3, &v1, &v2); Heap_FreeToHeap(v0); if (v1 == 2) { @@ -687,7 +681,7 @@ static BOOL sub_02024DA4 (int param0, const UnkStruct_02025258 * param1, u8 * pa return sub_02025AC0(v0, param2, param1->unk_08); } -static BOOL sub_02024DBC (UnkStruct_021C0794 * param0) +static BOOL sub_02024DBC (SaveData * param0) { int v0; u32 v1; @@ -704,13 +698,13 @@ static BOOL sub_02024DBC (UnkStruct_021C0794 * param0) } for (v0 = 0; v0 < 38; v0++) { - param0->unk_20024[v0].unk_0C = sub_0201D628(sub_020245BC(param0, v0), param0->unk_20024[v0].unk_04); + param0->unk_20024[v0].unk_0C = sub_0201D628(SaveData_Get(param0, v0), param0->unk_20024[v0].unk_04); } return 1; } -static s32 sub_02024E30 (UnkStruct_021C0794 * param0, int param1, u8 param2) +static s32 sub_02024E30 (SaveData * param0, int param1, u8 param2) { u32 v0; BOOL v1; @@ -725,7 +719,7 @@ static s32 sub_02024E30 (UnkStruct_021C0794 * param0, int param1, u8 param2) return sub_02025B3C(v0, v2, v3->unk_08 - sizeof(UnkStruct_02024920)); } -static s32 sub_02024E68 (UnkStruct_021C0794 * param0, int param1, u8 param2) +static s32 sub_02024E68 (SaveData * param0, int param1, u8 param2) { u32 v0; BOOL v1; @@ -738,7 +732,7 @@ static s32 sub_02024E68 (UnkStruct_021C0794 * param0, int param1, u8 param2) return sub_02025B3C(v0, v2, sizeof(UnkStruct_02024920)); } -static s32 sub_02024E98 (UnkStruct_021C0794 * param0, int param1, u8 param2) +static s32 sub_02024E98 (SaveData * param0, int param1, u8 param2) { u32 v0; BOOL v1; @@ -751,7 +745,7 @@ static s32 sub_02024E98 (UnkStruct_021C0794 * param0, int param1, u8 param2) return sub_02025B3C(v0, v2, 8); } -static void sub_02024EC8 (UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1, int param2) +static void sub_02024EC8 (SaveData * param0, UnkStruct_020250DC * param1, int param2) { int v0; @@ -787,7 +781,7 @@ static void sub_02024EC8 (UnkStruct_021C0794 * param0, UnkStruct_020250DC * para sub_02017B7C(1); } -static int sub_02024F44 (UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1) +static int sub_02024F44 (SaveData * param0, UnkStruct_020250DC * param1) { BOOL v0; @@ -856,7 +850,7 @@ static int sub_02024F44 (UnkStruct_021C0794 * param0, UnkStruct_020250DC * param return 0; } -static void sub_0202506C (UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1, int param2) +static void sub_0202506C (SaveData * param0, UnkStruct_020250DC * param1, int param2) { int v0; @@ -881,7 +875,7 @@ static void sub_0202506C (UnkStruct_021C0794 * param0, UnkStruct_020250DC * para sub_02017B8C(1); } -static void sub_020250DC (UnkStruct_021C0794 * param0, UnkStruct_020250DC * param1) +static void sub_020250DC (SaveData * param0, UnkStruct_020250DC * param1) { int v0; @@ -906,7 +900,7 @@ static void sub_020250DC (UnkStruct_021C0794 * param0, UnkStruct_020250DC * para sub_02017B8C(1); } -BOOL sub_0202513C (UnkStruct_021C0794 * param0) +BOOL sub_0202513C (SaveData * param0) { int v0; UnkStruct_020250DC v1; @@ -921,7 +915,7 @@ BOOL sub_0202513C (UnkStruct_021C0794 * param0) return v0; } -static BOOL sub_0202516C (const UnkStruct_021C0794 * param0, int param1, int param2) +static BOOL sub_0202516C (const SaveData * param0, int param1, int param2) { u32 v0; UnkStruct_02024920 v1; @@ -936,10 +930,10 @@ static BOOL sub_0202516C (const UnkStruct_021C0794 * param0, int param1, int par int sub_020251A4 (int param0) { int v0; - const UnkStruct_020251A4 * v1 = Unk_020E5894; + const SaveTableEntry * v1 = gSaveTable; - GF_ASSERT(param0 < Unk_020E5830); - v0 = v1[param0].unk_08(); + GF_ASSERT(param0 < gSaveTableSize); + v0 = v1[param0].sizeFunc(); v0 += 4 - (v0 % 4); v0 += 4; @@ -949,24 +943,24 @@ int sub_020251A4 (int param0) static void sub_020251DC (UnkStruct_020251DC * param0) { - const UnkStruct_020251A4 * v0 = Unk_020E5894; + const SaveTableEntry * v0 = gSaveTable; int v1; int v2 = 0; - GF_ASSERT(Unk_020E5830 == 38); + GF_ASSERT(gSaveTableSize == 38); - for (v1 = 0; v1 < Unk_020E5830; v1++) { - GF_ASSERT(v0[v1].unk_00 == v1); + for (v1 = 0; v1 < gSaveTableSize; v1++) { + GF_ASSERT(v0[v1].dataID == v1); - param0[v1].unk_00 = v0[v1].unk_00; + param0[v1].unk_00 = v0[v1].dataID; param0[v1].unk_04 = sub_020251A4(v1); param0[v1].unk_08 = v2; param0[v1].unk_0C = 0; - param0[v1].unk_0E = v0[v1].unk_04; + param0[v1].unk_0E = v0[v1].blockID; v2 += param0[v1].unk_04; - if ((v1 == Unk_020E5830 - 1) || (v0[v1].unk_04 != v0[v1 + 1].unk_04)) { + if ((v1 == gSaveTableSize - 1) || (v0[v1].blockID != v0[v1 + 1].blockID)) { v2 += sizeof(UnkStruct_02024920); } } @@ -991,7 +985,7 @@ static void sub_02025258 (UnkStruct_02025258 * param0, const UnkStruct_020251DC param0[v3].unk_00 = v3; param0[v3].unk_08 = 0; - for (; param1[v4].unk_0E == v3 && v4 < Unk_020E5830; v4++) { + for (; param1[v4].unk_0E == v3 && v4 < gSaveTableSize; v4++) { param0[v3].unk_08 += param1[v4].unk_04; } @@ -1010,7 +1004,7 @@ static void sub_02025258 (UnkStruct_02025258 * param0, const UnkStruct_020251DC static void sub_020252EC (UnkStruct_020252EC * param0, const UnkStruct_020251DC * param1) { - const UnkStruct_020251A4 * v0 = Unk_020E5894; + const SaveTableEntry * v0 = gSaveTable; int v1; int v2; void * v3; @@ -1018,18 +1012,18 @@ static void sub_020252EC (UnkStruct_020252EC * param0, const UnkStruct_020251DC MI_CpuClearFast(param0->unk_00, sizeof(param0->unk_00)); - for (v1 = 0; v1 < Unk_020E5830; v1++) { + for (v1 = 0; v1 < gSaveTableSize; v1++) { v4 = param1[v1].unk_08; v3 = ¶m0->unk_00[v4]; v2 = param1[v1].unk_04; MI_CpuClearFast(v3, v2); - v0[v1].unk_0C(v3); + v0[v1].initFunc(v3); } } -void sub_02025340 (UnkStruct_021C0794 * param0) +void sub_02025340 (SaveData * param0) { - const UnkStruct_02025340 * v0 = Unk_020E5834; + const SaveTableEntry * v0 = gExtraSaveTable; int v1; int v2; void * v3; @@ -1038,26 +1032,26 @@ void sub_02025340 (UnkStruct_021C0794 * param0) return; } - for (v1 = 0; v1 < Unk_020E582C; v1++) { - if (v0[v1].unk_00 == 0) { + for (v1 = 0; v1 < gExtraSaveTableSize; v1++) { + if (v0[v1].dataID == 0) { continue; } - v3 = sub_02025680(param0, 3, v0[v1].unk_00, &v2); + v3 = SaveDataExtra_Get(param0, 3, v0[v1].dataID, &v2); GF_ASSERT(v3 != NULL); - MI_CpuClear8(v3, v0[v1].unk_08()); + MI_CpuClear8(v3, v0[v1].sizeFunc()); - v0[v1].unk_0C(v3); + v0[v1].initFunc(v3); - sub_02025428(param0, v0[v1].unk_00, v3); + SaveDataExtra_Save(param0, v0[v1].dataID, v3); Heap_FreeToHeap(v3); } sub_020247D4(param0); } -static void sub_020253B4 (const UnkStruct_021C0794 * param0, void * param1, int param2, u32 param3) +static void sub_020253B4 (const SaveData * param0, void * param1, int param2, u32 param3) { UnkStruct_020253B4 * v0; @@ -1070,7 +1064,7 @@ static void sub_020253B4 (const UnkStruct_021C0794 * param0, void * param1, int v0->unk_0E = sub_0201D628(param1, param3 + sizeof(UnkStruct_020253B4) - 2); } -static BOOL sub_020253E0 (const UnkStruct_021C0794 * param0, void * param1, int param2, u32 param3) +static BOOL sub_020253E0 (const SaveData * param0, void * param1, int param2, u32 param3) { const UnkStruct_020253B4 * v0; @@ -1101,38 +1095,38 @@ static u32 sub_02025420 (void * param0, u32 param1) return v0->unk_04; } -int sub_02025428 (const UnkStruct_021C0794 * param0, int param1, void * param2) +int SaveDataExtra_Save (const SaveData * param0, int param1, void * param2) { - const UnkStruct_02025340 * v0; + const SaveTableEntry * v0; u32 v1; BOOL v2; sub_02017B7C(1); - GF_ASSERT(param1 < Unk_020E582C); - v0 = &Unk_020E5834[param1]; + GF_ASSERT(param1 < gExtraSaveTableSize); + v0 = &gExtraSaveTable[param1]; - GF_ASSERT(v0->unk_00 == param1); - v1 = v0->unk_08() + sizeof(UnkStruct_020253B4); + GF_ASSERT(v0->dataID == param1); + v1 = v0->sizeFunc() + sizeof(UnkStruct_020253B4); if (param0->unk_202C4 == 1) { - sub_020253B4(param0, param2, param1, v0->unk_08()); - v2 = sub_02025A9C((0 + v0->unk_04) * 0x1000, param2, v1); + sub_020253B4(param0, param2, param1, v0->sizeFunc()); + v2 = sub_02025A9C((0 + v0->blockID) * 0x1000, param2, v1); - GF_ASSERT(sub_020253E0(param0, param2, param1, v0->unk_08()) == 1); - sub_020253B4(param0, param2, param1, v0->unk_08()); + GF_ASSERT(sub_020253E0(param0, param2, param1, v0->sizeFunc()) == 1); + sub_020253B4(param0, param2, param1, v0->sizeFunc()); - v2 |= sub_02025A9C((64 + v0->unk_04) * 0x1000, param2, v1); - GF_ASSERT(sub_020253E0(param0, param2, param1, v0->unk_08()) == 1); + v2 |= sub_02025A9C((64 + v0->blockID) * 0x1000, param2, v1); + GF_ASSERT(sub_020253E0(param0, param2, param1, v0->sizeFunc()) == 1); } else { - sub_020253B4(param0, param2, param1, v0->unk_08()); - v2 = sub_02025A9C((64 + v0->unk_04) * 0x1000, param2, v1); + sub_020253B4(param0, param2, param1, v0->sizeFunc()); + v2 = sub_02025A9C((64 + v0->blockID) * 0x1000, param2, v1); - GF_ASSERT(sub_020253E0(param0, param2, param1, v0->unk_08()) == 1); - sub_020253B4(param0, param2, param1, v0->unk_08()); + GF_ASSERT(sub_020253E0(param0, param2, param1, v0->sizeFunc()) == 1); + sub_020253B4(param0, param2, param1, v0->sizeFunc()); - v2 |= sub_02025A9C((0 + v0->unk_04) * 0x1000, param2, v1); - GF_ASSERT(sub_020253E0(param0, param2, param1, v0->unk_08()) == 1); + v2 |= sub_02025A9C((0 + v0->blockID) * 0x1000, param2, v1); + GF_ASSERT(sub_020253E0(param0, param2, param1, v0->sizeFunc()) == 1); } if (v2 == 1) { @@ -1144,9 +1138,9 @@ int sub_02025428 (const UnkStruct_021C0794 * param0, int param1, void * param2) } } -int sub_02025574 (UnkStruct_021C0794 * param0, int param1, void * param2) +int SaveDataExtra_SaveMirror (SaveData * param0, int param1, void * param2) { - const UnkStruct_02025340 * v0; + const SaveTableEntry * v0; u32 v1; BOOL v2; u32 v3, v4, v5; @@ -1154,11 +1148,11 @@ int sub_02025574 (UnkStruct_021C0794 * param0, int param1, void * param2) sub_02017B7C(1); - GF_ASSERT(param1 < Unk_020E582C); - v0 = &Unk_020E5834[param1]; + GF_ASSERT(param1 < gExtraSaveTableSize); + v0 = &gExtraSaveTable[param1]; - GF_ASSERT(v0->unk_00 == param1); - v1 = v0->unk_08() + sizeof(UnkStruct_020253B4); + GF_ASSERT(v0->dataID == param1); + v1 = v0->sizeFunc() + sizeof(UnkStruct_020253B4); sub_020259F8(param0, param1, &v3, &v4, &v6); @@ -1171,13 +1165,13 @@ int sub_02025574 (UnkStruct_021C0794 * param0, int param1, void * param2) *((u32 *)param2) = v5; if (v6 == 1) { - sub_020253B4(param0, param2, param1, v0->unk_08()); - v2 = sub_02025A9C((0 + v0->unk_04) * 0x1000, param2, v1); - GF_ASSERT(sub_020253E0(param0, param2, param1, v0->unk_08()) == 1); + sub_020253B4(param0, param2, param1, v0->sizeFunc()); + v2 = sub_02025A9C((0 + v0->blockID) * 0x1000, param2, v1); + GF_ASSERT(sub_020253E0(param0, param2, param1, v0->sizeFunc()) == 1); } else { - sub_020253B4(param0, param2, param1, v0->unk_08()); - v2 = sub_02025A9C((64 + v0->unk_04) * 0x1000, param2, v1); - GF_ASSERT(sub_020253E0(param0, param2, param1, v0->unk_08()) == 1); + sub_020253B4(param0, param2, param1, v0->sizeFunc()); + v2 = sub_02025A9C((64 + v0->blockID) * 0x1000, param2, v1); + GF_ASSERT(sub_020253E0(param0, param2, param1, v0->sizeFunc()) == 1); } if (v2 == 1) { @@ -1189,44 +1183,44 @@ int sub_02025574 (UnkStruct_021C0794 * param0, int param1, void * param2) } } -void * sub_02025680 (UnkStruct_021C0794 * param0, int param1, int param2, int * param3) +void * SaveDataExtra_Get (SaveData * param0, int param1, int param2, int * param3) { - const UnkStruct_02025340 * v0; + const SaveTableEntry * v0; void * v1; u32 v2; BOOL v3, v4; u32 v5, v6; - GF_ASSERT(param2 < Unk_020E582C); - v0 = &Unk_020E5834[param2]; + GF_ASSERT(param2 < gExtraSaveTableSize); + v0 = &gExtraSaveTable[param2]; - GF_ASSERT(v0->unk_00 == param2); - v2 = v0->unk_08() + sizeof(UnkStruct_020253B4); + GF_ASSERT(v0->dataID == param2); + v2 = v0->sizeFunc() + sizeof(UnkStruct_020253B4); v1 = Heap_AllocFromHeap(param1, v2); - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); - v3 = sub_020253E0(param0, v1, param2, v0->unk_08()); - v5 = sub_02025420(v1, v0->unk_08()); + v3 = sub_020253E0(param0, v1, param2, v0->sizeFunc()); + v5 = sub_02025420(v1, v0->sizeFunc()); - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); - v4 = sub_020253E0(param0, v1, param2, v0->unk_08()); - v6 = sub_02025420(v1, v0->unk_08()); + v4 = sub_020253E0(param0, v1, param2, v0->sizeFunc()); + v6 = sub_02025420(v1, v0->sizeFunc()); *param3 = 1; if ((v3 == 1) && (v4 == 0)) { param0->unk_202C4 = 0; param0->unk_202C8 = v5; - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); return v1; } if ((v3 == 0) && (v4 == 1)) { param0->unk_202C4 = 1; param0->unk_202C8 = v6; - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); return v1; } @@ -1234,12 +1228,12 @@ void * sub_02025680 (UnkStruct_021C0794 * param0, int param1, int param2, int * if (sub_0202499C(v5, v6) != -1) { param0->unk_202C4 = 0; param0->unk_202C8 = v5; - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); return v1; } else { param0->unk_202C4 = 1; param0->unk_202C8 = v6; - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); return v1; } } @@ -1252,9 +1246,9 @@ void * sub_02025680 (UnkStruct_021C0794 * param0, int param1, int param2, int * return v1; } -void * sub_020257E8 (UnkStruct_021C0794 * param0, int param1, int param2, int * param3, BOOL * param4) +void * SaveDataExtra_Mirror (SaveData * param0, int param1, int param2, int * param3, BOOL * param4) { - const UnkStruct_02025340 * v0; + const SaveTableEntry * v0; void * v1; u32 v2; BOOL v3, v4; @@ -1263,23 +1257,23 @@ void * sub_020257E8 (UnkStruct_021C0794 * param0, int param1, int param2, int * u8 v9; UnkStruct_0202783C * v10 = sub_0202783C(param0); - GF_ASSERT(param2 < Unk_020E582C); + GF_ASSERT(param2 < gExtraSaveTableSize); GF_ASSERT(param2 != 0); - v0 = &Unk_020E5834[param2]; - GF_ASSERT(v0->unk_00 == param2); + v0 = &gExtraSaveTable[param2]; + GF_ASSERT(v0->dataID == param2); - v2 = v0->unk_08() + sizeof(UnkStruct_020253B4); + v2 = v0->sizeFunc() + sizeof(UnkStruct_020253B4); v1 = Heap_AllocFromHeap(param1, v2); sub_020259F8(param0, param2, &v7, &v8, &v9); - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); - v3 = sub_020253E0(param0, v1, param2, v0->unk_08()); + v3 = sub_020253E0(param0, v1, param2, v0->sizeFunc()); MI_CpuCopy8(v1, &v5, sizeof(u32)); - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); - v4 = sub_020253E0(param0, v1, param2, v0->unk_08()); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); + v4 = sub_020253E0(param0, v1, param2, v0->sizeFunc()); MI_CpuCopy8(v1, &v6, sizeof(u32)); @@ -1293,7 +1287,7 @@ void * sub_020257E8 (UnkStruct_021C0794 * param0, int param1, int param2, int * *param4 = 1; } - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); return v1; } } @@ -1305,7 +1299,7 @@ void * sub_020257E8 (UnkStruct_021C0794 * param0, int param1, int param2, int * *param4 = 1; } - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); return v1; } } @@ -1313,39 +1307,39 @@ void * sub_020257E8 (UnkStruct_021C0794 * param0, int param1, int param2, int * if ((v3 == 1) && (v4 == 1)) { if (v9 == 0) { if (v7 == v5) { - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); return v1; } else if (v8 == v6) { sub_02025A18(param0, param2, v8, v8, v9 ^ 1); *param4 = 1; - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); return v1; } } else { if (v7 == v6) { - sub_02025AC0((64 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((64 + v0->blockID) * 0x1000, v1, v2); return v1; } else if (v8 == v5) { sub_02025A18(param0, param2, v8, v8, v9 ^ 1); *param4 = 1; - sub_02025AC0((0 + v0->unk_04) * 0x1000, v1, v2); + sub_02025AC0((0 + v0->blockID) * 0x1000, v1, v2); return v1; } } } *param3 = 2; - sub_020279D0(v10, v0->unk_00, 0xffffffff, 0xffffffff, 0); + sub_020279D0(v10, v0->dataID, 0xffffffff, 0xffffffff, 0); return v1; } -static void sub_020259F8 (UnkStruct_021C0794 * param0, int param1, u32 * param2, u32 * param3, u8 * param4) +static void sub_020259F8 (SaveData * param0, int param1, u32 * param2, u32 * param3, u8 * param4) { sub_020279A8(sub_0202783C(param0), param1, param2, param3, param4); } -static void sub_02025A18 (UnkStruct_021C0794 * param0, int param1, u32 param2, u32 param3, u8 param4) +static void sub_02025A18 (SaveData * param0, int param1, u32 param2, u32 param3, u8 param4) { sub_020279D0(sub_0202783C(param0), param1, param2, param3, param4); } @@ -1491,10 +1485,10 @@ static void sub_02025C1C (s32 param0, int param1) sub_0209AA74(1, param1); } -BOOL sub_02025C48 (int param0) +BOOL SaveData_CRC (int param0) { - UnkStruct_021C0794 * v0 = sub_020245A4(); - void * v1 = sub_020245BC(v0, param0); + SaveData * v0 = sub_020245A4(); + void * v1 = SaveData_Get(v0, param0); int v2 = sub_020251A4(param0) - 4; int v3 = v2 / 2; u16 * v4 = v1; @@ -1515,8 +1509,8 @@ BOOL sub_02025C48 (int param0) void sub_02025C84 (int param0) { - UnkStruct_021C0794 * v0 = sub_020245A4(); - void * v1 = sub_020245BC(v0, param0); + SaveData * v0 = sub_020245A4(); + void * v1 = SaveData_Get(v0, param0); u16 * v2 = v1; int v3, v4; u16 v5; diff --git a/src/unk_02025CB0.c b/src/unk_02025CB0.c index a71ac30ce8..8d472f3ca4 100644 --- a/src/unk_02025CB0.c +++ b/src/unk_02025CB0.c @@ -20,23 +20,23 @@ typedef struct UnkStruct_02025CCC_t { u32 unk_50[3]; } UnkStruct_02025CCC; -int sub_02025CB0 (void) +int SystemData_SaveSize (void) { return sizeof(UnkStruct_02025CCC); } -void sub_02025CB4 (UnkStruct_02025CCC * param0) +void SystemData_Init (UnkStruct_02025CCC * param0) { MI_CpuClearFast(param0, sizeof(UnkStruct_02025CCC)); sub_02025D84(¶m0->unk_10); } -UnkStruct_02025CCC * sub_02025CCC (UnkStruct_021C0794 * param0) +UnkStruct_02025CCC * sub_02025CCC (SaveData * param0) { - return sub_020245BC(param0, 0); + return SaveData_Get(param0, 0); } -UnkStruct_02055BA8 * sub_02025CD8 (UnkStruct_021C0794 * param0) +UnkStruct_02055BA8 * sub_02025CD8 (SaveData * param0) { UnkStruct_02025CCC * v0; diff --git a/src/unk_02025E08.c b/src/unk_02025E08.c index daec4dce10..b293abe879 100644 --- a/src/unk_02025E08.c +++ b/src/unk_02025E08.c @@ -21,12 +21,12 @@ struct UnkStruct_02025E0C_t { UnkStruct_02025E5C unk_26; }; -int sub_02025E08 (void) +int Player_SaveSize (void) { return sizeof(UnkStruct_02025E0C); } -void sub_02025E0C (UnkStruct_02025E0C * param0) +void Player_Init (UnkStruct_02025E0C * param0) { MI_CpuClearFast(param0, sizeof(UnkStruct_02025E0C)); @@ -36,34 +36,34 @@ void sub_02025E0C (UnkStruct_02025E0C * param0) sub_0202CBE4(¶m0->unk_26); } -TrainerInfo * sub_02025E38 (UnkStruct_021C0794 * param0) +TrainerInfo * sub_02025E38 (SaveData * param0) { UnkStruct_02025E0C * v0; - v0 = sub_020245BC(param0, 1); + v0 = SaveData_Get(param0, 1); return &v0->unk_04; } -UnkStruct_020279FC * sub_02025E44 (UnkStruct_021C0794 * param0) +UnkStruct_020279FC * sub_02025E44 (SaveData * param0) { UnkStruct_02025E0C * v0; - v0 = sub_020245BC(param0, 1); + v0 = SaveData_Get(param0, 1); return &v0->unk_00; } -u16 * sub_02025E50 (UnkStruct_021C0794 * param0) +u16 * sub_02025E50 (SaveData * param0) { UnkStruct_02025E0C * v0; - v0 = sub_020245BC(param0, 1); + v0 = SaveData_Get(param0, 1); return &v0->unk_24; } -UnkStruct_02025E5C * sub_02025E5C (UnkStruct_021C0794 * param0) +UnkStruct_02025E5C * sub_02025E5C (SaveData * param0) { UnkStruct_02025E0C * v0; - v0 = sub_020245BC(param0, 1); + v0 = SaveData_Get(param0, 1); return &v0->unk_26; } diff --git a/src/unk_0202602C.c b/src/unk_0202602C.c index 422cafcfde..7c6fef5bda 100644 --- a/src/unk_0202602C.c +++ b/src/unk_0202602C.c @@ -18,7 +18,7 @@ int sub_0202602C (void) return sizeof(UnkStruct_0202610C); } -int sub_02026030 (void) +int RegulationBattles_SaveSize (void) { return sizeof(UnkStruct_02026030); } @@ -28,7 +28,7 @@ void sub_02026034 (const UnkStruct_0202610C * param0, UnkStruct_0202610C * param MI_CpuCopy8(param0, param1, sizeof(UnkStruct_0202610C)); } -void sub_02026040 (UnkStruct_02026030 * param0) +void RegulationBattles_Init (UnkStruct_02026030 * param0) { memset(param0, 0, sizeof(UnkStruct_02026030)); } @@ -100,12 +100,12 @@ int sub_02026074 (const UnkStruct_0202610C * param0, int param1) return v0; } -UnkStruct_0202610C * sub_0202610C (UnkStruct_021C0794 * param0, int param1) +UnkStruct_0202610C * sub_0202610C (SaveData * param0, int param1) { UnkStruct_02026030 * v0 = NULL; GF_ASSERT(param1 < 1); - v0 = sub_020245BC(param0, 13); + v0 = SaveData_Get(param0, 13); if (sub_02026074(&v0->unk_00[param1], 1) != 0) { return &v0->unk_00[param1]; @@ -114,10 +114,10 @@ UnkStruct_0202610C * sub_0202610C (UnkStruct_021C0794 * param0, int param1) return NULL; } -void sub_0202613C (UnkStruct_021C0794 * param0, const UnkStruct_0202610C * param1) +void sub_0202613C (SaveData * param0, const UnkStruct_0202610C * param1) { UnkStruct_02026030 * v0 = NULL; - v0 = sub_020245BC(param0, 13); + v0 = SaveData_Get(param0, 13); sub_02026034(param1, &v0->unk_00[0]); } diff --git a/src/unk_02026150.c b/src/unk_02026150.c index d50df150d4..7fdf7e5271 100644 --- a/src/unk_02026150.c +++ b/src/unk_02026150.c @@ -96,7 +96,7 @@ UnkStruct_0202610C Unk_02100860 = { 0x0 }; -const UnkStruct_0202610C * sub_02026150 (UnkStruct_021C0794 * param0, int param1) +const UnkStruct_0202610C * sub_02026150 (SaveData * param0, int param1) { UnkStruct_02026030 * v0 = NULL; @@ -104,11 +104,11 @@ const UnkStruct_0202610C * sub_02026150 (UnkStruct_021C0794 * param0, int param1 return &Unk_02100880[param1]; } - v0 = sub_020245BC(param0, 13); + v0 = SaveData_Get(param0, 13); return &v0->unk_00[0]; } -void sub_0202616C (UnkStruct_021C0794 * param0, int param1, Strbuf *param2, int param3) +void sub_0202616C (SaveData * param0, int param1, Strbuf *param2, int param3) { MessageLoader * v0; UnkStruct_02026030 * v1 = NULL; diff --git a/src/unk_020261E4.c b/src/unk_020261E4.c index 14ead71474..6811566642 100644 --- a/src/unk_020261E4.c +++ b/src/unk_020261E4.c @@ -30,12 +30,12 @@ typedef struct UnkStruct_02026310_t { u8 unk_DC; } UnkStruct_02026310; -int sub_020261E4 (void) +int Daycare_SaveSize (void) { return sizeof(UnkStruct_02026310); } -void sub_020261EC (UnkStruct_02026310 * param0) +void Daycare_Init (UnkStruct_02026310 * param0) { memset(param0, 0, sizeof(UnkStruct_02026310)); @@ -152,10 +152,10 @@ void sub_020262F4 (UnkStruct_02026218 * param0) sub_020262C0(¶m0->unk_08); } -UnkStruct_02026310 * sub_02026310 (UnkStruct_021C0794 * param0) +UnkStruct_02026310 * sub_02026310 (SaveData * param0) { UnkStruct_02026310 * v0; - v0 = sub_020245BC(param0, 8); + v0 = SaveData_Get(param0, 8); return v0; } diff --git a/src/unk_0202631C.c b/src/unk_0202631C.c index 51575e8acb..b83c118a87 100644 --- a/src/unk_0202631C.c +++ b/src/unk_0202631C.c @@ -34,7 +34,7 @@ typedef struct UnkStruct_02026324_t { u16 unk_322; } UnkStruct_02026324; -int sub_0202631C (void) +int Pokedex_SaveSize (void) { return sizeof(UnkStruct_02026324); } @@ -44,7 +44,7 @@ UnkStruct_02026324 * sub_02026324 (u32 param0) UnkStruct_02026324 * v0; v0 = Heap_AllocFromHeap(param0, sizeof(UnkStruct_02026324)); - sub_02026D6C(v0); + Pokedex_Init(v0); return v0; } @@ -743,7 +743,7 @@ static BOOL sub_02026D68 (u16 param0) return 1; } -void sub_02026D6C (UnkStruct_02026324 * param0) +void Pokedex_Init (UnkStruct_02026324 * param0) { memset(param0, 0, sizeof(UnkStruct_02026324)); @@ -1187,11 +1187,11 @@ void sub_02027540 (UnkStruct_02026324 * param0) param0->unk_31A = 1; } -UnkStruct_02026324 * sub_02027560 (UnkStruct_021C0794 * param0) +UnkStruct_02026324 * sub_02027560 (SaveData * param0) { UnkStruct_02026324 * v0; - v0 = sub_020245BC(param0, 7); + v0 = SaveData_Get(param0, 7); return v0; } diff --git a/src/unk_020277A4.c b/src/unk_020277A4.c index 44d48cdc1c..5d7aefd774 100644 --- a/src/unk_020277A4.c +++ b/src/unk_020277A4.c @@ -39,12 +39,12 @@ typedef struct UnkStruct_0202783C_t { UnkStruct_0202783C_sub1 unk_6DC; } UnkStruct_0202783C; -int sub_020277A4 (void) +int MiscSaveBlock_SaveSize (void) { return sizeof(UnkStruct_0202783C); } -void sub_020277AC (UnkStruct_0202783C * param0) +void MiscSaveBlock_Init (UnkStruct_0202783C * param0) { MI_CpuClearFast(param0, sizeof(UnkStruct_0202783C)); @@ -70,29 +70,29 @@ void sub_020277AC (UnkStruct_0202783C * param0) } } -UnkStruct_0202783C * sub_0202783C (UnkStruct_021C0794 * param0) +UnkStruct_0202783C * sub_0202783C (SaveData * param0) { - return sub_020245BC(param0, 10); + return SaveData_Get(param0, 10); } -const UnkStruct_0202783C * sub_02027848 (const UnkStruct_021C0794 * param0) +const UnkStruct_0202783C * sub_02027848 (const SaveData * param0) { return sub_020245E0(param0, 10); } -UnkStruct_02027854 * sub_02027854 (UnkStruct_021C0794 * param0) +UnkStruct_02027854 * sub_02027854 (SaveData * param0) { UnkStruct_0202783C * v0; - v0 = sub_020245BC(param0, 10); + v0 = SaveData_Get(param0, 10); return v0->unk_00; } -UnkStruct_02027860 * sub_02027860 (UnkStruct_021C0794 * param0) +UnkStruct_02027860 * sub_02027860 (SaveData * param0) { UnkStruct_0202783C * v0; - v0 = sub_020245BC(param0, 10); + v0 = SaveData_Get(param0, 10); return &v0->unk_680; } diff --git a/src/unk_020279FC.c b/src/unk_020279FC.c index 787f168a08..adb6424430 100644 --- a/src/unk_020279FC.c +++ b/src/unk_020279FC.c @@ -38,7 +38,7 @@ void sub_02027A1C (UnkStruct_020279FC * param0) param0->unk_02_2 = 0; } -void sub_02027A68 (UnkStruct_021C0794 * param0, int param1) +void sub_02027A68 (SaveData * param0, int param1) { UnkStruct_020279FC * v0; diff --git a/src/unk_02027F84.c b/src/unk_02027F84.c index 5f5d5a08c6..e277ff8e7b 100644 --- a/src/unk_02027F84.c +++ b/src/unk_02027F84.c @@ -10,17 +10,17 @@ #include "unk_020244AC.h" #include "unk_02027F84.h" -int sub_02027F84 (void) +int PalPad_SaveSize (void) { return sizeof(UnkStruct_02027F8C) * 16; } -UnkStruct_02027F8C * sub_02027F8C (UnkStruct_021C0794 * param0) +UnkStruct_02027F8C * sub_02027F8C (SaveData * param0) { - return sub_020245BC(param0, 9); + return SaveData_Get(param0, 9); } -void sub_02027F98 (UnkStruct_02027F8C * param0) +void PalPad_Init (UnkStruct_02027F8C * param0) { int v0; @@ -58,7 +58,7 @@ void sub_02027FEC (UnkStruct_02027F8C * param0, UnkStruct_02027F8C * param1, int UnkStruct_02027F8C * v4; v4 = Heap_AllocFromHeap(param3, sizeof(UnkStruct_02027F8C) * 16); - sub_02027F98(v4); + PalPad_Init(v4); for (v0 = 0; v0 < param2; v0++) { v3[v0] = -1; diff --git a/src/unk_02028124.c b/src/unk_02028124.c index a8a51a58cf..2b4946f4b9 100644 --- a/src/unk_02028124.c +++ b/src/unk_02028124.c @@ -87,7 +87,7 @@ void sub_020281A0 (UnkStruct_0202818C * param0, UnkStruct_0202818C * param1) MI_CpuCopy8(param0, param1, sizeof(UnkStruct_0202818C)); } -void sub_020281AC (UnkStruct_0202818C * param0, u8 param1, u8 param2, UnkStruct_021C0794 * param3) +void sub_020281AC (UnkStruct_0202818C * param0, u8 param1, u8 param2, SaveData * param3) { u8 v0, v1, v2, v3; u16 v4; @@ -234,17 +234,17 @@ void sub_0202841C (UnkStruct_0202818C * param0, UnkStruct_02014A84 * param1, u8 sub_02014CC0(¶m0->unk_20[param2], param1); } -UnkStruct_02028430 * sub_02028430 (UnkStruct_021C0794 * param0) +UnkStruct_02028430 * sub_02028430 (SaveData * param0) { - return sub_020245BC(param0, 15); + return SaveData_Get(param0, 15); } -int sub_0202843C (void) +int Mail_SaveSize (void) { return sizeof(UnkStruct_0202818C) * 20; } -void sub_02028444 (UnkStruct_02028430 * param0) +void Mail_Init (UnkStruct_02028430 * param0) { int v0 = 0; diff --git a/src/unk_0202854C.c b/src/unk_0202854C.c index 47e13aca7d..ce23b3bbad 100644 --- a/src/unk_0202854C.c +++ b/src/unk_0202854C.c @@ -73,7 +73,7 @@ u16 Unk_02100920[] = { 0x139 }; -int sub_0202854C (void) +int Underground_SaveSize (void) { return sizeof(UnkStruct_020298B0); } @@ -97,7 +97,7 @@ UnkStruct_0202855C * sub_0202855C (u32 param0) return v0; } -void sub_02028574 (UnkStruct_020298B0 * param0) +void Underground_Init (UnkStruct_020298B0 * param0) { u32 v0 = 0; RTCDate v1; @@ -164,7 +164,7 @@ static int sub_02028638 (UnkStruct_020298B0 * param0) return -1; } -void sub_02028658 (UnkStruct_021C0794 * param0, int param1) +void sub_02028658 (SaveData * param0, int param1) { UnkStruct_020298B0 * v0 = sub_020298B0(param0); MATHRandContext16 v1; @@ -203,7 +203,7 @@ void sub_02028658 (UnkStruct_021C0794 * param0, int param1) v0->unk_9AC_0 = 1; } -void sub_02028758 (UnkStruct_021C0794 * param0, s32 param1, BOOL param2) +void sub_02028758 (SaveData * param0, s32 param1, BOOL param2) { UnkStruct_020298B0 * v0 = sub_020298B0(param0); @@ -218,7 +218,7 @@ void sub_02028758 (UnkStruct_021C0794 * param0, s32 param1, BOOL param2) } } -void sub_0202878C (UnkStruct_021C0794 * param0) +void sub_0202878C (SaveData * param0) { UnkStruct_020298B0 * v0 = sub_020298B0(param0); @@ -235,7 +235,7 @@ void sub_0202878C (UnkStruct_021C0794 * param0) } } -void sub_020287E0 (UnkStruct_021C0794 * param0) +void sub_020287E0 (SaveData * param0) { UnkStruct_020298B0 * v0 = sub_020298B0(param0); @@ -244,7 +244,7 @@ void sub_020287E0 (UnkStruct_021C0794 * param0) } } -void sub_020287F8 (UnkStruct_021C0794 * param0) +void sub_020287F8 (SaveData * param0) { UnkStruct_020298B0 * v0 = sub_020298B0(param0); @@ -253,7 +253,7 @@ void sub_020287F8 (UnkStruct_021C0794 * param0) } } -BOOL sub_02028810 (UnkStruct_021C0794 * param0) +BOOL sub_02028810 (SaveData * param0) { UnkStruct_020298B0 * v0 = sub_020298B0(param0); @@ -1361,19 +1361,19 @@ BOOL sub_0202988C (const UnkStruct_02029894 * param0) return param0->unk_91; } -UnkStruct_02029894 * sub_02029894 (UnkStruct_021C0794 * param0) +UnkStruct_02029894 * sub_02029894 (SaveData * param0) { UnkStruct_020298B0 * v0; - v0 = sub_020245BC(param0, 12); + v0 = SaveData_Get(param0, 12); return &v0->unk_00; } -UnkStruct_0202855C * sub_020298A0 (UnkStruct_021C0794 * param0) +UnkStruct_0202855C * sub_020298A0 (SaveData * param0) { UnkStruct_020298B0 * v0; - v0 = sub_020245BC(param0, 12); + v0 = SaveData_Get(param0, 12); return &v0->unk_00.unk_50; } @@ -1382,10 +1382,10 @@ UnkStruct_0202855C * sub_020298AC (UnkStruct_02029894 * param0) return ¶m0->unk_50; } -UnkStruct_020298B0 * sub_020298B0 (UnkStruct_021C0794 * param0) +UnkStruct_020298B0 * sub_020298B0 (SaveData * param0) { UnkStruct_020298B0 * v0; - v0 = sub_020245BC(param0, 12); + v0 = SaveData_Get(param0, 12); return v0; } diff --git a/src/unk_020298BC.c b/src/unk_020298BC.c index 2fb47b4618..b599ccf3fc 100644 --- a/src/unk_020298BC.c +++ b/src/unk_020298BC.c @@ -311,7 +311,7 @@ static void sub_02029BD8 (Pokemon * param0, u8 * param1, u8 * param2) *param2 += (5 * 8); } -void sub_02029BFC (UnkStruct_0202A750 * param0) +void ImageClip_Init (UnkStruct_0202A750 * param0) { int v0; @@ -326,7 +326,7 @@ void sub_02029BFC (UnkStruct_0202A750 * param0) sub_02029BB0(¶m0->unk_7A4); } -int sub_02029C58 (void) +int ImageClip_SaveSize (void) { return sizeof(UnkStruct_0202A750); } @@ -984,11 +984,11 @@ void sub_0202A6A8 (u8 param0, int param1, UnkStruct_0202A750 * param2, const voi } } -UnkStruct_0202A750 * sub_0202A750 (UnkStruct_021C0794 * param0) +UnkStruct_0202A750 * sub_0202A750 (SaveData * param0) { UnkStruct_0202A750 * v0 = NULL; - v0 = sub_020245BC(param0, 14); + v0 = SaveData_Get(param0, 14); return v0; } diff --git a/src/unk_0202ACE0.c b/src/unk_0202ACE0.c index 3a82efb972..65e81eae0a 100644 --- a/src/unk_0202ACE0.c +++ b/src/unk_0202ACE0.c @@ -16,12 +16,12 @@ #include "unk_0202ACE0.h" #include "unk_02038FFC.h" -int sub_0202ACE0 (void) +int WiFiList_SaveSize (void) { return sizeof(UnkStruct_0202B370); } -void sub_0202ACE8 (UnkStruct_0202B370 * param0) +void WiFiList_Init (UnkStruct_0202B370 * param0) { int v0; @@ -377,10 +377,10 @@ void sub_0202B270 (UnkStruct_0202B370 * param0, int param1, int param2) param0->unk_1C0[param1].unk_2E = 2; } -UnkStruct_0202B370 * sub_0202B370 (UnkStruct_021C0794 * param0) +UnkStruct_0202B370 * sub_0202B370 (SaveData * param0) { UnkStruct_0202B370 * v0; - v0 = sub_020245BC(param0, 29); + v0 = SaveData_Get(param0, 29); return v0; } diff --git a/src/unk_0202B37C.c b/src/unk_0202B37C.c index aacf5b06c9..d3705aaaad 100644 --- a/src/unk_0202B37C.c +++ b/src/unk_0202B37C.c @@ -15,7 +15,7 @@ UnkStruct_0202B4A0 * Unk_021C079C; -int sub_0202B37C (void) +int RandomGroup_SaveSize (void) { return sizeof(UnkStruct_0202B4A0); } @@ -25,7 +25,7 @@ void sub_0202B384 (UnkStruct_0202B4A0 * param0, int param1, int param2) param0->unk_00[param2] = param0->unk_00[param1]; } -void sub_0202B3A8 (UnkStruct_0202B4A0 * param0) +void RandomGroup_Init (UnkStruct_0202B4A0 * param0) { int v0; @@ -108,9 +108,9 @@ void sub_0202B494 (UnkStruct_0202B4A0 * param0, int param1, int param2) param0->unk_00[param1].unk_21 = param2; } -UnkStruct_0202B4A0 * sub_0202B4A0 (UnkStruct_021C0794 * param0) +UnkStruct_0202B4A0 * sub_0202B4A0 (SaveData * param0) { - return (UnkStruct_0202B4A0 *)sub_020245BC(param0, 17); + return (UnkStruct_0202B4A0 *)SaveData_Get(param0, 17); } BOOL sub_0202B4AC (const UnkStruct_0202B4A0 * param0, int param1) diff --git a/src/unk_0202B604.c b/src/unk_0202B604.c index 77928ce603..c4ee52a541 100644 --- a/src/unk_0202B604.c +++ b/src/unk_0202B604.c @@ -117,7 +117,7 @@ static const UnkStruct_020E5B50 Unk_020E5B50[] = { {0x140, 0x9A, 0x7} }; -int sub_0202B604 (void) +int Journal_SaveSize (void) { return sizeof(UnkStruct_0202B628) * 10; } @@ -127,14 +127,14 @@ static void sub_0202B60C (UnkStruct_0202B628 * param0) memset(param0, 0, sizeof(UnkStruct_0202B628)); } -void sub_0202B618 (UnkStruct_0202B628 * param0) +void Journal_Init (UnkStruct_0202B628 * param0) { memset(param0, 0, sizeof(UnkStruct_0202B628) * 10); } -UnkStruct_0202B628 * sub_0202B628 (UnkStruct_021C0794 * param0) +UnkStruct_0202B628 * sub_0202B628 (SaveData * param0) { - return sub_020245BC(param0, 18); + return SaveData_Get(param0, 18); } UnkStruct_0202B628 * sub_0202B634 (UnkStruct_0202B628 * param0, BOOL param1) diff --git a/src/unk_0202C7FC.c b/src/unk_0202C7FC.c index f1bfec27fe..516e9e8a97 100644 --- a/src/unk_0202C7FC.c +++ b/src/unk_0202C7FC.c @@ -15,12 +15,12 @@ typedef struct UnkStruct_0202C834_t { u8 unk_20[1536]; } UnkStruct_0202C834; -int sub_0202C7FC (void) +int TrainerCard_SaveSize (void) { return sizeof(UnkStruct_0202C834); } -void sub_0202C804 (UnkStruct_0202C834 * param0) +void TrainerCard_Init (UnkStruct_0202C834 * param0) { memset(param0, 0, sizeof(UnkStruct_0202C834)); @@ -36,9 +36,9 @@ void sub_0202C804 (UnkStruct_0202C834 * param0) } } -UnkStruct_0202C834 * sub_0202C834 (UnkStruct_021C0794 * param0) +UnkStruct_0202C834 * sub_0202C834 (SaveData * param0) { - return sub_020245BC(param0, 19); + return SaveData_Get(param0, 19); } u8 * sub_0202C840 (UnkStruct_0202C834 * param0) diff --git a/src/unk_0202C858.c b/src/unk_0202C858.c index 356629aeb4..5bc7cb4526 100644 --- a/src/unk_0202C858.c +++ b/src/unk_0202C858.c @@ -8,21 +8,21 @@ #include "unk_020244AC.h" #include "unk_0202C858.h" -int sub_0202C858 (void) +int WiFiHistory_SaveSize (void) { return sizeof(UnkStruct_0202C878); } -void sub_0202C860 (UnkStruct_0202C878 * param0) +void WiFiHistory_Init (UnkStruct_0202C878 * param0) { MI_CpuClear32(param0, sizeof(UnkStruct_0202C878)); sub_02025C84(30); } -UnkStruct_0202C878 * sub_0202C878 (UnkStruct_021C0794 * param0) +UnkStruct_0202C878 * sub_0202C878 (SaveData * param0) { - sub_02025C48(30); - return (UnkStruct_0202C878 *)sub_020245BC(param0, 30); + SaveData_CRC(30); + return (UnkStruct_0202C878 *)SaveData_Get(param0, 30); } void sub_0202C88C (UnkStruct_0202C878 * param0, int param1, int param2) diff --git a/src/unk_0202C9F4.c b/src/unk_0202C9F4.c index 70b41ecdf2..8fd81d9e0d 100644 --- a/src/unk_0202C9F4.c +++ b/src/unk_0202C9F4.c @@ -11,16 +11,16 @@ #include "unk_020244AC.h" #include "unk_0202C9F4.h" -int sub_0202C9F4 (void) +int BallSeal_SaveSize (void) { return sizeof(UnkStruct_0202CA1C); } -void sub_0202C9FC (UnkStruct_0202CA1C * param0) +void BallSeal_Init (UnkStruct_0202CA1C * param0) { int v0; - v0 = sub_0202C9F4(); + v0 = BallSeal_SaveSize(); MI_CpuFill8(param0, 0, v0); } @@ -29,11 +29,11 @@ void sub_0202CA10 (const UnkStruct_0202CA28 * param0, UnkStruct_0202CA28 * param MI_CpuCopy8(param0, param1, sizeof(UnkStruct_0202CA28)); } -UnkStruct_0202CA1C * sub_0202CA1C (UnkStruct_021C0794 * param0) +UnkStruct_0202CA1C * sub_0202CA1C (SaveData * param0) { UnkStruct_0202CA1C * v0 = NULL; - v0 = sub_020245BC(param0, 21); + v0 = SaveData_Get(param0, 21); return v0; } diff --git a/src/unk_0202CC64.c b/src/unk_0202CC64.c index 6bfa1ffd30..07c4b7d0ef 100644 --- a/src/unk_0202CC64.c +++ b/src/unk_0202CC64.c @@ -12,12 +12,12 @@ typedef struct UnkStruct_0202CC84_t { s8 unk_04[1000]; } UnkStruct_0202CC84; -int sub_0202CC64 (void) +int ChatotCry_SaveSize (void) { return sizeof(UnkStruct_0202CC84); } -void sub_0202CC6C (UnkStruct_0202CC84 * param0) +void ChatotCry_Init (UnkStruct_0202CC84 * param0) { MI_CpuClear32(param0, sizeof(UnkStruct_0202CC84)); param0->unk_00 = 0; @@ -27,13 +27,13 @@ UnkStruct_0202CC84 * sub_0202CC84 (int param0) { UnkStruct_0202CC84 * v0 = Heap_AllocFromHeap(param0, sizeof(UnkStruct_0202CC84)); - sub_0202CC6C(v0); + ChatotCry_Init(v0); return v0; } -UnkStruct_0202CC84 * sub_0202CC98 (UnkStruct_021C0794 * param0) +UnkStruct_0202CC84 * sub_0202CC98 (SaveData * param0) { - return (UnkStruct_0202CC84 *)sub_020245BC(param0, 22); + return (UnkStruct_0202CC84 *)SaveData_Get(param0, 22); } BOOL sub_0202CCA4 (const UnkStruct_0202CC84 * param0) diff --git a/src/unk_0202CD50.c b/src/unk_0202CD50.c index f4ba9acb16..3c5e6a348b 100644 --- a/src/unk_0202CD50.c +++ b/src/unk_0202CD50.c @@ -24,12 +24,12 @@ typedef struct UnkStruct_0202CD88_t { static void sub_0202CD94(UnkStruct_0202CD88 * param0, int param1); static void sub_0202CDC0(UnkStruct_0202CD88 * param0, int param1); -int sub_0202CD50 (void) +int GameRecord_SaveSize (void) { return sizeof(UnkStruct_0202CD88); } -void sub_0202CD58 (UnkStruct_0202CD88 * param0) +void GameRecord_Init (UnkStruct_0202CD88 * param0) { MI_CpuClear32(param0, sizeof(UnkStruct_0202CD88)); param0->unk_1B8.unk_02 = OS_GetVBlankCount() | (OS_GetVBlankCount() << 8); @@ -37,9 +37,9 @@ void sub_0202CD58 (UnkStruct_0202CD88 * param0) sub_0202CD94(param0, (0 + 1)); } -UnkStruct_0202CD88 * sub_0202CD88 (UnkStruct_021C0794 * param0) +UnkStruct_0202CD88 * sub_0202CD88 (SaveData * param0) { - return sub_020245BC(param0, 20); + return SaveData_Get(param0, 20); } static void sub_0202CD94 (UnkStruct_0202CD88 * param0, int param1) diff --git a/src/unk_0202D05C.c b/src/unk_0202D05C.c index 30f2e63e4d..7ad1967e79 100644 --- a/src/unk_0202D05C.c +++ b/src/unk_0202D05C.c @@ -374,15 +374,15 @@ u32 sub_0202D474 (UnkStruct_0202D750 * param0) return param0->unk_04; } -void sub_0202D478 (UnkStruct_021C0794 * param0, int param1, UnkStruct_02014A84 * param2) +void sub_0202D478 (SaveData * param0, int param1, UnkStruct_02014A84 * param2) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); sub_02014CC0(&(v0->unk_950.unk_168.unk_00[param1]), param2); } -UnkStruct_02014A84 * sub_0202D498 (UnkStruct_021C0794 * param0, int param1) +UnkStruct_02014A84 * sub_0202D498 (SaveData * param0, int param1) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &(v0->unk_950.unk_168.unk_00[param1]); } @@ -544,20 +544,20 @@ UnkStruct_ov90_021D1750 * sub_0202D71C (UnkStruct_0202D764 * param0, int param1) return v0; } -UnkStruct_0202D060 * sub_0202D740 (UnkStruct_021C0794 * param0) +UnkStruct_0202D060 * sub_0202D740 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_8E0_val1; } -UnkStruct_0202D750 * sub_0202D750 (UnkStruct_021C0794 * param0) +UnkStruct_0202D750 * sub_0202D750 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_950.unk_00; } -UnkStruct_0202D764 * sub_0202D764 (UnkStruct_021C0794 * param0) +UnkStruct_0202D764 * sub_0202D764 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_950.unk_188; } diff --git a/src/unk_0202D778.c b/src/unk_0202D778.c index 3eebfac5a0..14bf00e812 100644 --- a/src/unk_0202D778.c +++ b/src/unk_0202D778.c @@ -6,17 +6,17 @@ #include "unk_020244AC.h" #include "unk_0202D778.h" -int sub_0202D778 (void) +int Ribbons_SaveSize (void) { return 14; } -void sub_0202D77C (u8 * param0) +void Ribbons_Init (u8 * param0) { memset(param0, 0, 14); } -u8 * sub_0202D79C (UnkStruct_021C0794 * param0) +u8 * sub_0202D79C (SaveData * param0) { - return sub_020245BC(param0, 24); + return SaveData_Get(param0, 24); } diff --git a/src/unk_0202D7A8.c b/src/unk_0202D7A8.c index ec911eeab3..8aaf600d10 100644 --- a/src/unk_0202D7A8.c +++ b/src/unk_0202D7A8.c @@ -13,12 +13,12 @@ #include "unk_020244AC.h" #include "unk_0202D7A8.h" -int sub_0202D7A8 (void) +int SpecialEncounter_SaveSize (void) { return sizeof(UnkStruct_0202D7B0); } -void sub_0202D7B0 (UnkStruct_0202D7B0 * param0) +void SpecialEncounter_Init (UnkStruct_0202D7B0 * param0) { memset(param0, 0, sizeof(UnkStruct_0202D7B0)); @@ -73,9 +73,9 @@ UnkStruct_020698E4 * sub_0202D830 (UnkStruct_0202D7B0 * param0) return &(param0->unk_BC); } -UnkStruct_0202D7B0 * sub_0202D834 (UnkStruct_021C0794 * param0) +UnkStruct_0202D7B0 * sub_0202D834 (SaveData * param0) { - return sub_020245BC(param0, 25); + return SaveData_Get(param0, 25); } UnkStruct_0202D844 * sub_0202D840 (UnkStruct_0202D7B0 * param0) @@ -101,7 +101,7 @@ UnkStruct_0202D84C * sub_0202D84C (const u8 param0, UnkStruct_0202D844 * param1) return v0; } -void sub_0202D854 (UnkStruct_021C0794 * param0, const int param1) +void sub_0202D854 (SaveData * param0, const int param1) { int v0; UnkStruct_0202D844 * v1; @@ -124,7 +124,7 @@ void sub_0202D854 (UnkStruct_021C0794 * param0, const int param1) } } -void sub_0202D884 (UnkStruct_021C0794 * param0) +void sub_0202D884 (SaveData * param0) { UnkStruct_0202D7B0 * v0; @@ -275,7 +275,7 @@ u8 sub_0202DA04 (UnkStruct_0202D7B0 * param0) return param0->unk_151; } -void sub_0202DA10 (UnkStruct_021C0794 * param0, u16 * param1, u16 * param2) +void sub_0202DA10 (SaveData * param0, u16 * param1, u16 * param2) { UnkStruct_0202D7B0 * v0 = sub_0202D834(param0); @@ -283,7 +283,7 @@ void sub_0202DA10 (UnkStruct_021C0794 * param0, u16 * param1, u16 * param2) (*param2) = v0->unk_08.unk_06; } -void sub_0202DA24 (UnkStruct_021C0794 * param0, const u16 param1) +void sub_0202DA24 (SaveData * param0, const u16 param1) { UnkStruct_0202D7B0 * v0 = sub_0202D834(param0); diff --git a/src/unk_0202DA40.c b/src/unk_0202DA40.c index 0d57b630dd..3a31730696 100644 --- a/src/unk_0202DA40.c +++ b/src/unk_0202DA40.c @@ -15,17 +15,17 @@ typedef struct UnkStruct_0202DA40_t { u32 unk_F4; } UnkStruct_0202DA40; -UnkStruct_0202DA40 * sub_0202DA40 (UnkStruct_021C0794 * param0) +UnkStruct_0202DA40 * sub_0202DA40 (SaveData * param0) { - return sub_020245BC(param0, 26); + return SaveData_Get(param0, 26); } -int sub_0202DA4C (void) +int GlobalTrade_SaveSize (void) { return sizeof(UnkStruct_0202DA40); } -void sub_0202DA50 (UnkStruct_0202DA40 * param0) +void GlobalTrade_Init (UnkStruct_0202DA40 * param0) { MI_CpuClearFast(param0, sizeof(UnkStruct_0202DA40)); } diff --git a/src/unk_0202DAB4.c b/src/unk_0202DAB4.c index 9523800e8f..8292f93037 100644 --- a/src/unk_0202DAB4.c +++ b/src/unk_0202DAB4.c @@ -7,24 +7,24 @@ #include "struct_defs/struct_0202DF40.h" #include "struct_defs/union_0204C4D0.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_0202DAB4.h" -typedef struct UnkStruct_0202442C_t { +typedef struct MysteryGift { u8 unk_00[256]; UnkStruct_0202DF40 unk_100[8]; UnkStruct_0202DBAC unk_920[3]; -} UnkStruct_0202442C; +} MysteryGift; -UnkStruct_0202442C * sub_0202442C(UnkStruct_021C0794 * param0); +MysteryGift * SaveData_MysteryGift(SaveData * param0); -int sub_0202DAB4 (void) +int MysteryGift_SaveSize (void) { - return sizeof(UnkStruct_0202442C); + return sizeof(MysteryGift); } -void sub_0202DABC (UnkStruct_0202442C * param0) +void MysteryGift_Init (MysteryGift * param0) { sub_02025C84(31); } @@ -38,7 +38,7 @@ static BOOL sub_0202DAC8 (u16 param0) return 0; } -UnkStruct_0202DF40 * sub_0202DAD8 (UnkStruct_0202442C * param0, int param1) +UnkStruct_0202DF40 * sub_0202DAD8 (MysteryGift * param0, int param1) { if ((param1 >= 0) && (param1 < 8)) { if (sub_0202DAC8(param0->unk_100[param1].unk_00)) { @@ -49,7 +49,7 @@ UnkStruct_0202DF40 * sub_0202DAD8 (UnkStruct_0202442C * param0, int param1) return (UnkStruct_0202DF40 *)NULL; } -UnkStruct_0202DBAC * sub_0202DB00 (UnkStruct_0202442C * param0, int param1) +UnkStruct_0202DBAC * sub_0202DB00 (MysteryGift * param0, int param1) { if ((param1 >= 0) && (param1 < 3)) { if (sub_0202DAC8(param0->unk_920[param1].unk_00)) { @@ -60,7 +60,7 @@ UnkStruct_0202DBAC * sub_0202DB00 (UnkStruct_0202442C * param0, int param1) return NULL; } -BOOL sub_0202DB2C (UnkStruct_0202442C * param0, const void * param1, int param2) +BOOL sub_0202DB2C (MysteryGift * param0, const void * param1, int param2) { int v0; BOOL v1 = 0; @@ -83,7 +83,7 @@ BOOL sub_0202DB2C (UnkStruct_0202442C * param0, const void * param1, int param2) return v1; } -BOOL sub_0202DBAC (UnkStruct_0202442C * param0, const void * param1) +BOOL sub_0202DBAC (MysteryGift * param0, const void * param1) { int v0; UnkStruct_0202DBAC * v1 = (UnkStruct_0202DBAC *)param1; @@ -115,7 +115,7 @@ BOOL sub_0202DBAC (UnkStruct_0202442C * param0, const void * param1) return v2; } -BOOL sub_0202DC48 (UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DC48 (MysteryGift * param0, int param1) { GF_ASSERT(param1 < 8); @@ -127,7 +127,7 @@ BOOL sub_0202DC48 (UnkStruct_0202442C * param0, int param1) return 1; } -BOOL sub_0202DC7C (UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DC7C (MysteryGift * param0, int param1) { GF_ASSERT(param1 < 3); @@ -140,7 +140,7 @@ BOOL sub_0202DC7C (UnkStruct_0202442C * param0, int param1) return 1; } -BOOL sub_0202DCB8 (UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DCB8 (MysteryGift * param0, int param1) { GF_ASSERT(param1 < 3); @@ -150,7 +150,7 @@ BOOL sub_0202DCB8 (UnkStruct_0202442C * param0, int param1) return 1; } -BOOL sub_0202DCE0 (UnkStruct_0202442C * param0) +BOOL sub_0202DCE0 (MysteryGift * param0) { int v0; @@ -163,7 +163,7 @@ BOOL sub_0202DCE0 (UnkStruct_0202442C * param0) return 0; } -BOOL sub_0202DD08 (UnkStruct_0202442C * param0) +BOOL sub_0202DD08 (MysteryGift * param0) { int v0; @@ -176,7 +176,7 @@ BOOL sub_0202DD08 (UnkStruct_0202442C * param0) return 0; } -BOOL sub_0202DD30 (const UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DD30 (const MysteryGift * param0, int param1) { GF_ASSERT(param1 < 8); @@ -187,7 +187,7 @@ BOOL sub_0202DD30 (const UnkStruct_0202442C * param0, int param1) return 0; } -BOOL sub_0202DD5C (const UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DD5C (const MysteryGift * param0, int param1) { GF_ASSERT(param1 < 3); @@ -198,7 +198,7 @@ BOOL sub_0202DD5C (const UnkStruct_0202442C * param0, int param1) return 0; } -BOOL sub_0202DD88 (const UnkStruct_0202442C * param0) +BOOL sub_0202DD88 (const MysteryGift * param0) { int v0; @@ -211,7 +211,7 @@ BOOL sub_0202DD88 (const UnkStruct_0202442C * param0) return 0; } -BOOL sub_0202DDA8 (const UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DDA8 (const MysteryGift * param0, int param1) { int v0; @@ -226,27 +226,27 @@ BOOL sub_0202DDA8 (const UnkStruct_0202442C * param0, int param1) return 0; } -void sub_0202DDE8 (const UnkStruct_0202442C * param0, int param1) +void sub_0202DDE8 (const MysteryGift * param0, int param1) { int v0; for (v0 = 0; v0 < 8; v0++) { if (sub_0202DAC8(param0->unk_100[v0].unk_00)) { if (param0->unk_100[v0].unk_02_0 == param1) { - sub_0202DC48((UnkStruct_0202442C *)param0, v0); + sub_0202DC48((MysteryGift *)param0, v0); return; } } } } -BOOL sub_0202DE2C (UnkStruct_0202442C * param0, int param1) +BOOL sub_0202DE2C (MysteryGift * param0, int param1) { GF_ASSERT(param1 < 2048); return !!(param0->unk_00[param1 / 8] & (1 << (param1 & 7))); } -void sub_0202DE5C (UnkStruct_0202442C * param0, int param1) +void sub_0202DE5C (MysteryGift * param0, int param1) { GF_ASSERT(param1 < 2048); @@ -254,7 +254,7 @@ void sub_0202DE5C (UnkStruct_0202442C * param0, int param1) sub_02025C84(31); } -void sub_0202DE8C (UnkStruct_0202442C * param0, int param1) +void sub_0202DE8C (MysteryGift * param0, int param1) { u8 v0 = (u8) ~(1 << (param1 & 7)); @@ -264,30 +264,30 @@ void sub_0202DE8C (UnkStruct_0202442C * param0, int param1) sub_02025C84(31); } -BOOL sub_0202DEC4 (UnkStruct_0202442C * param0) +BOOL sub_0202DEC4 (MysteryGift * param0) { return sub_0202DE2C(param0, (2048 - 1)); } -void sub_0202DED4 (UnkStruct_0202442C * param0) +void sub_0202DED4 (MysteryGift * param0) { sub_0202DE5C(param0, (2048 - 1)); } -static UnkStruct_0202442C * Unk_021C07A0 = NULL; +static MysteryGift * Unk_021C07A0 = NULL; -void sub_0202DEE4 (UnkStruct_021C0794 * param0, int param1) +void sub_0202DEE4 (SaveData * param0, int param1) { int v0; if (Unk_021C07A0 == NULL) { - Unk_021C07A0 = sub_0202442C(param0); + Unk_021C07A0 = SaveData_MysteryGift(param0); } sub_02025C84(31); } -void sub_0202DF04 (UnkStruct_021C0794 * param0, int param1) +void sub_0202DF04 (SaveData * param0, int param1) { int v0; diff --git a/src/unk_0202DF8C.c b/src/unk_0202DF8C.c index 2d4a968f75..9e1df4d5f4 100644 --- a/src/unk_0202DF8C.c +++ b/src/unk_0202DF8C.c @@ -17,19 +17,19 @@ #include "pokemon.h" #include "party.h" -static int inline inline_0202E1A8(const UnkStruct_0202DF8C * param0, int param1); +static int inline inline_0202E1A8(const HallOfFame * param0, int param1); -int sub_0202DF8C (void) +int HallOfFame_SaveSize (void) { - return sizeof(UnkStruct_0202DF8C); + return sizeof(HallOfFame); } -void sub_0202DF94 (UnkStruct_0202DF8C * param0) +void HallOfFame_Init (HallOfFame * param0) { - MI_CpuClear32(param0, sizeof(UnkStruct_0202DF8C)); + MI_CpuClear32(param0, sizeof(HallOfFame)); } -void sub_0202DFA8 (UnkStruct_0202DF8C * param0, const Party * param1, const RTCDate * param2) +void sub_0202DFA8 (HallOfFame * param0, const Party * param1, const RTCDate * param2) { UnkStruct_0202DFA8 * v0; Pokemon * v1; @@ -97,7 +97,7 @@ void sub_0202DFA8 (UnkStruct_0202DF8C * param0, const Party * param1, const RTCD } } -u32 sub_0202E148 (const UnkStruct_0202DF8C * param0) +u32 sub_0202E148 (const HallOfFame * param0) { GF_ASSERT(param0 != NULL); GF_ASSERT(param0->unk_2AA8 < 30); @@ -109,7 +109,7 @@ u32 sub_0202E148 (const UnkStruct_0202DF8C * param0) return param0->unk_2AAC; } -u32 sub_0202E174 (const UnkStruct_0202DF8C * param0, int param1) +u32 sub_0202E174 (const HallOfFame * param0, int param1) { GF_ASSERT(param0 != NULL); GF_ASSERT(param0->unk_2AA8 < 30); @@ -118,7 +118,7 @@ u32 sub_0202E174 (const UnkStruct_0202DF8C * param0, int param1) return param0->unk_2AAC - param1; } -u32 sub_0202E1A8 (const UnkStruct_0202DF8C * param0, int param1) +u32 sub_0202E1A8 (const HallOfFame * param0, int param1) { u32 v0; @@ -137,7 +137,7 @@ u32 sub_0202E1A8 (const UnkStruct_0202DF8C * param0, int param1) return v0; } -void sub_0202E1F4 (const UnkStruct_0202DF8C * param0, int param1, int param2, UnkStruct_ov87_021D1640 * param3) +void sub_0202E1F4 (const HallOfFame * param0, int param1, int param2, UnkStruct_ov87_021D1640 * param3) { const UnkStruct_0202E1F4 * v0; int v1; @@ -163,7 +163,7 @@ void sub_0202E1F4 (const UnkStruct_0202DF8C * param0, int param1, int param2, Un } } -void sub_0202E274 (const UnkStruct_0202DF8C * param0, int param1, RTCDate * param2) +void sub_0202E274 (const HallOfFame * param0, int param1, RTCDate * param2) { GF_ASSERT(param0 != NULL); GF_ASSERT(param0->unk_2AA8 < 30); @@ -177,7 +177,7 @@ void sub_0202E274 (const UnkStruct_0202DF8C * param0, int param1, RTCDate * para param2->week = 0; } -static int inline inline_0202E1A8 (const UnkStruct_0202DF8C * param0, int param1) +static int inline inline_0202E1A8 (const HallOfFame * param0, int param1) { int v0 = (param0->unk_2AA8 - 1 - param1); diff --git a/src/unk_0202E2CC.c b/src/unk_0202E2CC.c index 9e56c2a4be..527c546b2b 100644 --- a/src/unk_0202E2CC.c +++ b/src/unk_0202E2CC.c @@ -21,21 +21,21 @@ #include "unk_020244AC.h" #include "unk_0202E2CC.h" -static void sub_0202E3AC(UnkStruct_0202440C * param0); -static UnkStruct_0202E768 * sub_0202E4DC(UnkStruct_0202440C * param0, int param1); +static void sub_0202E3AC(TVBroadcast * param0); +static UnkStruct_0202E768 * sub_0202E4DC(TVBroadcast * param0, int param1); -int sub_0202E2CC (void) +int TVBroadcast_SaveSize (void) { - return sizeof(UnkStruct_0202440C); + return sizeof(TVBroadcast); } -void sub_0202E2D4 (UnkStruct_0202440C * param0) +void TVBroadcast_Init (TVBroadcast * param0) { - MI_CpuClearFast(param0, sizeof(UnkStruct_0202440C)); + MI_CpuClearFast(param0, sizeof(TVBroadcast)); sub_02025C84(27); } -void sub_0202E2EC (UnkStruct_0202440C * param0) +void sub_0202E2EC (TVBroadcast * param0) { MI_CpuClearFast(param0->unk_0C, sizeof(UnkStruct_0202E768) * 4); MI_CpuClearFast(param0->unk_C4, sizeof(UnkStruct_0202E768) * 4); @@ -45,7 +45,7 @@ void sub_0202E2EC (UnkStruct_0202440C * param0) sub_02025C84(27); } -void sub_0202E324 (UnkStruct_0202440C * param0, int param1, int param2) +void sub_0202E324 (TVBroadcast * param0, int param1, int param2) { int v0; @@ -68,25 +68,25 @@ void sub_0202E324 (UnkStruct_0202440C * param0, int param1, int param2) sub_02025C84(27); } -void sub_0202E35C (UnkStruct_0202440C * param0) +void sub_0202E35C (TVBroadcast * param0) { sub_0202E374(param0, 0); sub_0202E3AC(param0); sub_02025C84(27); } -void sub_0202E374 (UnkStruct_0202440C * param0, BOOL param1) +void sub_0202E374 (TVBroadcast * param0, BOOL param1) { param0->unk_08 = param1; sub_02025C84(27); } -BOOL sub_0202E380 (const UnkStruct_0202440C * param0) +BOOL sub_0202E380 (const TVBroadcast * param0) { return param0->unk_08; } -void sub_0202E384 (UnkStruct_0202440C * param0, int param1) +void sub_0202E384 (TVBroadcast * param0, int param1) { int v0; @@ -103,7 +103,7 @@ void sub_0202E384 (UnkStruct_0202440C * param0, int param1) sub_02025C84(27); } -static void sub_0202E3AC (UnkStruct_0202440C * param0) +static void sub_0202E3AC (TVBroadcast * param0) { int v0; @@ -114,7 +114,7 @@ static void sub_0202E3AC (UnkStruct_0202440C * param0) sub_02025C84(27); } -BOOL sub_0202E3C4 (const UnkStruct_0202440C * param0, int param1) +BOOL sub_0202E3C4 (const TVBroadcast * param0, int param1) { int v0; @@ -127,7 +127,7 @@ BOOL sub_0202E3C4 (const UnkStruct_0202440C * param0, int param1) return 0; } -int sub_0202E3DC (const UnkStruct_0202440C * param0) +int sub_0202E3DC (const TVBroadcast * param0) { int v0, v1; @@ -154,7 +154,7 @@ static void sub_0202E3F4 (UnkStruct_0202E4D4 * param0, int param1, const u8 * pa sub_02025C84(27); } -BOOL sub_0202E43C (UnkStruct_0202440C * param0, int param1, int param2, const u8 * param3) +BOOL sub_0202E43C (TVBroadcast * param0, int param1, int param2, const u8 * param3) { int v0; UnkStruct_0202E768 * v1; @@ -216,7 +216,7 @@ UnkStruct_0202E4D4 * sub_0202E4D8 (UnkStruct_0202E768 * param0) return ¶m0->unk_00; } -static UnkStruct_0202E768 * sub_0202E4DC (UnkStruct_0202440C * param0, int param1) +static UnkStruct_0202E768 * sub_0202E4DC (TVBroadcast * param0, int param1) { UnkStruct_0202E768 * v0 = NULL; @@ -238,7 +238,7 @@ static UnkStruct_0202E768 * sub_0202E4DC (UnkStruct_0202440C * param0, int param return v0; } -static UnkStruct_0202E794 * sub_0202E518 (UnkStruct_0202440C * param0, int param1) +static UnkStruct_0202E794 * sub_0202E518 (TVBroadcast * param0, int param1) { UnkStruct_0202E794 * v0 = NULL; @@ -321,7 +321,7 @@ static int sub_0202E5B8 (const UnkStruct_0202E794 * param0, int param1, int para return v1; } -int sub_0202E614 (const UnkStruct_0202440C * param0, int param1, int param2, BOOL param3, BOOL param4, u8 * param5) +int sub_0202E614 (const TVBroadcast * param0, int param1, int param2, BOOL param3, BOOL param4, u8 * param5) { switch (param1) { case 2: @@ -351,7 +351,7 @@ int sub_0202E614 (const UnkStruct_0202440C * param0, int param1, int param2, BOO return 0; } -BOOL sub_0202E6B0 (UnkStruct_0202440C * param0, int param1, int param2) +BOOL sub_0202E6B0 (TVBroadcast * param0, int param1, int param2) { int v0; int v1; @@ -391,7 +391,7 @@ BOOL sub_0202E6B0 (UnkStruct_0202440C * param0, int param1, int param2) return 0; } -UnkStruct_0202E768 * sub_0202E768 (UnkStruct_0202440C * param0, int param1, int param2) +UnkStruct_0202E768 * sub_0202E768 (TVBroadcast * param0, int param1, int param2) { UnkStruct_0202E768 * v0; @@ -403,7 +403,7 @@ UnkStruct_0202E768 * sub_0202E768 (UnkStruct_0202440C * param0, int param1, int return &v0[param2 - 1]; } -UnkStruct_0202E794 * sub_0202E794 (UnkStruct_0202440C * param0, int param1, int param2) +UnkStruct_0202E794 * sub_0202E794 (TVBroadcast * param0, int param1, int param2) { UnkStruct_0202E794 * v0; @@ -429,47 +429,47 @@ int sub_0202E7D0 (int param0) return param0 | 0x80; } -UnkStruct_0202E7D8 * sub_0202E7D8 (UnkStruct_0202440C * param0) +UnkStruct_0202E7D8 * sub_0202E7D8 (TVBroadcast * param0) { return ¶m0->unk_AD4; } -UnkStruct_0202E7E4 * sub_0202E7E4 (UnkStruct_0202440C * param0) +UnkStruct_0202E7E4 * sub_0202E7E4 (TVBroadcast * param0) { return ¶m0->unk_ADE; } -UnkStruct_0202E7F0 * sub_0202E7F0 (UnkStruct_0202440C * param0) +UnkStruct_0202E7F0 * sub_0202E7F0 (TVBroadcast * param0) { return ¶m0->unk_B02; } -UnkStruct_0202E7FC * sub_0202E7FC (UnkStruct_0202440C * param0) +UnkStruct_0202E7FC * sub_0202E7FC (TVBroadcast * param0) { return ¶m0->unk_B04; } -UnkStruct_0202E808 * sub_0202E808 (UnkStruct_0202440C * param0) +UnkStruct_0202E808 * sub_0202E808 (TVBroadcast * param0) { return ¶m0->unk_B08; } -UnkStruct_0202E810 * sub_0202E810 (UnkStruct_0202440C * param0) +UnkStruct_0202E810 * sub_0202E810 (TVBroadcast * param0) { return ¶m0->unk_B10; } -UnkStruct_0202E81C * sub_0202E81C (UnkStruct_0202440C * param0) +UnkStruct_0202E81C * sub_0202E81C (TVBroadcast * param0) { return ¶m0->unk_B2E; } -UnkStruct_0202E828 * sub_0202E828 (UnkStruct_0202440C * param0) +UnkStruct_0202E828 * sub_0202E828 (TVBroadcast * param0) { return ¶m0->unk_B44; } -UnkStruct_0202E834 * sub_0202E834 (UnkStruct_0202440C * param0) +UnkStruct_0202E834 * sub_0202E834 (TVBroadcast * param0) { return ¶m0->unk_B4C; } diff --git a/src/unk_0202E840.c b/src/unk_0202E840.c index d88c3b0bf7..9d917c570d 100644 --- a/src/unk_0202E840.c +++ b/src/unk_0202E840.c @@ -67,12 +67,12 @@ BOOL sub_0202E870 (UnkStruct_0202E858 * param0) return 1; } -int sub_0202E884 (void) +int Rankings_SaveSize (void) { return sizeof(UnkStruct_0202E8C0); } -void sub_0202E88C (UnkStruct_0202E8C0 * param0) +void Rankings_Init (UnkStruct_0202E8C0 * param0) { int v0, v1; @@ -87,10 +87,10 @@ void sub_0202E88C (UnkStruct_0202E8C0 * param0) sub_02025C84(28); } -UnkStruct_0202E8C0 * sub_0202E8C0 (UnkStruct_021C0794 * param0) +UnkStruct_0202E8C0 * sub_0202E8C0 (SaveData * param0) { - sub_02025C48(28); - return sub_020245BC(param0, 28); + SaveData_CRC(28); + return SaveData_Get(param0, 28); } void sub_0202E8D4 (UnkStruct_0202E8C0 * param0, int param1, u8 param2) @@ -118,7 +118,7 @@ int sub_0202E91C (void) return sizeof(UnkStruct_0202E91C); } -static u32 * sub_0202E924 (UnkStruct_021C0794 * param0, int param1) +static u32 * sub_0202E924 (SaveData * param0, int param1) { int v0; u32 v1; @@ -185,7 +185,7 @@ static u32 * sub_0202E924 (UnkStruct_021C0794 * param0, int param1) return v4; } -void * sub_0202E9FC (UnkStruct_021C0794 * param0, int param1) +void * sub_0202E9FC (SaveData * param0, int param1) { int v0; u32 v1, v2; @@ -350,7 +350,7 @@ static void sub_0202ECB0 (UnkStruct_0202E8C0 * param0, u32 param1, u8 param2, Un Heap_FreeToHeap(v2); } -void sub_0202ED0C (UnkStruct_021C0794 * param0, int param1, u8 param2, const void ** param3, int param4) +void sub_0202ED0C (SaveData * param0, int param1, u8 param2, const void ** param3, int param4) { u8 v0, v1; u32 v2; @@ -387,7 +387,7 @@ void sub_0202ED0C (UnkStruct_021C0794 * param0, int param1, u8 param2, const voi return; } -UnkStruct_0202EE10 * sub_0202ED8C (UnkStruct_021C0794 * param0, int param1, int param2) +UnkStruct_0202EE10 * sub_0202ED8C (SaveData * param0, int param1, int param2) { int v0, v1; u32 v2; diff --git a/src/unk_0202EEC0.c b/src/unk_0202EEC0.c index f59b57d66b..7301143ba3 100644 --- a/src/unk_0202EEC0.c +++ b/src/unk_0202EEC0.c @@ -7,24 +7,24 @@ #include "unk_0202EEC0.h" #include "pokemon.h" -typedef struct UnkStruct_02024440_t { +typedef struct PalParkTransfer { Pokemon unk_00[6]; u32 unk_288[20]; s64 unk_2D8[20]; s64 unk_378; u8 unk_380[6]; -} UnkStruct_02024440; +} PalParkTransfer; -int sub_0202EEC0 (void) +int PalParkTransfer_SaveSize (void) { - return sizeof(UnkStruct_02024440); + return sizeof(PalParkTransfer); } -void sub_0202EEC8 (UnkStruct_02024440 * param0) +void PalParkTransfer_Init (PalParkTransfer * param0) { int v0; - MI_CpuClearFast(param0, sizeof(UnkStruct_02024440)); + MI_CpuClearFast(param0, sizeof(PalParkTransfer)); for (v0 = 0; v0 < 6; v0++) { Pokemon_Init(¶m0->unk_00[v0]); @@ -32,7 +32,7 @@ void sub_0202EEC8 (UnkStruct_02024440 * param0) } } -void sub_0202EF04 (UnkStruct_02024440 * param0) +void sub_0202EF04 (PalParkTransfer * param0) { int v0; @@ -44,7 +44,7 @@ void sub_0202EF04 (UnkStruct_02024440 * param0) } } -static int sub_0202EF40 (UnkStruct_02024440 * param0, u32 param1) +static int sub_0202EF40 (PalParkTransfer * param0, u32 param1) { int v0, v1; s64 v2; @@ -73,12 +73,12 @@ static int sub_0202EF40 (UnkStruct_02024440 * param0, u32 param1) return v1; } -void sub_0202EFA4 (UnkStruct_02024440 * param0, BoxPokemon * param1, int param2) +void sub_0202EFA4 (PalParkTransfer * param0, BoxPokemon * param1, int param2) { Pokemon_FromBoxPokemon(param1, ¶m0->unk_00[param2]); } -void sub_0202EFB8 (UnkStruct_02024440 * param0, u32 param1) +void sub_0202EFB8 (PalParkTransfer * param0, u32 param1) { int v0 = sub_0202EF40(param0, param1); @@ -89,13 +89,13 @@ void sub_0202EFB8 (UnkStruct_02024440 * param0, u32 param1) OS_GetMacAddress(param0->unk_380); } -void sub_0202F000 (const UnkStruct_02024440 * param0, int param1, Pokemon * param2) +void sub_0202F000 (const PalParkTransfer * param0, int param1, Pokemon * param2) { GF_ASSERT(param1 < 6); *param2 = param0->unk_00[param1]; } -int sub_0202F028 (const UnkStruct_02024440 * param0) +int sub_0202F028 (const PalParkTransfer * param0) { int v0, v1; @@ -108,7 +108,7 @@ int sub_0202F028 (const UnkStruct_02024440 * param0) return v1; } -int sub_0202F050 (const UnkStruct_02024440 * param0, u32 param1) +int sub_0202F050 (const PalParkTransfer * param0, u32 param1) { int v0; s64 v1 = sub_020138EC(); @@ -122,7 +122,7 @@ int sub_0202F050 (const UnkStruct_02024440 * param0, u32 param1) return 0; } -BOOL sub_0202F088 (const UnkStruct_02024440 * param0) +BOOL sub_0202F088 (const PalParkTransfer * param0) { int v0; u8 v1[6]; @@ -138,12 +138,12 @@ BOOL sub_0202F088 (const UnkStruct_02024440 * param0) return 1; } -BOOL sub_0202F0BC (const UnkStruct_02024440 * param0) +BOOL sub_0202F0BC (const PalParkTransfer * param0) { return param0->unk_378 == OS_GetOwnerRtcOffset(); } -BOOL sub_0202F0E0 (const UnkStruct_02024440 * param0) +BOOL sub_0202F0E0 (const PalParkTransfer * param0) { int v0; u8 v1; diff --git a/src/unk_0202F108.c b/src/unk_0202F108.c index 7a364fe2da..2c50ca6e21 100644 --- a/src/unk_0202F108.c +++ b/src/unk_0202F108.c @@ -8,12 +8,12 @@ #include "unk_020244AC.h" #include "unk_0202F108.h" -int sub_0202F108 (void) +int Contest_SaveSize (void) { return sizeof(UnkStruct_0202F10C); } -void sub_0202F10C (UnkStruct_0202F10C * param0) +void Contest_Init (UnkStruct_0202F10C * param0) { int v0, v1; @@ -26,11 +26,11 @@ void sub_0202F10C (UnkStruct_0202F10C * param0) sub_02025C84(33); } -void sub_0202F134 (UnkStruct_021C0794 * param0, int param1, int param2) +void sub_0202F134 (SaveData * param0, int param1, int param2) { UnkStruct_0202F10C * v0; - v0 = sub_020245BC(param0, 33); + v0 = SaveData_Get(param0, 33); if (v0->unk_00[param1][param2] < 9999) { v0->unk_00[param1][param2]++; @@ -39,12 +39,12 @@ void sub_0202F134 (UnkStruct_021C0794 * param0, int param1, int param2) sub_02025C84(33); } -u16 sub_0202F160 (UnkStruct_021C0794 * param0, int param1, int param2) +u16 sub_0202F160 (SaveData * param0, int param1, int param2) { UnkStruct_0202F10C * v0; - v0 = sub_020245BC(param0, 33); - sub_02025C48(33); + v0 = SaveData_Get(param0, 33); + SaveData_CRC(33); return v0->unk_00[param1][param2]; } diff --git a/src/unk_0202F180.c b/src/unk_0202F180.c index ea9cf0fee1..dc724b7bd9 100644 --- a/src/unk_0202F180.c +++ b/src/unk_0202F180.c @@ -11,7 +11,7 @@ #include "unk_02056720.h" #include "pokemon.h" -void sub_0202F180 (UnkStruct_021C0794 * param0, const Pokemon * param1) +void sub_0202F180 (SaveData * param0, const Pokemon * param1) { if (Pokemon_GetValue((Pokemon *)param1, MON_DATA_IS_EGG, NULL) == 0) { UnkStruct_02026324 * v0 = sub_02027560(param0); diff --git a/src/unk_0202F1D4.c b/src/unk_0202F1D4.c index 1a21677e52..a8d453c72c 100644 --- a/src/unk_0202F1D4.c +++ b/src/unk_0202F1D4.c @@ -21,7 +21,7 @@ #include "unk_02017728.h" #include "heap.h" #include "unk_0201D15C.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -32,37 +32,37 @@ #include "pokemon.h" #include "party.h" -UnkStruct_0202F264 * Unk_021C07A4 = NULL; +BattleRecording * Unk_021C07A4 = NULL; static void sub_0202FCE8(const Party * param0, UnkStruct_0202FD30 * param1); static void sub_0202FD30(UnkStruct_0202FD30 * param0, Party * param1); -static BOOL sub_0202F75C(UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1); -static BOOL sub_0202F794(UnkStruct_021C0794 * param0, const UnkStruct_0202F264 * param1); +static BOOL sub_0202F75C(SaveData * param0, BattleRecording * param1); +static BOOL sub_0202F794(SaveData * param0, const BattleRecording * param1); static void sub_0202F860(void * param0, u32 param1, u32 param2); -static void sub_0202F510(UnkStruct_021C0794 * param0, UnkStruct_0202F41C * param1, const UnkStruct_0202F298 * param2, int param3, int param4); +static void sub_0202F510(SaveData * param0, UnkStruct_0202F41C * param1, const UnkStruct_0202F298 * param2, int param3, int param4); -int sub_0202F1D4 (void) +int BattleRecording_SaveSize (void) { - GF_ASSERT(sizeof(UnkStruct_0202F264) < 0x1000 * 2); + GF_ASSERT(sizeof(BattleRecording) < 0x1000 * 2); - return sizeof(UnkStruct_0202F264); + return sizeof(BattleRecording); } -void sub_0202F1DC (UnkStruct_0202F264 * param0) +void BattleRecording_Init (BattleRecording * param0) { - MI_CpuClear32(param0, sizeof(UnkStruct_0202F264)); + MI_CpuClear32(param0, sizeof(BattleRecording)); param0->unk_00 = 0xffffffff; } -void sub_0202F1F8 (UnkStruct_021C0794 * param0, int param1, int * param2) +void sub_0202F1F8 (SaveData * param0, int param1, int * param2) { if (Unk_021C07A4 != NULL) { Heap_FreeToHeap(Unk_021C07A4); Unk_021C07A4 = NULL; } - Unk_021C07A4 = sub_02024464(param0, param1, param2, 0); - sub_0202F1DC(Unk_021C07A4); + Unk_021C07A4 = SaveData_BattleRecording(param0, param1, param2, 0); + BattleRecording_Init(Unk_021C07A4); } void sub_0202F22C (void) @@ -78,7 +78,7 @@ BOOL sub_0202F250 (void) return Unk_021C07A4 != NULL; } -UnkStruct_0202F264 * sub_0202F264 (void) +BattleRecording * sub_0202F264 (void) { GF_ASSERT(Unk_021C07A4); return Unk_021C07A4; @@ -94,7 +94,7 @@ void * sub_0202F27C (void) return &v0[sizeof(u32)]; } -BOOL sub_0202F298 (UnkStruct_021C0794 * param0, int param1, int * param2, BattleParams * param3, int param4) +BOOL sub_0202F298 (SaveData * param0, int param1, int * param2, BattleParams * param3, int param4) { UnkStruct_0202F298 * v0; UnkStruct_0202F41C * v1; @@ -104,7 +104,7 @@ BOOL sub_0202F298 (UnkStruct_021C0794 * param0, int param1, int * param2, Battle Unk_021C07A4 = NULL; } - Unk_021C07A4 = sub_02024464(param0, param1, param2, param4); + Unk_021C07A4 = SaveData_BattleRecording(param0, param1, param2, param4); if (*param2 != 1) { *param2 = 3; @@ -134,13 +134,13 @@ BOOL sub_0202F298 (UnkStruct_021C0794 * param0, int param1, int * param2, Battle return 1; } -BOOL sub_0202F330 (UnkStruct_021C0794 * param0, int param1, int * param2, int param3) +BOOL sub_0202F330 (SaveData * param0, int param1, int * param2, int param3) { UnkStruct_0202F298 * v0; UnkStruct_0202F41C * v1; - UnkStruct_0202F264 * v2; + BattleRecording * v2; - v2 = sub_02024464(param0, param1, param2, param3); + v2 = SaveData_BattleRecording(param0, param1, param2, param3); if (*param2 != 1) { *param2 = 3; @@ -170,7 +170,7 @@ BOOL sub_0202F330 (UnkStruct_021C0794 * param0, int param1, int * param2, int pa return 1; } -int sub_0202F3AC (UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1, int param2, u16 * param3) +int sub_0202F3AC (SaveData * param0, BattleRecording * param1, int param2, u16 * param3) { int v0; @@ -179,7 +179,7 @@ int sub_0202F3AC (UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1, int sub_02017DE0(8); sub_02017E00(11); - v0 = sub_0202447C(param0, param1, param2); + v0 = SaveData_SaveBattleRecording(param0, param1, param2); if (v0 == 2) { sub_02024814(param0, 2); @@ -204,7 +204,7 @@ int sub_0202F3AC (UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1, int return 0; } -int sub_0202F41C (UnkStruct_021C0794 * param0, int param1, int param2, int param3, u16 * param4, u16 * param5) +int sub_0202F41C (SaveData * param0, int param1, int param2, int param3, u16 * param4, u16 * param5) { UnkStruct_0202F41C * v0; UnkStruct_0202F298 * v1; @@ -260,7 +260,7 @@ void sub_0202F4C0 (int param0, int * param1, int * param2) } } -static void sub_0202F510 (UnkStruct_021C0794 * param0, UnkStruct_0202F41C * param1, const UnkStruct_0202F298 * param2, int param3, int param4) +static void sub_0202F510 (SaveData * param0, UnkStruct_0202F41C * param1, const UnkStruct_0202F298 * param2, int param3, int param4) { int v0, v1, v2, v3, v4, v5, v6; const UnkStruct_02078B40 * v7; @@ -347,7 +347,7 @@ static void sub_0202F510 (UnkStruct_021C0794 * param0, UnkStruct_0202F41C * para param1->unk_26 = param3; } -static BOOL sub_0202F75C (UnkStruct_021C0794 * param0, UnkStruct_0202F264 * param1) +static BOOL sub_0202F75C (SaveData * param0, BattleRecording * param1) { UnkStruct_0202F298 * v0 = ¶m1->unk_E8; UnkStruct_0202F41C * v1 = ¶m1->unk_84; @@ -363,7 +363,7 @@ static BOOL sub_0202F75C (UnkStruct_021C0794 * param0, UnkStruct_0202F264 * para return 0; } -static BOOL sub_0202F794 (UnkStruct_021C0794 * param0, const UnkStruct_0202F264 * param1) +static BOOL sub_0202F794 (SaveData * param0, const BattleRecording * param1) { const UnkStruct_0202F298 * v0 = ¶m1->unk_E8; const UnkStruct_0202F41C * v1 = ¶m1->unk_84; @@ -533,7 +533,7 @@ BOOL sub_0202FAC0 (void) return 1; } -void sub_0202FAFC (BattleParams * param0, UnkStruct_021C0794 * param1) +void sub_0202FAFC (BattleParams * param0, SaveData * param1) { int v0; UnkStruct_0202F298 * v1 = &Unk_021C07A4->unk_E8; @@ -650,7 +650,7 @@ UnkStruct_0202F41C * sub_0202FE04 (void) return &Unk_021C07A4->unk_84; } -void sub_0202FE20 (UnkStruct_02030A80 * param0, UnkStruct_0202F41C * param1, UnkStruct_0202F298 * param2, BattleParams * param3, UnkStruct_021C0794 * param4) +void sub_0202FE20 (UnkStruct_02030A80 * param0, UnkStruct_0202F41C * param1, UnkStruct_0202F298 * param2, BattleParams * param3, SaveData * param4) { GF_ASSERT(Unk_021C07A4 != NULL); diff --git a/src/unk_0202FF4C.c b/src/unk_0202FF4C.c index 91f5829bd7..53739fe788 100644 --- a/src/unk_0202FF4C.c +++ b/src/unk_0202FF4C.c @@ -11,11 +11,11 @@ #include "unk_0202FF4C.h" void sub_0202FF4C(UnkStruct_0202FF58 * param0); -UnkStruct_0202FF58 * sub_0202FF58(UnkStruct_021C0794 * param0); +UnkStruct_0202FF58 * sub_0202FF58(SaveData * param0); void sub_020300A4(UnkStruct_020300F4 * param0); void sub_020300B0(UnkStruct_020300F4 * param0, u8 param1, u8 param2, const void * param3); u32 sub_020300E0(UnkStruct_020300F4 * param0, u8 param1, u8 param2, void * param3); -UnkStruct_020300F4 * sub_020300F4(UnkStruct_021C0794 * param0); +UnkStruct_020300F4 * sub_020300F4(SaveData * param0); BOOL sub_0202FF68(UnkStruct_0202FF58 * param0); void sub_0202FF70(UnkStruct_0202FF58 * param0, BOOL param1); void sub_0202FF84(UnkStruct_0202FF58 * param0, u8 param1, u8 param2, const void * param3); @@ -27,9 +27,9 @@ void sub_0202FF4C (UnkStruct_0202FF58 * param0) return; } -UnkStruct_0202FF58 * sub_0202FF58 (UnkStruct_021C0794 * param0) +UnkStruct_0202FF58 * sub_0202FF58 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_8E0_val2; } @@ -149,8 +149,8 @@ u32 sub_020300E0 (UnkStruct_020300F4 * param0, u8 param1, u8 param2, void * para return 0; } -UnkStruct_020300F4 * sub_020300F4 (UnkStruct_021C0794 * param0) +UnkStruct_020300F4 * sub_020300F4 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_1614.unk_00; } diff --git a/src/unk_02030108.c b/src/unk_02030108.c index 4878ec2dd8..3cbb731e36 100644 --- a/src/unk_02030108.c +++ b/src/unk_02030108.c @@ -11,7 +11,7 @@ #include "unk_02030108.h" void sub_02030108(UnkStruct_02030114 * param0); -UnkStruct_02030114 * sub_02030114(UnkStruct_021C0794 * param0); +UnkStruct_02030114 * sub_02030114(SaveData * param0); BOOL sub_02030124(UnkStruct_02030114 * param0); void sub_0203012C(UnkStruct_02030114 * param0, BOOL param1); void sub_02030140(UnkStruct_02030114 * param0, u8 param1, u8 param2, u8 param3, const void * param4); @@ -20,7 +20,7 @@ u8 sub_020301E0(u8 param0, u8 * param1); void sub_02030204(u8 param0, u8 * param1, u8 param2); void sub_02030244(u8 * param0); void sub_02030260(UnkStruct_0203026C * param0); -UnkStruct_0203026C * sub_0203026C(UnkStruct_021C0794 * param0); +UnkStruct_0203026C * sub_0203026C(SaveData * param0); void sub_02030280(UnkStruct_0203026C * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_020302B4(UnkStruct_0203026C * param0, u8 param1, u8 param2, u8 param3, void * param4); @@ -30,9 +30,9 @@ void sub_02030108 (UnkStruct_02030114 * param0) return; } -UnkStruct_02030114 * sub_02030114 (UnkStruct_021C0794 * param0) +UnkStruct_02030114 * sub_02030114 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_8E0_val3; } @@ -149,9 +149,9 @@ void sub_02030260 (UnkStruct_0203026C * param0) return; } -UnkStruct_0203026C * sub_0203026C (UnkStruct_021C0794 * param0) +UnkStruct_0203026C * sub_0203026C (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_1618.unk_00; } diff --git a/src/unk_020302D0.c b/src/unk_020302D0.c index 60a51eac9d..bd569368c6 100644 --- a/src/unk_020302D0.c +++ b/src/unk_020302D0.c @@ -11,13 +11,13 @@ #include "unk_020302D0.h" void sub_020302D0(UnkStruct_020302DC * param0); -UnkStruct_020302DC * sub_020302DC(UnkStruct_021C0794 * param0); +UnkStruct_020302DC * sub_020302DC(SaveData * param0); BOOL sub_020302EC(UnkStruct_020302DC * param0); void sub_020302F4(UnkStruct_020302DC * param0, BOOL param1); void sub_02030308(UnkStruct_020302DC * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_02030398(UnkStruct_020302DC * param0, u8 param1, u8 param2, u8 param3, void * param4); void sub_02030410(UnkStruct_0203041C * param0); -UnkStruct_0203041C * sub_0203041C(UnkStruct_021C0794 * param0); +UnkStruct_0203041C * sub_0203041C(SaveData * param0); void sub_02030430(UnkStruct_0203041C * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_02030470(UnkStruct_0203041C * param0, u8 param1, u8 param2, u8 param3, void * param4); @@ -27,9 +27,9 @@ void sub_020302D0 (UnkStruct_020302DC * param0) return; } -UnkStruct_020302DC * sub_020302DC (UnkStruct_021C0794 * param0) +UnkStruct_020302DC * sub_020302DC (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_8E0_val4; } @@ -124,9 +124,9 @@ void sub_02030410 (UnkStruct_0203041C * param0) return; } -UnkStruct_0203041C * sub_0203041C (UnkStruct_021C0794 * param0) +UnkStruct_0203041C * sub_0203041C (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_161C.unk_00; } diff --git a/src/unk_02030494.c b/src/unk_02030494.c index 99e58ec852..5b469176aa 100644 --- a/src/unk_02030494.c +++ b/src/unk_02030494.c @@ -11,13 +11,13 @@ #include "unk_02030494.h" void sub_02030494(UnkStruct_020304A0 * param0); -UnkStruct_020304A0 * sub_020304A0(UnkStruct_021C0794 * param0); +UnkStruct_020304A0 * sub_020304A0(SaveData * param0); BOOL sub_020304B0(UnkStruct_020304A0 * param0); void sub_020304B8(UnkStruct_020304A0 * param0, BOOL param1); void sub_020304CC(UnkStruct_020304A0 * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_0203054C(UnkStruct_020304A0 * param0, u8 param1, u8 param2, u8 param3, void * param4); void sub_020305AC(UnkStruct_020305B8 * param0); -UnkStruct_020305B8 * sub_020305B8(UnkStruct_021C0794 * param0); +UnkStruct_020305B8 * sub_020305B8(SaveData * param0); void sub_020305CC(UnkStruct_020305B8 * param0, u8 param1, u8 param2, u8 param3, const void * param4); u32 sub_02030600(UnkStruct_020305B8 * param0, u8 param1, u8 param2, u8 param3, void * param4); @@ -27,9 +27,9 @@ void sub_02030494 (UnkStruct_020304A0 * param0) return; } -UnkStruct_020304A0 * sub_020304A0 (UnkStruct_021C0794 * param0) +UnkStruct_020304A0 * sub_020304A0 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_8E0_val5; } @@ -116,9 +116,9 @@ void sub_020305AC (UnkStruct_020305B8 * param0) return; } -UnkStruct_020305B8 * sub_020305B8 (UnkStruct_021C0794 * param0) +UnkStruct_020305B8 * sub_020305B8 (SaveData * param0) { - UnkStruct_0203068C * v0 = sub_020245BC(param0, 23); + UnkStruct_0203068C * v0 = SaveData_Get(param0, 23); return &v0->unk_1620.unk_00; } diff --git a/src/unk_0203061C.c b/src/unk_0203061C.c index bdd3c9a69b..251f748528 100644 --- a/src/unk_0203061C.c +++ b/src/unk_0203061C.c @@ -14,12 +14,12 @@ #include "unk_02030494.h" #include "unk_0203061C.h" -int sub_0203061C (void) +int Frontier_SaveSize (void) { return sizeof(UnkStruct_0203068C); } -void sub_02030624 (UnkStruct_0203068C * param0) +void Frontier_Init (UnkStruct_0203068C * param0) { MI_CpuClear8(param0, sizeof(UnkStruct_0203068C)); @@ -34,9 +34,9 @@ void sub_02030624 (UnkStruct_0203068C * param0) return; } -UnkStruct_0203068C * sub_0203068C (UnkStruct_021C0794 * param0) +UnkStruct_0203068C * sub_0203068C (SaveData * param0) { - return sub_020245BC(param0, 23); + return SaveData_Get(param0, 23); } u16 sub_02030698 (UnkStruct_0203068C * param0, int param1, int param2) diff --git a/src/unk_02030880.c b/src/unk_02030880.c index 3d157f5194..235d4ff547 100644 --- a/src/unk_02030880.c +++ b/src/unk_02030880.c @@ -5,7 +5,7 @@ #include "struct_decls/struct_021C0794_decl.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_0203061C.h" #include "unk_02030880.h" @@ -17,45 +17,45 @@ typedef struct { u16 unk_B9A; } UnkStruct_020308A0_sub1; -typedef struct UnkStruct_020308A0_t { +typedef struct BattleFrontierStage { u32 unk_00; UnkStruct_020308A0_sub1 unk_04; -} UnkStruct_020308A0; +} BattleFrontierStage; -static u16 sub_02030908(UnkStruct_020308A0 * param0, int param1, int param2, u16 param3); -static u16 sub_02030954(UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1, int param2, int param3, u16 param4); +static u16 sub_02030908(BattleFrontierStage * param0, int param1, int param2, u16 param3); +static u16 sub_02030954(SaveData * param0, BattleFrontierStage * param1, int param2, int param3, u16 param4); -int sub_02030880 (void) +int Frontier_Extra_SaveSize (void) { - GF_ASSERT(sizeof(UnkStruct_020308A0) % 4 == 0); - return sizeof(UnkStruct_020308A0); + GF_ASSERT(sizeof(BattleFrontierStage) % 4 == 0); + return sizeof(BattleFrontierStage); } -void sub_02030888 (UnkStruct_020308A0 * param0) +void Frontier_Extra_Init (BattleFrontierStage * param0) { - MI_CpuClear8(param0, sizeof(UnkStruct_020308A0)); + MI_CpuClear8(param0, sizeof(BattleFrontierStage)); param0->unk_00 = 0xffffffff; } -UnkStruct_020308A0 * sub_020308A0 (UnkStruct_021C0794 * param0, int param1, int * param2) +BattleFrontierStage * sub_020308A0 (SaveData * param0, int param1, int * param2) { - UnkStruct_020308A0 * v0; + BattleFrontierStage * v0; - v0 = sub_0202448C(param0, param1, param2); + v0 = SaveData_BattleFrontierStage(param0, param1, param2); return v0; } -int sub_020308A8 (UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1) +int sub_020308A8 (SaveData * param0, BattleFrontierStage * param1) { int v0; - v0 = sub_020244A0(param0, param1); + v0 = SaveData_SaveBattleFrontierStage(param0, param1); v0 |= sub_020246E0(param0); return v0; } -u16 sub_020308BC (UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1, int param2, int param3) +u16 sub_020308BC (SaveData * param0, BattleFrontierStage * param1, int param2, int param3) { if (sub_020247C8(param0) == 0) { return 0; @@ -74,7 +74,7 @@ u16 sub_020308BC (UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1, int return 0; } -static u16 sub_02030908 (UnkStruct_020308A0 * param0, int param1, int param2, u16 param3) +static u16 sub_02030908 (BattleFrontierStage * param0, int param1, int param2, u16 param3) { if (param3 > 9999) { param3 = 9999; @@ -98,7 +98,7 @@ static u16 sub_02030908 (UnkStruct_020308A0 * param0, int param1, int param2, u1 return param3; } -static u16 sub_02030954 (UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param1, int param2, int param3, u16 param4) +static u16 sub_02030954 (SaveData * param0, BattleFrontierStage * param1, int param2, int param3, u16 param4) { u16 v0; @@ -119,10 +119,10 @@ static u16 sub_02030954 (UnkStruct_021C0794 * param0, UnkStruct_020308A0 * param } } -BOOL sub_020309A0 (UnkStruct_021C0794 * param0, int param1, int param2, int param3, int param4, int param5, int * param6, int * param7) +BOOL sub_020309A0 (SaveData * param0, int param1, int param2, int param3, int param4, int param5, int * param6, int * param7) { UnkStruct_0203068C * v0; - UnkStruct_020308A0 * v1; + BattleFrontierStage * v1; u16 v2, v3, v4; int v5; BOOL v6 = 0; diff --git a/src/unk_02030A80.c b/src/unk_02030A80.c index 5620475202..c476de3ded 100644 --- a/src/unk_02030A80.c +++ b/src/unk_02030A80.c @@ -43,7 +43,7 @@ void sub_02030A98 (UnkStruct_02030A80 * param0) Heap_FreeToHeap(param0); } -void sub_02030AA0 (UnkStruct_02030A80 * param0, UnkStruct_021C0794 * param1) +void sub_02030AA0 (UnkStruct_02030A80 * param0, SaveData * param1) { TrainerInfo * v0 = sub_02025E38(param1); UnkStruct_0202C878 * v1 = sub_0202C878(param1); diff --git a/src/unk_02030CE8.c b/src/unk_02030CE8.c index de10870828..7f535f4b2a 100644 --- a/src/unk_02030CE8.c +++ b/src/unk_02030CE8.c @@ -16,14 +16,14 @@ #include "unk_0202C858.h" #include "unk_02030CE8.h" -static void sub_02030DD0(UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1); +static void sub_02030DD0(SaveData * param0, UnkStruct_ov96_0223B574 * param1); -int sub_02030CE8 (void) +int Email_SaveSize (void) { return sizeof(UnkStruct_02030CEC); } -void sub_02030CEC (UnkStruct_02030CEC * param0) +void Email_Init (UnkStruct_02030CEC * param0) { MI_CpuClear8(param0, sizeof(UnkStruct_02030CEC)); @@ -33,16 +33,16 @@ void sub_02030CEC (UnkStruct_02030CEC * param0) sub_02025C84(35); } -void sub_02030D10 (UnkStruct_021C0794 * param0) +void sub_02030D10 (SaveData * param0) { - sub_02030CEC(sub_020245BC(param0, 35)); + Email_Init(SaveData_Get(param0, 35)); } -BOOL sub_02030D20 (UnkStruct_021C0794 * param0) +BOOL sub_02030D20 (SaveData * param0) { UnkStruct_02030CEC * v0; - v0 = sub_020245BC(param0, 35); + v0 = SaveData_Get(param0, 35); if (v0->unk_00[0] == '\0') { return 0; @@ -51,27 +51,27 @@ BOOL sub_02030D20 (UnkStruct_021C0794 * param0) return 1; } -void sub_02030D38 (UnkStruct_021C0794 * param0, const char * param1) +void sub_02030D38 (SaveData * param0, const char * param1) { UnkStruct_02030CEC * v0; - v0 = sub_020245BC(param0, 35); + v0 = SaveData_Get(param0, 35); strcpy(v0->unk_00, param1); sub_02025C84(35); } -char * sub_02030D50 (UnkStruct_021C0794 * param0) +char * sub_02030D50 (SaveData * param0) { UnkStruct_02030CEC * v0; - v0 = sub_020245BC(param0, 35); + v0 = SaveData_Get(param0, 35); return v0->unk_00; } -void sub_02030D5C (UnkStruct_021C0794 * param0, int param1, u32 param2) +void sub_02030D5C (SaveData * param0, int param1, u32 param2) { - UnkStruct_02030CEC * v0 = sub_020245BC(param0, 35); + UnkStruct_02030CEC * v0 = SaveData_Get(param0, 35); switch (param1) { case 0: @@ -91,9 +91,9 @@ void sub_02030D5C (UnkStruct_021C0794 * param0, int param1, u32 param2) sub_02025C84(35); } -u32 sub_02030D98 (UnkStruct_021C0794 * param0, int param1) +u32 sub_02030D98 (SaveData * param0, int param1) { - UnkStruct_02030CEC * v0 = sub_020245BC(param0, 35); + UnkStruct_02030CEC * v0 = SaveData_Get(param0, 35); switch (param1) { case 0: @@ -109,7 +109,7 @@ u32 sub_02030D98 (UnkStruct_021C0794 * param0, int param1) return 0; } -static void sub_02030DD0 (UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1) +static void sub_02030DD0 (SaveData * param0, UnkStruct_ov96_0223B574 * param1) { UnkStruct_0202C878 * v0 = sub_0202C878(param0); TrainerInfo * v1 = sub_02025E38(param0); @@ -132,7 +132,7 @@ static void sub_02030DD0 (UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * sub_02025C84(35); } -u32 sub_02030E48 (UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1) +u32 sub_02030E48 (SaveData * param0, UnkStruct_ov96_0223B574 * param1) { u32 v0; @@ -148,9 +148,9 @@ u32 sub_02030E48 (UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1) return v0; } -void sub_02030E78 (UnkStruct_021C0794 * param0, UnkStruct_ov96_0223B574 * param1) +void sub_02030E78 (SaveData * param0, UnkStruct_ov96_0223B574 * param1) { - UnkStruct_02030CEC * v0 = sub_020245BC(param0, 35); + UnkStruct_02030CEC * v0 = SaveData_Get(param0, 35); sub_02030DD0(param0, param1); diff --git a/src/unk_02030EA4.c b/src/unk_02030EA4.c index ab56e393ae..429b8eafc3 100644 --- a/src/unk_02030EA4.c +++ b/src/unk_02030EA4.c @@ -11,22 +11,22 @@ typedef struct UnkStruct_02030EC4_t { u32 unk_04; } UnkStruct_02030EC4; -int sub_02030EA4 (void) +int WiFiQuestion_SaveSize (void) { return sizeof(UnkStruct_02030EC4); } -void sub_02030EA8 (UnkStruct_02030EC4 * param0) +void WiFiQuestion_Init (UnkStruct_02030EC4 * param0) { - MI_CpuFill32(param0, 0, sub_02030EA4()); + MI_CpuFill32(param0, 0, WiFiQuestion_SaveSize()); param0->unk_00 = 0xffffffff; } -UnkStruct_02030EC4 * sub_02030EC4 (UnkStruct_021C0794 * param0) +UnkStruct_02030EC4 * sub_02030EC4 (SaveData * param0) { UnkStruct_02030EC4 * v0; - v0 = sub_020245BC(param0, 36); + v0 = SaveData_Get(param0, 36); return v0; } diff --git a/src/unk_020329E0.c b/src/unk_020329E0.c index 9454542602..b44a709be0 100644 --- a/src/unk_020329E0.c +++ b/src/unk_020329E0.c @@ -44,7 +44,7 @@ typedef struct { typedef struct { TrainerInfo * unk_00; const UnkStruct_0202610C * unk_04; - UnkStruct_021C0794 * unk_08; + SaveData * unk_08; UnkStruct_02032BEC unk_0C[8]; TrainerInfo * unk_33C[8]; UnkStruct_021C07B4_sub1 unk_35C[8]; @@ -56,7 +56,7 @@ typedef struct { static UnkStruct_021C07B4 * Unk_021C07B4; -void sub_020329E0 (UnkStruct_021C0794 * param0, const UnkStruct_0202610C * param1) +void sub_020329E0 (SaveData * param0, const UnkStruct_0202610C * param1) { int v0; TrainerInfo * v1 = sub_02025E38(param0); @@ -445,7 +445,7 @@ static void sub_02033054 (int param0, int param1) } } -void sub_02033114 (UnkStruct_021C0794 * param0) +void sub_02033114 (SaveData * param0) { UnkStruct_0202B370 * v0 = sub_0202B370(param0); int v1, v2, v3; @@ -476,7 +476,7 @@ void sub_02033114 (UnkStruct_021C0794 * param0) } } -void sub_020331B4 (UnkStruct_021C0794 * param0, int param1) +void sub_020331B4 (SaveData * param0, int param1) { if (param1 == 1) { sub_02033054(0, 1); @@ -487,7 +487,7 @@ void sub_020331B4 (UnkStruct_021C0794 * param0, int param1) sub_02033114(param0); } -void sub_020331E0 (UnkStruct_021C0794 * param0, int param1) +void sub_020331E0 (SaveData * param0, int param1) { sub_02033054(2, param1); sub_02033114(param0); diff --git a/src/unk_020366A0.c b/src/unk_020366A0.c index 7d07db1f2c..465d0ee915 100644 --- a/src/unk_020366A0.c +++ b/src/unk_020366A0.c @@ -35,7 +35,7 @@ typedef struct { u8 unk_04[6]; MATHRandContext32 unk_0C; UnkFuncPtr_02036C94 unk_24; - UnkStruct_021C0794 * unk_28; + SaveData * unk_28; TrainerInfo * unk_2C; const UnkStruct_0202610C * unk_30; UnkStruct_ov65_0222F6EC unk_34; @@ -146,7 +146,7 @@ static u8 Unk_02100A20[] = {"FREAK"}; static u8 Unk_02100A30[] = {" GAME"}; static u8 Unk_02100A28[] = {" FULL"}; -static void sub_020366A0 (UnkStruct_021C0794 * param0, int param1) +static void sub_020366A0 (SaveData * param0, int param1) { void * v0; @@ -210,7 +210,7 @@ BOOL sub_02036780 (void) return 0; } -void sub_02036794 (UnkStruct_021C0794 * param0) +void sub_02036794 (SaveData * param0) { if (Unk_021C07D4 != NULL) { return; @@ -288,7 +288,7 @@ void sub_020368A4 (void) sub_02036C94(sub_02037108, 0); } -void sub_020368B8 (UnkStruct_021C0794 * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4) +void sub_020368B8 (SaveData * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4) { if (sub_02035E38()) { return; @@ -303,7 +303,7 @@ void sub_020368B8 (UnkStruct_021C0794 * param0, int param1, int param2, const Un sub_02036C94(sub_02037144, 0); } -void sub_02036900 (UnkStruct_021C0794 * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4) +void sub_02036900 (SaveData * param0, int param1, int param2, const UnkStruct_0202610C * param3, BOOL param4) { if (sub_02035E38()) { return; @@ -365,7 +365,7 @@ BOOL sub_0203699C (void) return 0; } -void sub_020369EC (UnkStruct_021C0794 * param0) +void sub_020369EC (SaveData * param0) { if (Unk_021C07D4 != NULL) { return; @@ -512,7 +512,7 @@ void sub_02036BD8 (void) Unk_021C07D4->unk_4A = 9; } -void sub_02036BE8 (UnkStruct_021C0794 * param0, int param1) +void sub_02036BE8 (SaveData * param0, int param1) { if (sub_02035E38()) { return; @@ -523,7 +523,7 @@ void sub_02036BE8 (UnkStruct_021C0794 * param0, int param1) sub_02036C94(sub_02037E20, 0); } -void sub_02036C1C (UnkStruct_021C0794 * param0, int param1) +void sub_02036C1C (SaveData * param0, int param1) { if (sub_02035E38()) { return; @@ -1522,7 +1522,7 @@ static void sub_02037B78 (void) } } -void sub_02037BC0 (UnkStruct_021C0794 * param0) +void sub_02037BC0 (SaveData * param0) { if (sub_02035E38()) { return; @@ -1606,7 +1606,7 @@ static void sub_02037D08 (void) sub_02036C94(sub_02037CE4, 0); } -void sub_02037D48 (UnkStruct_021C0794 * param0) +void sub_02037D48 (SaveData * param0) { if (sub_02035E38()) { return; @@ -2065,7 +2065,7 @@ BOOL sub_020383E8 (void) return 0; } -void sub_02038438 (UnkStruct_021C0794 * param0) +void sub_02038438 (SaveData * param0) { if (!Unk_021C07D4) { Heap_CreateAtEnd(3, 15, 0x100); @@ -2090,7 +2090,7 @@ void sub_0203848C (void) } } -void sub_020384C0 (UnkStruct_021C0794 * param0) +void sub_020384C0 (SaveData * param0) { if (!Unk_021C07D4) { Heap_CreateAtEnd(3, 15, 0x100); @@ -2115,7 +2115,7 @@ void sub_02038514 (void) } } -void sub_02038548 (UnkStruct_021C0794 * param0) +void sub_02038548 (SaveData * param0) { if (!Unk_021C07D4) { Heap_CreateAtEnd(3, 15, 0x100); @@ -2222,7 +2222,7 @@ static void sub_020386B4 (void) } } -void * sub_0203871C (UnkStruct_021C0794 * param0, int param1) +void * sub_0203871C (SaveData * param0, int param1) { TrainerInfo * v0 = sub_02025E38(param0); @@ -2244,7 +2244,7 @@ void * sub_0203871C (UnkStruct_021C0794 * param0, int param1) return Unk_021C07D4->unk_00; } -void sub_0203878C (UnkStruct_021C0794 * param0, const void * param1) +void sub_0203878C (SaveData * param0, const void * param1) { TrainerInfo * v0 = sub_02025E38(param0); diff --git a/src/unk_02038ED4.c b/src/unk_02038ED4.c index 90377eb213..63ceaa837b 100644 --- a/src/unk_02038ED4.c +++ b/src/unk_02038ED4.c @@ -12,7 +12,7 @@ void sub_02038ED4 (int * param0) *param0 = 0; } -int sub_02038EDC (UnkStruct_021C0794 * param0, int param1, int * param2) +int sub_02038EDC (SaveData * param0, int param1, int * param2) { int v0; diff --git a/src/unk_02038FFC.c b/src/unk_02038FFC.c index eefe86adaf..79da782ecb 100644 --- a/src/unk_02038FFC.c +++ b/src/unk_02038FFC.c @@ -49,7 +49,7 @@ int sub_02039058 (UnkStruct_0202B370 * param0) return DWC_GetGsProfileId(v0, &v1); } -BOOL sub_02039074 (UnkStruct_021C0794 * param0) +BOOL sub_02039074 (SaveData * param0) { UnkStruct_0202B370 * v0 = sub_0202B370(param0); DWCUserData * v1 = sub_0202AD28(v0); diff --git a/src/unk_0203909C.c b/src/unk_0203909C.c index f4865bae86..a6cdd9b286 100644 --- a/src/unk_0203909C.c +++ b/src/unk_0203909C.c @@ -15,7 +15,7 @@ #include "unk_020366A0.h" #include "unk_0203909C.h" -int sub_0203909C (UnkStruct_021C0794 * param0, DWCFriendData * param1, int * param2) +int sub_0203909C (SaveData * param0, DWCFriendData * param1, int * param2) { int v0; DWCUserData * v1 = sub_0202AD28(sub_0202B370(param0)); @@ -42,7 +42,7 @@ int sub_0203909C (UnkStruct_021C0794 * param0, DWCFriendData * param1, int * par return 2; } -int sub_02039140 (UnkStruct_021C0794 * param0, u64 param1, int * param2) +int sub_02039140 (SaveData * param0, u64 param1, int * param2) { int v0; DWCUserData * v1 = sub_0202AD28(sub_0202B370(param0)); @@ -73,7 +73,7 @@ int sub_02039140 (UnkStruct_021C0794 * param0, u64 param1, int * param2) return 2; } -BOOL sub_020391DC (UnkStruct_021C0794 * param0, int * param1, int param2) +BOOL sub_020391DC (SaveData * param0, int * param1, int param2) { int v0, v1 = 0, v2; DWCFriendData * v3 = sub_0202AED8(sub_0202B370(param0), 0); @@ -112,7 +112,7 @@ BOOL sub_020391DC (UnkStruct_021C0794 * param0, int * param1, int param2) return v1; } -void sub_02039298 (UnkStruct_021C0794 * param0, int param1, int param2, int param3, int param4) +void sub_02039298 (SaveData * param0, int param1, int param2, int param3, int param4) { UnkStruct_0202B370 * v0 = sub_0202B370(param0); DWCFriendData * v1 = sub_0202AED8(v0, param2); @@ -147,7 +147,7 @@ void sub_02039298 (UnkStruct_021C0794 * param0, int param1, int param2, int para sub_02033114(param0); } -int sub_02039390 (UnkStruct_021C0794 * param0, int param1) +int sub_02039390 (SaveData * param0, int param1) { int v0, v1; DWCFriendData * v2 = sub_02032F1C(param1); diff --git a/src/unk_0203A6DC.c b/src/unk_0203A6DC.c index 0d4bc53ede..6130c10621 100644 --- a/src/unk_0203A6DC.c +++ b/src/unk_0203A6DC.c @@ -39,22 +39,22 @@ typedef struct UnkStruct_0203A79C_t { UnkStruct_02061D3C unk_00[64]; } UnkStruct_0203A79C; -int sub_0203A6DC (void) +int FieldPlayerState_SaveSize (void) { return sizeof(UnkStruct_0203A790); } -int sub_0203A6E0 (void) +int FieldOWState_SaveSize (void) { return sizeof(UnkStruct_0203A79C); } -void sub_0203A6E8 (UnkStruct_0203A79C * param0) +void FieldOWState_Init (UnkStruct_0203A79C * param0) { MI_CpuClear32(param0, sizeof(UnkStruct_0203A79C)); } -void sub_0203A6F8 (UnkStruct_0203A790 * param0) +void FieldPlayerState_Init (UnkStruct_0203A790 * param0) { memset(param0, 0, sizeof(UnkStruct_0203A790)); @@ -155,19 +155,19 @@ u16 * sub_0203A78C (UnkStruct_0203A790 * param0) return ¶m0->unk_94; } -UnkStruct_0203A790 * sub_0203A790 (UnkStruct_021C0794 * param0) +UnkStruct_0203A790 * sub_0203A790 (SaveData * param0) { UnkStruct_0203A790 * v0; - v0 = sub_020245BC(param0, 6); + v0 = SaveData_Get(param0, 6); return v0; } -UnkStruct_0203A79C * sub_0203A79C (UnkStruct_021C0794 * param0) +UnkStruct_0203A79C * sub_0203A79C (SaveData * param0) { UnkStruct_0203A79C * v0; - v0 = sub_020245BC(param0, 11); + v0 = SaveData_Get(param0, 11); return v0; } diff --git a/src/unk_0203CC84.c b/src/unk_0203CC84.c index b1d6da29a1..cd01af7225 100644 --- a/src/unk_0203CC84.c +++ b/src/unk_0203CC84.c @@ -386,7 +386,7 @@ UnkStruct_02018340 * sub_0203D170 (void * param0) return v0->unk_08; } -UnkStruct_021C0794 * sub_0203D174 (void * param0) +SaveData * sub_0203D174 (void * param0) { return ((UnkStruct_0203CDB0 *)param0)->unk_0C; } diff --git a/src/unk_0203D178.c b/src/unk_0203D178.c index 3cd379a8df..5db8c0dd11 100644 --- a/src/unk_0203D178.c +++ b/src/unk_0203D178.c @@ -27,7 +27,7 @@ void sub_0203D190 (UnkStruct_02049FA8 * param0) *param0 = v0; } -void sub_0203D1A8 (UnkStruct_021C0794 * param0) +void sub_0203D1A8 (SaveData * param0) { UnkStruct_0203A790 * v0 = sub_0203A790(param0); UnkStruct_02049FA8 * v1 = sub_0203A720(v0); diff --git a/src/unk_0203D1B8.c b/src/unk_0203D1B8.c index 3460f1722e..f98e101fbf 100644 --- a/src/unk_0203D1B8.c +++ b/src/unk_0203D1B8.c @@ -72,7 +72,7 @@ #include "heap.h" #include "unk_0201D15C.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025CB0.h" #include "unk_02025E08.h" @@ -238,7 +238,7 @@ typedef struct { } UnkStruct_0203E35C; static void sub_0203DF68(UnkStruct_020508D4 * param0); -static u8 sub_0203E484(UnkStruct_021C0794 * param0, u8 param1); +static u8 sub_0203E484(SaveData * param0, u8 param1); static int sub_0203D1B8 (UnkStruct_020067E8 * param0, int * param1) { @@ -591,7 +591,7 @@ void * sub_0203D644 (UnkStruct_0203CDB0 * param0, int param1) UnkStruct_02098D38 * sub_0203D670 (UnkStruct_0203CDB0 * param0, int param1, int param2) { UnkStruct_02098D38 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; static const u8 v2[] = { 0, 1, 2, 4, 3, 5, 6, 7, 8 }; @@ -871,7 +871,7 @@ void sub_0203D9D8 (UnkStruct_0203CDB0 * param0, UnkStruct_ov90_021D0D80 * param1 sub_0203CD84(param0, &v0, param1); } -static UnkStruct_0203DA00 * sub_0203DA00 (int param0, UnkStruct_021C0794 * param1, int param2, BOOL * param3, BOOL param4) +static UnkStruct_0203DA00 * sub_0203DA00 (int param0, SaveData * param1, int param2, BOOL * param3, BOOL param4) { UnkStruct_0203DA00 * v0; Pokemon * v1; @@ -930,7 +930,7 @@ static BOOL sub_0203DA64 (UnkStruct_020508D4 * param0) return 0; } -void sub_0203DAC0 (UnkStruct_020508D4 * param0, u16 * param1, UnkStruct_021C0794 * param2, u16 param3, u16 param4) +void sub_0203DAC0 (UnkStruct_020508D4 * param0, u16 * param1, SaveData * param2, u16 param3, u16 param4) { UnkStruct_0203DA64 * v0; @@ -995,7 +995,7 @@ static void sub_0203DB38 (UnkStruct_ov88_0223C370 * param0, UnkStruct_0203CDB0 * { param0->unk_04 = sub_02025E38(param1->unk_0C); param0->unk_08 = Party_GetFromSavedata(param1->unk_0C); - param0->unk_0C = sub_020245BC(param1->unk_0C, 9); + param0->unk_0C = SaveData_Get(param1->unk_0C, 9); param0->unk_14 = sub_0202C878(param1->unk_0C); param0->unk_18 = sub_02025E44(param1->unk_0C); param0->unk_24 = sub_02027560(param1->unk_0C); @@ -1186,12 +1186,12 @@ const UnkStruct_0208BE5C Unk_020EA238 = { FS_OVERLAY_ID(overlay64) }; -void sub_0203DE78 (UnkStruct_0203CDB0 * param0, UnkStruct_021C0794 * param1) +void sub_0203DE78 (UnkStruct_0203CDB0 * param0, SaveData * param1) { sub_0203CD84(param0, &Unk_020EA238, param1); } -void sub_0203DE88 (UnkStruct_0203CDB0 * param0, UnkStruct_021C0794 * param1) +void sub_0203DE88 (UnkStruct_0203CDB0 * param0, SaveData * param1) { sub_0203CD84(param0, &Unk_020F2FCC, param0); } @@ -1396,8 +1396,8 @@ void sub_0203E0FC (UnkStruct_0203CDB0 * param0, int param1) v0->unk_00 = sub_0202DA40(param0->unk_0C); v0->unk_04 = sub_02025CCC(param0->unk_0C); - v0->unk_08 = sub_020245BC(param0->unk_0C, 2); - v0->unk_0C = sub_02024420(param0->unk_0C); + v0->unk_08 = SaveData_Get(param0->unk_0C, 2); + v0->unk_0C = SaveData_PCBoxes(param0->unk_0C); v0->unk_10 = sub_02027560(param0->unk_0C); v0->unk_14 = sub_0202B370(param0->unk_0C); v0->unk_18 = sub_0202C878(param0->unk_0C); @@ -1479,10 +1479,10 @@ void * sub_0203E244 (UnkStruct_0203CDB0 * param0) static const UnkStruct_0208BE5C v0 = { ov87_021D0D80, ov87_021D0E2C, ov87_021D0DFC, FS_OVERLAY_ID(overlay87), }; - UnkStruct_0202DF8C * v1; + HallOfFame * v1; int v2; - v1 = sub_0202444C(param0->unk_0C, 11, &v2); + v1 = SaveData_HallOfFame(param0->unk_0C, 11, &v2); if (v2 == 2) { Heap_FreeToHeap(v1); @@ -1632,7 +1632,7 @@ void sub_0203E414 (UnkStruct_020508D4 * param0, int param1) sub_02050944(param0, sub_0203E35C, v2); } -static u8 sub_0203E484 (UnkStruct_021C0794 * param0, u8 param1) +static u8 sub_0203E484 (SaveData * param0, u8 param1) { static const u8 v0[12] = { 0, 5, 1, 1, 4, 4, 2, 2, 2, 3, 3, 3, @@ -1735,7 +1735,7 @@ UnkStruct_02098C44 * sub_0203E598 (UnkStruct_0203CDB0 * param0, int param1, int v0->unk_04 = sub_0207D990(param0->unk_0C); v0->unk_08 = sub_02028430(param0->unk_0C); v0->unk_0C = sub_02025E44(param0->unk_0C); - v0->unk_10 = sub_0202440C(param0->unk_0C); + v0->unk_10 = SaveData_TVBroadcast(param0->unk_0C); v0->unk_18 = NULL; v0->unk_21 = 0; v0->unk_20 = 5; diff --git a/src/unk_0203F6C4.c b/src/unk_0203F6C4.c index 3c71711d86..636575a1ef 100644 --- a/src/unk_0203F6C4.c +++ b/src/unk_0203F6C4.c @@ -85,7 +85,7 @@ #include "unk_0201D670.h" #include "unk_02020020.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025CB0.h" #include "unk_02025E08.h" @@ -753,7 +753,7 @@ static BOOL sub_02046A4C(UnkStruct_0203E724 * param0); static BOOL sub_02040F0C(UnkStruct_0203E724 * param0); static void sub_02040F28(UnkStruct_0203CDB0 * param0, UnkStruct_0201CD38 * param1, UnkStruct_ov5_021F8E3C * param2); static void sub_02040F5C(UnkStruct_0201CD38 * param0, void * param1); -static u32 sub_0204676C(UnkStruct_021C0794 * param0); +static u32 sub_0204676C(SaveData * param0); static const u8 Unk_020EABA6[6][3] = { {0x1, 0x0, 0x0}, @@ -4478,9 +4478,9 @@ static BOOL sub_02042524 (UnkStruct_0203E724 * param0) { u16 * v0; int v1; - UnkStruct_0202DF8C * v2; + HallOfFame * v2; - v2 = sub_0202444C(param0->unk_34->unk_0C, 4, &v1); + v2 = SaveData_HallOfFame(param0->unk_34->unk_0C, 4, &v1); v0 = inline_0204FCAC(param0); *v0 = 0; @@ -5258,7 +5258,7 @@ static BOOL sub_020434D0 (UnkStruct_0203E724 * param0) static BOOL sub_020434EC (UnkStruct_0203E724 * param0) { - UnkStruct_021C0794 * v0 = param0->unk_34->unk_0C; + SaveData * v0 = param0->unk_34->unk_0C; u16 * v1 = inline_0204FCAC(param0); if (sub_020247E0(v0)) { @@ -6508,7 +6508,7 @@ static BOOL sub_02044A50 (UnkStruct_0203E724 * param0) u16 * v1; UnkStruct_0203A790 * v2 = sub_0203A790(param0->unk_34->unk_0C); UnkStruct_020507E4 * v3 = sub_020507E4(param0->unk_34->unk_0C); - UnkStruct_0202440C * v4 = sub_0202440C(param0->unk_34->unk_0C); + TVBroadcast * v4 = SaveData_TVBroadcast(param0->unk_34->unk_0C); int v5 = (*((param0)->unk_08++)); v0 = sub_0203A784(v2); @@ -6823,7 +6823,7 @@ static BOOL sub_02045068 (UnkStruct_0203E724 * param0) UnkStruct_0203CDB0 * v0 = param0->unk_34; TrainerInfo * v1 = sub_02025E38(sub_0203D174(param0->unk_34)); u16 * v2 = inline_0204FCAC(param0); - UnkStruct_020797DC * v3 = sub_02024420(v0->unk_0C); + PCBoxes * v3 = SaveData_PCBoxes(v0->unk_0C); u16 v4 = inline_02049538(param0); u16 v5 = inline_02049538(param0); u16 v6 = inline_02049538(param0); @@ -6850,7 +6850,7 @@ static BOOL sub_02045068 (UnkStruct_0203E724 * param0) static BOOL sub_02045134 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_0202855C * v2; u16 * v3 = inline_0204FCAC(param0); @@ -6923,7 +6923,7 @@ static BOOL sub_0204521C (UnkStruct_0203E724 * param0) u16 * v0 = inline_0204FCAC(param0); u16 v1; - v1 = sub_02079A50(sub_02024420(param0->unk_34->unk_0C)); + v1 = sub_02079A50(SaveData_PCBoxes(param0->unk_34->unk_0C)); *v0 = 18 * (5 * 6) - v1; return 0; @@ -7286,7 +7286,7 @@ static BOOL sub_02045840 (UnkStruct_0203E724 * param0) static BOOL sub_02045850 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; sub_0206B334(v1); return 0; @@ -7576,10 +7576,10 @@ static BOOL sub_02045C10 (UnkStruct_0203E724 * param0) static BOOL sub_02045C50 (UnkStruct_0203E724 * param0) { int v0; - const UnkStruct_0202DF8C * v1; + const HallOfFame * v1; u16 * v2 = inline_0204FCAC(param0); - v1 = sub_0202444C(param0->unk_34->unk_0C, 32, &v0); + v1 = SaveData_HallOfFame(param0->unk_34->unk_0C, 32, &v0); if (v0 == 0) { *v2 = 0; @@ -8277,7 +8277,7 @@ static BOOL sub_020466A4 (UnkStruct_0203E724 * param0) return 1; } -static u32 sub_0204676C (UnkStruct_021C0794 * param0) +static u32 sub_0204676C (SaveData * param0) { int v0; Pokemon * v1; @@ -8319,10 +8319,10 @@ static u32 sub_0204676C (UnkStruct_021C0794 * param0) } { - UnkStruct_020797DC * v8; + PCBoxes * v8; u32 v9; - v8 = sub_02024420(param0); + v8 = SaveData_PCBoxes(param0); for (v9 = 0; v9 < 18; v9++) { for (v0 = 0; v0 < (5 * 6); v0++) { diff --git a/src/unk_020474B8.c b/src/unk_020474B8.c index 00484e4777..d42a4124f3 100644 --- a/src/unk_020474B8.c +++ b/src/unk_020474B8.c @@ -17,7 +17,7 @@ #include "message.h" #include "unk_0200B358.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "trainer_info.h" #include "unk_020277A4.h" @@ -218,7 +218,7 @@ BOOL sub_02047818 (UnkStruct_0203E724 * param0) { BoxPokemon * v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_020797DC * v2 = sub_02024420(v1->unk_0C); + PCBoxes * v2 = SaveData_PCBoxes(v1->unk_0C); UnkStruct_0200B358 ** v3 = sub_0203F098(v1, 15); u8 v4 = (*((param0)->unk_08++)); u16 v5 = inline_02049538(param0); diff --git a/src/unk_020480A8.c b/src/unk_020480A8.c index 892b757401..ba4fd87dd9 100644 --- a/src/unk_020480A8.c +++ b/src/unk_020480A8.c @@ -11,7 +11,7 @@ #include "struct_defs/struct_0203CDB0.h" #include "struct_defs/struct_0203E724_t.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020480A8.h" #include "unk_020507CC.h" #include "unk_0206AFE0.h" @@ -38,7 +38,7 @@ BOOL sub_020480D8 (UnkStruct_0203E724 * param0) UnkStruct_0203CDB0 * v0 = param0->unk_34; Pokemon * v1; BoxPokemon * v2; - UnkStruct_020797DC * v3 = sub_02024420(v0->unk_0C); + PCBoxes * v3 = SaveData_PCBoxes(v0->unk_0C); u16 * v4 = inline_0204FCAC(param0); u16 * v5 = inline_0204FCAC(param0); u16 * v6 = inline_0204FCAC(param0); diff --git a/src/unk_02048BD0.c b/src/unk_02048BD0.c index b022f0ac48..57b5cf43ea 100644 --- a/src/unk_02048BD0.c +++ b/src/unk_02048BD0.c @@ -28,7 +28,7 @@ BOOL sub_02048BD0 (UnkStruct_0203E724 * param0) { UnkStruct_0200B358 ** v0 = sub_0203F098(param0->unk_34, 15); UnkStruct_0202B4A0 * v1 = sub_0202B4A0(param0->unk_34->unk_0C); - UnkStruct_021C0794 * v2 = param0->unk_34->unk_0C; + SaveData * v2 = param0->unk_34->unk_0C; switch (sub_0203E838(param0)) { case 0: diff --git a/src/unk_02048DD8.c b/src/unk_02048DD8.c index caec252d5b..a245752f49 100644 --- a/src/unk_02048DD8.c +++ b/src/unk_02048DD8.c @@ -27,7 +27,7 @@ #include "message.h" #include "unk_0200B358.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020298BC.h" #include "unk_0202CD50.h" #include "unk_0202E2CC.h" @@ -212,7 +212,7 @@ BOOL sub_020490F0 (UnkStruct_0203E724 * param0) BOOL sub_0204912C (UnkStruct_0203E724 * param0) { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_34->unk_0C); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_34->unk_0C); switch (sub_0203E838(param0)) { case 0: @@ -261,7 +261,7 @@ static int sub_020491D0 (int param0, UnkStruct_0203CDB0 * param1, UnkStruct_0200 static BOOL sub_020491F4 (UnkStruct_0203CDB0 * param0, int param1) { UnkFuncPtr_020EBB48_2 v0; - UnkStruct_0202440C * v1 = sub_0202440C(param0->unk_0C); + TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); if (sub_0202E6B0(v1, 1, param1) == 0) { return 0; @@ -304,7 +304,7 @@ static void sub_02049288 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para static void sub_020492A0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) { u16 v0[10 + 1]; - UnkStruct_0202440C * v1 = sub_0202440C(param0->unk_0C); + TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); UnkStruct_0202E7E4 * v2 = sub_0202E7E4(v1); MessageLoader_GetSpeciesName(v2->unk_02, 4, v0); @@ -314,7 +314,7 @@ static void sub_020492A0 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para static void sub_020492D4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) { u16 v0[10 + 1]; - UnkStruct_0202440C * v1 = sub_0202440C(param0->unk_0C); + TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); UnkStruct_0202E810 * v2 = sub_0202E810(v1); MessageLoader_GetSpeciesName(v2->unk_02, 4, v0); @@ -324,7 +324,7 @@ static void sub_020492D4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para static void sub_02049308 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param1) { Strbuf* v0; - UnkStruct_0202440C * v1 = sub_0202440C(param0->unk_0C); + TVBroadcast * v1 = SaveData_TVBroadcast(param0->unk_0C); UnkStruct_0202E81C * v2 = sub_0202E81C(v1); v0 = Strbuf_Init(64, 4); @@ -336,7 +336,7 @@ static void sub_02049308 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * para static BOOL sub_02049348 (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202E7FC * v0 = sub_0202E7FC(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7FC * v0 = sub_0202E7FC(SaveData_TVBroadcast(param0->unk_0C)); return v0->unk_00; } @@ -348,7 +348,7 @@ static BOOL sub_02049358 (UnkStruct_0203CDB0 * param0) static BOOL sub_02049368 (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202E7D8 * v0 = sub_0202E7D8(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7D8 * v0 = sub_0202E7D8(SaveData_TVBroadcast(param0->unk_0C)); return v0->unk_00; } @@ -360,25 +360,25 @@ static BOOL sub_02049378 (UnkStruct_0203CDB0 * param0) static BOOL sub_02049388 (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202E7F0 * v0 = sub_0202E7F0(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7F0 * v0 = sub_0202E7F0(SaveData_TVBroadcast(param0->unk_0C)); return v0->unk_00; } static BOOL sub_02049398 (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202E7E4 * v0 = sub_0202E7E4(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7E4 * v0 = sub_0202E7E4(SaveData_TVBroadcast(param0->unk_0C)); return v0->unk_00; } static BOOL sub_020493A8 (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202E810 * v0 = sub_0202E810(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E810 * v0 = sub_0202E810(SaveData_TVBroadcast(param0->unk_0C)); return v0->unk_00; } static BOOL sub_020493B8 (UnkStruct_0203CDB0 * param0) { - UnkStruct_0202E81C * v0 = sub_0202E81C(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E81C * v0 = sub_0202E81C(SaveData_TVBroadcast(param0->unk_0C)); return v0->unk_00; } @@ -406,11 +406,11 @@ static const UnkStruct_020EBB48 Unk_020EBB48[19] = { BOOL sub_020493C8 (UnkStruct_0203E724 * param0) { - UnkStruct_0202440C * v0; + TVBroadcast * v0; UnkStruct_0202E808 * v1; u16 * v2 = inline_0204FCAC(param0); - v0 = sub_0202440C(param0->unk_34->unk_0C); + v0 = SaveData_TVBroadcast(param0->unk_34->unk_0C); v1 = sub_0202E808(v0); *v2 = v1->unk_07; @@ -419,14 +419,14 @@ BOOL sub_020493C8 (UnkStruct_0203E724 * param0) BOOL sub_020493F4 (UnkStruct_0203E724 * param0) { - UnkStruct_0202440C * v0; + TVBroadcast * v0; UnkStruct_0202E81C * v1; u16 * v2 = inline_0204FCAC(param0); u16 * v3 = inline_0204FCAC(param0); u16 * v4 = inline_0204FCAC(param0); u16 * v5 = inline_0204FCAC(param0); - v0 = sub_0202440C(param0->unk_34->unk_0C); + v0 = SaveData_TVBroadcast(param0->unk_34->unk_0C); v1 = sub_0202E81C(v0); switch (v1->unk_01) { diff --git a/src/unk_020494DC.c b/src/unk_020494DC.c index dd486ff0c8..8893c0a636 100644 --- a/src/unk_020494DC.c +++ b/src/unk_020494DC.c @@ -421,7 +421,7 @@ BOOL sub_02049B6C (UnkStruct_0203E724 * param0) BOOL sub_02049B8C (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 * v2 = inline_0204FCAC(param0); *v2 = sub_0202D230(sub_0202D750(v1), 0, 0); @@ -431,7 +431,7 @@ BOOL sub_02049B8C (UnkStruct_0203E724 * param0) BOOL sub_02049BBC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 v2 = inline_02049538(param0); sub_0202CF70(sub_0202CD88(param0->unk_34->unk_0C), (1 + 67), v2); @@ -443,7 +443,7 @@ BOOL sub_02049BBC (UnkStruct_0203E724 * param0) BOOL sub_02049C00 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 v2 = inline_02049538(param0); sub_0202CF70(sub_0202CD88(param0->unk_34->unk_0C), (1 + 68), v2); @@ -456,7 +456,7 @@ BOOL sub_02049C44 (UnkStruct_0203E724 * param0) { u16 v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_021C0794 * v2 = v1->unk_0C; + SaveData * v2 = v1->unk_0C; u16 v3 = inline_02049538(param0); u16 * v4 = inline_0204FCAC(param0); diff --git a/src/unk_02049D08.c b/src/unk_02049D08.c index 2bbc1418a4..c9b1605d5a 100644 --- a/src/unk_02049D08.c +++ b/src/unk_02049D08.c @@ -24,7 +24,7 @@ #include "heap.h" #include "unk_0201D15C.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "trainer_info.h" #include "unk_0202B604.h" @@ -49,9 +49,9 @@ typedef struct { u16 unk_02; } UnkStruct_02049D38; -static u16 sub_0204AC54(UnkStruct_021C0794 * param0, u8 param1, UnkStruct_0204AFC4 * param2); +static u16 sub_0204AC54(SaveData * param0, u8 param1, UnkStruct_0204AFC4 * param2); static u16 sub_0204ACC8(UnkStruct_0204AFC4 * param0); -static void sub_0204AE20(UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, int param2); +static void sub_0204AE20(UnkStruct_0204AFC4 * param0, SaveData * param1, int param2); u16 sub_02049D08 (u16 param0) { @@ -159,7 +159,7 @@ static BOOL sub_02049DB4 (UnkStruct_02049D38 * param0, int param1, int param2, i return 0; } -BOOL sub_02049EC4 (u16 param0, UnkStruct_021C0794 * param1, u8 param2) +BOOL sub_02049EC4 (u16 param0, SaveData * param1, u8 param2) { u8 v0, v1, v2, v3; u16 v4, v5; @@ -239,7 +239,7 @@ void sub_02049FE8 (UnkStruct_0203CDB0 * param0) sub_0206ADAC(sub_020507E4(param0->unk_0C)); } -u16 sub_02049FF8 (UnkStruct_021C0794 * param0, u16 param1) +u16 sub_02049FF8 (SaveData * param0, u16 param1) { u16 v0; @@ -257,7 +257,7 @@ u16 sub_02049FF8 (UnkStruct_021C0794 * param0, u16 param1) return v0; } -void sub_0204A030 (UnkStruct_021C0794 * param0, u8 param1) +void sub_0204A030 (SaveData * param0, u8 param1) { UnkStruct_0202D750 * v0 = sub_0202D750(param0); @@ -268,13 +268,13 @@ void sub_0204A030 (UnkStruct_021C0794 * param0, u8 param1) } } -u16 sub_0204A050 (UnkStruct_021C0794 * param0) +u16 sub_0204A050 (SaveData * param0) { UnkStruct_0202D750 * v0 = sub_0202D750(param0); return (u16)sub_0202D414(v0, 5, 0); } -u16 sub_0204A064 (UnkStruct_021C0794 * param0) +u16 sub_0204A064 (SaveData * param0) { u8 v0; int v1; @@ -305,7 +305,7 @@ u16 sub_0204A064 (UnkStruct_021C0794 * param0) return v0; } -u16 sub_0204A100 (UnkStruct_021C0794 * param0) +u16 sub_0204A100 (SaveData * param0) { UnkStruct_0202D764 * v0; @@ -319,7 +319,7 @@ void sub_0204A110 (UnkStruct_0204AFC4 ** param0) *param0 = NULL; } -UnkStruct_0204AFC4 * sub_0204A124 (UnkStruct_021C0794 * param0, u16 param1, u16 param2) +UnkStruct_0204AFC4 * sub_0204A124 (SaveData * param0, u16 param1, u16 param2) { u8 v0; u16 v1, v2; @@ -429,7 +429,7 @@ void sub_0204A358 (UnkStruct_0204AFC4 * param0, UnkStruct_020508D4 * param1, voi sub_0206BBFC(param1, param2, 17, 0, param0->unk_0E, param0->unk_0E, 100, 0); } -BOOL sub_0204A378 (UnkStruct_0204AFC4 * param0, void ** param1, UnkStruct_021C0794 * param2) +BOOL sub_0204A378 (UnkStruct_0204AFC4 * param0, void ** param1, SaveData * param2) { u16 v0 = 0; UnkStruct_02098C44 * v1 = *param1; @@ -456,7 +456,7 @@ BOOL sub_0204A378 (UnkStruct_0204AFC4 * param0, void ** param1, UnkStruct_021C07 return 1; } -int sub_0204A410 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +int sub_0204A410 (UnkStruct_0204AFC4 * param0, SaveData * param1) { u16 v0 = 0, v1 = 0; u16 v2[4], v3[4]; @@ -501,7 +501,7 @@ static BOOL sub_0204A4A0 (u16 * param0, u16 param1, u16 param2) return 0; } -void sub_0204A4C8 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +void sub_0204A4C8 (UnkStruct_0204AFC4 * param0, SaveData * param1) { int v0; u16 v1, v2; @@ -550,7 +550,7 @@ BOOL sub_0204A57C (UnkStruct_0204AFC4 * param0) return 0; } -static void sub_0204A5A0 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, u16 param2) +static void sub_0204A5A0 (UnkStruct_0204AFC4 * param0, SaveData * param1, u16 param2) { Party * v0; @@ -567,7 +567,7 @@ static void sub_0204A5A0 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * para } } -static void sub_0204A5EC (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, u8 param2, u16 param3) +static void sub_0204A5EC (UnkStruct_0204AFC4 * param0, SaveData * param1, u8 param2, u16 param3) { u8 v0; @@ -576,7 +576,7 @@ static void sub_0204A5EC (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * para sub_0204AE20(param0, param1, 0); case 1: if (param3 >= 7) { - sub_0206CFE4(sub_0202440C(param1), param2, param3); + sub_0206CFE4(SaveData_TVBroadcast(param1), param2, param3); } break; case 4: @@ -595,7 +595,7 @@ static void sub_0204A5EC (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * para } } -void sub_0204A660 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +void sub_0204A660 (UnkStruct_0204AFC4 * param0, SaveData * param1) { u32 v0 = 0; int v1; @@ -654,7 +654,7 @@ void sub_0204A660 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) sub_0204A5EC(param0, param1, 0, v0); } -void sub_0204A7A4 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, UnkStruct_0202B628 * param2) +void sub_0204A7A4 (UnkStruct_0204AFC4 * param0, SaveData * param1, UnkStruct_0202B628 * param2) { u32 v0 = 0; int v1; @@ -802,7 +802,7 @@ u16 sub_0204AA04 (UnkStruct_0204AFC4 * param0) return v1; } -u16 sub_0204AA7C (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +u16 sub_0204AA7C (UnkStruct_0204AFC4 * param0, SaveData * param1) { u8 v0, v1; u16 v2, v3, v4; @@ -826,7 +826,7 @@ u16 sub_0204AA7C (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) return 1; } -u16 sub_0204AABC (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, u8 param2) +u16 sub_0204AABC (UnkStruct_0204AFC4 * param0, SaveData * param1, u8 param2) { u8 v0, v1; UnkStruct_0202D750 * v2 = sub_0202D750(param1); @@ -875,7 +875,7 @@ u16 sub_0204AABC (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, u8 p return 0; } -u16 sub_0204AB68 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +u16 sub_0204AB68 (UnkStruct_0204AFC4 * param0, SaveData * param1) { if (param0->unk_0F != 0) { return 0; @@ -891,7 +891,7 @@ u16 sub_0204AB68 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) return 0; } -u16 sub_0204ABA0 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +u16 sub_0204ABA0 (UnkStruct_0204AFC4 * param0, SaveData * param1) { u8 v0, v1; u16 v2, v3, v4; @@ -927,7 +927,7 @@ u16 sub_0204ABA0 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) return sub_0204AC54(param1, v0, param0); } -u16 sub_0204ABF4 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +u16 sub_0204ABF4 (UnkStruct_0204AFC4 * param0, SaveData * param1) { u8 v0; @@ -946,7 +946,7 @@ u16 sub_0204ABF4 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) return param0->unk_08 / 65535; } -static u16 sub_0204AC54 (UnkStruct_021C0794 * param0, u8 param1, UnkStruct_0204AFC4 * param2) +static u16 sub_0204AC54 (SaveData * param0, u8 param1, UnkStruct_0204AFC4 * param2) { u8 v0 = 1; u8 v1; @@ -1022,7 +1022,7 @@ static void sub_0204ACFC (UnkStruct_ov104_0223A348_sub2 * param0, Pokemon * para Pokemon_GetValue(param1, MON_DATA_117, param0->unk_22); } -static void sub_0204AE20 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1, int param2) +static void sub_0204AE20 (UnkStruct_0204AFC4 * param0, SaveData * param1, int param2) { int v0 = 0; UnkStruct_ov104_0223A348_sub2 * v1; diff --git a/src/unk_0204AEE8.c b/src/unk_0204AEE8.c index df165ed955..ad12cb9a8c 100644 --- a/src/unk_0204AEE8.c +++ b/src/unk_0204AEE8.c @@ -106,7 +106,7 @@ static const u16 Unk_020EBD98[][2] = { {0x16, 0x47} }; -UnkStruct_0200B358 * sub_0204AEE8 (UnkStruct_021C0794 * param0, u16 param1, u16 param2, u8 param3, u8 * param4) +UnkStruct_0200B358 * sub_0204AEE8 (SaveData * param0, u16 param1, u16 param2, u8 param3, u8 * param4) { u8 v0; u16 v1; @@ -200,7 +200,7 @@ u16 sub_0204B044 (UnkStruct_0203CDB0 * param0, const u16 * param1) return 0; } -void sub_0204B060 (UnkStruct_0204AFC4 * param0, UnkStruct_021C0794 * param1) +void sub_0204B060 (UnkStruct_0204AFC4 * param0, SaveData * param1) { int v0; Party * v1; diff --git a/src/unk_0204C500.c b/src/unk_0204C500.c index 6f99f6223c..639d9f758d 100644 --- a/src/unk_0204C500.c +++ b/src/unk_0204C500.c @@ -12,7 +12,7 @@ #include "struct_defs/struct_0203E724_t.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "trainer_info.h" #include "unk_0202631C.h" @@ -46,7 +46,7 @@ BOOL sub_0204C500 (UnkStruct_0203E724 * param0) BOOL sub_0204C554 (UnkStruct_0203E724 * param0) { - UnkStruct_02024440 * v0 = sub_02024440(param0->unk_34->unk_0C); + PalParkTransfer * v0 = SaveData_PalParkTransfer(param0->unk_34->unk_0C); Pokemon * v1 = Pokemon_New(32); u16 * v2 = inline_0204FCAC(param0); @@ -62,8 +62,8 @@ BOOL sub_0204C554 (UnkStruct_0203E724 * param0) BOOL sub_0204C59C (UnkStruct_0203E724 * param0) { - UnkStruct_02024440 * v0 = sub_02024440(param0->unk_34->unk_0C); - UnkStruct_020797DC * v1 = sub_02024420(param0->unk_34->unk_0C); + PalParkTransfer * v0 = SaveData_PalParkTransfer(param0->unk_34->unk_0C); + PCBoxes * v1 = SaveData_PCBoxes(param0->unk_34->unk_0C); Pokemon * v2 = Pokemon_New(32); TrainerInfo * v3 = sub_02025E38(param0->unk_34->unk_0C); UnkStruct_02026324 * v4 = sub_02027560(param0->unk_34->unk_0C); diff --git a/src/unk_0204C6C8.c b/src/unk_0204C6C8.c index 5e91f2c32b..b2fbd7ce9b 100644 --- a/src/unk_0204C6C8.c +++ b/src/unk_0204C6C8.c @@ -54,7 +54,7 @@ BOOL sub_0204C730 (UnkStruct_0203E724 * param0) BOOL sub_0204C750 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 * v2 = sub_02025E50(v1); u16 * v3; @@ -67,7 +67,7 @@ BOOL sub_0204C750 (UnkStruct_0203E724 * param0) BOOL sub_0204C780 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 * v2 = sub_02025E50(v1); u16 v3; @@ -80,7 +80,7 @@ BOOL sub_0204C780 (UnkStruct_0203E724 * param0) BOOL sub_0204C7AC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 * v2 = sub_02025E50(v1); u16 v3; @@ -93,7 +93,7 @@ BOOL sub_0204C7AC (UnkStruct_0203E724 * param0) BOOL sub_0204C7D8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 * v2 = sub_02025E50(v1); u16 * v3 = inline_0204FCAC(param0); u16 v4; @@ -109,7 +109,7 @@ BOOL sub_0204C808 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; TrainerInfo * v1 = sub_02025E38(sub_0203D174(param0->unk_34)); - UnkStruct_021C0794 * v2 = v0->unk_0C; + SaveData * v2 = v0->unk_0C; u16 * v3 = sub_02025E50(v2); u32 v4, v5; u16 * v6 = inline_0204FCAC(param0); @@ -130,7 +130,7 @@ BOOL sub_0204C854 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; TrainerInfo * v1 = sub_02025E38(sub_0203D174(param0->unk_34)); - UnkStruct_021C0794 * v2 = v0->unk_0C; + SaveData * v2 = v0->unk_0C; u16 * v3 = sub_02025E50(v2); u16 * v4 = inline_0204FCAC(param0); u16 * v5 = inline_0204FCAC(param0); @@ -151,7 +151,7 @@ BOOL sub_0204C854 (UnkStruct_0203E724 * param0) BOOL sub_0204C8AC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; u16 * v2 = sub_02025E50(v1); u16 * v3 = inline_0204FCAC(param0); u16 v4 = inline_02049538(param0); diff --git a/src/unk_0204CA84.c b/src/unk_0204CA84.c index c1aadadd24..6ba988a87b 100644 --- a/src/unk_0204CA84.c +++ b/src/unk_0204CA84.c @@ -26,7 +26,7 @@ BOOL sub_0204CA84 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); ov5_021E72BC(sub_02026310(v1), *v2); @@ -38,11 +38,11 @@ BOOL sub_0204CAA4 (UnkStruct_0203E724 * param0) { u16 * v0; UnkStruct_0203CDB0 * v1 = param0->unk_34; - UnkStruct_021C0794 * v2 = v1->unk_0C; + SaveData * v2 = v1->unk_0C; UnkStruct_02026310 * v3; v0 = inline_0204FCAC(param0); - v3 = (UnkStruct_02026310 *)(sub_020245BC(v2, 8)); + v3 = (UnkStruct_02026310 *)(SaveData_Get(v2, 8)); *v0 = ov5_021E73C8(v3); return 0; @@ -51,10 +51,10 @@ BOOL sub_0204CAA4 (UnkStruct_0203E724 * param0) BOOL sub_0204CAD4 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_02026310 * v2; - v2 = (UnkStruct_02026310 *)(sub_020245BC(v1, 8)); + v2 = (UnkStruct_02026310 *)(SaveData_Get(v1, 8)); ov5_021E6B40(v2); return 0; @@ -63,8 +63,8 @@ BOOL sub_0204CAD4 (UnkStruct_0203E724 * param0) BOOL sub_0204CAEC (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; - UnkStruct_02026310 * v2 = (UnkStruct_02026310 *)(sub_020245BC(v1, 8)); + SaveData * v1 = v0->unk_0C; + UnkStruct_02026310 * v2 = (UnkStruct_02026310 *)(SaveData_Get(v1, 8)); Party * v3 = Party_GetFromSavedata(v0->unk_0C); TrainerInfo * v4 = sub_02025E38(sub_0203D174(param0->unk_34)); @@ -78,11 +78,11 @@ BOOL sub_0204CB20 (UnkStruct_0203E724 * param0) UnkStruct_02026310 * v1; Party * v2; UnkStruct_0200B358 ** v3 = sub_0203F098(v0, 15); - UnkStruct_021C0794 * v4 = v0->unk_0C; + SaveData * v4 = v0->unk_0C; u16 * v5 = inline_0204FCAC(param0); u8 v6 = inline_02049538(param0); - v1 = (UnkStruct_02026310 *)(sub_020245BC(v4, 8)); + v1 = (UnkStruct_02026310 *)(SaveData_Get(v4, 8)); v2 = Party_GetFromSavedata(v0->unk_0C); *v5 = ov5_021E64F8(v2, *v3, v1, v6); @@ -94,11 +94,11 @@ BOOL sub_0204CB80 (UnkStruct_0203E724 * param0) UnkStruct_0203CDB0 * v0 = param0->unk_34; UnkStruct_02026310 * v1; UnkStruct_0200B358 ** v2 = sub_0203F098(v0, 15); - UnkStruct_021C0794 * v3 = v0->unk_0C; + SaveData * v3 = v0->unk_0C; u16 * v4 = inline_0204FCAC(param0); u8 v5 = inline_02049538(param0); - v1 = (UnkStruct_02026310 *)(sub_020245BC(v3, 8)); + v1 = (UnkStruct_02026310 *)(SaveData_Get(v3, 8)); *v4 = ov5_021E6630(v1, v5, *v2); return 0; @@ -107,13 +107,13 @@ BOOL sub_0204CB80 (UnkStruct_0203E724 * param0) BOOL sub_0204CBD4 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_02026310 * v2; UnkStruct_0200B358 ** v3 = sub_0203F098(param0->unk_34, 15); u16 * v4 = inline_0204FCAC(param0); u16 v5 = inline_02049538(param0); - v2 = (UnkStruct_02026310 *)(sub_020245BC(v1, 8)); + v2 = (UnkStruct_02026310 *)(SaveData_Get(v1, 8)); *v4 = ov5_021E6640(v2, v5, *v3); return 0; @@ -137,13 +137,13 @@ BOOL sub_0204CC24 (UnkStruct_0203E724 * param0) BOOL sub_0204CC78 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_02026310 * v2; Party * v3; u8 v4 = inline_02049538(param0); v3 = Party_GetFromSavedata(v0->unk_0C); - v2 = (UnkStruct_02026310 *)(sub_020245BC(v1, 8)); + v2 = (UnkStruct_02026310 *)(SaveData_Get(v1, 8)); ov5_021E6358(v3, v4, v2, v1); @@ -153,7 +153,7 @@ BOOL sub_0204CC78 (UnkStruct_0203E724 * param0) BOOL sub_0204CCB8 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_0200B358 ** v2 = sub_0203F098(param0->unk_34, 15); u8 v3 = inline_02049538(param0); u8 v4 = inline_02049538(param0); @@ -167,11 +167,11 @@ BOOL sub_0204CCB8 (UnkStruct_0203E724 * param0) BOOL sub_0204CD44 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_02026310 * v2; u16 * v3 = inline_0204FCAC(param0); - v2 = (UnkStruct_02026310 *)(sub_020245BC(v1, 8)); + v2 = (UnkStruct_02026310 *)(SaveData_Get(v1, 8)); *v3 = ov5_021E7420(v2); return 0; @@ -180,11 +180,11 @@ BOOL sub_0204CD44 (UnkStruct_0203E724 * param0) BOOL sub_0204CD74 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_02026310 * v2; u16 * v3 = inline_0204FCAC(param0); - v2 = (UnkStruct_02026310 *)(sub_020245BC(v1, 8)); + v2 = (UnkStruct_02026310 *)(SaveData_Get(v1, 8)); *v3 = sub_02026234(v2); return 0; diff --git a/src/unk_0204CFFC.c b/src/unk_0204CFFC.c index 839b48b941..91ca2b1170 100644 --- a/src/unk_0204CFFC.c +++ b/src/unk_0204CFFC.c @@ -14,7 +14,7 @@ #include "unk_02017038.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "trainer_info.h" #include "map_header.h" @@ -463,7 +463,7 @@ BOOL sub_0204D94C (UnkStruct_0203E724 * param0) Pokemon * v3; UnkStruct_0203CDB0 * v4 = param0->unk_34; u16 * v5 = inline_0204FCAC(param0); - UnkStruct_020797DC * v6 = sub_02024420(v4->unk_0C); + PCBoxes * v6 = SaveData_PCBoxes(v4->unk_0C); v0 = Party_GetCurrentCount(Party_GetFromSavedata(v4->unk_0C)); diff --git a/src/unk_0204E974.c b/src/unk_0204E974.c index 1fc0129bb0..ac0340704c 100644 --- a/src/unk_0204E974.c +++ b/src/unk_0204E974.c @@ -16,7 +16,7 @@ BOOL sub_0204E974 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_020298B0 * v2; u16 v3 = inline_02049538(param0); u16 v4 = inline_02049538(param0); @@ -41,7 +41,7 @@ BOOL sub_0204E9C8 (UnkStruct_0203E724 * param0) BOOL sub_0204EA04 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_020298B0 * v2; u16 v3 = inline_02049538(param0); u16 v4 = inline_02049538(param0); @@ -66,7 +66,7 @@ BOOL sub_0204EA58 (UnkStruct_0203E724 * param0) BOOL sub_0204EA94 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_020298B0 * v2; u16 v3 = inline_02049538(param0); u16 v4 = inline_02049538(param0); @@ -111,7 +111,7 @@ BOOL sub_0204EB60 (UnkStruct_0203E724 * param0) BOOL sub_0204EB9C (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_020298B0 * v2; u16 v3 = inline_02049538(param0); u16 v4 = inline_02049538(param0); @@ -155,7 +155,7 @@ BOOL sub_0204EC5C (UnkStruct_0203E724 * param0) BOOL sub_0204EC98 (UnkStruct_0203E724 * param0) { UnkStruct_0203CDB0 * v0 = param0->unk_34; - UnkStruct_021C0794 * v1 = v0->unk_0C; + SaveData * v1 = v0->unk_0C; UnkStruct_020298B0 * v2; u16 v3 = inline_02049538(param0); u16 v4 = inline_02049538(param0); diff --git a/src/unk_0204F13C.c b/src/unk_0204F13C.c index c759e3aebb..8704f85a3d 100644 --- a/src/unk_0204F13C.c +++ b/src/unk_0204F13C.c @@ -67,7 +67,7 @@ enum { }; BOOL sub_0204F13C(UnkStruct_0203E724 * param0); -static BOOL sub_0204F268(u16 param0, UnkStruct_021C0794 * param1); +static BOOL sub_0204F268(u16 param0, SaveData * param1); BOOL sub_0204F360(UnkStruct_0203E724 * param0); BOOL sub_0204F398(UnkStruct_0203E724 * param0); @@ -155,7 +155,7 @@ BOOL sub_0204F13C (UnkStruct_0203E724 * param0) return 0; } -static BOOL sub_0204F268 (u16 param0, UnkStruct_021C0794 * param1) +static BOOL sub_0204F268 (u16 param0, SaveData * param1) { u8 v0, v1, v2, v3; u16 v4, v5; @@ -409,7 +409,7 @@ static int sub_0204F5D8 (UnkStruct_0204F470 * param0, UnkStruct_0203CDB0 * param static int sub_0204F628 (UnkStruct_0204F470 * param0, UnkStruct_0203CDB0 * param1, int param2) { UnkStruct_02098D38 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; static const u8 v2[] = { 0, @@ -527,7 +527,7 @@ BOOL sub_0204F6D8 (UnkStruct_0203E724 * param0) { int v0; int v1; - UnkStruct_020308A0 * v2; + BattleFrontierStage * v2; UnkStruct_0203068C * v3; u32 v4, v5, v6; u16 v7, v8; @@ -622,7 +622,7 @@ BOOL sub_0204F8A8(UnkStruct_0203E724 * param0); BOOL sub_0204F8A8 (UnkStruct_0203E724 * param0) { int v0; - UnkStruct_020308A0 * v1; + BattleFrontierStage * v1; u32 v2, v3, v4; UnkStruct_0203CDB0 * v5 = param0->unk_34; u16 * v6 = inline_0204FCAC(param0); @@ -672,7 +672,7 @@ BOOL sub_0204F950 (UnkStruct_0203E724 * param0) { int v0; int v1; - UnkStruct_020308A0 * v2; + BattleFrontierStage * v2; UnkStruct_0203068C * v3; u32 v4, v5; UnkStruct_0203CDB0 * v6 = param0->unk_34; diff --git a/src/unk_0204FA34.c b/src/unk_0204FA34.c index 5f7239da7c..135735518d 100644 --- a/src/unk_0204FA34.c +++ b/src/unk_0204FA34.c @@ -13,7 +13,7 @@ #include "unk_0205DFC4.h" void sub_0204FA34(int param0, int param1, void * param2, void * param3); -void sub_0204FA50(UnkStruct_021C0794 * param0, UnkStruct_0203026C * param1, u8 param2); +void sub_0204FA50(SaveData * param0, UnkStruct_0203026C * param1, u8 param2); void sub_0204FA34 (int param0, int param1, void * param2, void * param3) { @@ -32,7 +32,7 @@ void sub_0204FA34 (int param0, int param1, void * param2, void * param3) return; } -void sub_0204FA50 (UnkStruct_021C0794 * param0, UnkStruct_0203026C * param1, u8 param2) +void sub_0204FA50 (SaveData * param0, UnkStruct_0203026C * param1, u8 param2) { int v0; u8 v1[4]; diff --git a/src/unk_0204FAB4.c b/src/unk_0204FAB4.c index 4f69cbf58c..6337cd3420 100644 --- a/src/unk_0204FAB4.c +++ b/src/unk_0204FAB4.c @@ -51,7 +51,7 @@ typedef struct { BOOL sub_0204FAB4(UnkStruct_0203E724 * param0); BOOL sub_0204FBB4(UnkStruct_0203E724 * param0); -static void sub_0204FBEC(UnkStruct_021C0794 * param0, UnkStruct_0203041C * param1, u8 param2); +static void sub_0204FBEC(SaveData * param0, UnkStruct_0203041C * param1, u8 param2); static void sub_0204FDB4(UnkStruct_020508D4 * param0, void ** param1, u8 param2); static BOOL sub_0204FDE8(UnkStruct_020508D4 * param0); static int sub_0204FE50(UnkStruct_0204FE50 * param0, UnkStruct_0203CDB0 * param1, int param2); @@ -129,7 +129,7 @@ BOOL sub_0204FBB4 (UnkStruct_0203E724 * param0) return 0; } -static void sub_0204FBEC (UnkStruct_021C0794 * param0, UnkStruct_0203041C * param1, u8 param2) +static void sub_0204FBEC (SaveData * param0, UnkStruct_0203041C * param1, u8 param2) { int v0; u16 v1[4]; @@ -322,7 +322,7 @@ static int sub_0204FF1C (UnkStruct_0204FE50 * param0, UnkStruct_0203CDB0 * param static int sub_0204FF6C (UnkStruct_0204FE50 * param0, UnkStruct_0203CDB0 * param1, int param2) { UnkStruct_02098D38 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; static const u8 v2[] = { 0, 1, 2, 4, 3, 5, 6, 7, 8 }; diff --git a/src/unk_0205003C.c b/src/unk_0205003C.c index eaf79c8a2a..139e44efe5 100644 --- a/src/unk_0205003C.c +++ b/src/unk_0205003C.c @@ -51,7 +51,7 @@ typedef struct { BOOL sub_0205003C(UnkStruct_0203E724 * param0); BOOL sub_0205013C(UnkStruct_0203E724 * param0); -static void sub_02050174(UnkStruct_021C0794 * param0, UnkStruct_020305B8 * param1, u8 param2); +static void sub_02050174(SaveData * param0, UnkStruct_020305B8 * param1, u8 param2); void sub_020502E0(UnkStruct_020508D4 * param0, void ** param1, u8 param2); static BOOL sub_02050314(UnkStruct_020508D4 * param0); static int sub_0205037C(UnkStruct_0205037C * param0, UnkStruct_0203CDB0 * param1, int param2); @@ -129,7 +129,7 @@ BOOL sub_0205013C (UnkStruct_0203E724 * param0) return 0; } -static void sub_02050174 (UnkStruct_021C0794 * param0, UnkStruct_020305B8 * param1, u8 param2) +static void sub_02050174 (SaveData * param0, UnkStruct_020305B8 * param1, u8 param2) { int v0; u16 v1[4]; @@ -312,7 +312,7 @@ static int sub_02050448 (UnkStruct_0205037C * param0, UnkStruct_0203CDB0 * param static int sub_02050498 (UnkStruct_0205037C * param0, UnkStruct_0203CDB0 * param1, int param2) { UnkStruct_02098D38 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; static const u8 v2[] = { 0, 1, 2, 4, 3, 5, 6, 7, 8 }; diff --git a/src/unk_020507CC.c b/src/unk_020507CC.c index 7e3c234c1a..f31a5a81b8 100644 --- a/src/unk_020507CC.c +++ b/src/unk_020507CC.c @@ -13,21 +13,21 @@ typedef struct UnkStruct_020507E4_t { static u8 Unk_021C07F4[8] = {}; -int sub_020507CC (void) +int FieldEvents_SaveSize (void) { return sizeof(UnkStruct_020507E4); } -void sub_020507D4 (UnkStruct_020507E4 * param0) +void FieldEvents_Init (UnkStruct_020507E4 * param0) { memset(param0, 0, sizeof(UnkStruct_020507E4)); } -UnkStruct_020507E4 * sub_020507E4 (UnkStruct_021C0794 * param0) +UnkStruct_020507E4 * sub_020507E4 (SaveData * param0) { UnkStruct_020507E4 * v0; - v0 = (UnkStruct_020507E4 *)sub_020245BC(param0, 4); + v0 = (UnkStruct_020507E4 *)SaveData_Get(param0, 4); return v0; } diff --git a/src/unk_02050A74.c b/src/unk_02050A74.c index 25b7ba2c7b..945f72991b 100644 --- a/src/unk_02050A74.c +++ b/src/unk_02050A74.c @@ -20,7 +20,7 @@ #include "unk_020041CC.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "unk_02026150.h" #include "unk_0202B604.h" @@ -480,7 +480,7 @@ static BOOL sub_02051074 (UnkStruct_020508D4 * param0) sub_02050B1C(v1->unk_10, v0); if (v1->unk_10->unk_14 == 0x4) { - UnkStruct_0202440C * v4 = sub_0202440C(v0->unk_0C); + TVBroadcast * v4 = SaveData_TVBroadcast(v0->unk_0C); Pokemon * v5 = Party_GetPokemonBySlotIndex(v1->unk_10->parties[1], 0); sub_0206D018(v4, v5); @@ -515,7 +515,7 @@ static BOOL sub_02051074 (UnkStruct_020508D4 * param0) sub_0203E8E0(param0, 8809, NULL, NULL); } } else { - UnkStruct_020797DC * v7 = sub_02024420(v0->unk_0C); + PCBoxes * v7 = SaveData_PCBoxes(v0->unk_0C); Party * v8 = Party_GetFromSavedata(v0->unk_0C); if ((sub_020799A0(v7) == 18) && (Party_GetCurrentCount(v8) == 6)) { diff --git a/src/unk_02051D8C.c b/src/unk_02051D8C.c index 31599dfcc7..6d8a5cd073 100644 --- a/src/unk_02051D8C.c +++ b/src/unk_02051D8C.c @@ -31,7 +31,7 @@ #include "unk_0201378C.h" #include "heap.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025CB0.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -186,7 +186,7 @@ BattleParams * sub_02051F4C (int param0, const UnkStruct_0203CDB0 * param1) Party_AddPokemon(v4->parties[1], v5); Heap_FreeToHeap(v5); - v4->unk_EC = sub_02024420(param1->unk_0C); + v4->unk_EC = SaveData_PCBoxes(param1->unk_0C); v4->unk_E4 = param1->unk_98; v4->unk_190 = NULL; v4->unk_11C = sub_0202CD88(param1->unk_0C); @@ -250,7 +250,7 @@ void sub_020521A4 (BattleParams * param0, const UnkStruct_0202CC84 * param1, int sub_0202CD3C(param0->unk_F0[param2], param1); } -void sub_020521B8 (BattleParams * param0, const UnkStruct_0203CDB0 * param1, UnkStruct_021C0794 * param2, int param3, UnkStruct_0202B628 * param4, UnkStruct_0207D99C * param5, UnkStruct_0209C370 * param6) +void sub_020521B8 (BattleParams * param0, const UnkStruct_0203CDB0 * param1, SaveData * param2, int param3, UnkStruct_0202B628 * param4, UnkStruct_0207D99C * param5, UnkStruct_0209C370 * param6) { TrainerInfo * v0 = sub_02025E38(param2); Party * v1 = Party_GetFromSavedata(param2); @@ -280,7 +280,7 @@ void sub_020521B8 (BattleParams * param0, const UnkStruct_0203CDB0 * param1, Unk sub_02027A10(v5, param0->unk_108); sub_020521A4(param0, v4, 0); - param0->unk_EC = sub_02024420(param2); + param0->unk_EC = SaveData_PCBoxes(param2); param0->unk_130 = sub_0203A138(param3); param0->unk_13C = MapHeader_GetMapEvolutionMethod(param3); param0->unk_140 = sub_0208C324(param2); @@ -341,7 +341,7 @@ void sub_02052348 (BattleParams * param0, const UnkStruct_0203CDB0 * param1, int sub_02027A10(v7, param0->unk_108); sub_020521A4(param0, v6, 0); - param0->unk_EC = sub_02024420(param1->unk_0C); + param0->unk_EC = SaveData_PCBoxes(param1->unk_0C); param0->unk_138 = sub_02055BA8(param1); param0->unk_E4 = param1->unk_98; param0->unk_190 = param1->unk_BC; @@ -411,7 +411,7 @@ void sub_020524E4 (BattleParams * param0, const UnkStruct_0203CDB0 * param1, con sub_02027A10(v4, param0->unk_108); sub_020521A4(param0, v3, 0); - param0->unk_EC = sub_02024420(param1->unk_0C); + param0->unk_EC = SaveData_PCBoxes(param1->unk_0C); param0->unk_138 = sub_02055BA8(param1); param0->unk_E4 = param1->unk_98; param0->unk_190 = param1->unk_BC; diff --git a/src/unk_02052C6C.c b/src/unk_02052C6C.c index daf9c228e0..dfb54864e8 100644 --- a/src/unk_02052C6C.c +++ b/src/unk_02052C6C.c @@ -32,7 +32,7 @@ #include "unk_02018340.h" #include "gx_layers.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -72,22 +72,22 @@ static BOOL sub_02052FFC(UnkStruct_0205300C * param0); static void sub_02052C6C (UnkStruct_0203CDB0 * param0, BOOL param1) { - UnkStruct_0202DF8C * v0; + HallOfFame * v0; Party * v1; RTCDate v2; int v3; - v0 = sub_0202444C(param0->unk_0C, 11, &v3); + v0 = SaveData_HallOfFame(param0->unk_0C, 11, &v3); if ((v3 != 1) || !param1) { - sub_0202DF94(v0); + HallOfFame_Init(v0); } v1 = Party_GetFromSavedata(param0->unk_0C); sub_020138A4(&v2); sub_0202DFA8(v0, v1, &v2); - sub_02024458(param0->unk_0C, v0); + SaveData_SaveHallOfFame(param0->unk_0C, v0); Heap_FreeToHeap(v0); } diff --git a/src/unk_02054884.c b/src/unk_02054884.c index 64bc82fa3a..a9055f3c05 100644 --- a/src/unk_02054884.c +++ b/src/unk_02054884.c @@ -27,7 +27,7 @@ BOOL sub_02054884 (Pokemon * param0) return 1; } -BOOL sub_020548B0 (int param0, UnkStruct_021C0794 * param1, u16 param2, u8 param3, u16 param4, int param5, int param6) +BOOL sub_020548B0 (int param0, SaveData * param1, u16 param2, u8 param3, u16 param4, int param5, int param6) { BOOL v0; Pokemon * v1; @@ -56,7 +56,7 @@ BOOL sub_020548B0 (int param0, UnkStruct_021C0794 * param1, u16 param2, u8 param return v0; } -BOOL sub_02054930 (int param0, UnkStruct_021C0794 * param1, u16 param2, u8 param3, int param4, int param5) +BOOL sub_02054930 (int param0, SaveData * param1, u16 param2, u8 param3, int param4, int param5) { int v0; BOOL v1; diff --git a/src/unk_020559DC.c b/src/unk_020559DC.c index 5a4cbe421c..c787cdbac2 100644 --- a/src/unk_020559DC.c +++ b/src/unk_020559DC.c @@ -11,7 +11,7 @@ #include "struct_defs/struct_02055BA8.h" #include "unk_0201378C.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025CB0.h" #include "unk_0202854C.h" #include "unk_0202B37C.h" @@ -139,7 +139,7 @@ static void sub_02055B64 (UnkStruct_0203CDB0 * param0, s32 param1, const RTCTime sub_02028758(param0->unk_0C, param1, sub_02055C40(param0)); { - UnkStruct_0202440C * v0 = sub_0202440C(param0->unk_0C); + TVBroadcast * v0 = SaveData_TVBroadcast(param0->unk_0C); sub_0202E324(v0, param1, param2->minute); } diff --git a/src/unk_020562F8.c b/src/unk_020562F8.c index bde534635e..09cf0b0e99 100644 --- a/src/unk_020562F8.c +++ b/src/unk_020562F8.c @@ -14,7 +14,7 @@ #include "narc.h" #include "unk_0201378C.h" #include "heap.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_0202CD50.h" #include "unk_0202EEC0.h" #include "unk_02051D8C.h" @@ -138,9 +138,9 @@ static void sub_0205642C (UnkStruct_0203CDB0 * param0, UnkStruct_020564B4 * para u8 v1[8]; u16 v2; Pokemon * v3; - UnkStruct_02024440 * v4; + PalParkTransfer * v4; - v4 = sub_02024440(param0->unk_0C); + v4 = SaveData_PalParkTransfer(param0->unk_0C); v3 = Pokemon_New(4); for (v0 = 0; v0 < 6; v0++) { @@ -275,7 +275,7 @@ static BattleParams * sub_0205664C (UnkStruct_0203CDB0 * param0, UnkStruct_02056 { BattleParams * v0; Pokemon * v1 = Pokemon_New(32); - UnkStruct_02024440 * v2 = sub_02024440(param0->unk_0C); + PalParkTransfer * v2 = SaveData_PalParkTransfer(param0->unk_0C); int v3 = sub_020563BC(param0); v0 = sub_02051F38(11, v3); diff --git a/src/unk_02056720.c b/src/unk_02056720.c index d7ef8fe97f..2ae4158a37 100644 --- a/src/unk_02056720.c +++ b/src/unk_02056720.c @@ -37,12 +37,12 @@ typedef struct UnkStruct_02056B24_t { } unk_B8[12]; } UnkStruct_02056B24; -int sub_02056720 (void) +int Poketch_SaveSize (void) { return sizeof(UnkStruct_02056B24); } -void sub_02056728 (UnkStruct_02056B24 * param0) +void Poketch_Init (UnkStruct_02056B24 * param0) { int v0; @@ -337,10 +337,10 @@ u32 sub_02056AFC (const UnkStruct_02056B24 * param0, int param1) return param0->unk_B8[param1].unk_04; } -UnkStruct_02056B24 * sub_02056B24 (UnkStruct_021C0794 * param0) +UnkStruct_02056B24 * sub_02056B24 (SaveData * param0) { UnkStruct_02056B24 * v0; - v0 = sub_020245BC(param0, 5); + v0 = SaveData_Get(param0, 5); return v0; } diff --git a/src/unk_0205964C.c b/src/unk_0205964C.c index f1e342af26..2eae2096f8 100644 --- a/src/unk_0205964C.c +++ b/src/unk_0205964C.c @@ -724,7 +724,7 @@ static void sub_0205A058 (void) sub_020598EC(sub_020596BC, 0); } -UnkStruct_02029894 * sub_0205A080 (UnkStruct_021C0794 * param0) +UnkStruct_02029894 * sub_0205A080 (SaveData * param0) { if (!Unk_021C084C || !Unk_021C084C->unk_41) { return NULL; diff --git a/src/unk_0205A0D8.c b/src/unk_0205A0D8.c index f1ab940ac7..f5c622b1aa 100644 --- a/src/unk_0205A0D8.c +++ b/src/unk_0205A0D8.c @@ -127,7 +127,7 @@ static BOOL sub_0205AD20(UnkStruct_0205A0D8 * param0); static void sub_0205A0D8 (UnkStruct_0205A0D8 * param0, UnkStruct_0203CDB0 * param1, Party * param2, int param3, int param4, int param5) { UnkStruct_02098D38 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; static const u8 v2[] = { 0, 1, 2, 4, 3, 5, 6, 7, 8 }; diff --git a/src/unk_0205B33C.c b/src/unk_0205B33C.c index 3e2c6d886b..0f830c6b11 100644 --- a/src/unk_0205B33C.c +++ b/src/unk_0205B33C.c @@ -54,7 +54,7 @@ typedef struct { struct UnkStruct_0205B43C_t { UnkStruct_0203CDB0 * unk_00; - UnkStruct_021C0794 * unk_04; + SaveData * unk_04; TrainerInfo * unk_08; UnkStruct_0201CD38 * unk_0C; UnkFuncPtr_0205B43C unk_10; @@ -145,7 +145,7 @@ void sub_0205B388 (UnkStruct_0203CDB0 * param0) static UnkStruct_0205B43C * sub_0205B3A0 (UnkStruct_0203CDB0 * param0) { void * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; UnkStruct_0205B43C * v2 = NULL; if (param0->unk_7C != NULL) { diff --git a/src/unk_0205C22C.c b/src/unk_0205C22C.c index 83b2c29759..366f644642 100644 --- a/src/unk_0205C22C.c +++ b/src/unk_0205C22C.c @@ -67,7 +67,7 @@ UnkStruct_0205C22C * sub_0205C22C (UnkStruct_0205B43C * param0) v0->unk_47C = 1; v0->unk_04 = sub_0200D9E8(sub_0205C304, v0, 11); v0->unk_470 = sub_0205B770(param0); - v0->unk_474 = sub_020245BC(v0->unk_470->unk_0C, 9); + v0->unk_474 = SaveData_Get(v0->unk_470->unk_0C, 9); v0->unk_08 = v0->unk_470->unk_3C; Heap_CreateAtEnd(11, 89, 10000); diff --git a/src/unk_0205DFC4.c b/src/unk_0205DFC4.c index f96e3386c2..1491a53b18 100644 --- a/src/unk_0205DFC4.c +++ b/src/unk_0205DFC4.c @@ -61,7 +61,7 @@ int sub_0205E658(u8 param0); int sub_0205E680(u8 param0); int sub_0205E6A8(u32 param0); u8 sub_0205E6B8(void); -u8 sub_0205E6D8(UnkStruct_021C0794 * param0); +u8 sub_0205E6D8(SaveData * param0); int sub_0205E700(u8 param0); int sub_0205E728(u8 param0); int sub_0205E750(u8 param0); @@ -241,7 +241,7 @@ u16 sub_0205E0E4 (u16 param0, u16 param1) } } -u16 sub_0205E1B4 (UnkStruct_021C0794 * param0) +u16 sub_0205E1B4 (SaveData * param0) { Pokemon * v0; u16 v1, v2; @@ -259,7 +259,7 @@ u16 sub_0205E1B4 (UnkStruct_021C0794 * param0) return 0; } -BOOL HasAllLegendaryTitansInParty (UnkStruct_021C0794 * param0) +BOOL HasAllLegendaryTitansInParty (SaveData * param0) { int v0, v1, v2, v3 = 0; Party * v4; @@ -723,7 +723,7 @@ u8 sub_0205E6B8 (void) return TrainerInfo_GameCode(v0); } -u8 sub_0205E6D8 (UnkStruct_021C0794 * param0) +u8 sub_0205E6D8 (SaveData * param0) { if (TrainerInfo_GameCode(sub_02025E38(param0)) == 0) { return 1; diff --git a/src/unk_020683F4.c b/src/unk_020683F4.c index 0d9d2d6b35..681f702bca 100644 --- a/src/unk_020683F4.c +++ b/src/unk_020683F4.c @@ -28,7 +28,7 @@ #include "heap.h" #include "unk_02018340.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "unk_0202631C.h" #include "unk_02028124.h" @@ -346,7 +346,7 @@ static void sub_02068630 (UnkStruct_02068630 * param0, const UnkStruct_020684D0 v2->unk_04 = sub_0207D990(v0->unk_0C); v2->unk_08 = sub_02028430(v0->unk_0C); v2->unk_0C = sub_02025E44(v0->unk_0C); - v2->unk_10 = sub_0202440C(v0->unk_0C); + v2->unk_10 = SaveData_TVBroadcast(v0->unk_0C); v2->unk_18 = &v1->unk_24C; v2->unk_21 = 0; v2->unk_20 = 5; @@ -999,7 +999,7 @@ static void sub_02068FEC (UnkStruct_02068630 * param0, const UnkStruct_020684D0 v2->unk_04 = sub_0207D990(v0->unk_0C); v2->unk_08 = sub_02028430(v0->unk_0C); v2->unk_0C = sub_02025E44(v0->unk_0C); - v2->unk_10 = sub_0202440C(v0->unk_0C); + v2->unk_10 = SaveData_TVBroadcast(v0->unk_0C); v2->unk_18 = &v1->unk_24C; v2->unk_21 = 0; v2->unk_20 = 16; diff --git a/src/unk_0206AFE0.c b/src/unk_0206AFE0.c index 9f6a654399..d4ddfbeaa4 100644 --- a/src/unk_0206AFE0.c +++ b/src/unk_0206AFE0.c @@ -21,7 +21,7 @@ u16 sub_0206B054(UnkStruct_020507E4 * param0); u16 sub_0206B064(UnkStruct_020507E4 * param0); u16 sub_0206B08C(UnkStruct_020507E4 * param0); void sub_0206B558(UnkStruct_020507E4 * param0, u16 param1); -void sub_0206B514(UnkStruct_021C0794 * param0); +void sub_0206B514(SaveData * param0); static u8 sub_0206B4A4(UnkStruct_020507E4 * param0); static BOOL sub_0206AFE0 (UnkStruct_020507E4 * param0, u16 param1, u16 param2) @@ -259,7 +259,7 @@ void sub_0206B2C8 (UnkStruct_020507E4 * param0) sub_0206B280(param0, (v1 << 16) | v0); } -void sub_0206B2E4 (UnkStruct_021C0794 * param0, u16 param1) +void sub_0206B2E4 (SaveData * param0, u16 param1) { UnkStruct_020507E4 * v0 = sub_020507E4(param0); u32 v1; @@ -280,7 +280,7 @@ BOOL sub_0206B324 (UnkStruct_020507E4 * param0, u16 param1) return sub_0206AFE0(param0, (17 + (((0 + 0x4000) + 32) + 16)), param1); } -void sub_0206B334 (UnkStruct_021C0794 * param0) +void sub_0206B334 (SaveData * param0) { UnkStruct_020507E4 * v0 = sub_020507E4(param0); u32 v1; @@ -446,7 +446,7 @@ static u8 sub_0206B4A4 (UnkStruct_020507E4 * param0) return v2; } -void sub_0206B514 (UnkStruct_021C0794 * param0) +void sub_0206B514 (SaveData * param0) { u32 v0; UnkStruct_020507E4 * v1 = sub_020507E4(param0); diff --git a/src/unk_0206B9D8.c b/src/unk_0206B9D8.c index d25a43b199..10cba43b11 100644 --- a/src/unk_0206B9D8.c +++ b/src/unk_0206B9D8.c @@ -68,7 +68,7 @@ typedef struct { static int sub_0206B9D8 (UnkStruct_0206B9D8 * param0, UnkStruct_0203CDB0 * param1, int param2) { u8 v0; - UnkStruct_021C0794 * v1; + SaveData * v1; UnkStruct_02098C44 * v2 = Heap_AllocFromHeapAtEnd(param2, sizeof(UnkStruct_02098C44)); v1 = param1->unk_0C; @@ -127,7 +127,7 @@ static int sub_0206BA84 (UnkStruct_0206B9D8 * param0, UnkStruct_0203CDB0 * param static int sub_0206BAE0 (UnkStruct_0206B9D8 * param0, UnkStruct_0203CDB0 * param1, int param2) { UnkStruct_02098D38 * v0; - UnkStruct_021C0794 * v1; + SaveData * v1; static const u8 v2[] = { 0, 1, 2, 4, 3, 5, 6, 7, 8 }; @@ -217,7 +217,7 @@ void sub_0206BBFC (UnkStruct_020508D4 * param0, void ** param1, u8 param2, u8 pa static int sub_0206BC48 (UnkStruct_0206BC48 * param0, UnkStruct_0203CDB0 * param1) { - UnkStruct_021C0794 * v0; + SaveData * v0; if (sub_02039074(param1->unk_0C)) { param0->unk_08 = sub_0203E1AC(param1, param0->unk_12, param0->unk_14); @@ -323,7 +323,7 @@ void sub_0206BD88 (UnkStruct_020508D4 * param0, u16 param1, u16 param2) sub_02050944(v0->unk_10, sub_0206BD1C, v1); } -u16 sub_0206BDBC (UnkStruct_021C0794 * param0) +u16 sub_0206BDBC (SaveData * param0) { UnkStruct_0203068C * v0; UnkStruct_0202D750 * v1; @@ -398,7 +398,7 @@ u16 sub_0206BDBC (UnkStruct_021C0794 * param0) } } -u16 sub_0206BF04 (UnkStruct_021C0794 * param0) +u16 sub_0206BF04 (SaveData * param0) { UnkStruct_0203068C * v0; UnkStruct_0202D750 * v1; @@ -469,7 +469,7 @@ u32 sub_0206BFFC (u32 param0) return param0 * 1566083941 + 1; } -u32 sub_0206C008 (UnkStruct_021C0794 * param0) +u32 sub_0206C008 (SaveData * param0) { u32 v0; @@ -481,7 +481,7 @@ u32 sub_0206C008 (UnkStruct_021C0794 * param0) return v0; } -u32 sub_0206C02C (UnkStruct_021C0794 * param0) +u32 sub_0206C02C (SaveData * param0) { u32 v0, v1; UnkStruct_0202D750 * v2 = sub_0202D750(param0); @@ -496,7 +496,7 @@ u32 sub_0206C02C (UnkStruct_021C0794 * param0) return v0; } -u32 sub_0206C068 (UnkStruct_021C0794 * param0) +u32 sub_0206C068 (SaveData * param0) { int v0, v1; u32 v2, v3; diff --git a/src/unk_0206C2D0.c b/src/unk_0206C2D0.c index b17cce4b4a..c2ce4edb6a 100644 --- a/src/unk_0206C2D0.c +++ b/src/unk_0206C2D0.c @@ -11,7 +11,7 @@ #include "unk_0202C7FC.h" #include "unk_0206C2D0.h" -void sub_0206C2D0 (UnkStruct_021C0794 * param0, const s32 param1) +void sub_0206C2D0 (SaveData * param0, const s32 param1) { u8 v0; int v1; diff --git a/src/unk_0206CCB0.c b/src/unk_0206CCB0.c index fba655772d..0231b7a1b7 100644 --- a/src/unk_0206CCB0.c +++ b/src/unk_0206CCB0.c @@ -39,7 +39,7 @@ #include "heap.h" #include "unk_0201D15C.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_020244AC.h" #include "unk_02025E08.h" #include "trainer_info.h" @@ -70,7 +70,7 @@ #include "overlay025/ov25_02253CE0.h" static void sub_0206CD70(UnkStruct_0203CDB0 * param0, int param1, int param2, const void * param3); -static void sub_0206CD7C(UnkStruct_021C0794 * param0, int param1, int param2, const void * param3); +static void sub_0206CD7C(SaveData * param0, int param1, int param2, const void * param3); static u8 sub_0206DE4C(Pokemon * param0); static Strbuf* sub_0206F0D8(u16 param0, u32 param1); @@ -435,9 +435,9 @@ BOOL sub_0206CD2C (int param0, UnkStruct_0203CDB0 * param1, UnkStruct_ov6_022465 return v0(param1, param2); } -static void sub_0206CD58 (UnkStruct_021C0794 * param0, int param1, int param2, const void * param3) +static void sub_0206CD58 (SaveData * param0, int param1, int param2, const void * param3) { - UnkStruct_0202440C * v0 = sub_0202440C(param0); + TVBroadcast * v0 = SaveData_TVBroadcast(param0); GF_ASSERT(sizeof(UnkUnion_0206D1B8) == 40); sub_0202E43C(v0, param1, param2, (const u8 *)param3); @@ -448,9 +448,9 @@ static void sub_0206CD70 (UnkStruct_0203CDB0 * param0, int param1, int param2, c sub_0206CD7C(param0->unk_0C, param1, param2, param3); } -static void sub_0206CD7C (UnkStruct_021C0794 * param0, int param1, int param2, const void * param3) +static void sub_0206CD7C (SaveData * param0, int param1, int param2, const void * param3) { - UnkStruct_0202440C * v0 = sub_0202440C(param0); + TVBroadcast * v0 = SaveData_TVBroadcast(param0); GF_ASSERT(sizeof(UnkUnion_0206D1B8) == 40); sub_0202E43C(v0, param1, param2, (const u8 *)param3); @@ -516,7 +516,7 @@ static void sub_0206CED0 (int param0, Pokemon * param1, u8 * param2, u16 * param } } -void sub_0206CF14 (UnkStruct_0202440C * param0, Pokemon * param1, int param2, int param3, int param4) +void sub_0206CF14 (TVBroadcast * param0, Pokemon * param1, int param2, int param3, int param4) { UnkStruct_0202E7D8 * v0 = sub_0202E7D8(param0); @@ -529,7 +529,7 @@ void sub_0206CF14 (UnkStruct_0202440C * param0, Pokemon * param1, int param2, in sub_02025C84(27); } -void sub_0206CF48 (UnkStruct_0202440C * param0, Pokemon * param1, int param2) +void sub_0206CF48 (TVBroadcast * param0, Pokemon * param1, int param2) { UnkStruct_0202E7E4 * v0 = sub_0202E7E4(param0); @@ -544,7 +544,7 @@ void sub_0206CF48 (UnkStruct_0202440C * param0, Pokemon * param1, int param2) sub_02025C84(27); } -void sub_0206CF9C (UnkStruct_0202440C * param0, int param1) +void sub_0206CF9C (TVBroadcast * param0, int param1) { UnkStruct_0202E7E4 * v0 = sub_0202E7E4(param0); @@ -554,7 +554,7 @@ void sub_0206CF9C (UnkStruct_0202440C * param0, int param1) sub_02025C84(27); } -void sub_0206CFB4 (UnkStruct_0202440C * param0, int param1) +void sub_0206CFB4 (TVBroadcast * param0, int param1) { UnkStruct_0202E7E4 * v0 = sub_0202E7E4(param0); @@ -564,7 +564,7 @@ void sub_0206CFB4 (UnkStruct_0202440C * param0, int param1) sub_02025C84(27); } -void sub_0206CFCC (UnkStruct_0202440C * param0, int param1) +void sub_0206CFCC (TVBroadcast * param0, int param1) { UnkStruct_0202E7F0 * v0 = sub_0202E7F0(param0); @@ -574,7 +574,7 @@ void sub_0206CFCC (UnkStruct_0202440C * param0, int param1) sub_02025C84(27); } -void sub_0206CFE4 (UnkStruct_0202440C * param0, BOOL param1, u16 param2) +void sub_0206CFE4 (TVBroadcast * param0, BOOL param1, u16 param2) { UnkStruct_0202E7FC * v0 = sub_0202E7FC(param0); @@ -585,7 +585,7 @@ void sub_0206CFE4 (UnkStruct_0202440C * param0, BOOL param1, u16 param2) sub_02025C84(27); } -void sub_0206D000 (UnkStruct_0202440C * param0) +void sub_0206D000 (TVBroadcast * param0) { UnkStruct_0202E808 * v0 = sub_0202E808(param0); @@ -595,7 +595,7 @@ void sub_0206D000 (UnkStruct_0202440C * param0) sub_02025C84(27); } -void sub_0206D018 (UnkStruct_0202440C * param0, Pokemon * param1) +void sub_0206D018 (TVBroadcast * param0, Pokemon * param1) { UnkStruct_0202E808 * v0 = sub_0202E808(param0); @@ -607,7 +607,7 @@ void sub_0206D018 (UnkStruct_0202440C * param0, Pokemon * param1) sub_02025C84(27); } -void sub_0206D048 (UnkStruct_0202440C * param0, Pokemon * param1) +void sub_0206D048 (TVBroadcast * param0, Pokemon * param1) { UnkStruct_0202E810 * v0 = sub_0202E810(param0); @@ -619,7 +619,7 @@ void sub_0206D048 (UnkStruct_0202440C * param0, Pokemon * param1) sub_02025C84(27); } -void sub_0206D088 (UnkStruct_0202440C * param0, u8 param1, const TrainerInfo * param2) +void sub_0206D088 (TVBroadcast * param0, u8 param1, const TrainerInfo * param2) { UnkStruct_0202E81C * v0 = sub_0202E81C(param0); @@ -635,7 +635,7 @@ void sub_0206D088 (UnkStruct_0202440C * param0, u8 param1, const TrainerInfo * p sub_02025C84(27); } -void sub_0206D0C8 (UnkStruct_0202440C * param0, u16 param1) +void sub_0206D0C8 (TVBroadcast * param0, u16 param1) { UnkStruct_0202E828 * v0 = sub_0202E828(param0); @@ -649,7 +649,7 @@ void sub_0206D0C8 (UnkStruct_0202440C * param0, u16 param1) sub_02025C84(27); } -void sub_0206D0F0 (UnkStruct_0202440C * param0) +void sub_0206D0F0 (TVBroadcast * param0) { UnkStruct_0202E828 * v0 = sub_0202E828(param0); @@ -657,7 +657,7 @@ void sub_0206D0F0 (UnkStruct_0202440C * param0) sub_02025C84(27); } -void sub_0206D104 (UnkStruct_0202440C * param0) +void sub_0206D104 (TVBroadcast * param0) { UnkStruct_0202E834 * v0 = sub_0202E834(param0); @@ -671,7 +671,7 @@ void sub_0206D104 (UnkStruct_0202440C * param0) sub_02025C84(27); } -void sub_0206D12C (UnkStruct_0202440C * param0) +void sub_0206D12C (TVBroadcast * param0) { UnkStruct_0202E834 * v0 = sub_0202E834(param0); @@ -887,7 +887,7 @@ static int sub_0206D4D4 (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 10; } -void sub_0206D504 (UnkStruct_021C0794 * param0, u16 param1, u8 param2) +void sub_0206D504 (SaveData * param0, u16 param1, u8 param2) { UnkUnion_0206D1B8 v0; UnkStruct_0206D530 * v1 = &v0.val6; @@ -998,7 +998,7 @@ void sub_0206D720 (UnkStruct_0203CDB0 * param0) { UnkUnion_0206D1B8 v0; UnkStruct_0206D75C * v1 = &v0.val10; - UnkStruct_0202440C * v2 = sub_0202440C(param0->unk_0C); + TVBroadcast * v2 = SaveData_TVBroadcast(param0->unk_0C); UnkStruct_0202E808 * v3 = sub_0202E808(v2); if (v3->unk_07 == 0) { @@ -1100,7 +1100,7 @@ static BOOL sub_0206D8F0 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * return sub_02026FE8(sub_02027560(param0->unk_0C), v0->unk_00); } -void sub_0206D90C (UnkStruct_0202440C * param0, Pokemon * param1, u16 param2) +void sub_0206D90C (TVBroadcast * param0, Pokemon * param1, u16 param2) { return; } @@ -1149,7 +1149,7 @@ static int sub_0206D98C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 31; } -void sub_0206D9B4 (UnkStruct_0202440C * param0, Pokemon * param1, u8 param2) +void sub_0206D9B4 (TVBroadcast * param0, Pokemon * param1, u8 param2) { UnkUnion_0206D1B8 v0; UnkStruct_0206D9F4 * v1 = &v0.val14; @@ -1277,7 +1277,7 @@ static BOOL sub_0206DB9C (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * return inline_0208BE68(sub_020507E4(param0->unk_0C), 6); } -void sub_0206DBB0 (UnkStruct_021C0794 * param0, u32 param1, Pokemon * param2, BOOL param3) +void sub_0206DBB0 (SaveData * param0, u32 param1, Pokemon * param2, BOOL param3) { UnkUnion_0206D1B8 v0; UnkStruct_0206DBE8 * v1 = &v0.val18; @@ -1377,7 +1377,7 @@ static int sub_0206DD5C (UnkStruct_0203CDB0 * param0, UnkStruct_0200B358 * param return 3; } -void sub_0206DDB8 (UnkStruct_021C0794 * param0, Pokemon * param1, u32 param2) +void sub_0206DDB8 (SaveData * param0, Pokemon * param1, u32 param2) { u8 v0, v1; UnkUnion_0206D1B8 v2; @@ -1555,11 +1555,11 @@ static BOOL sub_0206DFC8 (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * return sub_0207D688(sub_0207D990(param0->unk_0C), 428, 1, 32); } -void sub_0206DFE0 (UnkStruct_021C0794 * param0) +void sub_0206DFE0 (SaveData * param0) { UnkUnion_0206D1B8 v0; UnkStruct_0206E018 * v1 = &v0.val24; - UnkStruct_0202E828 * v2 = sub_0202E828(sub_0202440C(param0)); + UnkStruct_0202E828 * v2 = sub_0202E828(SaveData_TVBroadcast(param0)); if (v2->unk_04 >= 30) { v1->unk_00 = *v2; @@ -1585,11 +1585,11 @@ static BOOL sub_0206E04C (UnkStruct_0203CDB0 * param0, UnkStruct_ov6_022465F4 * return inline_0208BE68(sub_020507E4(param0->unk_0C), 17); } -void sub_0206E060 (UnkStruct_021C0794 * param0) +void sub_0206E060 (SaveData * param0) { UnkUnion_0206D1B8 v0; UnkStruct_0206E098 * v1 = &v0.val25; - UnkStruct_0202E834 * v2 = sub_0202E834(sub_0202440C(param0)); + UnkStruct_0202E834 * v2 = sub_0202E834(SaveData_TVBroadcast(param0)); if (v2->unk_02 >= 10) { v1->unk_00 = *v2; @@ -1619,7 +1619,7 @@ void sub_0206E0E0 (UnkStruct_0203CDB0 * param0, u16 param1) { UnkUnion_0206D1B8 v0; UnkStruct_0206E118 * v1 = &v0.val26; - UnkStruct_0202E7FC * v2 = sub_0202E7FC(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7FC * v2 = sub_0202E7FC(SaveData_TVBroadcast(param0->unk_0C)); v1->unk_00 = *v2; v2->unk_00 = 0; @@ -1716,7 +1716,7 @@ void sub_0206E2BC (UnkStruct_0203CDB0 * param0, u16 param1) { UnkUnion_0206D1B8 v0; UnkStruct_0206E300 * v1 = &v0.val29; - UnkStruct_0202E7D8 * v2 = sub_0202E7D8(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7D8 * v2 = sub_0202E7D8(SaveData_TVBroadcast(param0->unk_0C)); v1->unk_00 = *v2; v2->unk_00 = 0; @@ -1805,7 +1805,7 @@ void sub_0206E448 (UnkStruct_0203CDB0 * param0, u16 param1) { UnkUnion_0206D1B8 v0; UnkStruct_0206E480 * v1 = &v0.val32; - UnkStruct_0202E7F0 * v2 = sub_0202E7F0(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7F0 * v2 = sub_0202E7F0(SaveData_TVBroadcast(param0->unk_0C)); v1->unk_00 = *v2; v1->unk_02 = param1; @@ -1842,7 +1842,7 @@ void sub_0206E4DC (UnkStruct_0203CDB0 * param0, u16 param1) { UnkUnion_0206D1B8 v0; UnkStruct_0206E520 * v1 = &v0.val33; - UnkStruct_0202E7E4 * v2 = sub_0202E7E4(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E7E4 * v2 = sub_0202E7E4(SaveData_TVBroadcast(param0->unk_0C)); v1->unk_00 = *v2; v1->unk_24 = param1; @@ -1879,7 +1879,7 @@ void sub_0206E5A0 (UnkStruct_0203CDB0 * param0, u16 param1) { UnkUnion_0206D1B8 v0; UnkStruct_0206E5E4 * v1 = &v0.val34; - UnkStruct_0202E810 * v2 = sub_0202E810(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E810 * v2 = sub_0202E810(SaveData_TVBroadcast(param0->unk_0C)); v1->unk_00 = *v2; v1->unk_1E = param1; @@ -1991,7 +1991,7 @@ void sub_0206E768 (UnkStruct_0203CDB0 * param0, u16 param1) { UnkUnion_0206D1B8 v0; UnkStruct_0206E768 * v1 = &v0.val39; - UnkStruct_0202E81C * v2 = sub_0202E81C(sub_0202440C(param0->unk_0C)); + UnkStruct_0202E81C * v2 = sub_0202E81C(SaveData_TVBroadcast(param0->unk_0C)); v1->unk_00 = *v2; v1->unk_16 = param1; @@ -3150,9 +3150,9 @@ static const UnkStruct_020EFFA4 Unk_020EFD9C[8] = { {sub_0206F29C, NULL} }; -void sub_0206F2F0 (UnkStruct_021C0794 * param0) +void sub_0206F2F0 (SaveData * param0) { - UnkStruct_0202440C * v0 = sub_0202440C(param0); + TVBroadcast * v0 = SaveData_TVBroadcast(param0); sub_0206DFE0(param0); sub_0206E060(param0); diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index da38d53944..c9805a526d 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -128,7 +128,7 @@ typedef struct { UnkStruct_0206F7F8 * unk_08; } UnkStruct_0206F314; -static void sub_0206F7F8(UnkStruct_0206F7F8 * param0, UnkStruct_021C0794 * param1); +static void sub_0206F7F8(UnkStruct_0206F7F8 * param0, SaveData * param1); static void sub_0206F9D4(UnkStruct_0206F7F8 * param0); static void sub_0206FA08(UnkStruct_0206F7F8 * param0); static void sub_0206FAC0(UnkStruct_0206F7F8 * param0); @@ -199,7 +199,7 @@ static const UnkStruct_020F02D0 * const Unk_020F0254[] = { static int sub_0206F314 (UnkStruct_0206F314 * param0, UnkStruct_0203CDB0 * param1, u16 param2) { UnkStruct_0206F7F8 * v0; - UnkStruct_021C0794 * v1 = param1->unk_0C; + SaveData * v1 = param1->unk_0C; Heap_Create(3, 80, 0x6000); @@ -252,7 +252,7 @@ static int sub_0206F3A0 (UnkStruct_0206F314 * param0) return 12; } -static int sub_0206F448 (UnkStruct_0206F7F8 * param0, UnkStruct_021C0794 * param1) +static int sub_0206F448 (UnkStruct_0206F7F8 * param0, SaveData * param1) { sub_0206F7F8(param0, param1); sub_0206FA08(param0); @@ -470,7 +470,7 @@ static int sub_0206F748 (UnkStruct_0206F7F8 * param0) return 8; } -static void sub_0206F7F8 (UnkStruct_0206F7F8 * param0, UnkStruct_021C0794 * param1) +static void sub_0206F7F8 (UnkStruct_0206F7F8 * param0, SaveData * param1) { int v0, v1, v2, v3; UnkStruct_0202EE10 * v4; diff --git a/src/unk_020711C8.c b/src/unk_020711C8.c index f1bba7d404..4c55485538 100644 --- a/src/unk_020711C8.c +++ b/src/unk_020711C8.c @@ -9,7 +9,7 @@ #include "unk_020711C8.h" #include "party.h" -UnkStruct_020711C8 * sub_020711C8 (const int param0, const u8 param1, UnkStruct_021C0794 * param2) +UnkStruct_020711C8 * sub_020711C8 (const int param0, const u8 param1, SaveData * param2) { UnkStruct_020711C8 * v0; diff --git a/src/unk_02071D40.c b/src/unk_02071D40.c index 55f6411f82..b89a91b527 100644 --- a/src/unk_02071D40.c +++ b/src/unk_02071D40.c @@ -50,7 +50,7 @@ void sub_02071D40 (const u8 param0, const u8 param1, const u8 param2, const u8 p { TrainerInfo * v0; UnkStruct_0202CD88 * v1; - UnkStruct_021C0794 * v2; + SaveData * v2; v2 = sub_0203D174(param4); v0 = sub_02025E38(v2); @@ -125,7 +125,7 @@ void sub_02071F20 (UnkStruct_02072014 * param0) u8 sub_02071F28 (UnkStruct_0203CDB0 * param0) { u8 v0; - UnkStruct_021C0794 * v1; + SaveData * v1; UnkStruct_0202CD88 * v2; UnkStruct_020507E4 * v3; UnkStruct_0202855C * v4; diff --git a/src/unk_020722AC.c b/src/unk_020722AC.c index 8d930b0fd6..16abe44021 100644 --- a/src/unk_020722AC.c +++ b/src/unk_020722AC.c @@ -159,7 +159,7 @@ static void sub_02072C98(UnkStruct_02072334 * param0, u8 param1, u8 param2); static void sub_02072DA4(UnkStruct_0200112C * param0, u32 param1, u8 param2); static void sub_02072DB8(UnkStruct_02072334 * param0); static void sub_02072E4C(UnkStruct_02072334 * param0); -static void sub_02072F30(UnkStruct_02072334 * param0, UnkStruct_021C0794 * param1, int param2); +static void sub_02072F30(UnkStruct_02072334 * param0, SaveData * param1, int param2); static void sub_02073020(UnkStruct_02072334 * param0, u8 param1); static BOOL sub_02073060(UnkStruct_02072334 * param0); static void sub_020730B8(UnkStruct_02072334 * param0, u8 param1, BOOL param2); @@ -210,7 +210,7 @@ static const UnkStruct_020F0524 Unk_020F0524[] = { void sub_020722AC (void * param0, int * param1) { UnkStruct_02072334 * v0 = NULL; - UnkStruct_021C0794 * v1; + SaveData * v1; Heap_Create(3, 43, 0x5000); @@ -916,7 +916,7 @@ static void sub_02072F04 (UnkStruct_02072EB8 * param0, u8 param1) } } -static void sub_02072F30 (UnkStruct_02072334 * param0, UnkStruct_021C0794 * param1, int param2) +static void sub_02072F30 (UnkStruct_02072334 * param0, SaveData * param1, int param2) { u8 v0 = 0, v1 = 0, v2 = 0xFF, v3 = 0; int v4; diff --git a/src/unk_02073700.c b/src/unk_02073700.c index 4ead4dded3..d4e0870a88 100644 --- a/src/unk_02073700.c +++ b/src/unk_02073700.c @@ -15,9 +15,9 @@ #include "unk_0202D05C.h" #include "unk_0205C980.h" -void sub_02073700(UnkStruct_021C0794 * param0, int param1, UnkStruct_ov96_0223B450_sub1 * param2); +void sub_02073700(SaveData * param0, int param1, UnkStruct_ov96_0223B450_sub1 * param2); -void sub_02073700 (UnkStruct_021C0794 * param0, int param1, UnkStruct_ov96_0223B450_sub1 * param2) +void sub_02073700 (SaveData * param0, int param1, UnkStruct_ov96_0223B450_sub1 * param2) { int v0; TrainerInfo * v1 = sub_02025E38(param0); diff --git a/src/unk_02079170.c b/src/unk_02079170.c index b2cf3fd2a1..83eab8ee50 100644 --- a/src/unk_02079170.c +++ b/src/unk_02079170.c @@ -26,7 +26,7 @@ #include "party.h" -void sub_02079170(BattleParams * param0, const UnkStruct_021C0794 * param1, int param2); +void sub_02079170(BattleParams * param0, const SaveData * param1, int param2); u32 sub_02079220(int param0, int param1); BOOL sub_02079280(int param0, int param1, int param2); void sub_020792F8(int param0, int param1, Strbuf *param2, int param3); @@ -143,7 +143,7 @@ static const u8 Unk_020F0714[] = { 0x1 }; -void sub_02079170 (BattleParams * param0, const UnkStruct_021C0794 * param1, int param2) +void sub_02079170 (BattleParams * param0, const SaveData * param1, int param2) { TrainerData v0; int v1; diff --git a/src/unk_020797C8.c b/src/unk_020797C8.c index 9a9735c7c4..057735c3ea 100644 --- a/src/unk_020797C8.c +++ b/src/unk_020797C8.c @@ -7,28 +7,28 @@ #include "pokemon.h" #include "unk_020797C8.h" -typedef struct UnkStruct_020797DC_t { +typedef struct PCBoxes { u32 unk_00; BoxPokemon unk_04[18][30]; u16 unk_10E4[18][20]; u8 unk_13B4[18]; u8 unk_13C6; -} UnkStruct_020797DC; +} PCBoxes; -static void sub_020797DC(UnkStruct_020797DC * param0); +static void sub_020797DC(PCBoxes * param0); -void sub_020797C8 (UnkStruct_020797DC * param0) +void PCBoxes_Init (PCBoxes * param0) { sub_020797DC(param0); sub_02024804(); } -u32 sub_020797D4 (void) +u32 PCBoxes_SaveSize (void) { - return sizeof(UnkStruct_020797DC); + return sizeof(PCBoxes); } -static void sub_020797DC (UnkStruct_020797DC * param0) +static void sub_020797DC (PCBoxes * param0) { u32 v0, v1; MessageLoader * v2; @@ -61,7 +61,7 @@ static void sub_020797DC (UnkStruct_020797DC * param0) param0->unk_00 = 0; } -BOOL sub_02079868 (UnkStruct_020797DC * param0, BoxPokemon * param1) +BOOL sub_02079868 (PCBoxes * param0, BoxPokemon * param1) { u32 v0; @@ -83,7 +83,7 @@ BOOL sub_02079868 (UnkStruct_020797DC * param0, BoxPokemon * param1) return 0; } -BOOL sub_020798A0 (UnkStruct_020797DC * param0, u32 param1, BoxPokemon * param2) +BOOL sub_020798A0 (PCBoxes * param0, u32 param1, BoxPokemon * param2) { u32 v0; @@ -105,7 +105,7 @@ BOOL sub_020798A0 (UnkStruct_020797DC * param0, u32 param1, BoxPokemon * param2) return 0; } -BOOL sub_02079914 (UnkStruct_020797DC * param0, u32 param1, u32 param2, BoxPokemon * param3) +BOOL sub_02079914 (PCBoxes * param0, u32 param1, u32 param2, BoxPokemon * param3) { sub_0207896C(param3); BoxPokemon_SetShayminForm(param3, 0); @@ -125,7 +125,7 @@ BOOL sub_02079914 (UnkStruct_020797DC * param0, u32 param1, u32 param2, BoxPokem return 0; } -void sub_02079968 (UnkStruct_020797DC * param0, u32 param1, u32 param2) +void sub_02079968 (PCBoxes * param0, u32 param1, u32 param2) { if (param1 == 0xffffffff) { param1 = param0->unk_00; @@ -139,12 +139,12 @@ void sub_02079968 (UnkStruct_020797DC * param0, u32 param1, u32 param2) } } -u32 sub_0207999C (const UnkStruct_020797DC * param0) +u32 sub_0207999C (const PCBoxes * param0) { return param0->unk_00; } -u32 sub_020799A0 (const UnkStruct_020797DC * param0) +u32 sub_020799A0 (const PCBoxes * param0) { int v0, v1; @@ -169,7 +169,7 @@ u32 sub_020799A0 (const UnkStruct_020797DC * param0) return(18); } -BOOL sub_020799F0 (const UnkStruct_020797DC * param0, int * param1, int * param2) +BOOL sub_020799F0 (const PCBoxes * param0, int * param1, int * param2) { int v0, v1; @@ -203,7 +203,7 @@ BOOL sub_020799F0 (const UnkStruct_020797DC * param0, int * param1, int * param2 return(18); } -u32 sub_02079A50 (const UnkStruct_020797DC * param0) +u32 sub_02079A50 (const PCBoxes * param0) { int v0, v1; u32 v2; @@ -221,7 +221,7 @@ u32 sub_02079A50 (const UnkStruct_020797DC * param0) return v2; } -void sub_02079A94 (UnkStruct_020797DC * param0, u32 param1) +void sub_02079A94 (PCBoxes * param0, u32 param1) { if (param1 < 18) { param0->unk_00 = param1; @@ -231,7 +231,7 @@ void sub_02079A94 (UnkStruct_020797DC * param0, u32 param1) } } -u32 sub_02079AA8 (const UnkStruct_020797DC * param0, u32 param1) +u32 sub_02079AA8 (const PCBoxes * param0, u32 param1) { if (param1 < 18) { return param0->unk_13B4[param1]; @@ -241,7 +241,7 @@ u32 sub_02079AA8 (const UnkStruct_020797DC * param0, u32 param1) } } -void sub_02079AC4 (UnkStruct_020797DC * param0, u32 param1, u32 param2) +void sub_02079AC4 (PCBoxes * param0, u32 param1, u32 param2) { if (param1 == 0xffffffff) { param1 = param0->unk_00; @@ -259,7 +259,7 @@ void sub_02079AC4 (UnkStruct_020797DC * param0, u32 param1, u32 param2) } } -void sub_02079AF4 (const UnkStruct_020797DC * param0, u32 param1, Strbuf *param2) +void sub_02079AF4 (const PCBoxes * param0, u32 param1, Strbuf *param2) { if (param1 == 0xffffffff) { param1 = param0->unk_00; @@ -272,7 +272,7 @@ void sub_02079AF4 (const UnkStruct_020797DC * param0, u32 param1, Strbuf *param2 } } -void sub_02079B24 (UnkStruct_020797DC * param0, u32 param1, const Strbuf *param2) +void sub_02079B24 (PCBoxes * param0, u32 param1, const Strbuf *param2) { if (param1 == 0xffffffff) { param1 = param0->unk_00; @@ -284,7 +284,7 @@ void sub_02079B24 (UnkStruct_020797DC * param0, u32 param1, const Strbuf *param2 } } -u32 sub_02079B54 (const UnkStruct_020797DC * param0, u32 param1) +u32 sub_02079B54 (const PCBoxes * param0, u32 param1) { if (param1 == 0xffffffff) { param1 = param0->unk_00; @@ -308,7 +308,7 @@ u32 sub_02079B54 (const UnkStruct_020797DC * param0, u32 param1) return 0; } -u32 sub_02079B98 (const UnkStruct_020797DC * param0, u32 param1) +u32 sub_02079B98 (const PCBoxes * param0, u32 param1) { if (param1 == 0xffffffff) { param1 = param0->unk_00; @@ -334,7 +334,7 @@ u32 sub_02079B98 (const UnkStruct_020797DC * param0, u32 param1) return 0; } -u32 sub_02079BEC (const UnkStruct_020797DC * param0) +u32 sub_02079BEC (const PCBoxes * param0) { u32 v0, v1; @@ -345,7 +345,7 @@ u32 sub_02079BEC (const UnkStruct_020797DC * param0) return v0; } -u32 sub_02079C08 (const UnkStruct_020797DC * param0, u32 param1, u32 param2, int param3, void * param4) +u32 sub_02079C08 (const PCBoxes * param0, u32 param1, u32 param2, int param3, void * param4) { GF_ASSERT((param1 < 18) || (param1 == 0xffffffff)); GF_ASSERT(param2 < (5 * 6)); @@ -357,7 +357,7 @@ u32 sub_02079C08 (const UnkStruct_020797DC * param0, u32 param1, u32 param2, int return BoxPokemon_GetValue((BoxPokemon *)(¶m0->unk_04[param1][param2]), param3, param4); } -void sub_02079C50 (UnkStruct_020797DC * param0, u32 param1, u32 param2, int param3, void * param4) +void sub_02079C50 (PCBoxes * param0, u32 param1, u32 param2, int param3, void * param4) { GF_ASSERT((param1 < 18) || (param1 == 0xffffffff)); GF_ASSERT(param2 < (5 * 6)); @@ -370,7 +370,7 @@ void sub_02079C50 (UnkStruct_020797DC * param0, u32 param1, u32 param2, int para sub_02024804(); } -BoxPokemon * sub_02079C9C (const UnkStruct_020797DC * param0, u32 param1, u32 param2) +BoxPokemon * sub_02079C9C (const PCBoxes * param0, u32 param1, u32 param2) { GF_ASSERT(((param1 < 18) || (param1 == 0xffffffff))); GF_ASSERT((param2 < (5 * 6))); @@ -382,7 +382,7 @@ BoxPokemon * sub_02079C9C (const UnkStruct_020797DC * param0, u32 param1, u32 pa return (BoxPokemon *)&(param0->unk_04[param1][param2]); } -void sub_02079CD8 (UnkStruct_020797DC * param0, u32 param1) +void sub_02079CD8 (PCBoxes * param0, u32 param1) { GF_ASSERT(param1 < 8); @@ -390,14 +390,14 @@ void sub_02079CD8 (UnkStruct_020797DC * param0, u32 param1) sub_02024804(); } -BOOL sub_02079CFC (const UnkStruct_020797DC * param0, u32 param1) +BOOL sub_02079CFC (const PCBoxes * param0, u32 param1) { GF_ASSERT(param1 < 8); return (param0->unk_13C6 & (1 << param1)) != 0; } -u32 sub_02079D20 (const UnkStruct_020797DC * param0) +u32 sub_02079D20 (const PCBoxes * param0) { u32 v0, v1; diff --git a/src/unk_0207A274.c b/src/unk_0207A274.c index b4311468d2..7b2742de1c 100644 --- a/src/unk_0207A274.c +++ b/src/unk_0207A274.c @@ -8,7 +8,7 @@ #include "pokemon.h" #include "unk_0207A274.h" -u32 sub_0207A274 (UnkStruct_021C0794 * param0) +u32 sub_0207A274 (SaveData * param0) { UnkStruct_02026324 * v0; diff --git a/src/unk_0207A6DC.c b/src/unk_0207A6DC.c index d00666ecdf..d81d86e07d 100644 --- a/src/unk_0207A6DC.c +++ b/src/unk_0207A6DC.c @@ -141,7 +141,7 @@ static int sub_0207A75C (void) static int sub_0207A764 (void) { - return Party_sizeof(); + return Party_SaveSize(); } static int sub_0207A76C (void) @@ -402,7 +402,7 @@ BOOL sub_0207AA5C (UnkStruct_0207A778 * param0) return 0; } - return sub_0203597C(27, (void *)¶m0->unk_20[0], Party_sizeof()); + return sub_0203597C(27, (void *)¶m0->unk_20[0], Party_SaveSize()); } static void sub_0207AA90 (int param0, int param1, void * param2, void * param3) @@ -550,9 +550,9 @@ BOOL sub_0207AC54 (UnkStruct_0207A778 * param0, int param1, int param2) } if (param1 == 1) { - return sub_0203597C(31, (void *)¶m0->unk_20[0], Party_sizeof()); + return sub_0203597C(31, (void *)¶m0->unk_20[0], Party_SaveSize()); } else { - return sub_0203597C(32, (void *)¶m0->unk_20[0], Party_sizeof()); + return sub_0203597C(32, (void *)¶m0->unk_20[0], Party_SaveSize()); } } diff --git a/src/unk_0207CB08.c b/src/unk_0207CB08.c index 20609b2f48..42baebb76a 100644 --- a/src/unk_0207CB08.c +++ b/src/unk_0207CB08.c @@ -22,11 +22,11 @@ #include "unk_0202D05C.h" #include "unk_0207CB08.h" -static u32 sub_0207CBB4(UnkStruct_021C0794 * param0); -static u32 sub_0207CBC0(UnkStruct_021C0794 * param0); -static u32 sub_0207CBE0(UnkStruct_021C0794 * param0); -static u32 sub_0207CBF0(UnkStruct_021C0794 * param0); -static u32 sub_0207CC00(UnkStruct_021C0794 * param0); +static u32 sub_0207CBB4(SaveData * param0); +static u32 sub_0207CBC0(SaveData * param0); +static u32 sub_0207CBE0(SaveData * param0); +static u32 sub_0207CBF0(SaveData * param0); +static u32 sub_0207CC00(SaveData * param0); UnkStruct_0207CB08 * sub_0207CB08 (u8 param0) { @@ -45,7 +45,7 @@ void sub_0207CB24 (UnkStruct_0207CB08 * param0, u8 param1) param0->unk_65 = param1; } -void sub_0207CB2C (UnkStruct_0207CB08 * param0, UnkStruct_021C0794 * param1, u8 param2, void * param3) +void sub_0207CB2C (UnkStruct_0207CB08 * param0, SaveData * param1, u8 param2, void * param3) { sub_0207CB24(param0, param2); param0->unk_00 = param1; @@ -99,12 +99,12 @@ u8 sub_0207CBAC (UnkStruct_0207CB08 * param0) return param0->unk_75; } -static u32 sub_0207CBB4 (UnkStruct_021C0794 * param0) +static u32 sub_0207CBB4 (SaveData * param0) { return Coins_GetValue(sub_02025E50(param0)); } -static u32 sub_0207CBC0 (UnkStruct_021C0794 * param0) +static u32 sub_0207CBC0 (SaveData * param0) { UnkStruct_0202CA1C * v0; u32 v1, v2; @@ -119,24 +119,24 @@ static u32 sub_0207CBC0 (UnkStruct_021C0794 * param0) return v2; } -static u32 sub_0207CBE0 (UnkStruct_021C0794 * param0) +static u32 sub_0207CBE0 (SaveData * param0) { UnkStruct_02029D04 * v0 = sub_02029D04(sub_0202A750(param0)); return sub_02029DF0(v0); } -static u32 sub_0207CBF0 (UnkStruct_021C0794 * param0) +static u32 sub_0207CBF0 (SaveData * param0) { UnkStruct_02029D04 * v0 = sub_02029D04(sub_0202A750(param0)); return sub_02029E0C(v0); } -static u32 sub_0207CC00 (UnkStruct_021C0794 * param0) +static u32 sub_0207CC00 (SaveData * param0) { return (u32)sub_0202D230(sub_0202D750(param0), 0, 0); } -BOOL sub_0207CC10 (UnkStruct_021C0794 * param0, Strbuf *param1, u16 param2, u32 param3) +BOOL sub_0207CC10 (SaveData * param0, Strbuf *param1, u16 param2, u32 param3) { MessageLoader * v0; UnkStruct_0200B358 * v1; diff --git a/src/unk_0207D3B8.c b/src/unk_0207D3B8.c index a4962e3792..84f6ad806e 100644 --- a/src/unk_0207D3B8.c +++ b/src/unk_0207D3B8.c @@ -46,7 +46,7 @@ typedef struct UnkStruct_0207D99C_t { static u32 sub_0207D40C(UnkStruct_0207D3C0 * param0, u16 param1, BagItem ** param2, u32 * param3, u32 param4); -int sub_0207D3B8 (void) +int Bag_SaveSize (void) { return sizeof(UnkStruct_0207D3C0); } @@ -56,12 +56,12 @@ UnkStruct_0207D3C0 * sub_0207D3C0 (int param0) UnkStruct_0207D3C0 * v0; v0 = Heap_AllocFromHeap(param0, sizeof(UnkStruct_0207D3C0)); - sub_0207D3D8(v0); + Bag_Init(v0); return v0; } -void sub_0207D3D8 (UnkStruct_0207D3C0 * param0) +void Bag_Init (UnkStruct_0207D3C0 * param0) { MI_CpuClear16(param0, sizeof(UnkStruct_0207D3C0)); } @@ -474,11 +474,11 @@ BagItem * sub_0207D910 (UnkStruct_0207D3C0 * param0, u16 param1, u16 param2) return &v0[param2]; } -UnkStruct_0207D3C0 * sub_0207D990 (UnkStruct_021C0794 * param0) +UnkStruct_0207D3C0 * sub_0207D990 (SaveData * param0) { UnkStruct_0207D3C0 * v0; - v0 = (UnkStruct_0207D3C0 *)sub_020245BC(param0, 3); + v0 = (UnkStruct_0207D3C0 *)SaveData_Get(param0, 3); return v0; } diff --git a/src/unk_0208BA78.c b/src/unk_0208BA78.c index 8a4df9a4bf..0b1b1fbe50 100644 --- a/src/unk_0208BA78.c +++ b/src/unk_0208BA78.c @@ -43,7 +43,7 @@ typedef struct { int unk_00; int unk_04; UnkStruct_020067E8 * unk_08; - UnkStruct_021C0794 * unk_0C; + SaveData * unk_0C; BattleParams * unk_10; UnkStruct_0208C06C * unk_14; UnkStruct_0208BA84 unk_18; @@ -78,7 +78,7 @@ void sub_0208BA84 (UnkStruct_0208BA84 * param0, BOOL param1, int param2) param0->unk_04 = param2; } -static void sub_0208BA8C (UnkStruct_021C0794 * param0, int param1, u32 param2) +static void sub_0208BA8C (SaveData * param0, int param1, u32 param2) { UnkStruct_0202B628 * v0 = sub_0202B628(param0); void * v1 = sub_0202C244(param1, param2); diff --git a/src/unk_0208C324.c b/src/unk_0208C324.c index 8a3bb91b41..8a71cbf637 100644 --- a/src/unk_0208C324.c +++ b/src/unk_0208C324.c @@ -134,7 +134,7 @@ const UnkStruct_0208BE5C Unk_020F410C = { 0xFFFFFFFF }; -BOOL sub_0208C324 (UnkStruct_021C0794 * param0) +BOOL sub_0208C324 (SaveData * param0) { return sub_0206ADCC(sub_020507E4(param0)); } diff --git a/src/unk_020933F8.c b/src/unk_020933F8.c index b493f59187..93f81307d4 100644 --- a/src/unk_020933F8.c +++ b/src/unk_020933F8.c @@ -39,7 +39,7 @@ #include "heap.h" #include "unk_0201D15C.h" #include "strbuf.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "trainer_info.h" #include "unk_0202631C.h" #include "unk_020298BC.h" @@ -808,7 +808,7 @@ static void sub_02093C6C (UnkStruct_0201CD38 * param0, void * param1) } break; case 28: - MI_CpuCopy8(v0->unk_14C[0], v0->unk_569, sub_0202CC64()); + MI_CpuCopy8(v0->unk_14C[0], v0->unk_569, ChatotCry_SaveSize()); sub_020364F0(12); v0->unk_568 = 0; @@ -1582,7 +1582,7 @@ void sub_02094BB4 (UnkStruct_02095C48 * param0, int * param1, int * param2, int } } -void sub_02094C44 (UnkStruct_02095C48 * param0, UnkStruct_021C0794 * param1, u32 param2, UnkStruct_0202B628 * param3) +void sub_02094C44 (UnkStruct_02095C48 * param0, SaveData * param1, u32 param2, UnkStruct_0202B628 * param3) { int v0; @@ -1626,9 +1626,9 @@ void sub_02094C44 (UnkStruct_02095C48 * param0, UnkStruct_021C0794 * param1, u32 } { - UnkStruct_0202440C * v4; + TVBroadcast * v4; - v4 = sub_0202440C(param0->unk_1970); + v4 = SaveData_TVBroadcast(param0->unk_1970); sub_0206CF14(v4, param0->unk_1974, param0->unk_00.unk_10F, param0->unk_00.unk_110, param0->unk_00.unk_118[param0->unk_00.unk_113].unk_08 + 1); } diff --git a/src/unk_02095CD4.c b/src/unk_02095CD4.c index 1f82750ba4..7d0577761f 100644 --- a/src/unk_02095CD4.c +++ b/src/unk_02095CD4.c @@ -69,7 +69,7 @@ void sub_02095CFC (int param0, int param1, void * param2, void * param3) memcpy((void *)v1->unk_2274, param2, (236 * 6 + 4 * 2)); v1->unk_58++; - if ((v1->unk_58) * (236 * 6 + 4 * 2) >= Party_sizeof()) { + if ((v1->unk_58) * (236 * 6 + 4 * 2) >= Party_SaveSize()) { if (sub_0203608C() == 1) { ov88_0223D058(v1, 27, 0); } else { diff --git a/src/unk_0209747C.c b/src/unk_0209747C.c index 171454beda..20591037a2 100644 --- a/src/unk_0209747C.c +++ b/src/unk_0209747C.c @@ -33,7 +33,7 @@ struct UnkStruct_0209747C_t { u16 unk_20[2]; }; -UnkStruct_0209747C * sub_0209747C (u32 param0, u32 param1, UnkStruct_021C0794 * param2, u32 param3) +UnkStruct_0209747C * sub_0209747C (u32 param0, u32 param1, SaveData * param2, u32 param3) { UnkStruct_0209747C * v0 = Heap_AllocFromHeap(param3, sizeof(UnkStruct_0209747C)); diff --git a/src/unk_02097624.c b/src/unk_02097624.c index 59dfddd48d..354b8e25f3 100644 --- a/src/unk_02097624.c +++ b/src/unk_02097624.c @@ -41,10 +41,10 @@ typedef struct { static int sub_02097944(UnkStruct_020067E8 * param0, int * param1); static int sub_020979A8(UnkStruct_020067E8 * param0, int * param1); static int sub_02097AF8(UnkStruct_020067E8 * param0, int * param1); -UnkStruct_02097728 * sub_02097624(UnkStruct_021C0794 * param0, int param1, u8 param2, u8 param3, int param4); -UnkStruct_02097728 * sub_0209767C(UnkStruct_021C0794 * param0, int param1, u16 param2, int param3); -UnkStruct_02097728 * sub_020976BC(UnkStruct_021C0794 * param0, Pokemon * param1, int param2); -UnkStruct_02097728 * sub_020976F4(UnkStruct_021C0794 * param0, u8 param1, int param2); +UnkStruct_02097728 * sub_02097624(SaveData * param0, int param1, u8 param2, u8 param3, int param4); +UnkStruct_02097728 * sub_0209767C(SaveData * param0, int param1, u16 param2, int param3); +UnkStruct_02097728 * sub_020976BC(SaveData * param0, Pokemon * param1, int param2); +UnkStruct_02097728 * sub_020976F4(SaveData * param0, u8 param1, int param2); BOOL sub_02097728(UnkStruct_02097728 * param0); int sub_0209772C(UnkStruct_02097728 * param0, int param1, u8 param2); int sub_02097750(UnkStruct_02097728 * param0, Pokemon * param1); @@ -62,7 +62,7 @@ const UnkStruct_0208BE5C Unk_020F64B0 = { 0xFFFFFFFF }; -UnkStruct_02097728 * sub_02097624 (UnkStruct_021C0794 * param0, int param1, u8 param2, u8 param3, int param4) +UnkStruct_02097728 * sub_02097624 (SaveData * param0, int param1, u8 param2, u8 param3, int param4) { UnkStruct_02097728 * v0; UnkStruct_02028430 * v1; @@ -88,7 +88,7 @@ UnkStruct_02097728 * sub_02097624 (UnkStruct_021C0794 * param0, int param1, u8 p return v0; } -UnkStruct_02097728 * sub_0209767C (UnkStruct_021C0794 * param0, int param1, u16 param2, int param3) +UnkStruct_02097728 * sub_0209767C (SaveData * param0, int param1, u16 param2, int param3) { UnkStruct_02097728 * v0; UnkStruct_02028430 * v1; @@ -109,7 +109,7 @@ UnkStruct_02097728 * sub_0209767C (UnkStruct_021C0794 * param0, int param1, u16 return v0; } -UnkStruct_02097728 * sub_020976BC (UnkStruct_021C0794 * param0, Pokemon * param1, int param2) +UnkStruct_02097728 * sub_020976BC (SaveData * param0, Pokemon * param1, int param2) { UnkStruct_02097728 * v0; @@ -124,7 +124,7 @@ UnkStruct_02097728 * sub_020976BC (UnkStruct_021C0794 * param0, Pokemon * param1 return v0; } -UnkStruct_02097728 * sub_020976F4 (UnkStruct_021C0794 * param0, u8 param1, int param2) +UnkStruct_02097728 * sub_020976F4 (SaveData * param0, u8 param1, int param2) { UnkStruct_02097728 * v0; diff --git a/src/unk_02097B18.c b/src/unk_02097B18.c index b040be1c23..c46f0b8779 100644 --- a/src/unk_02097B18.c +++ b/src/unk_02097B18.c @@ -34,7 +34,7 @@ #include "gx_layers.h" #include "unk_02023FCC.h" #include "unk_02024220.h" -#include "unk_0202440C.h" +#include "savedata/save_table.h" #include "unk_02025E08.h" #include "unk_020279FC.h" #include "unk_02028124.h" @@ -63,7 +63,7 @@ typedef struct { UnkStruct_02097F38_sub1 * unk_04; UnkStruct_02097F18 * unk_08; UnkStruct_02098C44 * unk_0C; - UnkStruct_021C0794 * unk_10; + SaveData * unk_10; int unk_14; } UnkStruct_02097F38; @@ -389,7 +389,7 @@ static BOOL sub_02097F38 (UnkStruct_020508D4 * param0) Pokemon * v8; UnkStruct_0202CA28 * v9; UnkStruct_0202CA64 * v10; - UnkStruct_0202440C * v11; + TVBroadcast * v11; int v12; int v13; @@ -405,7 +405,7 @@ static BOOL sub_02097F38 (UnkStruct_020508D4 * param0) v10 = sub_0202CA64(v9, 0); v12 = sub_0202CA7C(v10); v12 = sub_02098164(v12); - v11 = sub_0202440C(v2->unk_0C); + v11 = SaveData_TVBroadcast(v2->unk_0C); sub_0206D9B4(v11, v8, v12); } @@ -426,7 +426,7 @@ static BOOL sub_02097F38 (UnkStruct_020508D4 * param0) return 0; } -void sub_020980DC (UnkStruct_020508D4 * param0, UnkStruct_021C0794 * param1) +void sub_020980DC (UnkStruct_020508D4 * param0, SaveData * param1) { UnkStruct_02097F38 * v0 = Heap_AllocFromHeapAtEnd(11, sizeof(UnkStruct_02097F38)); diff --git a/src/unk_020985E4.c b/src/unk_020985E4.c index e0b9a21575..4acc674b40 100644 --- a/src/unk_020985E4.c +++ b/src/unk_020985E4.c @@ -21,7 +21,7 @@ FS_EXTERN_OVERLAY(overlay100); -void sub_020985E4 (UnkStruct_020508D4 * param0, UnkStruct_021C0794 * param1) +void sub_020985E4 (UnkStruct_020508D4 * param0, SaveData * param1) { UnkStruct_0209862C * v0; UnkStruct_020985E4 * v1; diff --git a/src/unk_020989DC.c b/src/unk_020989DC.c index 6fdd86e89c..c3e8589465 100644 --- a/src/unk_020989DC.c +++ b/src/unk_020989DC.c @@ -95,7 +95,7 @@ const UnkStruct_0208BE5C Unk_020F6890 = { 0xFFFFFFFF }; -UnkStruct_0203D9B8 * sub_020989DC (UnkStruct_021C0794 * param0, int param1) +UnkStruct_0203D9B8 * sub_020989DC (SaveData * param0, int param1) { UnkStruct_0203D9B8 * v0; Poffin * v1; diff --git a/src/unk_02099550.c b/src/unk_02099550.c index 53b18e61d0..b220e94bd9 100644 --- a/src/unk_02099550.c +++ b/src/unk_02099550.c @@ -38,7 +38,7 @@ void sub_02099580 (void) Overlay_UnloadByID(FS_OVERLAY_ID(overlay18)); } -void sub_02099590 (UnkStruct_021C0794 * param0, int param1) +void sub_02099590 (SaveData * param0, int param1) { sub_02099550(); sub_02099570(); diff --git a/src/unk_02099604.c b/src/unk_02099604.c index 1d658f9380..ea5cc38c91 100644 --- a/src/unk_02099604.c +++ b/src/unk_02099604.c @@ -17,11 +17,11 @@ FS_EXTERN_OVERLAY(overlay82); -UnkStruct_ov82_0223B164 * sub_02099604(int param0, UnkStruct_021C0794 * param1, int param2, UnkStruct_0202B628 * param3); +UnkStruct_ov82_0223B164 * sub_02099604(int param0, SaveData * param1, int param2, UnkStruct_0202B628 * param3); UnkStruct_ov82_0223B164 * sub_02099674(UnkStruct_0203CDB0 * param0, int param1, int param2); UnkStruct_ov82_0223B164 * sub_020996A0(UnkStruct_0203CDB0 * param0, int param1, BOOL param2); -UnkStruct_ov82_0223B164 * sub_02099604 (int param0, UnkStruct_021C0794 * param1, int param2, UnkStruct_0202B628 * param3) +UnkStruct_ov82_0223B164 * sub_02099604 (int param0, SaveData * param1, int param2, UnkStruct_0202B628 * param3) { UnkStruct_ov82_0223B164 * v0; diff --git a/src/unk_02099DFC.c b/src/unk_02099DFC.c index b546cff162..9bf14b2507 100644 --- a/src/unk_02099DFC.c +++ b/src/unk_02099DFC.c @@ -47,7 +47,7 @@ typedef struct { MessageLoader * unk_18; UnkStruct_0205AA50 unk_1C; UnkStruct_02001AF4 * unk_2C; - UnkStruct_021C0794 * unk_30; + SaveData * unk_30; void * unk_34; } UnkStruct_02099DFC; diff --git a/src/unk_0209A2C4.c b/src/unk_0209A2C4.c index fd00f60704..107a89345c 100644 --- a/src/unk_0209A2C4.c +++ b/src/unk_0209A2C4.c @@ -45,7 +45,7 @@ typedef struct { MessageLoader * unk_1C; UnkStruct_0205AA50 unk_20; UnkStruct_02001AF4 * unk_30; - UnkStruct_021C0794 * unk_34; + SaveData * unk_34; void * unk_38; u32 unk_3C; } UnkStruct_0209A3D0;