From 8958487e95618eaea84f4aaa02f68d3ef467a874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 3 Apr 2021 11:57:44 +0200 Subject: decomp unk_0205FA2C.s --- include/unk_0205FA2C.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/unk_0205FA2C.h (limited to 'include') diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h new file mode 100644 index 00000000..7418c4a3 --- /dev/null +++ b/include/unk_0205FA2C.h @@ -0,0 +1,34 @@ +#ifndef POKEDIAMOND_UNK_0205FA2C_H +#define POKEDIAMOND_UNK_0205FA2C_H + + +#include "global.h" +#include "MI_memory.h" +#include "bag.h" +#include "heap.h" +#include "party.h" +#include "player_data.h" +#include "unk_0202A8F4.h" +#include "unk_0204639C.h" +#include "unk_0206BB28.h" +#include "unk_02029FB0.h" +#include "unk_020286F8.h" + + +const u8 UNK_020F7454[] = { + 0x00, + 0x01, + 0x02, + 0x04, + 0x03, + 0x05, + 0x06, + 0x07, + 0x08, + 0x00, + 0x00, + 0x00, +}; + + +#endif //POKEDIAMOND_UNK_0205FA2C_H \ No newline at end of file -- cgit v1.2.3 From b20e00af7417022971bdf37870b66ccb8d3c52a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 3 Apr 2021 15:11:23 +0200 Subject: better structs and signatures --- include/unk_0205FA2C.h | 108 +++++++++++++++++++++++++++++++++++++++++++++++++ include/unk_0206BB28.h | 4 +- 2 files changed, 110 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h index 7418c4a3..7875b5e9 100644 --- a/include/unk_0205FA2C.h +++ b/include/unk_0205FA2C.h @@ -8,6 +8,7 @@ #include "heap.h" #include "party.h" #include "player_data.h" +#include "script.h" #include "unk_0202A8F4.h" #include "unk_0204639C.h" #include "unk_0206BB28.h" @@ -31,4 +32,111 @@ const u8 UNK_020F7454[] = { }; +struct UnkPlayerStruct1_0205FA2C +{ + /* 0x00 */ struct PlayerParty *player_party; + /* 0x04 */ struct Bag *bag; + u32 unk08; + /* 0x0c */ struct Options *options; + u32 unk10[4]; + u8 unk20; + u8 unk21; + u8 unk22; + u8 unk23; + u32 unk24[2]; + u8 unk2c[6]; + u8 unk32:4; + u8 unk322:4; + u8 unk33; + u32 unk34[3]; +}; + + +struct UnkPlayerStruct2_0205FA2C { + /* 0x00 */ struct PlayerParty *player_party; + /* 0x04 */ struct Options *options; + u32 unk08; + u32 unk0c; + u8 unk10; + u8 unk11; + u8 unk12; + /* 0x04 */ u8 party_count; + u8 unk14; + u8 unk15[3]; + u16 unk18; + u16 unk1a; + /* 0x1c */ BOOL IsNatDex; + void *unk20; + u32 unk24; + u32 unk28; + u32 unk2c; + +}; + + + +struct UnkCallbackStruct1_0205FA2C { + u32 unk00; + u32 unk04; + u8 unk08; + u8 unk09; + u8 unk0a; + u8 unk0b; + u8 unk0c; + u8 unk0d; + u8 unk0e[6]; + void **unk14; +}; + + + + +struct UnkCallbackStruct2_0205FA2C { + u32 unk00; + u32 unk04; + u32 *unk08; + u32 unk0c; + u16 unk10; + u16 unk12; + u16 unk14; +}; + + + + + + +THUMB_FUNC u32 FUN_0205FA2C(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); +THUMB_FUNC u32 FUN_0205FAD8(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC u32 FUN_0205FB34(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); +THUMB_FUNC u32 FUN_0205FBC0(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC int FUN_0205FBE8(struct UnkStruct_0204639C *param0); +THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, + void **param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u8 param7); + +THUMB_FUNC u32 FUN_0205FC9C(struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC u32 FUN_0205FCC4(struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC int FUN_0205FCE8(struct UnkStruct_0204639C *param0); +THUMB_FUNC void FUN_0205FD38(struct UnkStruct_0204639C *param0, u16 param1, u16 param2, u16 param3); + + +THUMB_FUNC int FUN_0205FD70(struct UnkStruct_0204639C *param0); +THUMB_FUNC void FUN_0205FDDC(struct UnkStruct_0204639C *param0, u16 param1, u16 param2); + +THUMB_FUNC u32 FUN_0205FE10(struct SaveBlock2 *sav2); +THUMB_FUNC u32 FUN_0205FF5C(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_02060044(u16 **param0, u32 *param1); +THUMB_FUNC u32 FUN_02060064(u32 param0); +THUMB_FUNC u32 FUN_02060070(u32 param0); +THUMB_FUNC u32 FUN_0206007C(struct SaveBlock2 *sav2); +THUMB_FUNC u32 FUN_020600A0(struct SaveBlock2 *sav2); +THUMB_FUNC u32 FUN_020600DC(struct SaveBlock2 *sav2); +THUMB_FUNC BOOL FUN_02060144(u32 **param0); + #endif //POKEDIAMOND_UNK_0205FA2C_H \ No newline at end of file diff --git a/include/unk_0206BB28.h b/include/unk_0206BB28.h index ff60e220..44997e73 100644 --- a/include/unk_0206BB28.h +++ b/include/unk_0206BB28.h @@ -5,8 +5,8 @@ #include "pokedex.h" #include "pokemon.h" -BOOL FUN_0206BB28(struct SaveBlock2 * sav2); -BOOL FUN_0206BB34(struct Pokedex * pokedex); +BOOL SavArray_IsNatDexEnabled(struct SaveBlock2 * sav2); +BOOL Pokedex_IsNatDexEnabled(struct Pokedex * pokedex); u32 FUN_0206BB48(BOOL isNationalDex, u32 species); #endif //POKEDIAMOND_UNK_0206BB28_H -- cgit v1.2.3 From 44a082830ef1aaff60449d9dc2b01fdcf8300e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 3 Apr 2021 15:18:24 +0200 Subject: remove extern declaration --- include/unk_0205FA2C.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'include') diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h index 7875b5e9..c8d6da6d 100644 --- a/include/unk_0205FA2C.h +++ b/include/unk_0205FA2C.h @@ -16,22 +16,6 @@ #include "unk_020286F8.h" -const u8 UNK_020F7454[] = { - 0x00, - 0x01, - 0x02, - 0x04, - 0x03, - 0x05, - 0x06, - 0x07, - 0x08, - 0x00, - 0x00, - 0x00, -}; - - struct UnkPlayerStruct1_0205FA2C { /* 0x00 */ struct PlayerParty *player_party; -- cgit v1.2.3 From c54ec6c98fa9ac1affed7fb1233e9b9aa84a27c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 3 Apr 2021 18:10:46 +0200 Subject: run clang-format --- include/unk_0205FA2C.h | 52 ++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) (limited to 'include') diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h index c8d6da6d..99cf7606 100644 --- a/include/unk_0205FA2C.h +++ b/include/unk_0205FA2C.h @@ -1,7 +1,6 @@ #ifndef POKEDIAMOND_UNK_0205FA2C_H #define POKEDIAMOND_UNK_0205FA2C_H - #include "global.h" #include "MI_memory.h" #include "bag.h" @@ -9,12 +8,11 @@ #include "party.h" #include "player_data.h" #include "script.h" +#include "unk_020286F8.h" +#include "unk_02029FB0.h" #include "unk_0202A8F4.h" #include "unk_0204639C.h" #include "unk_0206BB28.h" -#include "unk_02029FB0.h" -#include "unk_020286F8.h" - struct UnkPlayerStruct1_0205FA2C { @@ -29,14 +27,14 @@ struct UnkPlayerStruct1_0205FA2C u8 unk23; u32 unk24[2]; u8 unk2c[6]; - u8 unk32:4; - u8 unk322:4; + u8 unk32 : 4; + u8 unk322 : 4; u8 unk33; u32 unk34[3]; }; - -struct UnkPlayerStruct2_0205FA2C { +struct UnkPlayerStruct2_0205FA2C +{ /* 0x00 */ struct PlayerParty *player_party; /* 0x04 */ struct Options *options; u32 unk08; @@ -54,12 +52,10 @@ struct UnkPlayerStruct2_0205FA2C { u32 unk24; u32 unk28; u32 unk2c; - }; - - -struct UnkCallbackStruct1_0205FA2C { +struct UnkCallbackStruct1_0205FA2C +{ u32 unk00; u32 unk04; u8 unk08; @@ -72,10 +68,8 @@ struct UnkCallbackStruct1_0205FA2C { void **unk14; }; - - - -struct UnkCallbackStruct2_0205FA2C { +struct UnkCallbackStruct2_0205FA2C +{ u32 unk00; u32 unk04; u32 *unk08; @@ -85,15 +79,14 @@ struct UnkCallbackStruct2_0205FA2C { u16 unk14; }; - - - - - -THUMB_FUNC u32 FUN_0205FA2C(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); -THUMB_FUNC u32 FUN_0205FAD8(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); -THUMB_FUNC u32 FUN_0205FB34(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); -THUMB_FUNC u32 FUN_0205FBC0(struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC u32 FUN_0205FA2C( + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); +THUMB_FUNC u32 FUN_0205FAD8( + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC u32 FUN_0205FB34( + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); +THUMB_FUNC u32 FUN_0205FBC0( + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); THUMB_FUNC int FUN_0205FBE8(struct UnkStruct_0204639C *param0); THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, void **param1, @@ -104,12 +97,13 @@ THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, u8 param6, u8 param7); -THUMB_FUNC u32 FUN_0205FC9C(struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); -THUMB_FUNC u32 FUN_0205FCC4(struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC u32 FUN_0205FC9C( + struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); +THUMB_FUNC u32 FUN_0205FCC4( + struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); THUMB_FUNC int FUN_0205FCE8(struct UnkStruct_0204639C *param0); THUMB_FUNC void FUN_0205FD38(struct UnkStruct_0204639C *param0, u16 param1, u16 param2, u16 param3); - THUMB_FUNC int FUN_0205FD70(struct UnkStruct_0204639C *param0); THUMB_FUNC void FUN_0205FDDC(struct UnkStruct_0204639C *param0, u16 param1, u16 param2); @@ -123,4 +117,4 @@ THUMB_FUNC u32 FUN_020600A0(struct SaveBlock2 *sav2); THUMB_FUNC u32 FUN_020600DC(struct SaveBlock2 *sav2); THUMB_FUNC BOOL FUN_02060144(u32 **param0); -#endif //POKEDIAMOND_UNK_0205FA2C_H \ No newline at end of file +#endif // POKEDIAMOND_UNK_0205FA2C_H \ No newline at end of file -- cgit v1.2.3