From 6850ab1f5f9c68553fcc8efb6dd7afe6170a3ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Fri, 26 Mar 2021 18:58:24 +0100 Subject: nonmatching --- include/unk_02016B94.h | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 include/unk_02016B94.h (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h new file mode 100644 index 00000000..b1dbfcda --- /dev/null +++ b/include/unk_02016B94.h @@ -0,0 +1,64 @@ +#ifndef POKEDIAMOND_UNK_02016B94_H +#define POKEDIAMOND_UNK_02016B94_H + + +#include "global.h" +#include "GX_layers.h" +#include "gx.h" +#include "heap.h" + +struct UnkStruct1 { + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; + + u8 unk10; + u8 unk11; + u8 unk12; + u8 unk13; + u8 unk14; + u8 unk15; + u8 unk16; + u8 unk17; //probably paddding + u32 unk18; +}; + + + +struct UnkStruct2 { + u32 unk00; + u32 unk04; + + + struct InnerStruct { + u32 unk08; + u32 unk0c; + u32 unk10; + + u32 unk14; + u32 unk18; + + u8 unk1c; + u8 unk1d; + u8 unk1e; + u8 unk1f; + u16 unk20; + u16 unk22; //probably padding + u32 unk24; + u32 unk28; + u32 unk2c; + u32 unk30; + } unk08[8]; +}; + + +THUMB_FUNC void *FUN_02016B94(u32 heap_id); +THUMB_FUNC u32 FUN_02016BB8(u32 *param0); +THUMB_FUNC void FUN_02016BBC(u32 *param0); +THUMB_FUNC void FUN_02016BF4(u32 *param0, u32 param1); +THUMB_FUNC void FUN_02016C18(struct UnkStruct2 *param0, u8 param1, struct UnkStruct1 *param2, u8 param3); + + + +#endif //POKEDIAMOND_UNK_02016B94_H \ No newline at end of file -- cgit v1.2.3 From 2023f223aa3cfce3d8e17cddf3833dc8510c443e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Fri, 16 Apr 2021 11:57:16 +0200 Subject: decomp unk_0202D858.s --- include/unk_0202D858.h | 10 ++++++++++ include/unk_0202F150.h | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 include/unk_0202D858.h (limited to 'include') diff --git a/include/unk_0202D858.h b/include/unk_0202D858.h new file mode 100644 index 00000000..210821d0 --- /dev/null +++ b/include/unk_0202D858.h @@ -0,0 +1,10 @@ +#ifndef POKEDIAMOND_UNK_0202D858_H +#define POKEDIAMOND_UNK_0202D858_H + +#include "global.h" + +THUMB_FUNC u8 FUN_0202D858(u16 param0); +THUMB_FUNC u8 FUN_0202D884(u16 param0); +THUMB_FUNC u32 FUN_0202D8B0(int param0); + +#endif // POKEDIAMOND_UNK_0202D858_H diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index 3996c1c8..77fb4f7d 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -6,6 +6,7 @@ #include "RTC_api.h" #include "heap.h" #include "main.h" +#include "unk_0202D858.h" struct UnkStruct0202F150_sub1 { @@ -163,8 +164,8 @@ THUMB_FUNC u32 FUN_020311DC(u32 param0); THUMB_FUNC u32 FUN_020311E8(); THUMB_FUNC u32 FUN_020311F0(); THUMB_FUNC int FUN_02031228(u16 param0); -THUMB_FUNC u32 FUN_02031248(u32 param0); -THUMB_FUNC u32 FUN_02031258(u32 param0); +THUMB_FUNC int FUN_02031248(u32 param0); +THUMB_FUNC int FUN_02031258(u32 param0); THUMB_FUNC void FUN_02031268(u8 param0); THUMB_FUNC u8 FUN_02031280(); THUMB_FUNC void FUN_0203129C(); -- cgit v1.2.3 From dcb4eea28034cb3be345736dbc9bb223f3ace92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Fri, 16 Apr 2021 15:19:40 +0200 Subject: decompile unk_02031480.s --- include/unk_02031480.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/unk_02031480.h (limited to 'include') diff --git a/include/unk_02031480.h b/include/unk_02031480.h new file mode 100644 index 00000000..48cfbd14 --- /dev/null +++ b/include/unk_02031480.h @@ -0,0 +1,30 @@ +#ifndef POKEDIAMOND_UNK_02031480_H +#define POKEDIAMOND_UNK_02031480_H + +#include "global.h" +#include "MI_memory.h" +#include "heap.h" +#include "unk_0202F150.h" + +THUMB_FUNC void FUN_02031480(u32 heap_id); +THUMB_FUNC void FUN_020314D0(); +THUMB_FUNC BOOL FUN_020314E8(); +THUMB_FUNC void FUN_020314FC(u8 param0, u32 param1, u8 *param2); +THUMB_FUNC void FUN_02031560(u32 param0, u32 param1, u8 *param2); +THUMB_FUNC void FUN_02031574(u32 param0, u32 param1, u8 *param2); +THUMB_FUNC void FUN_02031588(u8 param0); +THUMB_FUNC void FUN_020315A4(); +THUMB_FUNC BOOL FUN_020315D8(u8 param0); +THUMB_FUNC u8 FUN_020315FC(u8 index); +THUMB_FUNC void FUN_0203160C(u32 param0, u32 param1, u8 *param2); +THUMB_FUNC u32 FUN_02031628(); +THUMB_FUNC void FUN_0203162C(u8 param0, u8 param1); +THUMB_FUNC int FUN_02031640(u32 param0, u8 param1); +THUMB_FUNC void FUN_02031668(); +THUMB_FUNC void FUN_0203168C(); +THUMB_FUNC BOOL FUN_020316AC(u32 param0, void *param1); +THUMB_FUNC u8 *FUN_020316E0(u32 param0); +THUMB_FUNC void FUN_02031704(u32 param0, u32 param1, void *param2); +THUMB_FUNC u32 FUN_02031730(); + +#endif // POKEDIAMOND_UNK_02031480_H -- cgit v1.2.3 From 61b2d69a68e03e39aaa97ae39969987b52c08c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Mon, 19 Apr 2021 19:10:37 +0200 Subject: update externs --- include/unk_0202F150.h | 1 + include/unk_02031480.h | 2 +- include/unk_0205FA2C.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index 77fb4f7d..4542cdd1 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -7,6 +7,7 @@ #include "heap.h" #include "main.h" #include "unk_0202D858.h" +#include "unk_02031480.h" struct UnkStruct0202F150_sub1 { diff --git a/include/unk_02031480.h b/include/unk_02031480.h index 48cfbd14..975f0796 100644 --- a/include/unk_02031480.h +++ b/include/unk_02031480.h @@ -23,7 +23,7 @@ THUMB_FUNC int FUN_02031640(u32 param0, u8 param1); THUMB_FUNC void FUN_02031668(); THUMB_FUNC void FUN_0203168C(); THUMB_FUNC BOOL FUN_020316AC(u32 param0, void *param1); -THUMB_FUNC u8 *FUN_020316E0(u32 param0); +THUMB_FUNC u8 *FUN_020316E0(int param0); THUMB_FUNC void FUN_02031704(u32 param0, u32 param1, void *param2); THUMB_FUNC u32 FUN_02031730(); diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h index 99cf7606..e65507b7 100644 --- a/include/unk_0205FA2C.h +++ b/include/unk_0205FA2C.h @@ -13,6 +13,7 @@ #include "unk_0202A8F4.h" #include "unk_0204639C.h" #include "unk_0206BB28.h" +#include "unk_02031480.h" struct UnkPlayerStruct1_0205FA2C { -- cgit v1.2.3 From 88aa75fe3e94f1aac0368b6dbcfaf75614066a8a Mon Sep 17 00:00:00 2001 From: tgsm Date: Thu, 29 Apr 2021 07:31:45 -0400 Subject: Decompile unk_0204B0A0 --- include/sav_system_info.h | 2 ++ include/unk_0204B0A0.h | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 include/unk_0204B0A0.h (limited to 'include') diff --git a/include/sav_system_info.h b/include/sav_system_info.h index 696cfe07..bded91f7 100644 --- a/include/sav_system_info.h +++ b/include/sav_system_info.h @@ -3,6 +3,8 @@ #include "RTC_api.h" +struct SaveBlock2; + struct UnkSaveStruct_0202376C_sub { /* 0x00 */ u32 field_00; diff --git a/include/unk_0204B0A0.h b/include/unk_0204B0A0.h new file mode 100644 index 00000000..8d37e354 --- /dev/null +++ b/include/unk_0204B0A0.h @@ -0,0 +1,25 @@ +#ifndef POKEDIAMOND_UNK_0204B0A0_H +#define POKEDIAMOND_UNK_0204B0A0_H + +#include "RTC_api.h" +#include "RTC_convert.h" +#include "sav_system_info.h" +#include "script.h" + +void FUN_0204B0F8(struct UnkSavStruct80* unk); +void FUN_0204B130(struct UnkSavStruct80* unk, struct UnkSaveStruct_0202376C_sub* rtc_info, struct RTCDate* date); +void FUN_0204B158(struct UnkSavStruct80* unk, struct UnkSaveStruct_0202376C_sub* rtc_info, struct RTCDate* date, struct RTCTime* time); +void FUN_0204B1DC(struct UnkSavStruct80* unk, s32 a1); +void FUN_0204B270(struct UnkSavStruct80* unk, s32 a1, struct RTCTime* time); +u32 Script_GetTimeOfDay(struct UnkSavStruct80* unk); +u32 Script_GetMonth(struct UnkSavStruct80* unk); +u32 Script_GetDay(struct UnkSavStruct80* unk); +RTCWeek Script_GetWeekday(struct UnkSavStruct80* unk); +u32 Script_GetHour(struct UnkSavStruct80* unk); +u32 Script_GetMinute(struct UnkSavStruct80* unk); +void Script_SavRTC_x24toDateTime(struct UnkSavStruct80* unk, struct RTCDate* date, struct RTCTime* time); +void Script_SavRTC_x2CtoDateTime(struct UnkSavStruct80* unk, struct RTCDate* date, struct RTCTime* time); +void Script_SavRTC_DateTimeTox2C(struct UnkSavStruct80* unk); +BOOL FUN_0204B33C(struct UnkSavStruct80* unk); + +#endif -- cgit v1.2.3 From cf188406f006750ec7206e3dd2a6818c767729eb Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 30 Apr 2021 04:30:27 -0400 Subject: Fix a bunch of function signatures A bunch of functions were thought to be returning/taking in an unk_204639c but they actually return/take an unksavstruct80. This fixes that, and also changes a couple of struct members, so this might be useful for scrcmd. --- include/script.h | 3 ++- include/unk_0204639C.h | 12 +++++++----- include/unk_0205FA2C.h | 14 +++++++------- 3 files changed, 16 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/script.h b/include/script.h index 9a7270c2..bb237523 100644 --- a/include/script.h +++ b/include/script.h @@ -28,7 +28,8 @@ struct UnkSavStruct80 u8 padding[0x8]; u32 unk08; struct SaveBlock2 *saveBlock2; //0xC - u8 padding2[0xC]; + struct UnkStruct_0204639C *unk10; + u8 padding2[0x8]; u32 *mapId; //0x1C u8 padding3[0x18]; u32 unk38; diff --git a/include/unk_0204639C.h b/include/unk_0204639C.h index cff2241f..cebe192d 100644 --- a/include/unk_0204639C.h +++ b/include/unk_0204639C.h @@ -1,6 +1,8 @@ #ifndef GUARD_UNK_0204639C_H #define GUARD_UNK_0204639C_H +#include "script.h" + struct UnkStruct_0204639C; typedef BOOL (*UnkStruct_0204639C_cb)(struct UnkStruct_0204639C * ); @@ -13,18 +15,18 @@ struct UnkStruct_0204639C u32 * unkC; struct UnkStruct_0204639C * unk10; void * unk14; - struct UnkStruct_0204639C * unk18; + struct UnkSavStruct80 * unk18; u32 * unk1C; }; extern void LoadOverlay_MODULE_05(void *); -extern void FUN_020373D4(struct UnkStruct_0204639C *, u32, u32); +extern void FUN_020373D4(struct UnkSavStruct80 *, u32, u32); extern BOOL FUN_020373AC(void *); extern BOOL FUN_0203739C(void *); extern BOOL FUN_020373C4(void *); -struct UnkStruct_0204639C * FUN_0204639C(struct UnkStruct_0204639C * r5, UnkStruct_0204639C_cb r6, u32 * r7); -void FUN_020463CC(struct UnkStruct_0204639C * r5, UnkStruct_0204639C_cb r4, u32 * r6); +struct UnkStruct_0204639C * FUN_0204639C(struct UnkSavStruct80 * r5, UnkStruct_0204639C_cb r6, u32 * r7); +void FUN_020463CC(struct UnkSavStruct80 * r5, UnkStruct_0204639C_cb r4, u32 * r6); void FUN_020463EC(struct UnkStruct_0204639C * r4, UnkStruct_0204639C_cb r1, u32 * r2); void FUN_0204640C(struct UnkStruct_0204639C * r4, UnkStruct_0204639C_cb r1, u32 * r2); BOOL FUN_02046420(struct UnkStruct_0204639C * r5); @@ -37,6 +39,6 @@ void FUN_02046500(struct UnkStruct_0204639C * r6, u32 r5, u32 r4); u32 * FUN_0204652C(struct UnkStruct_0204639C * r0); u32 * FUN_02046530(struct UnkStruct_0204639C * r0); u32 FUN_02046534(struct UnkStruct_0204639C * r0); -struct UnkStruct_0204639C * FUN_02046528(struct UnkStruct_0204639C *); +struct UnkSavStruct80 * FUN_02046528(struct UnkStruct_0204639C *); #endif //GUARD_UNK_0204639C_H diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h index e65507b7..19279a6c 100644 --- a/include/unk_0205FA2C.h +++ b/include/unk_0205FA2C.h @@ -81,13 +81,13 @@ struct UnkCallbackStruct2_0205FA2C }; THUMB_FUNC u32 FUN_0205FA2C( - struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1, u32 heap_id); THUMB_FUNC u32 FUN_0205FAD8( - struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1); THUMB_FUNC u32 FUN_0205FB34( - struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1, u32 heap_id); + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1, u32 heap_id); THUMB_FUNC u32 FUN_0205FBC0( - struct UnkCallbackStruct1_0205FA2C *param0, struct UnkStruct_0204639C *param1); + struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1); THUMB_FUNC int FUN_0205FBE8(struct UnkStruct_0204639C *param0); THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, void **param1, @@ -99,9 +99,9 @@ THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, u8 param7); THUMB_FUNC u32 FUN_0205FC9C( - struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); + struct UnkCallbackStruct2_0205FA2C *param0, struct UnkSavStruct80 *param1); THUMB_FUNC u32 FUN_0205FCC4( - struct UnkCallbackStruct2_0205FA2C *param0, struct UnkStruct_0204639C *param1); + struct UnkCallbackStruct2_0205FA2C *param0, struct UnkSavStruct80 *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); @@ -118,4 +118,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 -- cgit v1.2.3 From 6b6c7eab5f18fb21b6ca40795b1042d3bcf85ff3 Mon Sep 17 00:00:00 2001 From: fyren Date: Sat, 1 May 2021 12:09:14 +0200 Subject: decompile unk_0206015C --- include/unk_0206015C.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 include/unk_0206015C.h (limited to 'include') diff --git a/include/unk_0206015C.h b/include/unk_0206015C.h new file mode 100644 index 00000000..75d75c53 --- /dev/null +++ b/include/unk_0206015C.h @@ -0,0 +1,60 @@ +#include "global.h" +#include "script.h" +#include "main.h" +#include "unk_0204639C.h" +#include "heap.h" +#include "event_data.h" + +/* Note to future reader, there might be some errors + in the return type / parameters. They are right for this code + but they might not be for every code, please do not blindly + trust these prototypes if you are decompiling these functions. */ +extern THUMB_FUNC u32 MOD06_02244DB0(u32); +extern THUMB_FUNC void MOD06_02244DBC(void*); +extern THUMB_FUNC void MOD06_02244DC4(void*, void*); +extern THUMB_FUNC void MOD06_02244EF8(void*); +extern THUMB_FUNC void MOD06_02244F18(void*); +extern THUMB_FUNC BOOL MOD06_02244F24(void*); +extern THUMB_FUNC void MOD06_02244F2C(void*); +extern THUMB_FUNC void* MOD06_02245088(struct UnkSavStruct80 * savStruct); +extern THUMB_FUNC u32 MOD06_02245114(u32, struct UnkSavStruct80*); +extern THUMB_FUNC void MOD06_02245190(u32); +extern THUMB_FUNC void MOD06_02245198(u8, u32); +extern THUMB_FUNC u32 MOD06_022451F0(u32); + +extern THUMB_FUNC void FUN_020054C8(u32); +extern THUMB_FUNC void FUN_02049160(struct UnkStruct_0204639C*, u32); +extern THUMB_FUNC void FUN_0204AF84(struct UnkStruct_0204639C*); +extern THUMB_FUNC void FUN_0204AF3C(struct UnkStruct_0204639C *); +extern THUMB_FUNC void FUN_0204AFC8(struct UnkStruct_0204639C *); +extern THUMB_FUNC void FUN_0204B00C(struct UnkStruct_0204639C *); +extern THUMB_FUNC void FUN_0204C1B4(struct UnkStruct_0204639C*, u32,u32,u32,u32,u32,u32,u32); +extern THUMB_FUNC u32 FUN_020553A0(u32); +extern THUMB_FUNC void FUN_0205889C(u32, u32); +extern THUMB_FUNC void FUN_0205F1C4(struct ScriptState *); +extern THUMB_FUNC void FUN_0205F1D4(struct ScriptState *); +extern THUMB_FUNC void FUN_0206367C(struct UnkSavStruct80 *, u32); + + +struct UnkStruct_0206015C +{ + u32 unk0; + u32 unk4; + u32 unk8; + u8 unkC; + u8 unkD; +}; + +struct UnkStruct_0204652C +{ + void* unk0; + u32 unk4; + u32 unk8; + u8 action; + u8 unkD; // some kind of counter? + u8 unkE; // some kind of counter? +}; + +THUMB_FUNC void FUN_0206015C(struct UnkSavStruct80* savStruct); +THUMB_FUNC BOOL FUN_02060194(struct UnkStruct_0204639C * unkStruct0); + -- cgit v1.2.3 From ce5a50546d48ebe03adee670db617ec0deb30060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 1 May 2021 12:59:57 +0200 Subject: decompile unk_02031734.s --- include/unk_02031734.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 include/unk_02031734.h (limited to 'include') diff --git a/include/unk_02031734.h b/include/unk_02031734.h new file mode 100644 index 00000000..0bfdc910 --- /dev/null +++ b/include/unk_02031734.h @@ -0,0 +1,223 @@ +#ifndef POKEDIAMOND_UNK_02031734_H +#define POKEDIAMOND_UNK_02031734_H + + +#include "global.h" +#include "MI_memory.h" +#include "heap.h" +#include "player_data.h" +#include "unk_0202F150.h" +#include "game_init.h" +#include "unk_0202F150.h" + + +struct UnkStruct_02031734_const1 +{ + u32 unk00[3]; +}; + +struct UnkStruct_02031734_const2 +{ + u32 unk00[2]; +}; + + +struct UnkStruct_02031734 +{ + void *unk00; + u8 unk04[6]; + s64 unk0C; + s64 unk14; + s64 unk1C; + void (*unk24)(); + struct SaveBlock2 *unk28; + struct PlayerData *unk2C; + u32 unk30; + u32 unk34; + u16 unk38; + u16 unk3A; + u8 unk3C; + u8 unk3D; + u8 unk3E; + u8 unk3F; + u8 unk40; + u8 unk41; + u8 unk42; + u8 unk43; + u8 unk44; + u8 unk45; + u8 unk46; + u8 unk47; + u8 unk48; + u8 unk49; + u8 unk4A; + u8 unk4B; + u8 unk4C; + u8 unk4D; + u8 unk4E; + u8 unk4F; +}; + + + + +THUMB_FUNC void FUN_02031734(struct SaveBlock2 *sav2, u8 param1); +THUMB_FUNC void FUN_020317C0(); +THUMB_FUNC BOOL FUN_02031810(); +THUMB_FUNC void FUN_02031824(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_02031860(); +THUMB_FUNC void FUN_02031880(); +THUMB_FUNC void FUN_020318A4(u8 param0); +THUMB_FUNC void FUN_020318B4(); +THUMB_FUNC BOOL FUN_020318C4(); +THUMB_FUNC void FUN_02031914(); +THUMB_FUNC void FUN_02031924(); +THUMB_FUNC void FUN_02031934(); +THUMB_FUNC void FUN_02031948(struct SaveBlock2 *sav2, u8 param1, u8 param2, u32 param3); +THUMB_FUNC void FUN_02031990(struct SaveBlock2 *sav2, u8 param1, u8 param2, u32 param3); +THUMB_FUNC void FUN_020319D8(u8 param0); +THUMB_FUNC void FUN_020319F4(); +THUMB_FUNC void FUN_02031A08(); +THUMB_FUNC void FUN_02031A24(); +THUMB_FUNC BOOL FUN_02031A2C(); +THUMB_FUNC void FUN_02031A7C(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_02031AC8(u8 param0); +THUMB_FUNC s32 FUN_02031AF4(); +THUMB_FUNC BOOL FUN_02031B2C(); +THUMB_FUNC void FUN_02031B50(); +THUMB_FUNC u32 FUN_02031BD0(); +THUMB_FUNC void FUN_02031BF4(); +THUMB_FUNC void FUN_02031C10(); +THUMB_FUNC void FUN_02031C2C(); +THUMB_FUNC void FUN_02031C54(); +THUMB_FUNC void FUN_02031C64(); +THUMB_FUNC void FUN_02031C74(struct SaveBlock2 *sav2, u8 param1); +THUMB_FUNC void FUN_02031CA8(struct SaveBlock2 *sav2, u8 param1); +THUMB_FUNC void FUN_02031CDC(); +THUMB_FUNC void FUN_02031D20(void (*param0)(), u16 param1); +THUMB_FUNC void FUN_02031D30(); +THUMB_FUNC void FUN_02031E08(); +THUMB_FUNC void FUN_02031E8C(); +THUMB_FUNC void FUN_02031EE0(); +THUMB_FUNC void FUN_02031F60(); +THUMB_FUNC void FUN_02031FC8(); +THUMB_FUNC void FUN_02032028(); +THUMB_FUNC void FUN_02032040(); +THUMB_FUNC void FUN_02032058(); +THUMB_FUNC void FUN_020320C4(); +THUMB_FUNC void FUN_02032118(); +THUMB_FUNC void FUN_02032138(); +THUMB_FUNC void FUN_0203213C(); +THUMB_FUNC void FUN_02032140(); +THUMB_FUNC void FUN_02032178(); +THUMB_FUNC void FUN_02032194(); +THUMB_FUNC void FUN_020321B8(); +THUMB_FUNC void FUN_020321D0(); +THUMB_FUNC void FUN_02032218(); +THUMB_FUNC void FUN_02032234(); +THUMB_FUNC void FUN_0203224C(); +THUMB_FUNC void FUN_02032290(); +THUMB_FUNC void FUN_02032298(); +THUMB_FUNC void FUN_020322C0(); +THUMB_FUNC void FUN_020322F8(); +THUMB_FUNC void FUN_0203230C(); +THUMB_FUNC void FUN_0203234C(); +THUMB_FUNC void FUN_02032364(); +THUMB_FUNC void FUN_02032378(); +THUMB_FUNC void FUN_020323B8(); +THUMB_FUNC void FUN_020323BC(); +THUMB_FUNC void FUN_020323CC(); +THUMB_FUNC void FUN_020323DC(); +THUMB_FUNC void FUN_02032424(); +THUMB_FUNC void FUN_02032440(); +THUMB_FUNC void FUN_02032478(); +THUMB_FUNC void FUN_020324C8(); +THUMB_FUNC void FUN_020324F8(); +THUMB_FUNC void FUN_02032510(); +THUMB_FUNC void FUN_02032578(); +THUMB_FUNC void FUN_020325D0(); +THUMB_FUNC void FUN_02032628(); +THUMB_FUNC void FUN_02032640(); +THUMB_FUNC void FUN_0203266C(); +THUMB_FUNC void FUN_020326D0(); +THUMB_FUNC void FUN_02032738(); +THUMB_FUNC void FUN_0203279C(); +THUMB_FUNC void FUN_020327B4(); +THUMB_FUNC void FUN_020327B8(); +THUMB_FUNC void FUN_020327FC(); +THUMB_FUNC void FUN_02032850(); +THUMB_FUNC void FUN_02032888(); +THUMB_FUNC void FUN_020328C0(u8 param0); +THUMB_FUNC void FUN_020328E4(); +THUMB_FUNC void FUN_020328F4(u8 param0); +THUMB_FUNC void FUN_02032924(); +THUMB_FUNC void FUN_0203293C(); +THUMB_FUNC void FUN_02032978(); +THUMB_FUNC void FUN_020329F4(); +THUMB_FUNC void FUN_02032A8C(u8 param0, u32 param1, u8 *param2); +THUMB_FUNC void FUN_02032AEC(u32 param0, u32 param1, u8 *param2); +THUMB_FUNC u32 FUN_02032B68(); +THUMB_FUNC void FUN_02032B6C(u8 param0); +THUMB_FUNC void FUN_02032B84(); +THUMB_FUNC void FUN_02032B8C(); +THUMB_FUNC void FUN_02032BD0(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_02032C0C(); +THUMB_FUNC u32 FUN_02032C28(); +THUMB_FUNC void FUN_02032C6C(u32 param0, u32 param1); +THUMB_FUNC void FUN_02032CF4(); +THUMB_FUNC void FUN_02032D44(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_02032D80(); +THUMB_FUNC u8 FUN_02032D9C(); +THUMB_FUNC BOOL FUN_02032DAC(); +THUMB_FUNC void FUN_02032E00(); +THUMB_FUNC void FUN_02032E48(); +THUMB_FUNC void FUN_02032E8C(); +THUMB_FUNC void FUN_02032E90(); +THUMB_FUNC void FUN_02032EA8(); +THUMB_FUNC void FUN_02032EAC(); +THUMB_FUNC void FUN_02032EB0(); +THUMB_FUNC void FUN_02032F20(u32 param0); +THUMB_FUNC void FUN_02032F34(); +THUMB_FUNC void FUN_02032F98(); +THUMB_FUNC u32 FUN_02032FDC(u8 param0); +THUMB_FUNC u32 FUN_0203300C(); +THUMB_FUNC void FUN_02033060(); +THUMB_FUNC void FUN_020330A0(); +THUMB_FUNC void FUN_020330E4(); +THUMB_FUNC u8 FUN_02033128(); +THUMB_FUNC u32 FUN_02033138(); +THUMB_FUNC u32 FUN_02033154(); +THUMB_FUNC u32 FUN_02033180(); +THUMB_FUNC void FUN_0203318C(); +THUMB_FUNC void FUN_020331C4(); +THUMB_FUNC void FUN_020331E8(); +THUMB_FUNC void FUN_02033208(); +THUMB_FUNC void FUN_0203323C(); +THUMB_FUNC u32 FUN_02033250(); +THUMB_FUNC void FUN_02033288(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_020332DC(); +THUMB_FUNC void FUN_02033310(struct SaveBlock2 *sav2); +THUMB_FUNC void FUN_02033364(); +THUMB_FUNC u32 FUN_02033398(); +THUMB_FUNC void FUN_020333F0(); +THUMB_FUNC void FUN_0203341C(); +THUMB_FUNC void *FUN_0203346C(struct SaveBlock2 *sav2, u32 param1); +THUMB_FUNC void *FUN_020334DC(); +THUMB_FUNC void FUN_020334E8(u8 param0, u8 param1); +THUMB_FUNC u8 FUN_02033510(); +THUMB_FUNC s32 FUN_02033534(); +THUMB_FUNC u8 FUN_0203354C(); +THUMB_FUNC void FUN_02033564(void *src); +THUMB_FUNC void FUN_02033578(void *dst); +THUMB_FUNC u32 FUN_02033590(); +THUMB_FUNC void FUN_020335A4(u8 param0); +THUMB_FUNC u8 FUN_020335B8(); +THUMB_FUNC void FUN_020335D0(s32 param0); +THUMB_FUNC void FUN_020335E0(); +THUMB_FUNC void FUN_020335F0(); +THUMB_FUNC void FUN_020335F4(); +THUMB_FUNC BOOL FUN_02033678(); +THUMB_FUNC u32 FUN_020336A0(u8 param0); + + +#endif //POKEDIAMOND_UNK_0202F150_H \ No newline at end of file -- cgit v1.2.3 From 56e5d2eac8ed953e9f52b5ae760fcfa72cc6a91e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 1 May 2021 13:00:21 +0200 Subject: remove obsolete externs --- include/unk_0202F150.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index 4542cdd1..49c58a52 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -105,7 +105,7 @@ THUMB_FUNC void FUN_0202FA5C(); THUMB_FUNC u32 FUN_0202FB18(u32 param0); THUMB_FUNC void FUN_0202FB20(); THUMB_FUNC void FUN_0202FB58(); -THUMB_FUNC u32 FUN_0202FB80(); +THUMB_FUNC BOOL FUN_0202FB80(); THUMB_FUNC void FUN_0202FC60(); THUMB_FUNC void FUN_0202FC80(); THUMB_FUNC void FUN_0202FCA8(); @@ -145,7 +145,7 @@ THUMB_FUNC void FUN_02030C8C(struct UnkStruct0202F150_sub1 *param0, THUMB_FUNC void FUN_02030DA4(); THUMB_FUNC void FUN_02030DFC(); THUMB_FUNC u32 FUN_02030E7C(u16 param0); -THUMB_FUNC u32 FUN_02030F20(); +THUMB_FUNC s32 FUN_02030F20(); THUMB_FUNC u32 FUN_02030F40(); THUMB_FUNC void FUN_02030F60(u8 param0); THUMB_FUNC u8 FUN_02030F74(u32 param0); -- cgit v1.2.3 From f447c9f02c12d2434f48ccf82cedfab0ea16b5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 1 May 2021 13:04:52 +0200 Subject: formatting --- include/unk_02031734.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/unk_02031734.h b/include/unk_02031734.h index 0bfdc910..c8098aec 100644 --- a/include/unk_02031734.h +++ b/include/unk_02031734.h @@ -1,15 +1,12 @@ #ifndef POKEDIAMOND_UNK_02031734_H #define POKEDIAMOND_UNK_02031734_H - #include "global.h" #include "MI_memory.h" +#include "game_init.h" #include "heap.h" #include "player_data.h" #include "unk_0202F150.h" -#include "game_init.h" -#include "unk_0202F150.h" - struct UnkStruct_02031734_const1 { @@ -21,7 +18,6 @@ struct UnkStruct_02031734_const2 u32 unk00[2]; }; - struct UnkStruct_02031734 { void *unk00; @@ -58,9 +54,6 @@ struct UnkStruct_02031734 u8 unk4F; }; - - - THUMB_FUNC void FUN_02031734(struct SaveBlock2 *sav2, u8 param1); THUMB_FUNC void FUN_020317C0(); THUMB_FUNC BOOL FUN_02031810(); @@ -219,5 +212,4 @@ THUMB_FUNC void FUN_020335F4(); THUMB_FUNC BOOL FUN_02033678(); THUMB_FUNC u32 FUN_020336A0(u8 param0); - -#endif //POKEDIAMOND_UNK_0202F150_H \ No newline at end of file +#endif // POKEDIAMOND_UNK_0202F150_H \ No newline at end of file -- cgit v1.2.3 From 62f567932f7e0eee6e8e354cde7e83472cb51887 Mon Sep 17 00:00:00 2001 From: fyren Date: Sat, 1 May 2021 23:07:29 +0200 Subject: fixing small issues in unk_0206015C --- include/unk_0206015C.h | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'include') diff --git a/include/unk_0206015C.h b/include/unk_0206015C.h index 75d75c53..e8a312c2 100644 --- a/include/unk_0206015C.h +++ b/include/unk_0206015C.h @@ -1,40 +1,9 @@ +#ifndef UNK_0206015C_H_GUARD +#define UNK_0206015C_H_GUARD + #include "global.h" #include "script.h" -#include "main.h" #include "unk_0204639C.h" -#include "heap.h" -#include "event_data.h" - -/* Note to future reader, there might be some errors - in the return type / parameters. They are right for this code - but they might not be for every code, please do not blindly - trust these prototypes if you are decompiling these functions. */ -extern THUMB_FUNC u32 MOD06_02244DB0(u32); -extern THUMB_FUNC void MOD06_02244DBC(void*); -extern THUMB_FUNC void MOD06_02244DC4(void*, void*); -extern THUMB_FUNC void MOD06_02244EF8(void*); -extern THUMB_FUNC void MOD06_02244F18(void*); -extern THUMB_FUNC BOOL MOD06_02244F24(void*); -extern THUMB_FUNC void MOD06_02244F2C(void*); -extern THUMB_FUNC void* MOD06_02245088(struct UnkSavStruct80 * savStruct); -extern THUMB_FUNC u32 MOD06_02245114(u32, struct UnkSavStruct80*); -extern THUMB_FUNC void MOD06_02245190(u32); -extern THUMB_FUNC void MOD06_02245198(u8, u32); -extern THUMB_FUNC u32 MOD06_022451F0(u32); - -extern THUMB_FUNC void FUN_020054C8(u32); -extern THUMB_FUNC void FUN_02049160(struct UnkStruct_0204639C*, u32); -extern THUMB_FUNC void FUN_0204AF84(struct UnkStruct_0204639C*); -extern THUMB_FUNC void FUN_0204AF3C(struct UnkStruct_0204639C *); -extern THUMB_FUNC void FUN_0204AFC8(struct UnkStruct_0204639C *); -extern THUMB_FUNC void FUN_0204B00C(struct UnkStruct_0204639C *); -extern THUMB_FUNC void FUN_0204C1B4(struct UnkStruct_0204639C*, u32,u32,u32,u32,u32,u32,u32); -extern THUMB_FUNC u32 FUN_020553A0(u32); -extern THUMB_FUNC void FUN_0205889C(u32, u32); -extern THUMB_FUNC void FUN_0205F1C4(struct ScriptState *); -extern THUMB_FUNC void FUN_0205F1D4(struct ScriptState *); -extern THUMB_FUNC void FUN_0206367C(struct UnkSavStruct80 *, u32); - struct UnkStruct_0206015C { @@ -58,3 +27,4 @@ struct UnkStruct_0204652C THUMB_FUNC void FUN_0206015C(struct UnkSavStruct80* savStruct); THUMB_FUNC BOOL FUN_02060194(struct UnkStruct_0204639C * unkStruct0); +#endif //UNK_0206015C_H_GUARD -- cgit v1.2.3 From aaaa27e731b1a39fbb35e21ff88f4944d74c9f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 2 May 2021 09:54:51 +0200 Subject: replace nonmatchings with an inline function --- include/unk_02031734.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/unk_02031734.h b/include/unk_02031734.h index c8098aec..bcfc3f84 100644 --- a/include/unk_02031734.h +++ b/include/unk_02031734.h @@ -22,9 +22,7 @@ struct UnkStruct_02031734 { void *unk00; u8 unk04[6]; - s64 unk0C; - s64 unk14; - s64 unk1C; + s64 unk0C[3]; void (*unk24)(); struct SaveBlock2 *unk28; struct PlayerData *unk2C; @@ -54,6 +52,15 @@ struct UnkStruct_02031734 u8 unk4F; }; + +inline u32 compute(s64 *param0, u32 param1) +{ + param0[0] = param0[1] * param0[0] + param0[2]; + + return (u32)(((s64)((u64)(param0[0]) >> 32) * param1) >> 32); +} + + THUMB_FUNC void FUN_02031734(struct SaveBlock2 *sav2, u8 param1); THUMB_FUNC void FUN_020317C0(); THUMB_FUNC BOOL FUN_02031810(); @@ -87,7 +94,7 @@ THUMB_FUNC void FUN_02031C64(); THUMB_FUNC void FUN_02031C74(struct SaveBlock2 *sav2, u8 param1); THUMB_FUNC void FUN_02031CA8(struct SaveBlock2 *sav2, u8 param1); THUMB_FUNC void FUN_02031CDC(); -THUMB_FUNC void FUN_02031D20(void (*param0)(), u16 param1); +THUMB_FUNC void FUN_02031D20(void (*param0)(), u32 param1); THUMB_FUNC void FUN_02031D30(); THUMB_FUNC void FUN_02031E08(); THUMB_FUNC void FUN_02031E8C(); -- cgit v1.2.3 From a036306c5554d2d7088c07ea0c08c7b718a6508a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 2 May 2021 10:04:55 +0200 Subject: fix line endings --- include/unk_02031734.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/unk_02031734.h b/include/unk_02031734.h index bcfc3f84..53b1e0b7 100644 --- a/include/unk_02031734.h +++ b/include/unk_02031734.h @@ -219,4 +219,4 @@ THUMB_FUNC void FUN_020335F4(); THUMB_FUNC BOOL FUN_02033678(); THUMB_FUNC u32 FUN_020336A0(u8 param0); -#endif // POKEDIAMOND_UNK_0202F150_H \ No newline at end of file +#endif // POKEDIAMOND_UNK_0202F150_H -- cgit v1.2.3 From fe7f18002c7987ef744b5024151ca0903e4317fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 2 May 2021 10:14:04 +0200 Subject: cleanup header --- include/unk_02031734.h | 321 ++++++++++++++++++++++++------------------------- 1 file changed, 157 insertions(+), 164 deletions(-) (limited to 'include') diff --git a/include/unk_02031734.h b/include/unk_02031734.h index 53b1e0b7..baf3901f 100644 --- a/include/unk_02031734.h +++ b/include/unk_02031734.h @@ -2,11 +2,6 @@ #define POKEDIAMOND_UNK_02031734_H #include "global.h" -#include "MI_memory.h" -#include "game_init.h" -#include "heap.h" -#include "player_data.h" -#include "unk_0202F150.h" struct UnkStruct_02031734_const1 { @@ -52,7 +47,6 @@ struct UnkStruct_02031734 u8 unk4F; }; - inline u32 compute(s64 *param0, u32 param1) { param0[0] = param0[1] * param0[0] + param0[2]; @@ -60,163 +54,162 @@ inline u32 compute(s64 *param0, u32 param1) return (u32)(((s64)((u64)(param0[0]) >> 32) * param1) >> 32); } - -THUMB_FUNC void FUN_02031734(struct SaveBlock2 *sav2, u8 param1); -THUMB_FUNC void FUN_020317C0(); -THUMB_FUNC BOOL FUN_02031810(); -THUMB_FUNC void FUN_02031824(struct SaveBlock2 *sav2); -THUMB_FUNC void FUN_02031860(); -THUMB_FUNC void FUN_02031880(); -THUMB_FUNC void FUN_020318A4(u8 param0); -THUMB_FUNC void FUN_020318B4(); -THUMB_FUNC BOOL FUN_020318C4(); -THUMB_FUNC void FUN_02031914(); -THUMB_FUNC void FUN_02031924(); -THUMB_FUNC void FUN_02031934(); -THUMB_FUNC void FUN_02031948(struct SaveBlock2 *sav2, u8 param1, u8 param2, u32 param3); -THUMB_FUNC void FUN_02031990(struct SaveBlock2 *sav2, u8 param1, u8 param2, u32 param3); -THUMB_FUNC void FUN_020319D8(u8 param0); -THUMB_FUNC void FUN_020319F4(); -THUMB_FUNC void FUN_02031A08(); -THUMB_FUNC void FUN_02031A24(); -THUMB_FUNC BOOL FUN_02031A2C(); -THUMB_FUNC void FUN_02031A7C(struct SaveBlock2 *sav2); -THUMB_FUNC void FUN_02031AC8(u8 param0); -THUMB_FUNC s32 FUN_02031AF4(); -THUMB_FUNC BOOL FUN_02031B2C(); -THUMB_FUNC void FUN_02031B50(); -THUMB_FUNC u32 FUN_02031BD0(); -THUMB_FUNC void FUN_02031BF4(); -THUMB_FUNC void FUN_02031C10(); -THUMB_FUNC void FUN_02031C2C(); -THUMB_FUNC void FUN_02031C54(); -THUMB_FUNC void FUN_02031C64(); -THUMB_FUNC void FUN_02031C74(struct SaveBlock2 *sav2, u8 param1); -THUMB_FUNC void FUN_02031CA8(struct SaveBlock2 *sav2, u8 param1); -THUMB_FUNC void FUN_02031CDC(); -THUMB_FUNC void FUN_02031D20(void (*param0)(), u32 param1); -THUMB_FUNC void FUN_02031D30(); -THUMB_FUNC void FUN_02031E08(); -THUMB_FUNC void FUN_02031E8C(); -THUMB_FUNC void FUN_02031EE0(); -THUMB_FUNC void FUN_02031F60(); -THUMB_FUNC void FUN_02031FC8(); -THUMB_FUNC void FUN_02032028(); -THUMB_FUNC void FUN_02032040(); -THUMB_FUNC void FUN_02032058(); -THUMB_FUNC void FUN_020320C4(); -THUMB_FUNC void FUN_02032118(); -THUMB_FUNC void FUN_02032138(); -THUMB_FUNC void FUN_0203213C(); -THUMB_FUNC void FUN_02032140(); -THUMB_FUNC void FUN_02032178(); -THUMB_FUNC void FUN_02032194(); -THUMB_FUNC void FUN_020321B8(); -THUMB_FUNC void FUN_020321D0(); -THUMB_FUNC void FUN_02032218(); -THUMB_FUNC void FUN_02032234(); -THUMB_FUNC void FUN_0203224C(); -THUMB_FUNC void FUN_02032290(); -THUMB_FUNC void FUN_02032298(); -THUMB_FUNC void FUN_020322C0(); -THUMB_FUNC void FUN_020322F8(); -THUMB_FUNC void FUN_0203230C(); -THUMB_FUNC void FUN_0203234C(); -THUMB_FUNC void FUN_02032364(); -THUMB_FUNC void FUN_02032378(); -THUMB_FUNC void FUN_020323B8(); -THUMB_FUNC void FUN_020323BC(); -THUMB_FUNC void FUN_020323CC(); -THUMB_FUNC void FUN_020323DC(); -THUMB_FUNC void FUN_02032424(); -THUMB_FUNC void FUN_02032440(); -THUMB_FUNC void FUN_02032478(); -THUMB_FUNC void FUN_020324C8(); -THUMB_FUNC void FUN_020324F8(); -THUMB_FUNC void FUN_02032510(); -THUMB_FUNC void FUN_02032578(); -THUMB_FUNC void FUN_020325D0(); -THUMB_FUNC void FUN_02032628(); -THUMB_FUNC void FUN_02032640(); -THUMB_FUNC void FUN_0203266C(); -THUMB_FUNC void FUN_020326D0(); -THUMB_FUNC void FUN_02032738(); -THUMB_FUNC void FUN_0203279C(); -THUMB_FUNC void FUN_020327B4(); -THUMB_FUNC void FUN_020327B8(); -THUMB_FUNC void FUN_020327FC(); -THUMB_FUNC void FUN_02032850(); -THUMB_FUNC void FUN_02032888(); -THUMB_FUNC void FUN_020328C0(u8 param0); -THUMB_FUNC void FUN_020328E4(); -THUMB_FUNC void FUN_020328F4(u8 param0); -THUMB_FUNC void FUN_02032924(); -THUMB_FUNC void FUN_0203293C(); -THUMB_FUNC void FUN_02032978(); -THUMB_FUNC void FUN_020329F4(); -THUMB_FUNC void FUN_02032A8C(u8 param0, u32 param1, u8 *param2); -THUMB_FUNC void FUN_02032AEC(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC u32 FUN_02032B68(); -THUMB_FUNC void FUN_02032B6C(u8 param0); -THUMB_FUNC void FUN_02032B84(); -THUMB_FUNC void FUN_02032B8C(); -THUMB_FUNC void FUN_02032BD0(struct SaveBlock2 *sav2); -THUMB_FUNC void FUN_02032C0C(); -THUMB_FUNC u32 FUN_02032C28(); -THUMB_FUNC void FUN_02032C6C(u32 param0, u32 param1); -THUMB_FUNC void FUN_02032CF4(); -THUMB_FUNC void FUN_02032D44(struct SaveBlock2 *sav2); -THUMB_FUNC void FUN_02032D80(); -THUMB_FUNC u8 FUN_02032D9C(); -THUMB_FUNC BOOL FUN_02032DAC(); -THUMB_FUNC void FUN_02032E00(); -THUMB_FUNC void FUN_02032E48(); -THUMB_FUNC void FUN_02032E8C(); -THUMB_FUNC void FUN_02032E90(); -THUMB_FUNC void FUN_02032EA8(); -THUMB_FUNC void FUN_02032EAC(); -THUMB_FUNC void FUN_02032EB0(); -THUMB_FUNC void FUN_02032F20(u32 param0); -THUMB_FUNC void FUN_02032F34(); -THUMB_FUNC void FUN_02032F98(); -THUMB_FUNC u32 FUN_02032FDC(u8 param0); -THUMB_FUNC u32 FUN_0203300C(); -THUMB_FUNC void FUN_02033060(); -THUMB_FUNC void FUN_020330A0(); -THUMB_FUNC void FUN_020330E4(); -THUMB_FUNC u8 FUN_02033128(); -THUMB_FUNC u32 FUN_02033138(); -THUMB_FUNC u32 FUN_02033154(); -THUMB_FUNC u32 FUN_02033180(); -THUMB_FUNC void FUN_0203318C(); -THUMB_FUNC void FUN_020331C4(); -THUMB_FUNC void FUN_020331E8(); -THUMB_FUNC void FUN_02033208(); -THUMB_FUNC void FUN_0203323C(); -THUMB_FUNC u32 FUN_02033250(); -THUMB_FUNC void FUN_02033288(struct SaveBlock2 *sav2); -THUMB_FUNC void FUN_020332DC(); -THUMB_FUNC void FUN_02033310(struct SaveBlock2 *sav2); -THUMB_FUNC void FUN_02033364(); -THUMB_FUNC u32 FUN_02033398(); -THUMB_FUNC void FUN_020333F0(); -THUMB_FUNC void FUN_0203341C(); -THUMB_FUNC void *FUN_0203346C(struct SaveBlock2 *sav2, u32 param1); -THUMB_FUNC void *FUN_020334DC(); -THUMB_FUNC void FUN_020334E8(u8 param0, u8 param1); -THUMB_FUNC u8 FUN_02033510(); -THUMB_FUNC s32 FUN_02033534(); -THUMB_FUNC u8 FUN_0203354C(); -THUMB_FUNC void FUN_02033564(void *src); -THUMB_FUNC void FUN_02033578(void *dst); -THUMB_FUNC u32 FUN_02033590(); -THUMB_FUNC void FUN_020335A4(u8 param0); -THUMB_FUNC u8 FUN_020335B8(); -THUMB_FUNC void FUN_020335D0(s32 param0); -THUMB_FUNC void FUN_020335E0(); -THUMB_FUNC void FUN_020335F0(); -THUMB_FUNC void FUN_020335F4(); -THUMB_FUNC BOOL FUN_02033678(); -THUMB_FUNC u32 FUN_020336A0(u8 param0); +void FUN_02031734(struct SaveBlock2 *sav2, u8 param1); +void FUN_020317C0(); +BOOL FUN_02031810(); +void FUN_02031824(struct SaveBlock2 *sav2); +void FUN_02031860(); +void FUN_02031880(); +void FUN_020318A4(u8 param0); +void FUN_020318B4(); +BOOL FUN_020318C4(); +void FUN_02031914(); +void FUN_02031924(); +void FUN_02031934(); +void FUN_02031948(struct SaveBlock2 *sav2, u8 param1, u8 param2, u32 param3); +void FUN_02031990(struct SaveBlock2 *sav2, u8 param1, u8 param2, u32 param3); +void FUN_020319D8(u8 param0); +void FUN_020319F4(); +void FUN_02031A08(); +void FUN_02031A24(); +BOOL FUN_02031A2C(); +void FUN_02031A7C(struct SaveBlock2 *sav2); +void FUN_02031AC8(u8 param0); +s32 FUN_02031AF4(); +BOOL FUN_02031B2C(); +void FUN_02031B50(); +u32 FUN_02031BD0(); +void FUN_02031BF4(); +void FUN_02031C10(); +void FUN_02031C2C(); +void FUN_02031C54(); +void FUN_02031C64(); +void FUN_02031C74(struct SaveBlock2 *sav2, u8 param1); +void FUN_02031CA8(struct SaveBlock2 *sav2, u8 param1); +void FUN_02031CDC(); +void FUN_02031D20(void (*param0)(), u32 param1); +void FUN_02031D30(); +void FUN_02031E08(); +void FUN_02031E8C(); +void FUN_02031EE0(); +void FUN_02031F60(); +void FUN_02031FC8(); +void FUN_02032028(); +void FUN_02032040(); +void FUN_02032058(); +void FUN_020320C4(); +void FUN_02032118(); +void FUN_02032138(); +void FUN_0203213C(); +void FUN_02032140(); +void FUN_02032178(); +void FUN_02032194(); +void FUN_020321B8(); +void FUN_020321D0(); +void FUN_02032218(); +void FUN_02032234(); +void FUN_0203224C(); +void FUN_02032290(); +void FUN_02032298(); +void FUN_020322C0(); +void FUN_020322F8(); +void FUN_0203230C(); +void FUN_0203234C(); +void FUN_02032364(); +void FUN_02032378(); +void FUN_020323B8(); +void FUN_020323BC(); +void FUN_020323CC(); +void FUN_020323DC(); +void FUN_02032424(); +void FUN_02032440(); +void FUN_02032478(); +void FUN_020324C8(); +void FUN_020324F8(); +void FUN_02032510(); +void FUN_02032578(); +void FUN_020325D0(); +void FUN_02032628(); +void FUN_02032640(); +void FUN_0203266C(); +void FUN_020326D0(); +void FUN_02032738(); +void FUN_0203279C(); +void FUN_020327B4(); +void FUN_020327B8(); +void FUN_020327FC(); +void FUN_02032850(); +void FUN_02032888(); +void FUN_020328C0(u8 param0); +void FUN_020328E4(); +void FUN_020328F4(u8 param0); +void FUN_02032924(); +void FUN_0203293C(); +void FUN_02032978(); +void FUN_020329F4(); +void FUN_02032A8C(u8 param0, u32 param1, u8 *param2); +void FUN_02032AEC(u32 param0, u32 param1, u8 *param2); +u32 FUN_02032B68(); +void FUN_02032B6C(u8 param0); +void FUN_02032B84(); +void FUN_02032B8C(); +void FUN_02032BD0(struct SaveBlock2 *sav2); +void FUN_02032C0C(); +u32 FUN_02032C28(); +void FUN_02032C6C(u32 param0, u32 param1); +void FUN_02032CF4(); +void FUN_02032D44(struct SaveBlock2 *sav2); +void FUN_02032D80(); +u8 FUN_02032D9C(); +BOOL FUN_02032DAC(); +void FUN_02032E00(); +void FUN_02032E48(); +void FUN_02032E8C(); +void FUN_02032E90(); +void FUN_02032EA8(); +void FUN_02032EAC(); +void FUN_02032EB0(); +void FUN_02032F20(u32 param0); +void FUN_02032F34(); +void FUN_02032F98(); +u32 FUN_02032FDC(u8 param0); +u32 FUN_0203300C(); +void FUN_02033060(); +void FUN_020330A0(); +void FUN_020330E4(); +u8 FUN_02033128(); +u32 FUN_02033138(); +u32 FUN_02033154(); +u32 FUN_02033180(); +void FUN_0203318C(); +void FUN_020331C4(); +void FUN_020331E8(); +void FUN_02033208(); +void FUN_0203323C(); +u32 FUN_02033250(); +void FUN_02033288(struct SaveBlock2 *sav2); +void FUN_020332DC(); +void FUN_02033310(struct SaveBlock2 *sav2); +void FUN_02033364(); +u32 FUN_02033398(); +void FUN_020333F0(); +void FUN_0203341C(); +void *FUN_0203346C(struct SaveBlock2 *sav2, u32 param1); +void *FUN_020334DC(); +void FUN_020334E8(u8 param0, u8 param1); +u8 FUN_02033510(); +s32 FUN_02033534(); +u8 FUN_0203354C(); +void FUN_02033564(void *src); +void FUN_02033578(void *dst); +u32 FUN_02033590(); +void FUN_020335A4(u8 param0); +u8 FUN_020335B8(); +void FUN_020335D0(s32 param0); +void FUN_020335E0(); +void FUN_020335F0(); +void FUN_020335F4(); +BOOL FUN_02033678(); +u32 FUN_020336A0(u8 param0); #endif // POKEDIAMOND_UNK_0202F150_H -- cgit v1.2.3 From 6120ebe7e78f500432708631891feb32bc974be2 Mon Sep 17 00:00:00 2001 From: tgsm Date: Mon, 3 May 2021 08:19:11 -0400 Subject: Decompile scrcmd_21 -> scrcmd_flags --- include/scrcmd.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 120a0c96..f895323f 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -220,6 +220,28 @@ BOOL ScrCmd_Unk01F3(struct ScriptContext* ctx); //scrcmd_20.c BOOL ScrCmd_Unk02A6(struct ScriptContext* ctx); +//scrcmd_flags.c +BOOL ScrCmd_HasSinnohDex(struct ScriptContext* ctx); +BOOL ScrCmd_GiveSinnohDex(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0159(struct ScriptContext* ctx); +BOOL ScrCmd_Unk015A(struct ScriptContext* ctx); +BOOL ScrCmd_HasBadge(struct ScriptContext* ctx); +BOOL ScrCmd_GiveBadge(struct ScriptContext* ctx); +BOOL ScrCmd_Unk015E(struct ScriptContext* ctx); +BOOL ScrCmd_GetTotalEarnedBadges(struct ScriptContext* ctx); +BOOL ScrCmd_Unk015F(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0160(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0161(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0162(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0163(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0164(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0165(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0166(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0167(struct ScriptContext* ctx); +BOOL ScrCmd_Unk01CF(struct ScriptContext* ctx); +BOOL ScrCmd_Unk01D0(struct ScriptContext* ctx); +BOOL ScrCmd_Unk01D1(struct ScriptContext* ctx); + //scrcmd_items.c BOOL ScrCmd_GiveItem(struct ScriptContext* ctx); BOOL ScrCmd_TakeItem(struct ScriptContext* ctx); -- cgit v1.2.3 From fead56db333c9eb3024ad4483c26a11a66ffe9f1 Mon Sep 17 00:00:00 2001 From: tgsm Date: Wed, 5 May 2021 14:10:45 -0400 Subject: Decompile unk_0208890C --- include/script.h | 4 +++- include/unk_0208890C.h | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 include/unk_0208890C.h (limited to 'include') diff --git a/include/script.h b/include/script.h index bb237523..cb41889d 100644 --- a/include/script.h +++ b/include/script.h @@ -37,7 +37,9 @@ struct UnkSavStruct80 u32 unk60; u8 padding5[0x14]; u32 unk78; - u8 padding6[0x2C]; + u8 padding6[0x1C]; + void *unk98; + u8 padding7[0xC]; struct UnkStruct_02046444 * unkA8; }; diff --git a/include/unk_0208890C.h b/include/unk_0208890C.h new file mode 100644 index 00000000..9ec040a1 --- /dev/null +++ b/include/unk_0208890C.h @@ -0,0 +1,25 @@ +#ifndef POKEDIAMOND_UNK_0208890C_H +#define POKEDIAMOND_UNK_0208890C_H + +struct Bag; +struct Options; +struct PlayerData; +struct SaveBlock2; + +struct UnkStruct_0208890C +{ + u8 padding[0x4]; + void* unk4; + void* unk8; + struct SaveBlock2* sav2; + struct PlayerData* player; + struct Bag* bag; + struct Options* options; + void* unk1C; +}; + +struct UnkStruct_0208890C* FUN_0208890C(void*, struct SaveBlock2* sav2, u32 heap_id, void*); +void FUN_02088950(struct UnkSavStruct80*, struct UnkStruct_0208890C*); +struct UnkStruct_0208890C* FUN_02088960(struct UnkSavStruct80*, void*, u32 heap_id); + +#endif -- cgit v1.2.3 From 5cdb95f4e0fb866fdbf219ab112d69be21c59a2e Mon Sep 17 00:00:00 2001 From: tgsm Date: Fri, 7 May 2021 13:32:25 -0400 Subject: Decompile scrcmd_8 --- include/scrcmd.h | 3 +++ include/unk_020286F8.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index f895323f..86bb4f51 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -150,6 +150,9 @@ BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx); BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx); BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx); +//scrcmd_8.c +BOOL ScrCmd_Unk021D(struct ScriptContext* ctx); + //scrcmd_11.c BOOL ScrCmd_Unk017D(struct ScriptContext* ctx); BOOL ScrCmd_Unk017E(struct ScriptContext* ctx); diff --git a/include/unk_020286F8.h b/include/unk_020286F8.h index 3d81753a..99ecd982 100644 --- a/include/unk_020286F8.h +++ b/include/unk_020286F8.h @@ -21,10 +21,10 @@ void FUN_02028788(struct UnkSaveStruct_020286F8 * ptr, u32 i, u32 j); u32 FUN_020287A4(struct UnkSaveStruct_020286F8 * ptr); u16 * FUN_020287A8(struct UnkSaveStruct_020286F8 * ptr, u32 i, u32 j); void FUN_020287C0(struct UnkSaveStruct_020286F8 * ptr, u32 i, u32 j, struct String * k); -void FUN_020287EC(struct UnkSaveStruct_020286F8 * ptr, u32 i, u8 j); +void FUN_020287EC(struct UnkSaveStruct_020286F8 * ptr, u32 i, u32 j); u8 FUN_020287F8(struct UnkSaveStruct_020286F8 * ptr, u32 i); u8 FUN_02028804(struct UnkSaveStruct_020286F8 * ptr, u32 i); -void FUN_02028810(struct UnkSaveStruct_020286F8 * ptr, u32 i, u8 j); +void FUN_02028810(struct UnkSaveStruct_020286F8 * ptr, u32 i, u32 j); struct UnkSaveStruct_020286F8 * FUN_0202881C(struct SaveBlock2 * sav2); BOOL FUN_02028828(struct UnkSaveStruct_020286F8 * ptr, u32 i); BOOL FUN_02028840(struct UnkSaveStruct_020286F8 * ptr, int i); -- cgit v1.2.3 From 0d99c3cbc17514149081de794f2d5ec55e7ab88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 8 May 2021 12:04:27 +0200 Subject: decompile unk_0202E29C.s --- include/unk_0202E29C.h | 137 +++++++++++++++++++++++++++++++++++++++++++++++++ include/unk_0202F150.h | 6 +-- 2 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 include/unk_0202E29C.h (limited to 'include') diff --git a/include/unk_0202E29C.h b/include/unk_0202E29C.h new file mode 100644 index 00000000..d755d3f5 --- /dev/null +++ b/include/unk_0202E29C.h @@ -0,0 +1,137 @@ +#ifndef POKEDIAMOND_UNK_0202E29C_H +#define POKEDIAMOND_UNK_0202E29C_H + +#include "global.h" +#include "mail_message.h" +#include "player_data.h" + +struct UnkStruct2_sub4 { + u32 unk00; + u8 unk04; + u8 unk05; + u8 unk06; + u8 unk07; + u8 unk08[8]; + struct PlayerData unk10; + u8 unk30[0x40]; +}; + +struct UnkStruct2_sub +{ + u32 unk00; + u8 unk04[6]; + u8 unk0A[0x2C]; + u16 unk36; + u8 unk38[0x18]; + struct UnkStruct2_sub4 unk50; +}; + +struct UnkStruct2_sub3 +{ + struct MailMessage unk00; + struct PlayerData unk08; + u8 unk28[0x20]; + u8 unk48[0x4]; + u8 unk4C; + u8 unk4D[7]; +}; + +struct UnkStruct2_sub2 +{ + u32 unk00; + u8 unk04; + u8 unk05; + u8 unk06; + struct UnkStruct2_sub3 unk08; +}; + +struct UnkStruct2 +{ + struct UnkStruct2_sub3 unk000; + struct UnkStruct2_sub unk054[16]; + u8 unkC54[8][6]; + u16 unkC84[16]; + void *unkCA4; + struct MailMessage unkCA8; + u32 unkCB0; + u8 unkCB4; + struct PlayerData *unkCB8; + void *unkCBC; + u32 unkCC0; + struct UnkStruct2_sub2 unkCC4; + u8 unkD20[0x84]; + u16 unkDA4; + u16 unkDA6; + u8 unkDA8; + u8 unkDA9; + u8 unkDAA; + u8 unkDAB; + u8 unkDAC; + u8 unkDAD; + u8 unkDAE[0x2]; +}; + + +void FUN_0202E29C(struct PlayerData *player_data); +BOOL FUN_0202E344(); +BOOL FUN_0202E358(u8 *param0, u8 *param1, s32 param2); +void FUN_0202E380(struct UnkStruct2_sub *param0, u32 param1); +void FUN_0202E470(u32 param0, u32 param1); +void FUN_0202E488(); +void FUN_0202E49C(); +BOOL FUN_0202E4C8(); +BOOL FUN_0202E4DC(); +void FUN_0202E4F0(); +void FUN_0202E500(); +void FUN_0202E538(); +void FUN_0202E56C(u32 param0); +void FUN_0202E594(); +BOOL FUN_0202E5F8(u32 param0, u32 param1, u32 param2); +u32 FUN_0202E66C(u32 param0, u32 param1); +u32 FUN_0202E6F0(); +BOOL FUN_0202E784(); +void FUN_0202E7B0(u32 param0); +void FUN_0202E7D8(); +u32 FUN_0202E810(); +s32 FUN_0202E844(u32 param0); +u8 FUN_0202E878(); +void FUN_0202E88C(); +s32 FUN_0202E8A0(s32 param0); +s32 FUN_0202E8D0(s32 param0); +s32 FUN_0202E8F4(); +s32 FUN_0202E950(); +void FUN_0202E9AC(u32 param0, struct PlayerData *player_data); +u32 FUN_0202E9E8(u32 param0); +void FUN_0202EA54(); +void FUN_0202EA9C(); +void FUN_0202EB7C(); +void FUN_0202EBD0(u16 param0); +void FUN_0202ED70(u16 param0); +u32 FUN_0202ED84(u16 param0); +u32 FUN_0202EDB8(); +BOOL FUN_0202EDD8(); +BOOL FUN_0202EDF8(); +u32 FUN_0202EE0C(); +u32 FUN_0202EE24(); +BOOL FUN_0202EE44(); +BOOL FUN_0202EE60(); +void FUN_0202EE84(u32 param0); +void FUN_0202EEB0(u32 param0); +u32 FUN_0202EEE8(u16 param0); +struct UnkStruct2_sub *FUN_0202EF18(u32 param0); +struct UnkStruct2_sub4 *FUN_0202EF44(s32 param0); +struct PlayerData *FUN_0202EF70(); +struct PlayerData *FUN_0202EF84(int param0); +void FUN_0202EFAC(u8 *param0, s32 param1); +BOOL FUN_0202EFE4(u8 *param0); +u32 FUN_0202F03C(); +void FUN_0202F05C(); +void FUN_0202F078(struct MailMessage *mail_message); +void FUN_0202F094(void *param0); +void FUN_0202F0B8(); +u32 FUN_0202F0DC(u8 param0); +BOOL FUN_0202F104(); +void FUN_0202F10C(struct UnkStruct2_sub3 *param0); +u8 *FUN_0202F124(u32 param0); + +#endif // POKEDIAMOND_UNK_0202E29C_H diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index 49c58a52..4e19812a 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -113,10 +113,10 @@ THUMB_FUNC void FUN_0202FCCC(); THUMB_FUNC u32 FUN_0202FE2C(int param0); THUMB_FUNC void FUN_0202FEEC(); THUMB_FUNC void FUN_02030074(); -THUMB_FUNC void FUN_02030238(u32 param0, void *param1, u32 param2); +THUMB_FUNC void FUN_02030238(u32 param0, u8 *param1, u32 param2); THUMB_FUNC void FUN_0203026C(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_020303BC(u32 param0, u8 *param1, u16 param2); -THUMB_FUNC void FUN_020303F4(u32 param0, u8 *param1, u16 param2); +THUMB_FUNC void FUN_020303BC(u32 param0, u8 *param1, u32 param2); +THUMB_FUNC void FUN_020303F4(u32 param0, u8 *param1, u32 param2); THUMB_FUNC void FUN_020304D4(u32 param0); THUMB_FUNC void FUN_020304F0(u32 param0); THUMB_FUNC void FUN_0203050C(); -- cgit v1.2.3 From 0a89ace18db732440c498c1684e287e164b6d76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 8 May 2021 12:28:24 +0200 Subject: externs cleanup --- include/unk_0202E29C.h | 4 ++-- include/unk_0202F150.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/unk_0202E29C.h b/include/unk_0202E29C.h index d755d3f5..1339ca09 100644 --- a/include/unk_0202E29C.h +++ b/include/unk_0202E29C.h @@ -5,7 +5,8 @@ #include "mail_message.h" #include "player_data.h" -struct UnkStruct2_sub4 { +struct UnkStruct2_sub4 +{ u32 unk00; u8 unk04; u8 unk05; @@ -71,7 +72,6 @@ struct UnkStruct2 u8 unkDAE[0x2]; }; - void FUN_0202E29C(struct PlayerData *player_data); BOOL FUN_0202E344(); BOOL FUN_0202E358(u8 *param0, u8 *param1, s32 param2); diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index 4e19812a..ea0846c6 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -146,7 +146,7 @@ THUMB_FUNC void FUN_02030DA4(); THUMB_FUNC void FUN_02030DFC(); THUMB_FUNC u32 FUN_02030E7C(u16 param0); THUMB_FUNC s32 FUN_02030F20(); -THUMB_FUNC u32 FUN_02030F40(); +THUMB_FUNC BOOL FUN_02030F40(); THUMB_FUNC void FUN_02030F60(u8 param0); THUMB_FUNC u8 FUN_02030F74(u32 param0); THUMB_FUNC u32 FUN_02030F88(u32 param0); @@ -163,7 +163,7 @@ THUMB_FUNC u16 FUN_02031190(); THUMB_FUNC u32 FUN_020311D0(u32 param0, u8 *param1); THUMB_FUNC u32 FUN_020311DC(u32 param0); THUMB_FUNC u32 FUN_020311E8(); -THUMB_FUNC u32 FUN_020311F0(); +THUMB_FUNC BOOL FUN_020311F0(); THUMB_FUNC int FUN_02031228(u16 param0); THUMB_FUNC int FUN_02031248(u32 param0); THUMB_FUNC int FUN_02031258(u32 param0); -- cgit v1.2.3 From 5f893fd3ce282c293c42a3e5421aa8256972f90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 8 May 2021 12:31:19 +0200 Subject: better struct names --- include/unk_0202E29C.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/unk_0202E29C.h b/include/unk_0202E29C.h index 1339ca09..d4316336 100644 --- a/include/unk_0202E29C.h +++ b/include/unk_0202E29C.h @@ -5,7 +5,7 @@ #include "mail_message.h" #include "player_data.h" -struct UnkStruct2_sub4 +struct UnkStruct_0202E29C_sub4 { u32 unk00; u8 unk04; @@ -17,17 +17,17 @@ struct UnkStruct2_sub4 u8 unk30[0x40]; }; -struct UnkStruct2_sub +struct UnkStruct_0202E29C_sub { u32 unk00; u8 unk04[6]; u8 unk0A[0x2C]; u16 unk36; u8 unk38[0x18]; - struct UnkStruct2_sub4 unk50; + struct UnkStruct_0202E29C_sub4 unk50; }; -struct UnkStruct2_sub3 +struct UnkStruct_0202E29C_sub3 { struct MailMessage unk00; struct PlayerData unk08; @@ -37,19 +37,19 @@ struct UnkStruct2_sub3 u8 unk4D[7]; }; -struct UnkStruct2_sub2 +struct UnkStruct_0202E29C_sub2 { u32 unk00; u8 unk04; u8 unk05; u8 unk06; - struct UnkStruct2_sub3 unk08; + struct UnkStruct_0202E29C_sub3 unk08; }; -struct UnkStruct2 +struct UnkStruct_0202E29C { - struct UnkStruct2_sub3 unk000; - struct UnkStruct2_sub unk054[16]; + struct UnkStruct_0202E29C_sub3 unk000; + struct UnkStruct_0202E29C_sub unk054[16]; u8 unkC54[8][6]; u16 unkC84[16]; void *unkCA4; @@ -59,7 +59,7 @@ struct UnkStruct2 struct PlayerData *unkCB8; void *unkCBC; u32 unkCC0; - struct UnkStruct2_sub2 unkCC4; + struct UnkStruct_0202E29C_sub2 unkCC4; u8 unkD20[0x84]; u16 unkDA4; u16 unkDA6; @@ -75,7 +75,7 @@ struct UnkStruct2 void FUN_0202E29C(struct PlayerData *player_data); BOOL FUN_0202E344(); BOOL FUN_0202E358(u8 *param0, u8 *param1, s32 param2); -void FUN_0202E380(struct UnkStruct2_sub *param0, u32 param1); +void FUN_0202E380(struct UnkStruct_0202E29C_sub *param0, u32 param1); void FUN_0202E470(u32 param0, u32 param1); void FUN_0202E488(); void FUN_0202E49C(); @@ -118,8 +118,8 @@ BOOL FUN_0202EE60(); void FUN_0202EE84(u32 param0); void FUN_0202EEB0(u32 param0); u32 FUN_0202EEE8(u16 param0); -struct UnkStruct2_sub *FUN_0202EF18(u32 param0); -struct UnkStruct2_sub4 *FUN_0202EF44(s32 param0); +struct UnkStruct_0202E29C_sub *FUN_0202EF18(u32 param0); +struct UnkStruct_0202E29C_sub4 *FUN_0202EF44(s32 param0); struct PlayerData *FUN_0202EF70(); struct PlayerData *FUN_0202EF84(int param0); void FUN_0202EFAC(u8 *param0, s32 param1); @@ -131,7 +131,7 @@ void FUN_0202F094(void *param0); void FUN_0202F0B8(); u32 FUN_0202F0DC(u8 param0); BOOL FUN_0202F104(); -void FUN_0202F10C(struct UnkStruct2_sub3 *param0); +void FUN_0202F10C(struct UnkStruct_0202E29C_sub3 *param0); u8 *FUN_0202F124(u32 param0); #endif // POKEDIAMOND_UNK_0202E29C_H -- cgit v1.2.3 From 5200f263fc773b5bfb246af68619d96822a321b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 13 May 2021 19:38:55 +0200 Subject: more decomps --- include/unk_02016B94.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index b1dbfcda..0ecf4f56 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -6,6 +6,9 @@ #include "GX_layers.h" #include "gx.h" #include "heap.h" +#include "math_util.h" +#include "MI_uncompress.h" +#include "OS_cache.h" struct UnkStruct1 { u32 unk00; @@ -32,7 +35,7 @@ struct UnkStruct2 { struct InnerStruct { - u32 unk08; + void *unk08; u32 unk0c; u32 unk10; @@ -61,4 +64,5 @@ THUMB_FUNC void FUN_02016C18(struct UnkStruct2 *param0, u8 param1, struct UnkStr -#endif //POKEDIAMOND_UNK_02016B94_H \ No newline at end of file + +#endif //POKEDIAMOND_UNK_02016B94_H -- cgit v1.2.3 From 44ed8160dfe35adba152d2ef508e2a58ae388799 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 15 May 2021 14:43:49 -0500 Subject: address review comments --- include/scrcmd.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 86bb4f51..6d52972d 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -150,6 +150,35 @@ BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx); BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx); BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx); +//scrcmd_sound.c +BOOL FUN_020413C0(struct ScriptContext *ctx); +BOOL FUN_020413E8(struct ScriptContext *ctx); +BOOL FUN_020413F8(struct ScriptContext *ctx); +BOOL FUN_0204140C(struct ScriptContext *ctx); +BOOL FUN_02041424(struct ScriptContext *ctx); +BOOL FUN_0204143C(struct ScriptContext *ctx); +BOOL FUN_02041464(struct ScriptContext *ctx); +BOOL FUN_02041478(struct ScriptContext* ctx); +BOOL FUN_0204149C(struct ScriptContext* ctx); +BOOL FUN_020414B8(struct ScriptContext *ctx); +BOOL FUN_020414CC(struct ScriptContext* ctx); +BOOL FUN_020414E0(struct ScriptContext* ctx); +BOOL FUN_020414FC(struct ScriptContext* ctx); +BOOL FUN_02041518(struct ScriptContext* ctx); +BOOL FUN_02041540(struct ScriptContext* ctx); +BOOL FUN_02041558(struct ScriptContext* ctx); +BOOL ScrCmd_waitcry(struct ScriptContext* ctx); +BOOL FUN_02041598(struct ScriptContext* ctx); +BOOL FUN_020415BC(struct ScriptContext* ctx); +BOOL FUN_020415CC(struct ScriptContext* ctx); +BOOL ScrCmd_playbgm(struct ScriptContext* ctx); +BOOL FUN_020415E0(struct ScriptContext* ctx); +BOOL FUN_02041618(struct ScriptContext* ctx); +BOOL FUN_02041644(struct ScriptContext* ctx); +BOOL FUN_02041650(struct ScriptContext* ctx); +BOOL FUN_02041664(struct ScriptContext* ctx); +BOOL FUN_02041674(struct ScriptContext* ctx); + //scrcmd_8.c BOOL ScrCmd_Unk021D(struct ScriptContext* ctx); -- cgit v1.2.3 From 1355615fe9dfea12a2800c182f6716c190b9a964 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 15 May 2021 16:41:35 -0500 Subject: name scrcmd's in scrcmd_sound --- include/scrcmd.h | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 6d52972d..c246279d 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -151,33 +151,32 @@ BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx); BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx); //scrcmd_sound.c -BOOL FUN_020413C0(struct ScriptContext *ctx); -BOOL FUN_020413E8(struct ScriptContext *ctx); -BOOL FUN_020413F8(struct ScriptContext *ctx); -BOOL FUN_0204140C(struct ScriptContext *ctx); -BOOL FUN_02041424(struct ScriptContext *ctx); -BOOL FUN_0204143C(struct ScriptContext *ctx); +BOOL ScrCmd_Unk02AE(struct ScriptContext *ctx); +BOOL ScrCmd_Unk0050(struct ScriptContext *ctx); +BOOL ScrCmd_Unk0051(struct ScriptContext *ctx); +BOOL ScrCmd_Unk0052(struct ScriptContext *ctx); +BOOL ScrCmd_Unk0053(struct ScriptContext *ctx); +BOOL ScrCmd_Unk0054(struct ScriptContext *ctx); BOOL FUN_02041464(struct ScriptContext *ctx); -BOOL FUN_02041478(struct ScriptContext* ctx); -BOOL FUN_0204149C(struct ScriptContext* ctx); -BOOL FUN_020414B8(struct ScriptContext *ctx); -BOOL FUN_020414CC(struct ScriptContext* ctx); -BOOL FUN_020414E0(struct ScriptContext* ctx); -BOOL FUN_020414FC(struct ScriptContext* ctx); -BOOL FUN_02041518(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0055(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0056(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0058(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0049(struct ScriptContext* ctx); +BOOL ScrCmd_Unk004A(struct ScriptContext* ctx); +BOOL ScrCmd_Unk004B(struct ScriptContext* ctx); BOOL FUN_02041540(struct ScriptContext* ctx); -BOOL FUN_02041558(struct ScriptContext* ctx); -BOOL ScrCmd_waitcry(struct ScriptContext* ctx); +BOOL ScrCmd_Unk004C(struct ScriptContext* ctx); +BOOL ScrCmd_PlayCryWait(struct ScriptContext* ctx); BOOL FUN_02041598(struct ScriptContext* ctx); -BOOL FUN_020415BC(struct ScriptContext* ctx); +BOOL ScrCmd_Unk004F(struct ScriptContext* ctx); BOOL FUN_020415CC(struct ScriptContext* ctx); -BOOL ScrCmd_playbgm(struct ScriptContext* ctx); -BOOL FUN_020415E0(struct ScriptContext* ctx); -BOOL FUN_02041618(struct ScriptContext* ctx); -BOOL FUN_02041644(struct ScriptContext* ctx); -BOOL FUN_02041650(struct ScriptContext* ctx); -BOOL FUN_02041664(struct ScriptContext* ctx); -BOOL FUN_02041674(struct ScriptContext* ctx); +BOOL ScrCmd_PlayBgm(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0059(struct ScriptContext* ctx); +BOOL ScrCmd_Unk005A(struct ScriptContext* ctx); +BOOL ScrCmd_Unk005B(struct ScriptContext* ctx); +BOOL ScrCmd_Unk005C(struct ScriptContext* ctx); +BOOL ScrCmd_Unk005D(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0283(struct ScriptContext *ctx); //scrcmd_8.c BOOL ScrCmd_Unk021D(struct ScriptContext* ctx); -- cgit v1.2.3 From 61776017dc42d46aa5cefcb40429d7d96984f703 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 15 May 2021 19:31:22 -0500 Subject: decomp 3 files --- include/WIFI_stubsmd5_dummy.h | 12 ++++++++++++ include/unk_02022504.h | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 include/WIFI_stubsmd5_dummy.h create mode 100644 include/unk_02022504.h (limited to 'include') diff --git a/include/WIFI_stubsmd5_dummy.h b/include/WIFI_stubsmd5_dummy.h new file mode 100644 index 00000000..73e83e39 --- /dev/null +++ b/include/WIFI_stubsmd5_dummy.h @@ -0,0 +1,12 @@ +#ifndef POKEDIAMOND_WIFI_STUBSMD5_DUMMY_H +#define POKEDIAMOND_WIFI_STUBSMD5_DUMMY_H + +#include "dgt.h" + +void MD5Final(u8 *digest, struct DGTHash1Context *context); +void MD5Update(struct DGTHash1Context *context, u8 *input, u32 length); +void MD5Init(struct DGTHash1Context *context); + + +#endif //POKEDIAMOND_WIFI_STUBSMD5_DUMMY_H + diff --git a/include/unk_02022504.h b/include/unk_02022504.h new file mode 100644 index 00000000..3473ffff --- /dev/null +++ b/include/unk_02022504.h @@ -0,0 +1,15 @@ +#ifndef POKEDIAMOND_UNK_02022504_H +#define POKEDIAMOND_UNK_02022504_H + +#include "save_block_2.h" +#include "pokemon_storage_system.h" + +void *FUN_02022504(struct SaveBlock2 *sav2); +struct PCStorage *GetStoragePCPointer(struct SaveBlock2 *sav2); +void *FUN_0202251C(struct SaveBlock2 *sav2); +void *FUN_02022528(struct SaveBlock2 *sav2); +u8 *LoadHallOfFame(struct SaveBlock2 *sav2, u32 heap_id, int *ret_p); +int *SaveHallOfFame(struct SaveBlock2 *sav2, u8 *data); + +#endif //POKEDIAMOND_UNK_02022504_H + -- cgit v1.2.3 From 5f4bb52fd5d93b2638c99baee82d63b4d9b9f790 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 15 May 2021 20:30:26 -0500 Subject: address review comments --- include/WIFI_stubsmd5_dummy.h | 3 +-- include/unk_02022504.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/WIFI_stubsmd5_dummy.h b/include/WIFI_stubsmd5_dummy.h index 73e83e39..d82b55c5 100644 --- a/include/WIFI_stubsmd5_dummy.h +++ b/include/WIFI_stubsmd5_dummy.h @@ -1,12 +1,11 @@ #ifndef POKEDIAMOND_WIFI_STUBSMD5_DUMMY_H #define POKEDIAMOND_WIFI_STUBSMD5_DUMMY_H +#include "nitro/types.h" #include "dgt.h" void MD5Final(u8 *digest, struct DGTHash1Context *context); void MD5Update(struct DGTHash1Context *context, u8 *input, u32 length); void MD5Init(struct DGTHash1Context *context); - #endif //POKEDIAMOND_WIFI_STUBSMD5_DUMMY_H - diff --git a/include/unk_02022504.h b/include/unk_02022504.h index 3473ffff..aa541f85 100644 --- a/include/unk_02022504.h +++ b/include/unk_02022504.h @@ -9,7 +9,6 @@ struct PCStorage *GetStoragePCPointer(struct SaveBlock2 *sav2); void *FUN_0202251C(struct SaveBlock2 *sav2); void *FUN_02022528(struct SaveBlock2 *sav2); u8 *LoadHallOfFame(struct SaveBlock2 *sav2, u32 heap_id, int *ret_p); -int *SaveHallOfFame(struct SaveBlock2 *sav2, u8 *data); +s32 *SaveHallOfFame(struct SaveBlock2 *sav2, u8 *data); #endif //POKEDIAMOND_UNK_02022504_H - -- cgit v1.2.3 From a125d1fb025c9fbf1d6857722a5cf591f430bf48 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 16 May 2021 20:47:51 -0400 Subject: More prototype fixing --- include/main.h | 8 ++++---- include/overlay_manager.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/main.h b/include/main.h index d40e22f9..2e424e09 100644 --- a/include/main.h +++ b/include/main.h @@ -20,7 +20,7 @@ struct UnkStruct_02006234 struct Unk21DBE18 ovly_mgr; u32 unk10; u32 unk14; - int * unk18; + s32 * unk18; void * unk1C; struct SaveBlock2 * unk20; u32 unk24; @@ -31,9 +31,9 @@ struct Unk2106FA0 PMBackLightSwitch unk0; s32 unk4; FSOverlayID unk8; - s32 unkC; + struct UnkStruct_02006234 *unkC; FSOverlayID unk10; - struct Unk21DBE18 * unk14; + const struct Unk21DBE18 * unk14; s32 unk18; s32 unk1C; struct SaveBlock2 * unk20; @@ -113,7 +113,7 @@ extern struct Main gMain; void FUN_02000DF4(void); void Main_RunOverlayManager(void); -void RegisterMainOverlay(FSOverlayID id, struct Unk21DBE18 * arg1); +void RegisterMainOverlay(FSOverlayID id, const struct Unk21DBE18 * arg1); void FUN_02000E9C(void); void FUN_02000EC8(u32 parameter); void FUN_02000EE8(void); diff --git a/include/overlay_manager.h b/include/overlay_manager.h index 193bc7e8..534af18d 100644 --- a/include/overlay_manager.h +++ b/include/overlay_manager.h @@ -5,7 +5,7 @@ struct Unk21DBE18; -struct UnkStruct_02006234 * OverlayManager_new(struct Unk21DBE18 * ovly_mgr, int * a1, u32 heap_id); +struct UnkStruct_02006234 * OverlayManager_new(const struct Unk21DBE18 * ovly_mgr, s32 * a1, u32 heap_id); void OverlayManager_delete(struct UnkStruct_02006234 * a0); void * OverlayManager_CreateAndGetData(struct UnkStruct_02006234 * a0, u32 size, u32 heap_id); void * OverlayManager_GetData(struct UnkStruct_02006234 * a0); -- cgit v1.2.3 From 1c7120ac14f155f47dca5c4ff6059121382a562c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 17 May 2021 08:22:16 -0400 Subject: UnkStruct_0202E29C.unkDAD is a bitfield --- include/overlay_manager.h | 2 +- include/unk_0202E29C.h | 7 ++++++- include/unk_0202F150.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/overlay_manager.h b/include/overlay_manager.h index 534af18d..8d9bd6e3 100644 --- a/include/overlay_manager.h +++ b/include/overlay_manager.h @@ -10,7 +10,7 @@ void OverlayManager_delete(struct UnkStruct_02006234 * a0); void * OverlayManager_CreateAndGetData(struct UnkStruct_02006234 * a0, u32 size, u32 heap_id); void * OverlayManager_GetData(struct UnkStruct_02006234 * a0); void OverlayManager_FreeData(struct UnkStruct_02006234 * a0); -int * OverlayManager_GetField18(struct UnkStruct_02006234 * a0); +s32 * OverlayManager_GetField18(struct UnkStruct_02006234 * a0); BOOL OverlayManager_Run(struct UnkStruct_02006234 * a0); #endif //POKEDIAMOND_OVERLAY_MANAGER_H diff --git a/include/unk_0202E29C.h b/include/unk_0202E29C.h index d4316336..92998f7c 100644 --- a/include/unk_0202E29C.h +++ b/include/unk_0202E29C.h @@ -68,7 +68,12 @@ struct UnkStruct_0202E29C u8 unkDAA; u8 unkDAB; u8 unkDAC; - u8 unkDAD; + u8 unkDAD_0:1; + u8 unkDAD_1:1; + u8 unkDAD_2:1; + u8 unkDAD_3:1; + u8 unkDAD_4:1; + u8 unkDAD_5:1; u8 unkDAE[0x2]; }; diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index ea0846c6..8f5cdd3e 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -93,7 +93,7 @@ THUMB_FUNC void FUN_0202F5A4(); THUMB_FUNC void FUN_0202F820(int param0); THUMB_FUNC void FUN_0202F8D4(); THUMB_FUNC void FUN_0202F910(int param0); -THUMB_FUNC u32 FUN_0202F918(u32 param0, u32 param1, u32 param2, u32 param3); +THUMB_FUNC BOOL FUN_0202F918(u32 param0, u32 param1, u32 param2, u32 param3); THUMB_FUNC u32 FUN_0202F950(u32 param0, u32 param1, u32 param2); THUMB_FUNC void FUN_0202F984(); THUMB_FUNC void FUN_0202F9E0(u32 param0); -- cgit v1.2.3 From 71c737c85b671425f887dd1670e200f95bfeb0cf Mon Sep 17 00:00:00 2001 From: tgsm Date: Sat, 15 May 2021 23:23:13 -0400 Subject: Decompile scrcmd_24 --- include/scrcmd.h | 13 +++++++++++++ include/unk_020377F0.h | 30 ++++++++++++++++++++++++++++++ include/unk_02088DD8.h | 19 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 include/unk_020377F0.h create mode 100644 include/unk_02088DD8.h (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index c246279d..edc4c00d 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -301,6 +301,19 @@ BOOL ScrCmd_Unk0090(struct ScriptContext* ctx); BOOL ScrCmd_Unk0091(struct ScriptContext* ctx); BOOL ScrCmd_Unk0092(struct ScriptContext* ctx); +//scrcmd_24.c +BOOL ScrCmd_Unk01C6(struct ScriptContext* ctx); +BOOL ScrCmd_Unk01C7(struct ScriptContext* ctx); +BOOL ScrCmd_Unk021E(struct ScriptContext* ctx); +BOOL ScrCmd_Unk021F(struct ScriptContext* ctx); +void FUN_02045E74(struct ScriptContext* ctx, u8 a1, struct Pokemon* pokemon, void* a3); +BOOL ScrCmd_Unk0220(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0221(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0224(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0222(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0223(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0225(struct ScriptContext* ctx); + //scrcmd_25.c BOOL ScrCmd_Unk023F(struct ScriptContext* ctx); BOOL ScrCmd_Unk0240(struct ScriptContext* ctx); diff --git a/include/unk_020377F0.h b/include/unk_020377F0.h new file mode 100644 index 00000000..91276889 --- /dev/null +++ b/include/unk_020377F0.h @@ -0,0 +1,30 @@ +#ifndef POKEDIAMOND_UNK_020377F0_H +#define POKEDIAMOND_UNK_020377F0_H + +struct Options; +struct PlayerParty; + +// This struct gets created from a bunch of places, not just 0x02037CF0. This was +// just the first place I (tgsm) found it being created. +struct UnkStruct_02037CF0 +{ + struct PlayerParty* party; + struct Options* options; + u16* name_buf; + u32 trainer_id; + u8 gender; + u8 unk11; + u8 unk12; + u8 party_count; + u8 unk14; + u8 unk15; + u8 unk16; + u8 padding; + u16 unk18; + u8 padding2[0x2]; + BOOL has_national_dex; + u8 padding3[0xC]; + BOOL unk2C; +}; + +#endif diff --git a/include/unk_02088DD8.h b/include/unk_02088DD8.h new file mode 100644 index 00000000..318a98fb --- /dev/null +++ b/include/unk_02088DD8.h @@ -0,0 +1,19 @@ +#ifndef POKEDIAMOND_UNK_02088DD8_H +#define POKEDIAMOND_UNK_02088DD8_H + +struct Options; +struct PlayerData; +struct Pokemon; + +struct UnkStruct_02088DD8 +{ + struct Pokemon* pokemon; + struct PlayerData* player; + struct Options* options; + void* unkC; + u8 padding[0x5]; + u8 unk15; + u8 padding2[0x2]; +}; + +#endif -- cgit v1.2.3 From e0636bd748fa018ef03398a95a6ee1b66710e4ad Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 17 May 2021 20:53:40 -0400 Subject: [leak informed] Break apart gBacklightTop --- include/main.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/main.h b/include/main.h index 2e424e09..78e0fd76 100644 --- a/include/main.h +++ b/include/main.h @@ -104,8 +104,22 @@ struct Main //extern struct UnkStruct_021C4918 gMain + 0x60; -extern struct Unk2106FA0 gBacklightTop; -extern struct Unk2106FA0 gBacklightTop_2; // same as the first one, it's referenced twice in the constant pool... +extern PMBackLightSwitch gBacklightTop; +extern s32 UNK_02016FA4; + +struct UnkStruct_02016FA8 +{ + FSOverlayID unk0; + struct UnkStruct_02006234 *unk4; + FSOverlayID unk8; + const struct Unk21DBE18 * unkC; + s32 unk10; + s32 unk14; + struct SaveBlock2 * unk18; + +}; + +extern struct UnkStruct_02016FA8 UNK_02016FA8; void NitroMain(void); -- cgit v1.2.3 From a69fee786db2b7197c86b14278ef7f8e908e2f23 Mon Sep 17 00:00:00 2001 From: red031000 Date: Tue, 18 May 2021 18:07:32 +0100 Subject: literally one function --- include/scrcmd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index c246279d..c4a9631c 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -105,6 +105,7 @@ BOOL ScrCmd_Unk0047(struct ScriptContext *ctx); BOOL ScrCmd_Unk0048(struct ScriptContext *ctx); BOOL ScrCmd_Unk02CF(struct ScriptContext *ctx); BOOL ScrCmd_Unk02D0(struct ScriptContext *ctx); +BOOL ScrCmd_Unk005E(struct ScriptContext *ctx); //scrcmd_4.c BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx); -- cgit v1.2.3 From ded31ee11b7c6f4aed68bca2a53a4372ea713492 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 19 May 2021 20:48:11 -0400 Subject: Decomp ListMenuInit --- include/list_menu.h | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 include/list_menu.h (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h new file mode 100644 index 00000000..befbf051 --- /dev/null +++ b/include/list_menu.h @@ -0,0 +1,56 @@ +#ifndef POKEDIAMOND_LIST_MENU_H +#define POKEDIAMOND_LIST_MENU_H + +struct ListMenu; + +// TODO: Move to its own header, and fill it out +struct Window +{ + u8 * unk_00; + u8 unk_04; +}; + +// TODO: Document remaining fields. +// A lot of these are named based on similar fields in gen 3. +struct ListMenuTemplate +{ + u8 filler_00[12]; + /*0x0C*/ struct Window * window; + /*0x10*/ u16 totalItems; + /*0x12*/ u16 maxShowed; + /*0x14*/ u8 header_X; + /*0x15*/ u8 item_X; + /*0x16*/ u8 cursor_X; + /*0x17*/ u8 upText_Y:4; + u8 cursorPal:4; + /*0x18*/ u8 fillValue:4; + u8 cursorShadowPal:4; + /*0x1A*/ u16 lettersSpacing:3; + u16 unk_1a_3:6; + u16 fontId:6; + /*0x1C*/ u8 filler_1C[4]; +}; + +struct ListMenu +{ + /*0x00*/ struct ListMenuTemplate template; + // ListMenuOverride from gen 3 + /*0x20*/ u8 cursorPal:4; + u8 fillValue:4; + /*0x21*/ u8 cursorShadowPal:4; + u8 unk_21_4:4; + /*0x22*/ u8 lettersSpacing:6; + /*0x23*/ u8 unk_23; + /*0x24*/ u8 fontId:7; + u8 enabled:1; + /*0x28*/ void * unk_28; + /*0x2c*/ u16 cursorPos; + /*0x2e*/ u16 itemsAbove; + /*0x30*/ u8 unk_30; + /*0x31*/ u8 unk_31; + /*0x32*/ u8 taskId; + /*0x33*/ u8 unk_33; + /*0x34*/ u8 heap_id; +}; + +#endif // POKEDIAMOND_LIST_MENU_H -- cgit v1.2.3 From 8e300b8f7f14f2ef2a1479a27f0e5aed1aa36d40 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 19 May 2021 21:15:40 -0400 Subject: Decompile ListMenu_ProcessInput --- include/list_menu.h | 20 ++++++++++++++++++-- include/main.h | 4 ++-- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index befbf051..ed47d21d 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -1,6 +1,14 @@ #ifndef POKEDIAMOND_LIST_MENU_H #define POKEDIAMOND_LIST_MENU_H +#define LIST_HEADER -3 +#define LIST_CANCEL -2 +#define LIST_NOTHING_CHOSEN -1 + +#define LIST_NO_MULTIPLE_SCROLL 0 +#define LIST_MULTIPLE_SCROLL_DPAD 1 +#define LIST_MULTIPLE_SCROLL_L_R 2 + struct ListMenu; // TODO: Move to its own header, and fill it out @@ -10,11 +18,18 @@ struct Window u8 unk_04; }; +struct ListMenuItem +{ + const u16 * text; + s32 index; +}; + // TODO: Document remaining fields. // A lot of these are named based on similar fields in gen 3. struct ListMenuTemplate { - u8 filler_00[12]; + struct ListMenuItem * items; + u8 filler_04[8]; /*0x0C*/ struct Window * window; /*0x10*/ u16 totalItems; /*0x12*/ u16 maxShowed; @@ -26,7 +41,8 @@ struct ListMenuTemplate /*0x18*/ u8 fillValue:4; u8 cursorShadowPal:4; /*0x1A*/ u16 lettersSpacing:3; - u16 unk_1a_3:6; + u16 itemVerticalPadding:4; + u16 scrollMultiple:2; u16 fontId:6; /*0x1C*/ u8 filler_1C[4]; }; diff --git a/include/main.h b/include/main.h index 78e0fd76..9227d9a8 100644 --- a/include/main.h +++ b/include/main.h @@ -84,8 +84,8 @@ struct Main u32 unk3C; u32 unk40; u32 unk44; - u32 unk48; - u32 unk4C; + u32 newKeys; + u32 newAndRepeatedKeys; s32 unk50; s32 unk54; s32 unk58; -- cgit v1.2.3 From 84a6ed639c0887d084b0d9785f842dca9621b8e8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 19 May 2021 21:23:32 -0400 Subject: DestroyListMenu, RedrawListMenu --- include/list_menu.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index ed47d21d..67b73893 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -18,6 +18,12 @@ struct Window u8 unk_04; }; +// TODO: Move to its own header, and fill it out +struct ListMenuCursor +{ + // ??? +}; + struct ListMenuItem { const u16 * text; @@ -59,7 +65,7 @@ struct ListMenu /*0x23*/ u8 unk_23; /*0x24*/ u8 fontId:7; u8 enabled:1; - /*0x28*/ void * unk_28; + /*0x28*/ struct ListMenuCursor *cursor; /*0x2c*/ u16 cursorPos; /*0x2e*/ u16 itemsAbove; /*0x30*/ u8 unk_30; @@ -69,4 +75,9 @@ struct ListMenu /*0x34*/ u8 heap_id; }; +THUMB_FUNC struct ListMenu * ListMenuInit(const struct ListMenuTemplate * template, u16 cursorPos, u16 itemsAbove, u32 heap_id); +THUMB_FUNC s32 ListMenu_ProcessInput(struct ListMenu * list); +THUMB_FUNC void DestroyListMenu(struct ListMenu * list, u16 * cursorPos, u16 * itemsAbove); +THUMB_FUNC void RedrawListMenu(struct ListMenu * list); + #endif // POKEDIAMOND_LIST_MENU_H -- cgit v1.2.3 From b9775f239f86191af5cb1ee8f58f4fbcdc7e4b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 20 May 2021 09:37:43 +0200 Subject: remaining decomps --- include/unk_02016B94.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index 0ecf4f56..eaf764ad 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -31,7 +31,8 @@ struct UnkStruct1 { struct UnkStruct2 { u32 unk00; - u32 unk04; + u16 unk04; + u16 unk06; struct InnerStruct { -- cgit v1.2.3 From c1a0ef9536ef8bcc2d7b7047f6154f32a6fea542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 20 May 2021 09:57:50 +0200 Subject: headers cleanup --- include/unk_02016B94.h | 274 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 256 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index eaf764ad..0183e96c 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -1,16 +1,16 @@ #ifndef POKEDIAMOND_UNK_02016B94_H #define POKEDIAMOND_UNK_02016B94_H - #include "global.h" #include "GX_layers.h" +#include "MI_uncompress.h" +#include "OS_cache.h" #include "gx.h" #include "heap.h" #include "math_util.h" -#include "MI_uncompress.h" -#include "OS_cache.h" -struct UnkStruct1 { +struct UnkStruct1 +{ u32 unk00; u32 unk04; u32 unk08; @@ -23,19 +23,18 @@ struct UnkStruct1 { u8 unk14; u8 unk15; u8 unk16; - u8 unk17; //probably paddding + u8 unk17; // probably paddding u32 unk18; }; - - -struct UnkStruct2 { +struct UnkStruct2 +{ u32 unk00; u16 unk04; u16 unk06; - - struct InnerStruct { + struct InnerStruct + { void *unk08; u32 unk0c; u32 unk10; @@ -48,7 +47,7 @@ struct UnkStruct2 { u8 unk1e; u8 unk1f; u16 unk20; - u16 unk22; //probably padding + u16 unk22; // probably padding u32 unk24; u32 unk28; u32 unk2c; @@ -56,14 +55,253 @@ struct UnkStruct2 { } unk08[8]; }; +struct UnkStruct3 +{ + void *unk00; + u16 unk04; + u16 unk06; +}; -THUMB_FUNC void *FUN_02016B94(u32 heap_id); -THUMB_FUNC u32 FUN_02016BB8(u32 *param0); -THUMB_FUNC void FUN_02016BBC(u32 *param0); -THUMB_FUNC void FUN_02016BF4(u32 *param0, u32 param1); -THUMB_FUNC void FUN_02016C18(struct UnkStruct2 *param0, u8 param1, struct UnkStruct1 *param2, u8 param3); - +struct UnkStruct4 +{ + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; + u8 unk4; + u8 unk5; + u16 unk6; +}; +struct Window +{ + struct UnkStruct2 *unk00; + u8 unk04; + u8 unk05; + u8 unk06; + u8 unk07; + u8 unk08; + u8 unk09; + u16 unk0a : 15; + u16 unk0b : 1; + void *unk0c; +}; +void *FUN_02016B94(u32 heap_id); +u32 FUN_02016BB8(u32 *param0); +void FUN_02016BBC(u32 *param0); +void FUN_02016BF4(u32 *param0, u32 param1); +void FUN_02016C18(struct UnkStruct2 *param0, u8 param1, struct UnkStruct1 *param2, u8 param3); +void FUN_020170F4(struct UnkStruct2 *param0, u8 param1, u32 param2, u8 param3); +u8 FUN_020177DC(u8 param0, u32 param1); +void FUN_02017850(u32 param0, u8 *param1, u8 *param2); +void FUN_020178A0(struct UnkStruct2 *param0, u32 param1); +void FUN_020178BC(u32 param0, u32 param1); +void FUN_0201797C(u32 param0, GX_LayerToggle toggle); +void FUN_020179E0(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 val); +u32 FUN_02017B48(struct UnkStruct2 *param0, u32 param1); +u32 FUN_02017B54(struct UnkStruct2 *param0, u32 param1); +void FUN_02017B60(struct UnkStruct2 *param0, + u32 param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + u32 param6); +void FUN_02017B8C(struct InnerStruct *param0, u32 param1, u32 val); +void FUN_02017BD0( + struct UnkStruct2 *param0, u32 param1, struct Mtx22 *param2, fx32 param3, fx32 param4); +void FUN_02017C6C(struct UnkStruct2 *param0, u32 param1); +void FUN_02017C98(const void *param0, void *param1, u32 param2); +void FUN_02017CD0(struct UnkStruct2 *param0, u32 param1); +void FUN_02017CE8(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017D68(u32 param0, void *param1, u32 offset, u32 size); +void FUN_02017DFC(struct UnkStruct2 *param0, u32 param1, void *param2, u32 param3); +void FUN_02017E14(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); +void FUN_02017E40(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017E84(u32 param0, void *param1, u32 offset, u32 size); +void FUN_02017F18(u32 param0, u32 size, u32 offset, u32 heap_id); +void FUN_02017F48(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017FB4(u32 param0, void *param1, u32 offset, u32 size); +void FUN_02017FE4(u32 param0, u32 param1); +u16 FUN_02017FFC(u8 param0, u8 param1, u8 param2); +u16 FUN_02018068(u8 param0, u8 param1, u8 param2, u8 param3); +void FUN_02018148( + struct UnkStruct2 *param0, u32 param1, u32 *param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_02018170(struct UnkStruct2 *param0, + u32 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u32 *param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_020181EC(struct UnkStruct2 *param0, + u32 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u32 *param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_02018268(struct InnerStruct *param0, + u8 param1, + u8 param2, + u8 param3, + u8 param4, + u16 *param5, + u8 param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_020183DC(struct InnerStruct *param0, + u8 param1, + u8 param2, + u8 param3, + u8 param4, + u8 *param5, + u8 param6, + u8 param7, + u8 param8, + u8 param9, + u8 param10); +void FUN_02018540(struct UnkStruct2 *param0, + u32 param1, + u16 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u8 param7); +void FUN_02018590( + struct InnerStruct *param0, u16 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_02018640( + struct InnerStruct *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5); +void FUN_020186B4( + struct UnkStruct2 *param0, u32 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_02018744(struct UnkStruct2 *param0, u32 param1); +void FUN_02018768(struct UnkStruct2 *param0, u32 param1, u16 param2); +void FUN_0201878C(struct UnkStruct2 *param0, u32 param1, u16 param2); +void *FUN_020187B0(u32 param0); +void FUN_02018808(u8 *param0, u32 param1, u8 (*param2)[2], u8 param3); +u8 (*FUN_02018848(u8 *param0, u32 param1, u8 param2, u32 heap_id))[2]; +void *FUN_0201886C(struct UnkStruct2 *param0, u32 param1); +u16 FUN_02018878(struct UnkStruct2 *param0, u32 param1); +u8 FUN_02018884(struct UnkStruct2 *param0, u32 param1); +void FUN_02018A60(struct UnkStruct3 *param0, + struct UnkStruct3 *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8); +void FUN_02018CA0(struct UnkStruct3 *param0, + struct UnkStruct3 *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8); +void FUN_02018E88( + struct UnkStruct3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); +void FUN_02018F4C( + struct UnkStruct3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); +void *FUN_02018FF4(u32 heap_id, s32 size); +void FUN_0201901C(struct Window *param0); +BOOL FUN_02019048(struct Window *param0); +void FUN_02019064(struct UnkStruct2 *param0, + struct Window *param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6, + u8 param7, + u16 param8); +void FUN_020190EC( + struct UnkStruct2 *param0, struct Window *param1, u8 param2, u8 param3, u16 param4, u8 param5); +void FUN_02019150(struct UnkStruct2 *param0, struct Window *param1, struct UnkStruct4 *param2); +void FUN_02019178(struct Window *param0); +void FUN_020191A4(struct Window *param0, int param1); +void CopyWindowToVram(struct Window *param0); +void FUN_02019220(struct Window *param0); +void FUN_02019270(struct Window *param0); +void FUN_0201928C(struct Window *param0, u8 param1, u8 param2); +void FUN_020192B8(struct Window *param0); +void FUN_020192D4(struct Window *param0); +void FUN_02019358(struct Window *param0); +void FUN_020193B4(struct Window *param0); +void FUN_02019444(struct Window *param0); +void FUN_0201949C(struct Window *window); +void FUN_020194C8(struct Window *window); +void FUN_020194E0(struct Window *window); +void FUN_0201951C(struct Window *window); +void FUN_02019548(struct Window *window); +void FUN_02019570(struct Window *window); +void FUN_0201958C(struct Window *window); +void FUN_020195A8(struct Window *window); +void FUN_020195D0(struct Window *window); +void FUN_020195E4(struct Window *window); +void FUN_0201960C(struct Window *window); +void FUN_02019620(struct Window *window, u8 param1); +void FUN_02019658(struct Window *window, + void *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8, + u16 param9); +void FUN_02019684(struct Window *window, + void *param1, + u16 param2, + u16 param3, + u16 param4, + u16 param5, + u16 param6, + u16 param7, + u16 param8, + u16 param9, + u16 param10); +void FUN_020196F4(struct Window *window, u8 param1, u16 param2, u16 param3, u16 param4, u16 param5); +void FUN_0201974C( + struct Window *window, u32 *param1, u32 param2, u32 param3, u16 param4, u16 param5, u32 param6); +void FUN_0201A8C8(struct Window *window, u32 param1, u8 param2, u8 param3); +void FUN_0201A8E8(struct Window *window, u32 param1, u8 param2, u8 param3); +void FUN_0201A9D4(struct Window *window, u32 param1, u8 param2, u8 param3); +u8 FUN_0201AB08(struct Window *window); +u8 FUN_0201AB0C(struct Window *window); +u8 FUN_0201AB10(struct Window *window); +u8 FUN_0201AB14(struct Window *window); +u8 FUN_0201AB18(struct Window *window); +void FUN_0201AB1C(struct Window *window, u8 param1); +void FUN_0201AB20(struct Window *window, u8 param1); +void FUN_0201AB24(struct Window *window, u8 param1); +u32 FUN_0201AB28(struct Window *window, u32 heap_id, const char *path); +u32 FUN_0201AB44(struct Window *window, u32 heap_id, const char *path); +void FUN_0201AB60(struct UnkStruct2 *param0); +void FUN_0201AB78(struct UnkStruct2 *param0); +void FUN_0201AC68(struct UnkStruct2 *param0, u32 param1); +void FUN_0201AC78(struct UnkStruct2 *param0); +void FUN_0201AEE4(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3); +void FUN_0201AF08(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3); +void FUN_0201AF2C(struct InnerStruct *param0, u32 param1, u32 val); +void FUN_0201AF50(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3); +void FUN_0201AF74(struct InnerStruct *param0, u32 param1, u32 val); +u32 FUN_0201AFBC(struct UnkStruct2 *param0, u8 param1, u8 param2, u8 param3, u16 *param4); +void FUN_0201B118(struct UnkStruct2 *param0, u8 param1, u8 *param2); -#endif //POKEDIAMOND_UNK_02016B94_H +#endif // POKEDIAMOND_UNK_02016B94_H -- cgit v1.2.3 From 056db847ca93551cbcadcd79a264c360ba86519d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 20 May 2021 18:32:19 +0200 Subject: fix compiler warnings --- include/unk_02016B94.h | 65 ++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 28 deletions(-) (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index 0183e96c..f4e57737 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -9,6 +9,10 @@ #include "heap.h" #include "math_util.h" +#define reg_G2_BG2P (u32 *)0x4000020 +#define reg_G2_BG3P (u32 *)0x4000030 +#define reg_G2S_DB_BG2P (u32 *)0x4001020 +#define reg_G2S_DB_BG3P (u32 *)0x4001030 struct UnkStruct1 { u32 unk00; @@ -39,8 +43,8 @@ struct UnkStruct2 u32 unk0c; u32 unk10; - u32 unk14; - u32 unk18; + fx32 unk14; + fx32 unk18; u8 unk1c; u8 unk1d; @@ -48,10 +52,10 @@ struct UnkStruct2 u8 unk1f; u16 unk20; u16 unk22; // probably padding - u32 unk24; - u32 unk28; - u32 unk2c; - u32 unk30; + fx32 unk24; + fx32 unk28; + fx32 unk2c; + fx32 unk30; } unk08[8]; }; @@ -87,28 +91,28 @@ struct Window void *unk0c; }; -void *FUN_02016B94(u32 heap_id); +struct UnkStruct2 *FUN_02016B94(u32 heap_id); u32 FUN_02016BB8(u32 *param0); -void FUN_02016BBC(u32 *param0); +void FUN_02016BBC(const struct GraphicsModes *modes); void FUN_02016BF4(u32 *param0, u32 param1); void FUN_02016C18(struct UnkStruct2 *param0, u8 param1, struct UnkStruct1 *param2, u8 param3); void FUN_020170F4(struct UnkStruct2 *param0, u8 param1, u32 param2, u8 param3); u8 FUN_020177DC(u8 param0, u32 param1); void FUN_02017850(u32 param0, u8 *param1, u8 *param2); void FUN_020178A0(struct UnkStruct2 *param0, u32 param1); -void FUN_020178BC(u32 param0, u32 param1); +void FUN_020178BC(u32 param0, u16 param1); void FUN_0201797C(u32 param0, GX_LayerToggle toggle); -void FUN_020179E0(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 val); -u32 FUN_02017B48(struct UnkStruct2 *param0, u32 param1); -u32 FUN_02017B54(struct UnkStruct2 *param0, u32 param1); +void FUN_020179E0(struct UnkStruct2 *param0, u32 param1, u32 param2, fx32 val); +fx32 FUN_02017B48(struct UnkStruct2 *param0, u32 param1); +fx32 FUN_02017B54(struct UnkStruct2 *param0, u32 param1); void FUN_02017B60(struct UnkStruct2 *param0, u32 param1, u32 param2, - u32 param3, - u32 param4, - u32 param5, - u32 param6); -void FUN_02017B8C(struct InnerStruct *param0, u32 param1, u32 val); + fx32 param3, + struct Mtx22 *param4, + fx32 param5, + fx32 param6); +void FUN_02017B8C(struct InnerStruct *param0, u32 param1, fx32 val); void FUN_02017BD0( struct UnkStruct2 *param0, u32 param1, struct Mtx22 *param2, fx32 param3, fx32 param4); void FUN_02017C6C(struct UnkStruct2 *param0, u32 param1); @@ -117,24 +121,29 @@ void FUN_02017CD0(struct UnkStruct2 *param0, u32 param1); void FUN_02017CE8(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017D68(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017DFC(struct UnkStruct2 *param0, u32 param1, void *param2, u32 param3); -void FUN_02017E14(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); +void FUN_02017E14(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017E40(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017E84(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017F18(u32 param0, u32 size, u32 offset, u32 heap_id); -void FUN_02017F48(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017F48(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); void FUN_02017FB4(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017FE4(u32 param0, u32 param1); u16 FUN_02017FFC(u8 param0, u8 param1, u8 param2); u16 FUN_02018068(u8 param0, u8 param1, u8 param2, u8 param3); -void FUN_02018148( - struct UnkStruct2 *param0, u32 param1, u32 *param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_02018148(struct UnkStruct2 *param0, + u32 param1, + void *param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6); void FUN_02018170(struct UnkStruct2 *param0, u32 param1, u8 param2, u8 param3, u8 param4, u8 param5, - u32 *param6, + void *param6, u8 param7, u8 param8, u8 param9, @@ -145,7 +154,7 @@ void FUN_020181EC(struct UnkStruct2 *param0, u8 param3, u8 param4, u8 param5, - u32 *param6, + void *param6, u8 param7, u8 param8, u8 param9, @@ -296,11 +305,11 @@ void FUN_0201AB60(struct UnkStruct2 *param0); void FUN_0201AB78(struct UnkStruct2 *param0); void FUN_0201AC68(struct UnkStruct2 *param0, u32 param1); void FUN_0201AC78(struct UnkStruct2 *param0); -void FUN_0201AEE4(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3); -void FUN_0201AF08(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3); -void FUN_0201AF2C(struct InnerStruct *param0, u32 param1, u32 val); -void FUN_0201AF50(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3); -void FUN_0201AF74(struct InnerStruct *param0, u32 param1, u32 val); +void FUN_0201AEE4(struct UnkStruct2 *param0, u32 param1, u32 param2, fx32 param3); +void FUN_0201AF08(struct UnkStruct2 *param0, u32 param1, u32 param2, u16 param3); +void FUN_0201AF2C(struct InnerStruct *param0, u32 param1, u16 val); +void FUN_0201AF50(struct UnkStruct2 *param0, u32 param1, u32 param2, fx32 param3); +void FUN_0201AF74(struct InnerStruct *param0, u32 param1, fx32 val); u32 FUN_0201AFBC(struct UnkStruct2 *param0, u8 param1, u8 param2, u8 param3, u16 *param4); void FUN_0201B118(struct UnkStruct2 *param0, u8 param1, u8 *param2); -- cgit v1.2.3 From fb002e4c21e5a4e4a2b4afa151ea725f16d86d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 20 May 2021 18:33:34 +0200 Subject: remove obsolete externs --- include/script.h | 4 +++- include/text_02054590.h | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/script.h b/include/script.h index cb41889d..92d586b6 100644 --- a/include/script.h +++ b/include/script.h @@ -4,6 +4,8 @@ #include "global.h" #include "msgdata.h" #include "save_block_2.h" +#include "unk_02016B94.h" + struct ScriptContext; @@ -26,7 +28,7 @@ struct UnkStruct_02046444 struct UnkSavStruct80 { u8 padding[0x8]; - u32 unk08; + struct UnkStruct2 *unk08; struct SaveBlock2 *saveBlock2; //0xC struct UnkStruct_0204639C *unk10; u8 padding2[0x8]; diff --git a/include/text_02054590.h b/include/text_02054590.h index 725bd9b4..6c5090e7 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -3,15 +3,16 @@ #include "global.h" #include "options.h" +#include "unk_02016B94.h" void FUN_02054590(u32 param0, u32 param1); -void FUN_020545B8(u32 param0, u32 param1, u32 param2); -void FUN_02054608(u32 *param0, struct Options *options); -void FUN_0205464C(u32 *param0); +void FUN_020545B8(struct UnkStruct2 *param0, struct Window *param1, u32 param2); +void FUN_02054608(struct Window *param0, struct Options *options); +void FUN_0205464C(struct Window *param0); u16 FUN_02054658(u8 windowId, const u16 *str, struct Options *options, u8 param3); u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); u8 FUN_020546C8(u32 param0); -void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3); -void FUN_02054744(u32 *param0, u32 param1, u32 param2); +void FUN_020546E0(struct UnkStruct2 *param0, struct Window *param1, u32 param2, u32 param3); +void FUN_02054744(struct Window *param0, u32 param1, u32 param2); -#endif //POKEDIAMOND_UNK_02054590_H +#endif // POKEDIAMOND_UNK_02054590_H -- cgit v1.2.3 From 8df65ef7a08ee617dc858e4f40429c01f866f1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 20 May 2021 19:22:55 +0200 Subject: more extern cleanups --- include/GX_layers.h | 27 ++++++++++++++++++++++++--- include/error_message_reset.h | 24 ------------------------ include/script_buffers.h | 5 +++-- include/text.h | 3 ++- 4 files changed, 29 insertions(+), 30 deletions(-) (limited to 'include') diff --git a/include/GX_layers.h b/include/GX_layers.h index e94fb4ec..69fdc198 100644 --- a/include/GX_layers.h +++ b/include/GX_layers.h @@ -3,9 +3,6 @@ #include "global.h" -#include "GX_vramcnt.h" -#include "error_message_reset.h" -#include "gx.h" struct GX_LayerData { @@ -20,6 +17,30 @@ typedef enum { } GX_LayerToggle; +struct GraphicsBanks +{ + s32 bg; + s32 bgextpltt; + s32 subbg; + s32 subbgextpltt; + s32 obj; + s32 objextpltt; + s32 subobj; + s32 subobjextpltt; + s32 tex; + s32 texpltt; +}; + + +struct GraphicsModes { + u32 mode1; + u32 mode2; + u32 mode3; + u32 mode4; +}; + + + THUMB_FUNC void GX_SetBanks(const struct GraphicsBanks *banks); THUMB_FUNC void GX_DisableEngineALayers(); THUMB_FUNC void GX_EngineAToggleLayers(u32 layer_mask, GX_LayerToggle layer_toggle); diff --git a/include/error_message_reset.h b/include/error_message_reset.h index d12cbf33..8c44c0a8 100644 --- a/include/error_message_reset.h +++ b/include/error_message_reset.h @@ -9,30 +9,6 @@ #include "text.h" - -struct GraphicsBanks -{ - s32 bg; - s32 bgextpltt; - s32 subbg; - s32 subbgextpltt; - s32 obj; - s32 objextpltt; - s32 subobj; - s32 subobjextpltt; - s32 tex; - s32 texpltt; -}; - - -struct GraphicsModes { - u32 mode1; - u32 mode2; - u32 mode3; - u32 mode4; -}; - - THUMB_FUNC void VBlankHandler(); THUMB_FUNC void PrintErrorMessageAndReset(); diff --git a/include/script_buffers.h b/include/script_buffers.h index d0fff528..20de53de 100644 --- a/include/script_buffers.h +++ b/include/script_buffers.h @@ -4,6 +4,7 @@ #include "pokemon.h" #include "pokemon_storage_system.h" #include "trainer_data.h" +#include "unk_02016B94.h" struct UnkStruct_0200AA80_sub_sub { @@ -105,7 +106,7 @@ void StringExpandPlaceholders(struct ScrStrBufs * mgr, struct String * dest, str void ScrStrBufs_ResetBuffers(struct ScrStrBufs * mgr); struct UnkStruct_0200B870 * MessagePrinter_new(u32 r5, u32 r6, u32 sp4, u32 r4); void MessagePrinter_delete(struct UnkStruct_0200B870 * a0); -void FUN_0200B9A8(struct UnkStruct_0200B870 * a0, int a1, int a2, int a3, int a4); -void FUN_0200B9EC(struct UnkStruct_0200B870 * string, u32 value, u32 n, enum PrintingMode mode, int sp30, int r5, int r7); +void FUN_0200B9A8(struct UnkStruct_0200B870 * a0, int a1, struct Window *a2, int a3, int a4); +void FUN_0200B9EC(struct UnkStruct_0200B870 * string, u32 value, u32 n, enum PrintingMode mode, struct Window *sp30, int r5, int r7); #endif //POKEDIAMOND_SCRIPT_BUFFERS_H diff --git a/include/text.h b/include/text.h index 40f4d03a..0874f21d 100644 --- a/include/text.h +++ b/include/text.h @@ -2,11 +2,12 @@ #define POKEDIAMOND_TEXT_H #include "global.h" +#include "unk_02016B94.h" struct TextPrinterTemplate { const u16* currentChar; - u32 windowId; + struct Window *windowId; u8 padding[1]; u8 fontId; u8 x; -- cgit v1.2.3 From d2caf0745621b35455cd6d82ffe55d3a6d40235a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Thu, 20 May 2021 19:25:56 +0200 Subject: struct renaming --- include/script.h | 2 +- include/text_02054590.h | 4 +- include/unk_02016B94.h | 116 ++++++++++++++++++++++++------------------------ 3 files changed, 61 insertions(+), 61 deletions(-) (limited to 'include') diff --git a/include/script.h b/include/script.h index 92d586b6..01bba305 100644 --- a/include/script.h +++ b/include/script.h @@ -28,7 +28,7 @@ struct UnkStruct_02046444 struct UnkSavStruct80 { u8 padding[0x8]; - struct UnkStruct2 *unk08; + struct UnkStruct_02016B94_2 *unk08; struct SaveBlock2 *saveBlock2; //0xC struct UnkStruct_0204639C *unk10; u8 padding2[0x8]; diff --git a/include/text_02054590.h b/include/text_02054590.h index 6c5090e7..57560595 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -6,13 +6,13 @@ #include "unk_02016B94.h" void FUN_02054590(u32 param0, u32 param1); -void FUN_020545B8(struct UnkStruct2 *param0, struct Window *param1, u32 param2); +void FUN_020545B8(struct UnkStruct_02016B94_2 *param0, struct Window *param1, u32 param2); void FUN_02054608(struct Window *param0, struct Options *options); void FUN_0205464C(struct Window *param0); u16 FUN_02054658(u8 windowId, const u16 *str, struct Options *options, u8 param3); u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); u8 FUN_020546C8(u32 param0); -void FUN_020546E0(struct UnkStruct2 *param0, struct Window *param1, u32 param2, u32 param3); +void FUN_020546E0(struct UnkStruct_02016B94_2 *param0, struct Window *param1, u32 param2, u32 param3); void FUN_02054744(struct Window *param0, u32 param1, u32 param2); #endif // POKEDIAMOND_UNK_02054590_H diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index f4e57737..b19fd625 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -13,7 +13,7 @@ #define reg_G2_BG3P (u32 *)0x4000030 #define reg_G2S_DB_BG2P (u32 *)0x4001020 #define reg_G2S_DB_BG3P (u32 *)0x4001030 -struct UnkStruct1 +struct UnkStruct_02016B94_1 { u32 unk00; u32 unk04; @@ -31,13 +31,13 @@ struct UnkStruct1 u32 unk18; }; -struct UnkStruct2 +struct UnkStruct_02016B94_2 { u32 unk00; u16 unk04; u16 unk06; - struct InnerStruct + struct UnkStruct_02016B94_2_sub { void *unk08; u32 unk0c; @@ -59,14 +59,14 @@ struct UnkStruct2 } unk08[8]; }; -struct UnkStruct3 +struct UnkStruct_02016B94_3 { void *unk00; u16 unk04; u16 unk06; }; -struct UnkStruct4 +struct UnkStruct_02016B94_4 { u8 unk0; u8 unk1; @@ -79,7 +79,7 @@ struct UnkStruct4 struct Window { - struct UnkStruct2 *unk00; + struct UnkStruct_02016B94_2 *unk00; u8 unk04; u8 unk05; u8 unk06; @@ -91,53 +91,53 @@ struct Window void *unk0c; }; -struct UnkStruct2 *FUN_02016B94(u32 heap_id); +struct UnkStruct_02016B94_2 *FUN_02016B94(u32 heap_id); u32 FUN_02016BB8(u32 *param0); void FUN_02016BBC(const struct GraphicsModes *modes); void FUN_02016BF4(u32 *param0, u32 param1); -void FUN_02016C18(struct UnkStruct2 *param0, u8 param1, struct UnkStruct1 *param2, u8 param3); -void FUN_020170F4(struct UnkStruct2 *param0, u8 param1, u32 param2, u8 param3); +void FUN_02016C18(struct UnkStruct_02016B94_2 *param0, u8 param1, struct UnkStruct_02016B94_1 *param2, u8 param3); +void FUN_020170F4(struct UnkStruct_02016B94_2 *param0, u8 param1, u32 param2, u8 param3); u8 FUN_020177DC(u8 param0, u32 param1); void FUN_02017850(u32 param0, u8 *param1, u8 *param2); -void FUN_020178A0(struct UnkStruct2 *param0, u32 param1); +void FUN_020178A0(struct UnkStruct_02016B94_2 *param0, u32 param1); void FUN_020178BC(u32 param0, u16 param1); void FUN_0201797C(u32 param0, GX_LayerToggle toggle); -void FUN_020179E0(struct UnkStruct2 *param0, u32 param1, u32 param2, fx32 val); -fx32 FUN_02017B48(struct UnkStruct2 *param0, u32 param1); -fx32 FUN_02017B54(struct UnkStruct2 *param0, u32 param1); -void FUN_02017B60(struct UnkStruct2 *param0, +void FUN_020179E0(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 val); +fx32 FUN_02017B48(struct UnkStruct_02016B94_2 *param0, u32 param1); +fx32 FUN_02017B54(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02017B60(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 param3, struct Mtx22 *param4, fx32 param5, fx32 param6); -void FUN_02017B8C(struct InnerStruct *param0, u32 param1, fx32 val); +void FUN_02017B8C(struct UnkStruct_02016B94_2_sub *param0, u32 param1, fx32 val); void FUN_02017BD0( - struct UnkStruct2 *param0, u32 param1, struct Mtx22 *param2, fx32 param3, fx32 param4); -void FUN_02017C6C(struct UnkStruct2 *param0, u32 param1); + struct UnkStruct_02016B94_2 *param0, u32 param1, struct Mtx22 *param2, fx32 param3, fx32 param4); +void FUN_02017C6C(struct UnkStruct_02016B94_2 *param0, u32 param1); void FUN_02017C98(const void *param0, void *param1, u32 param2); -void FUN_02017CD0(struct UnkStruct2 *param0, u32 param1); -void FUN_02017CE8(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017CD0(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02017CE8(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017D68(u32 param0, void *param1, u32 offset, u32 size); -void FUN_02017DFC(struct UnkStruct2 *param0, u32 param1, void *param2, u32 param3); -void FUN_02017E14(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); -void FUN_02017E40(struct UnkStruct2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017DFC(struct UnkStruct_02016B94_2 *param0, u32 param1, void *param2, u32 param3); +void FUN_02017E14(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017E40(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017E84(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017F18(u32 param0, u32 size, u32 offset, u32 heap_id); -void FUN_02017F48(struct UnkStruct2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); +void FUN_02017F48(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); void FUN_02017FB4(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017FE4(u32 param0, u32 param1); u16 FUN_02017FFC(u8 param0, u8 param1, u8 param2); u16 FUN_02018068(u8 param0, u8 param1, u8 param2, u8 param3); -void FUN_02018148(struct UnkStruct2 *param0, +void FUN_02018148(struct UnkStruct_02016B94_2 *param0, u32 param1, void *param2, u8 param3, u8 param4, u8 param5, u8 param6); -void FUN_02018170(struct UnkStruct2 *param0, +void FUN_02018170(struct UnkStruct_02016B94_2 *param0, u32 param1, u8 param2, u8 param3, @@ -148,7 +148,7 @@ void FUN_02018170(struct UnkStruct2 *param0, u8 param8, u8 param9, u8 param10); -void FUN_020181EC(struct UnkStruct2 *param0, +void FUN_020181EC(struct UnkStruct_02016B94_2 *param0, u32 param1, u8 param2, u8 param3, @@ -159,7 +159,7 @@ void FUN_020181EC(struct UnkStruct2 *param0, u8 param8, u8 param9, u8 param10); -void FUN_02018268(struct InnerStruct *param0, +void FUN_02018268(struct UnkStruct_02016B94_2_sub *param0, u8 param1, u8 param2, u8 param3, @@ -170,7 +170,7 @@ void FUN_02018268(struct InnerStruct *param0, u8 param8, u8 param9, u8 param10); -void FUN_020183DC(struct InnerStruct *param0, +void FUN_020183DC(struct UnkStruct_02016B94_2_sub *param0, u8 param1, u8 param2, u8 param3, @@ -181,7 +181,7 @@ void FUN_020183DC(struct InnerStruct *param0, u8 param8, u8 param9, u8 param10); -void FUN_02018540(struct UnkStruct2 *param0, +void FUN_02018540(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2, u8 param3, @@ -190,22 +190,22 @@ void FUN_02018540(struct UnkStruct2 *param0, u8 param6, u8 param7); void FUN_02018590( - struct InnerStruct *param0, u16 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); + struct UnkStruct_02016B94_2_sub *param0, u16 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); void FUN_02018640( - struct InnerStruct *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5); + struct UnkStruct_02016B94_2_sub *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5); void FUN_020186B4( - struct UnkStruct2 *param0, u32 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); -void FUN_02018744(struct UnkStruct2 *param0, u32 param1); -void FUN_02018768(struct UnkStruct2 *param0, u32 param1, u16 param2); -void FUN_0201878C(struct UnkStruct2 *param0, u32 param1, u16 param2); + struct UnkStruct_02016B94_2 *param0, u32 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_02018744(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02018768(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); +void FUN_0201878C(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); void *FUN_020187B0(u32 param0); void FUN_02018808(u8 *param0, u32 param1, u8 (*param2)[2], u8 param3); u8 (*FUN_02018848(u8 *param0, u32 param1, u8 param2, u32 heap_id))[2]; -void *FUN_0201886C(struct UnkStruct2 *param0, u32 param1); -u16 FUN_02018878(struct UnkStruct2 *param0, u32 param1); -u8 FUN_02018884(struct UnkStruct2 *param0, u32 param1); -void FUN_02018A60(struct UnkStruct3 *param0, - struct UnkStruct3 *param1, +void *FUN_0201886C(struct UnkStruct_02016B94_2 *param0, u32 param1); +u16 FUN_02018878(struct UnkStruct_02016B94_2 *param0, u32 param1); +u8 FUN_02018884(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_02018A60(struct UnkStruct_02016B94_3 *param0, + struct UnkStruct_02016B94_3 *param1, u16 param2, u16 param3, u16 param4, @@ -213,8 +213,8 @@ void FUN_02018A60(struct UnkStruct3 *param0, u16 param6, u16 param7, u16 param8); -void FUN_02018CA0(struct UnkStruct3 *param0, - struct UnkStruct3 *param1, +void FUN_02018CA0(struct UnkStruct_02016B94_3 *param0, + struct UnkStruct_02016B94_3 *param1, u16 param2, u16 param3, u16 param4, @@ -223,13 +223,13 @@ void FUN_02018CA0(struct UnkStruct3 *param0, u16 param7, u16 param8); void FUN_02018E88( - struct UnkStruct3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); + struct UnkStruct_02016B94_3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); void FUN_02018F4C( - struct UnkStruct3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); + struct UnkStruct_02016B94_3 *param0, u16 param1, u16 param2, u16 param3, u16 param4, u8 param5); void *FUN_02018FF4(u32 heap_id, s32 size); void FUN_0201901C(struct Window *param0); BOOL FUN_02019048(struct Window *param0); -void FUN_02019064(struct UnkStruct2 *param0, +void FUN_02019064(struct UnkStruct_02016B94_2 *param0, struct Window *param1, u8 param2, u8 param3, @@ -239,8 +239,8 @@ void FUN_02019064(struct UnkStruct2 *param0, u8 param7, u16 param8); void FUN_020190EC( - struct UnkStruct2 *param0, struct Window *param1, u8 param2, u8 param3, u16 param4, u8 param5); -void FUN_02019150(struct UnkStruct2 *param0, struct Window *param1, struct UnkStruct4 *param2); + struct UnkStruct_02016B94_2 *param0, struct Window *param1, u8 param2, u8 param3, u16 param4, u8 param5); +void FUN_02019150(struct UnkStruct_02016B94_2 *param0, struct Window *param1, struct UnkStruct_02016B94_4 *param2); void FUN_02019178(struct Window *param0); void FUN_020191A4(struct Window *param0, int param1); void CopyWindowToVram(struct Window *param0); @@ -301,16 +301,16 @@ void FUN_0201AB20(struct Window *window, u8 param1); void FUN_0201AB24(struct Window *window, u8 param1); u32 FUN_0201AB28(struct Window *window, u32 heap_id, const char *path); u32 FUN_0201AB44(struct Window *window, u32 heap_id, const char *path); -void FUN_0201AB60(struct UnkStruct2 *param0); -void FUN_0201AB78(struct UnkStruct2 *param0); -void FUN_0201AC68(struct UnkStruct2 *param0, u32 param1); -void FUN_0201AC78(struct UnkStruct2 *param0); -void FUN_0201AEE4(struct UnkStruct2 *param0, u32 param1, u32 param2, fx32 param3); -void FUN_0201AF08(struct UnkStruct2 *param0, u32 param1, u32 param2, u16 param3); -void FUN_0201AF2C(struct InnerStruct *param0, u32 param1, u16 val); -void FUN_0201AF50(struct UnkStruct2 *param0, u32 param1, u32 param2, fx32 param3); -void FUN_0201AF74(struct InnerStruct *param0, u32 param1, fx32 val); -u32 FUN_0201AFBC(struct UnkStruct2 *param0, u8 param1, u8 param2, u8 param3, u16 *param4); -void FUN_0201B118(struct UnkStruct2 *param0, u8 param1, u8 *param2); +void FUN_0201AB60(struct UnkStruct_02016B94_2 *param0); +void FUN_0201AB78(struct UnkStruct_02016B94_2 *param0); +void FUN_0201AC68(struct UnkStruct_02016B94_2 *param0, u32 param1); +void FUN_0201AC78(struct UnkStruct_02016B94_2 *param0); +void FUN_0201AEE4(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 param3); +void FUN_0201AF08(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, u16 param3); +void FUN_0201AF2C(struct UnkStruct_02016B94_2_sub *param0, u32 param1, u16 val); +void FUN_0201AF50(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, fx32 param3); +void FUN_0201AF74(struct UnkStruct_02016B94_2_sub *param0, u32 param1, fx32 val); +u32 FUN_0201AFBC(struct UnkStruct_02016B94_2 *param0, u8 param1, u8 param2, u8 param3, u16 *param4); +void FUN_0201B118(struct UnkStruct_02016B94_2 *param0, u8 param1, u8 *param2); #endif // POKEDIAMOND_UNK_02016B94_H -- cgit v1.2.3 From 80231d12b10043197be4d01222346fe7f0b72900 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 May 2021 09:08:28 -0400 Subject: ListMenuGetSetTemplateField --- include/list_menu.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index 67b73893..5f8e6944 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -32,10 +32,15 @@ struct ListMenuItem // TODO: Document remaining fields. // A lot of these are named based on similar fields in gen 3. + +typedef void (*LM_MOVECURSORFUNC)(s32, u8, struct ListMenu *); +typedef void (*LM_ITEMPRINTFUNC)(struct Window *, s32, u8); + struct ListMenuTemplate { - struct ListMenuItem * items; - u8 filler_04[8]; + /*0x00*/ struct ListMenuItem * items; + /*0x04*/ LM_MOVECURSORFUNC moveCursorFunc; + /*0x08*/ LM_ITEMPRINTFUNC itemPrintFunc; /*0x0C*/ struct Window * window; /*0x10*/ u16 totalItems; /*0x12*/ u16 maxShowed; @@ -50,7 +55,8 @@ struct ListMenuTemplate u16 itemVerticalPadding:4; u16 scrollMultiple:2; u16 fontId:6; - /*0x1C*/ u8 filler_1C[4]; + u16 unk_1B_7:1; + /*0x1C*/ u32 unk_1C; }; struct ListMenu -- cgit v1.2.3 From 11f1419d080f346574b7a83d528c42a9473d41ec Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 May 2021 12:51:26 -0400 Subject: ListMenuPrint --- include/list_menu.h | 11 +++-------- include/text.h | 15 +++++++++++---- 2 files changed, 14 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index 5f8e6944..0be1a32a 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -1,6 +1,8 @@ #ifndef POKEDIAMOND_LIST_MENU_H #define POKEDIAMOND_LIST_MENU_H +#include "text.h" + #define LIST_HEADER -3 #define LIST_CANCEL -2 #define LIST_NOTHING_CHOSEN -1 @@ -11,13 +13,6 @@ struct ListMenu; -// TODO: Move to its own header, and fill it out -struct Window -{ - u8 * unk_00; - u8 unk_04; -}; - // TODO: Move to its own header, and fill it out struct ListMenuCursor { @@ -70,7 +65,7 @@ struct ListMenu /*0x22*/ u8 lettersSpacing:6; /*0x23*/ u8 unk_23; /*0x24*/ u8 fontId:7; - u8 enabled:1; + u8 overrideEnabled:1; /*0x28*/ struct ListMenuCursor *cursor; /*0x2c*/ u16 cursorPos; /*0x2e*/ u16 itemsAbove; diff --git a/include/text.h b/include/text.h index 40f4d03a..1218a0b3 100644 --- a/include/text.h +++ b/include/text.h @@ -3,10 +3,17 @@ #include "global.h" +// TODO: Move to its own header, and fill it out +struct Window +{ + u8 * unk_00; + u8 unk_04; +}; + struct TextPrinterTemplate { const u16* currentChar; - u32 windowId; + struct Window * window; u8 padding[1]; u8 fontId; u8 x; @@ -69,9 +76,9 @@ BOOL FUN_0201BD44(u32 param0); void FUN_0201BD5C(void); u8 FUN_0201BD70(u32 param0); void FUN_0201BD7C(u32 param0); -u16 AddTextPrinterParameterized(u32 windowId, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u8 (*callback)(struct TextPrinterTemplate *, u16)); -u16 AddTextPrinterParameterized2(u32 windowId, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u32 colors, u8 (*callback)(struct TextPrinterTemplate *, u16)); -u16 AddTextPrinterParameterized3(u32 windowId, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u32 colors, u32 letterSpacing, u32 lineSpacing, u8 (*callback)(struct TextPrinterTemplate *, u16)); +u16 AddTextPrinterParameterized(struct Window * window, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u8 (*callback)(struct TextPrinterTemplate *, u16)); +u16 AddTextPrinterParameterized2(struct Window * window, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u32 colors, u8 (*callback)(struct TextPrinterTemplate *, u16)); +u16 AddTextPrinterParameterized3(struct Window * window, u32 fontId, const u16 *str, u32 x, u32 y, u32 speed, u32 colors, u32 letterSpacing, u32 lineSpacing, u8 (*callback)(struct TextPrinterTemplate *, u16)); u16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u32 speed, u8 (*callback)(struct TextPrinterTemplate *, u16)); void RunTextPrinter(u32 param0, struct TextPrinter *printer); u32 RenderFont(struct TextPrinter *printer); -- cgit v1.2.3 From bcc2b21b1db3a0a54c5d5c446644b288064e14d9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 May 2021 13:45:38 -0400 Subject: ListMenuUpdateSelectedRowIndexAndScrollOffset --- include/list_menu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index 0be1a32a..966a942a 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -29,7 +29,7 @@ struct ListMenuItem // A lot of these are named based on similar fields in gen 3. typedef void (*LM_MOVECURSORFUNC)(s32, u8, struct ListMenu *); -typedef void (*LM_ITEMPRINTFUNC)(struct Window *, s32, u8); +typedef void (*LM_ITEMPRINTFUNC)(struct ListMenu *, s32, u8); struct ListMenuTemplate { @@ -50,7 +50,7 @@ struct ListMenuTemplate u16 itemVerticalPadding:4; u16 scrollMultiple:2; u16 fontId:6; - u16 unk_1B_7:1; + u16 cursorKind:1; /*0x1C*/ u32 unk_1C; }; -- cgit v1.2.3 From 433f9a7f144c3f0fcad357f8916cf1d599a1bcd4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 May 2021 16:09:22 -0400 Subject: Finish decompiling list_menu --- include/heap.h | 2 +- include/list_menu.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/heap.h b/include/heap.h index 69aedd9e..5dc51795 100644 --- a/include/heap.h +++ b/include/heap.h @@ -28,7 +28,7 @@ THUMB_FUNC void FUN_02016988(); void *AllocFromHeap(u32 heap_id, u32 size); void *AllocFromHeapAtEnd(u32 heap_id, u32 size); void FreeToHeap(void *ptr); -void FUN_02016A8C(u32 heap_id, void * ptr); +void FreeToHeapExplicit(u32 heap_id, void * ptr); THUMB_FUNC u32 FUN_02016AF8(u32 param0); THUMB_FUNC void FUN_02016B20(u32 param0, u32 param1, u32 param2); THUMB_FUNC void FUN_02016B44(void *ptr, u32 param1); diff --git a/include/list_menu.h b/include/list_menu.h index 966a942a..35fc44e6 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -28,8 +28,8 @@ struct ListMenuItem // TODO: Document remaining fields. // A lot of these are named based on similar fields in gen 3. -typedef void (*LM_MOVECURSORFUNC)(s32, u8, struct ListMenu *); -typedef void (*LM_ITEMPRINTFUNC)(struct ListMenu *, s32, u8); +typedef void (*LM_MOVECURSORFUNC)(struct ListMenu *list, s32 index, u8 onInit); +typedef void (*LM_ITEMPRINTFUNC)(struct ListMenu *list, s32 index, u8 y); struct ListMenuTemplate { -- cgit v1.2.3 From 70b098f92d46c134388e02bd8c436649fe31e999 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 May 2021 19:43:41 -0400 Subject: Fix parameterization --- include/font.h | 6 ++++++ include/list_menu.h | 8 +------- include/list_menu_cursor.h | 17 +++++++++++++++++ include/text.h | 9 ++------- include/text_02054590.h | 11 ++++++----- include/window.h | 25 +++++++++++++++++++++++++ 6 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 include/font.h create mode 100644 include/list_menu_cursor.h create mode 100644 include/window.h (limited to 'include') diff --git a/include/font.h b/include/font.h new file mode 100644 index 00000000..e5e64e88 --- /dev/null +++ b/include/font.h @@ -0,0 +1,6 @@ +#ifndef POKEDIAMOND_FONT_H +#define POKEDIAMOND_FONT_H + +extern s32 GetFontAttribute(u8 fontId, s32 attr); + +#endif // POKEDIAMOND_FONT_H diff --git a/include/list_menu.h b/include/list_menu.h index 35fc44e6..4cc1d247 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -1,7 +1,7 @@ #ifndef POKEDIAMOND_LIST_MENU_H #define POKEDIAMOND_LIST_MENU_H -#include "text.h" +#include "list_menu_cursor.h" #define LIST_HEADER -3 #define LIST_CANCEL -2 @@ -13,12 +13,6 @@ struct ListMenu; -// TODO: Move to its own header, and fill it out -struct ListMenuCursor -{ - // ??? -}; - struct ListMenuItem { const u16 * text; diff --git a/include/list_menu_cursor.h b/include/list_menu_cursor.h new file mode 100644 index 00000000..355c63ec --- /dev/null +++ b/include/list_menu_cursor.h @@ -0,0 +1,17 @@ +#ifndef POKEDIAMOND_LIST_MENU_CURSOR_H +#define POKEDIAMOND_LIST_MENU_CURSOR_H + +#include "window.h" + +// TODO: Move to its own header, and fill it out +struct ListMenuCursor +{ + // ??? +}; + +extern struct ListMenuCursor * ListMenuCursorNew(u32 heap_id); +extern void ListMenuUpdateCursorObj(struct ListMenuCursor *, struct Window *, u8 x, u8 y); +extern void ListMenuCursorSetColor(struct ListMenuCursor *, u32); +extern void DestroyListMenuCursorObj(struct ListMenuCursor *); + +#endif // POKEDIAMOND_LIST_MENU_CURSOR_H diff --git a/include/text.h b/include/text.h index 1218a0b3..78bfb9d4 100644 --- a/include/text.h +++ b/include/text.h @@ -2,13 +2,8 @@ #define POKEDIAMOND_TEXT_H #include "global.h" - -// TODO: Move to its own header, and fill it out -struct Window -{ - u8 * unk_00; - u8 unk_04; -}; +#include "window.h" +#include "font.h" struct TextPrinterTemplate { diff --git a/include/text_02054590.h b/include/text_02054590.h index 725bd9b4..b1ee055a 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -3,15 +3,16 @@ #include "global.h" #include "options.h" +#include "window.h" void FUN_02054590(u32 param0, u32 param1); void FUN_020545B8(u32 param0, u32 param1, u32 param2); -void FUN_02054608(u32 *param0, struct Options *options); -void FUN_0205464C(u32 *param0); -u16 FUN_02054658(u8 windowId, const u16 *str, struct Options *options, u8 param3); -u16 DrawFieldMessage(u8 windowId, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); +void FUN_02054608(struct Window *param0, struct Options *options); +void FUN_0205464C(struct Window *param0); +u16 FUN_02054658(struct Window * window, const u16 *str, struct Options *options, u8 param3); +u16 DrawFieldMessage(struct Window * window, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); u8 FUN_020546C8(u32 param0); void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3); -void FUN_02054744(u32 *param0, u32 param1, u32 param2); +void FUN_02054744(struct Window *param0, u32 param1, u32 param2); #endif //POKEDIAMOND_UNK_02054590_H diff --git a/include/window.h b/include/window.h new file mode 100644 index 00000000..ebe3338a --- /dev/null +++ b/include/window.h @@ -0,0 +1,25 @@ +#ifndef POKEDIAMOND_WINDOW_H +#define POKEDIAMOND_WINDOW_H + +struct Window +{ + u8 * unk_00; + u8 unk_04; + u8 unk_05; + u8 unk_06; + u8 width; + u8 height; + u8 unk_9; + u16 unk_A_0:15; + u16 unk_A_15:1; + void * unk_C; +}; + +extern void FillWindowPixelBuffer(struct Window *, u32); +extern void CopyWindowToVram(struct Window *); +extern void FillWindowPixelRect(struct Window *, u32 fillValue, u16 x, u16 y, u16 width, u16 height); +extern void ScrollWindow(struct Window *, u8, u8, u8); +extern u16 GetWindowWidth(struct Window *); +extern u16 GetWindowHeight(struct Window *); + +#endif // POKEDIAMOND_WINDOW_H -- cgit v1.2.3 From 4d5947ecb02e28fce1cd1156bd6908571fbf29bd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 May 2021 21:50:44 -0400 Subject: Adjust typing in text.c routines --- include/text.h | 66 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'include') diff --git a/include/text.h b/include/text.h index 78bfb9d4..c9afc9b3 100644 --- a/include/text.h +++ b/include/text.h @@ -7,49 +7,49 @@ struct TextPrinterTemplate { - const u16* currentChar; - struct Window * window; - u8 padding[1]; - u8 fontId; - u8 x; - u8 y; - u8 currentX; - u8 currentY; - u8 letterSpacing; - u8 lineSpacing; - u8 unk; - u8 fgColor; - u8 bgColor; - u8 shadowColor; - union - { - struct - { - u16 unk2; - u8 unk3; - u8 unk4; - }; - u32 Unk20; //todo this can't be right - }; + const u16* currentChar; // 0 + struct Window * window; // 4 + u8 padding[1]; // 8 + u8 fontId; // 9 + u8 x; // a + u8 y; // b + u8 currentX; // c + u8 currentY; // d + u8 letterSpacing; // e + u8 lineSpacing; // f + u8 unk; // 10 + u8 fgColor; // 11 + u8 bgColor; // 12 + u8 shadowColor; // 13 + u16 unk2; // 14 + u8 unk3; // 16 + u8 unk4; // 17 +}; + +struct Font +{ + u8 filler[20]; + void * unk20; }; struct TextPrinter { struct TextPrinterTemplate printerTemplate; - u8 (*callback)(struct TextPrinterTemplate *, u16); // 0x10 + u8 (*callback)(struct TextPrinterTemplate *, u16); // 0x18 u8 subStructFields[7]; // always cast to struct TextPrinterSubStruct... so why bother - u8 active; - u8 state; // 0x1C - u8 textSpeedBottom:7; + // 1c + u8 active; // 23 + u8 state; // 0x24 + u8 textSpeedBottom:7; // 25 u8 textSpeedTop:1; - u8 delayCounter; - u8 scrollDistance; - u8 minLetterSpacing; // 0x20 + u8 delayCounter; // 26 + u8 scrollDistance; // 27 + u8 minLetterSpacing; // 0x28 u8 Unk29; // used to be japanese, not sure about that anymore u16 Unk2A; - void *Unk2C; + u16 *Unk2C; }; struct FontInfo @@ -80,7 +80,7 @@ u32 RenderFont(struct TextPrinter *printer); void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor); void DecompressGlyphTile(const u16 *src, u16 *dst); void FUN_0201C1A8(struct TextPrinter *printer); -void *FUN_0201C1B0(void); +u16 *FUN_0201C1B0(void); void FUN_0201C1EC(struct TextPrinter *printer, u32 param1, u32 param2, u32 param3); void FUN_0201C238(struct TextPrinter *printer); -- cgit v1.2.3 From ef69f285d6103c8ff20092ee14d0ee0b1d51794b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 22 May 2021 07:37:19 -0400 Subject: Remove THUMB_FUNC from headers --- include/GX_layers.h | 18 ++--- include/error_message_reset.h | 4 +- include/heap.h | 24 +++--- include/list_menu.h | 8 +- include/timer3.h | 12 +-- include/unk_02015E30.h | 6 +- include/unk_02024E64.h | 20 ++--- include/unk_0202D858.h | 6 +- include/unk_0202F150.h | 180 +++++++++++++++++++++--------------------- include/unk_02031480.h | 40 +++++----- include/unk_0205FA2C.h | 42 +++++----- include/unk_0206015C.h | 4 +- 12 files changed, 182 insertions(+), 182 deletions(-) (limited to 'include') diff --git a/include/GX_layers.h b/include/GX_layers.h index e94fb4ec..d6afc743 100644 --- a/include/GX_layers.h +++ b/include/GX_layers.h @@ -20,14 +20,14 @@ typedef enum { } GX_LayerToggle; -THUMB_FUNC void GX_SetBanks(const struct GraphicsBanks *banks); -THUMB_FUNC void GX_DisableEngineALayers(); -THUMB_FUNC void GX_EngineAToggleLayers(u32 layer_mask, GX_LayerToggle layer_toggle); -THUMB_FUNC void GX_SetEngineALayers(u32 layer_mask); -THUMB_FUNC void GX_DisableEngineBLayers(); -THUMB_FUNC void GX_EngineBToggleLayers(u32 layer_mask, GX_LayerToggle layer_toggle); -THUMB_FUNC void GX_BothDispOn(); -THUMB_FUNC void GX_SwapDisplay(); -THUMB_FUNC u32 GX_GetEngineALayers(); +void GX_SetBanks(const struct GraphicsBanks *banks); +void GX_DisableEngineALayers(); +void GX_EngineAToggleLayers(u32 layer_mask, GX_LayerToggle layer_toggle); +void GX_SetEngineALayers(u32 layer_mask); +void GX_DisableEngineBLayers(); +void GX_EngineBToggleLayers(u32 layer_mask, GX_LayerToggle layer_toggle); +void GX_BothDispOn(); +void GX_SwapDisplay(); +u32 GX_GetEngineALayers(); #endif //POKEDIAMOND_GX_LAYERS_H diff --git a/include/error_message_reset.h b/include/error_message_reset.h index d12cbf33..c3a3dd6a 100644 --- a/include/error_message_reset.h +++ b/include/error_message_reset.h @@ -33,7 +33,7 @@ struct GraphicsModes { }; -THUMB_FUNC void VBlankHandler(); -THUMB_FUNC void PrintErrorMessageAndReset(); +void VBlankHandler(); +void PrintErrorMessageAndReset(); #endif //POKEDIAMOND_ERROR_MESSAGE_RESET_H diff --git a/include/heap.h b/include/heap.h index 5dc51795..de1f5f18 100644 --- a/include/heap.h +++ b/include/heap.h @@ -17,21 +17,21 @@ struct UnkStruct_020166C8 }; -THUMB_FUNC void FUN_020166C8(u32 *param0, u32 param1, u32 param2, u32 pre_size); -THUMB_FUNC s32 FUN_020167F4(); -THUMB_FUNC u32 FUN_0201681C(u32 param0, u32 heap_id, u32 param2); -THUMB_FUNC u32 FUN_02016828(u32 param0, u32 param1, u32 param2); -THUMB_FUNC u32 FUN_02016834(u32 param0, u32 param1, u32 param2, s32 param3); -THUMB_FUNC void FUN_020168D0(u32 heap_id); -THUMB_FUNC u32 *FUN_02016944(void *param0, u32 param1, s32 param2, u32 param3); -THUMB_FUNC void FUN_02016988(); +void FUN_020166C8(u32 *param0, u32 param1, u32 param2, u32 pre_size); +s32 FUN_020167F4(); +u32 FUN_0201681C(u32 param0, u32 heap_id, u32 param2); +u32 FUN_02016828(u32 param0, u32 param1, u32 param2); +u32 FUN_02016834(u32 param0, u32 param1, u32 param2, s32 param3); +void FUN_020168D0(u32 heap_id); +u32 *FUN_02016944(void *param0, u32 param1, s32 param2, u32 param3); +void FUN_02016988(); void *AllocFromHeap(u32 heap_id, u32 size); void *AllocFromHeapAtEnd(u32 heap_id, u32 size); void FreeToHeap(void *ptr); void FreeToHeapExplicit(u32 heap_id, void * ptr); -THUMB_FUNC u32 FUN_02016AF8(u32 param0); -THUMB_FUNC void FUN_02016B20(u32 param0, u32 param1, u32 param2); -THUMB_FUNC void FUN_02016B44(void *ptr, u32 param1); -THUMB_FUNC u32 FUN_02016B90(u32 param0); +u32 FUN_02016AF8(u32 param0); +void FUN_02016B20(u32 param0, u32 param1, u32 param2); +void FUN_02016B44(void *ptr, u32 param1); +u32 FUN_02016B90(u32 param0); #endif //POKEDIAMOND_HEAP_H diff --git a/include/list_menu.h b/include/list_menu.h index 4cc1d247..11322674 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -70,9 +70,9 @@ struct ListMenu /*0x34*/ u8 heap_id; }; -THUMB_FUNC struct ListMenu * ListMenuInit(const struct ListMenuTemplate * template, u16 cursorPos, u16 itemsAbove, u32 heap_id); -THUMB_FUNC s32 ListMenu_ProcessInput(struct ListMenu * list); -THUMB_FUNC void DestroyListMenu(struct ListMenu * list, u16 * cursorPos, u16 * itemsAbove); -THUMB_FUNC void RedrawListMenu(struct ListMenu * list); +struct ListMenu * ListMenuInit(const struct ListMenuTemplate * template, u16 cursorPos, u16 itemsAbove, u32 heap_id); +s32 ListMenu_ProcessInput(struct ListMenu * list); +void DestroyListMenu(struct ListMenu * list, u16 * cursorPos, u16 * itemsAbove); +void RedrawListMenu(struct ListMenu * list); #endif // POKEDIAMOND_LIST_MENU_H diff --git a/include/timer3.h b/include/timer3.h index be6e1da8..3220c7a3 100644 --- a/include/timer3.h +++ b/include/timer3.h @@ -10,12 +10,12 @@ struct Timer3Data vu64 Timer3Counter; }; -THUMB_FUNC void Init_Timer3(); -THUMB_FUNC void CountUpTimer3(); -THUMB_FUNC u64 internal_GetTimer3Count(); -THUMB_FUNC u64 GetTimer3Count(); -THUMB_FUNC u64 Timer3CountToMilliSeconds(u64 count); -THUMB_FUNC u64 Timer3CountToSeconds(u64 count); +void Init_Timer3(); +void CountUpTimer3(); +u64 internal_GetTimer3Count(); +u64 GetTimer3Count(); +u64 Timer3CountToMilliSeconds(u64 count); +u64 Timer3CountToSeconds(u64 count); #endif //POKEDIAMOND_TIMER3_H diff --git a/include/unk_02015E30.h b/include/unk_02015E30.h index 6a4d6c15..67a7aaaf 100644 --- a/include/unk_02015E30.h +++ b/include/unk_02015E30.h @@ -15,8 +15,8 @@ struct UnkStruct_02015E30 u64 unk18; }; -THUMB_FUNC void FUN_02015E30(); -THUMB_FUNC void FUN_02015E3C(struct IGT *igt); -THUMB_FUNC void FUN_02015E60(); +void FUN_02015E30(); +void FUN_02015E3C(struct IGT *igt); +void FUN_02015E60(); #endif //POKEDIAMOND_UNK_02015E30_H diff --git a/include/unk_02024E64.h b/include/unk_02024E64.h index ed1bd447..68e7103c 100644 --- a/include/unk_02024E64.h +++ b/include/unk_02024E64.h @@ -14,15 +14,15 @@ struct UnkStruct_02024E64 { u8 unk74A[2]; // might be padding }; -THUMB_FUNC u32 FUN_02024E64(); -THUMB_FUNC void FUN_02024E6C(struct UnkStruct_02024E64 *param0); -THUMB_FUNC struct UnkStruct_02024E64 *FUN_02024EB4(struct SaveBlock2 *sav2); -THUMB_FUNC void *FUN_02024EC0(struct SaveBlock2 *sav2); -THUMB_FUNC struct UnkStruct_02024E64 *FUN_02024ECC(struct SaveBlock2 *sav2); -THUMB_FUNC void *FUN_02024ED8(struct SaveBlock2 *sav2); -THUMB_FUNC u16 *GetRivalNamePtr(struct UnkStruct_02024E64 *unk); -THUMB_FUNC void RivalsNameToU16Array(struct UnkStruct_02024E64 *unk, struct String *str); -THUMB_FUNC u16 *FUN_02024F0C(struct UnkStruct_02024E64 *unk); -THUMB_FUNC void FUN_02024F18(struct UnkStruct_02024E64 *unk, struct String *str); +u32 FUN_02024E64(); +void FUN_02024E6C(struct UnkStruct_02024E64 *param0); +struct UnkStruct_02024E64 *FUN_02024EB4(struct SaveBlock2 *sav2); +void *FUN_02024EC0(struct SaveBlock2 *sav2); +struct UnkStruct_02024E64 *FUN_02024ECC(struct SaveBlock2 *sav2); +void *FUN_02024ED8(struct SaveBlock2 *sav2); +u16 *GetRivalNamePtr(struct UnkStruct_02024E64 *unk); +void RivalsNameToU16Array(struct UnkStruct_02024E64 *unk, struct String *str); +u16 *FUN_02024F0C(struct UnkStruct_02024E64 *unk); +void FUN_02024F18(struct UnkStruct_02024E64 *unk, struct String *str); #endif diff --git a/include/unk_0202D858.h b/include/unk_0202D858.h index 210821d0..b5845998 100644 --- a/include/unk_0202D858.h +++ b/include/unk_0202D858.h @@ -3,8 +3,8 @@ #include "global.h" -THUMB_FUNC u8 FUN_0202D858(u16 param0); -THUMB_FUNC u8 FUN_0202D884(u16 param0); -THUMB_FUNC u32 FUN_0202D8B0(int param0); +u8 FUN_0202D858(u16 param0); +u8 FUN_0202D884(u16 param0); +u32 FUN_0202D8B0(int param0); #endif // POKEDIAMOND_UNK_0202D858_H diff --git a/include/unk_0202F150.h b/include/unk_0202F150.h index 8f5cdd3e..b87bbf0c 100644 --- a/include/unk_0202F150.h +++ b/include/unk_0202F150.h @@ -87,100 +87,100 @@ struct UnkStruct0202F150 u8 unk68B; }; -THUMB_FUNC u32 FUN_0202F150(u32 param0, u32 param1); -THUMB_FUNC void FUN_0202F2F0(); -THUMB_FUNC void FUN_0202F5A4(); -THUMB_FUNC void FUN_0202F820(int param0); -THUMB_FUNC void FUN_0202F8D4(); -THUMB_FUNC void FUN_0202F910(int param0); -THUMB_FUNC BOOL FUN_0202F918(u32 param0, u32 param1, u32 param2, u32 param3); -THUMB_FUNC u32 FUN_0202F950(u32 param0, u32 param1, u32 param2); -THUMB_FUNC void FUN_0202F984(); -THUMB_FUNC void FUN_0202F9E0(u32 param0); -THUMB_FUNC void FUN_0202FA10(); -THUMB_FUNC void FUN_0202FA1C(); -THUMB_FUNC u8 FUN_0202FA28(); -THUMB_FUNC u32 FUN_0202FA48(); -THUMB_FUNC void FUN_0202FA5C(); -THUMB_FUNC u32 FUN_0202FB18(u32 param0); -THUMB_FUNC void FUN_0202FB20(); -THUMB_FUNC void FUN_0202FB58(); -THUMB_FUNC BOOL FUN_0202FB80(); -THUMB_FUNC void FUN_0202FC60(); -THUMB_FUNC void FUN_0202FC80(); -THUMB_FUNC void FUN_0202FCA8(); -THUMB_FUNC void FUN_0202FCCC(); -THUMB_FUNC u32 FUN_0202FE2C(int param0); -THUMB_FUNC void FUN_0202FEEC(); -THUMB_FUNC void FUN_02030074(); -THUMB_FUNC void FUN_02030238(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_0203026C(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_020303BC(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_020303F4(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_020304D4(u32 param0); -THUMB_FUNC void FUN_020304F0(u32 param0); -THUMB_FUNC void FUN_0203050C(); -THUMB_FUNC void FUN_02030674(); -THUMB_FUNC void FUN_020307A8(); -THUMB_FUNC void FUN_020307BC(); -THUMB_FUNC void FUN_020307D0(); -THUMB_FUNC u32 FUN_020307E4(u8 *param0, u32 param1); -THUMB_FUNC void FUN_0203086C(); -THUMB_FUNC u32 FUN_02030870(u8 *param0); -THUMB_FUNC u32 FUN_02030930(u8 *param0); -THUMB_FUNC void FUN_02030A00(u8 *param0); -THUMB_FUNC u32 FUN_02030A78(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC u32 FUN_02030ADC(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC u32 FUN_02030B3C(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC u32 FUN_02030BC4(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC u32 FUN_02030C4C(u32 param0, u8 *param1); -THUMB_FUNC int FUN_02030C58(); -THUMB_FUNC void FUN_02030C70( +u32 FUN_0202F150(u32 param0, u32 param1); +void FUN_0202F2F0(); +void FUN_0202F5A4(); +void FUN_0202F820(int param0); +void FUN_0202F8D4(); +void FUN_0202F910(int param0); +BOOL FUN_0202F918(u32 param0, u32 param1, u32 param2, u32 param3); +u32 FUN_0202F950(u32 param0, u32 param1, u32 param2); +void FUN_0202F984(); +void FUN_0202F9E0(u32 param0); +void FUN_0202FA10(); +void FUN_0202FA1C(); +u8 FUN_0202FA28(); +u32 FUN_0202FA48(); +void FUN_0202FA5C(); +u32 FUN_0202FB18(u32 param0); +void FUN_0202FB20(); +void FUN_0202FB58(); +BOOL FUN_0202FB80(); +void FUN_0202FC60(); +void FUN_0202FC80(); +void FUN_0202FCA8(); +void FUN_0202FCCC(); +u32 FUN_0202FE2C(int param0); +void FUN_0202FEEC(); +void FUN_02030074(); +void FUN_02030238(u32 param0, u8 *param1, u32 param2); +void FUN_0203026C(u32 param0, u8 *param1, u32 param2); +void FUN_020303BC(u32 param0, u8 *param1, u32 param2); +void FUN_020303F4(u32 param0, u8 *param1, u32 param2); +void FUN_020304D4(u32 param0); +void FUN_020304F0(u32 param0); +void FUN_0203050C(); +void FUN_02030674(); +void FUN_020307A8(); +void FUN_020307BC(); +void FUN_020307D0(); +u32 FUN_020307E4(u8 *param0, u32 param1); +void FUN_0203086C(); +u32 FUN_02030870(u8 *param0); +u32 FUN_02030930(u8 *param0); +void FUN_02030A00(u8 *param0); +u32 FUN_02030A78(u32 param0, u8 *param1, u32 param2); +u32 FUN_02030ADC(u32 param0, u8 *param1, u32 param2); +u32 FUN_02030B3C(u32 param0, u8 *param1, u32 param2); +u32 FUN_02030BC4(u32 param0, u8 *param1, u32 param2); +u32 FUN_02030C4C(u32 param0, u8 *param1); +int FUN_02030C58(); +void FUN_02030C70( u32 param0, u32 param1, u32 param2, void *param3, struct UnkStruct0202F150_sub2 *param4); -THUMB_FUNC void FUN_02030C8C(struct UnkStruct0202F150_sub1 *param0, +void FUN_02030C8C(struct UnkStruct0202F150_sub1 *param0, u32 param1, void *param2, u32 param3, struct UnkStruct0202F150_sub2 *param4); -THUMB_FUNC void FUN_02030DA4(); -THUMB_FUNC void FUN_02030DFC(); -THUMB_FUNC u32 FUN_02030E7C(u16 param0); -THUMB_FUNC s32 FUN_02030F20(); -THUMB_FUNC BOOL FUN_02030F40(); -THUMB_FUNC void FUN_02030F60(u8 param0); -THUMB_FUNC u8 FUN_02030F74(u32 param0); -THUMB_FUNC u32 FUN_02030F88(u32 param0); -THUMB_FUNC void FUN_02030FA8(); -THUMB_FUNC void FUN_02030FC8(); -THUMB_FUNC u32 FUN_02030FE0(); -THUMB_FUNC void FUN_02031000(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_0203105C(u32 param0, u8 *param1, u32 param2); -THUMB_FUNC void FUN_02031088(); -THUMB_FUNC void FUN_0203110C(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC void FUN_02031134(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC void FUN_0203115C(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC u16 FUN_02031190(); -THUMB_FUNC u32 FUN_020311D0(u32 param0, u8 *param1); -THUMB_FUNC u32 FUN_020311DC(u32 param0); -THUMB_FUNC u32 FUN_020311E8(); -THUMB_FUNC BOOL FUN_020311F0(); -THUMB_FUNC int FUN_02031228(u16 param0); -THUMB_FUNC int FUN_02031248(u32 param0); -THUMB_FUNC int FUN_02031258(u32 param0); -THUMB_FUNC void FUN_02031268(u8 param0); -THUMB_FUNC u8 FUN_02031280(); -THUMB_FUNC void FUN_0203129C(); -THUMB_FUNC void FUN_020312BC(s64 *param0); -THUMB_FUNC void FUN_02031354(u32 param0); -THUMB_FUNC u32 FUN_02031370(); -THUMB_FUNC u32 FUN_02031388(); -THUMB_FUNC void FUN_020313A0(u8 param0); -THUMB_FUNC void FUN_020313B4(u8 param0, u32 param1); -THUMB_FUNC u32 FUN_020313CC(u32 param0); -THUMB_FUNC u32 FUN_020313EC(); -THUMB_FUNC void FUN_02031400(u32 param0); -THUMB_FUNC u32 FUN_02031438(); -THUMB_FUNC void FUN_02031454(); -THUMB_FUNC void FUN_02031468(); +void FUN_02030DA4(); +void FUN_02030DFC(); +u32 FUN_02030E7C(u16 param0); +s32 FUN_02030F20(); +BOOL FUN_02030F40(); +void FUN_02030F60(u8 param0); +u8 FUN_02030F74(u32 param0); +u32 FUN_02030F88(u32 param0); +void FUN_02030FA8(); +void FUN_02030FC8(); +u32 FUN_02030FE0(); +void FUN_02031000(u32 param0, u8 *param1, u32 param2); +void FUN_0203105C(u32 param0, u8 *param1, u32 param2); +void FUN_02031088(); +void FUN_0203110C(u32 param0, u32 param1, u8 *param2); +void FUN_02031134(u32 param0, u32 param1, u8 *param2); +void FUN_0203115C(u32 param0, u32 param1, u8 *param2); +u16 FUN_02031190(); +u32 FUN_020311D0(u32 param0, u8 *param1); +u32 FUN_020311DC(u32 param0); +u32 FUN_020311E8(); +BOOL FUN_020311F0(); +int FUN_02031228(u16 param0); +int FUN_02031248(u32 param0); +int FUN_02031258(u32 param0); +void FUN_02031268(u8 param0); +u8 FUN_02031280(); +void FUN_0203129C(); +void FUN_020312BC(s64 *param0); +void FUN_02031354(u32 param0); +u32 FUN_02031370(); +u32 FUN_02031388(); +void FUN_020313A0(u8 param0); +void FUN_020313B4(u8 param0, u32 param1); +u32 FUN_020313CC(u32 param0); +u32 FUN_020313EC(); +void FUN_02031400(u32 param0); +u32 FUN_02031438(); +void FUN_02031454(); +void FUN_02031468(); #endif // POKEDIAMOND_UNK_0202F150_H diff --git a/include/unk_02031480.h b/include/unk_02031480.h index 975f0796..951a3717 100644 --- a/include/unk_02031480.h +++ b/include/unk_02031480.h @@ -6,25 +6,25 @@ #include "heap.h" #include "unk_0202F150.h" -THUMB_FUNC void FUN_02031480(u32 heap_id); -THUMB_FUNC void FUN_020314D0(); -THUMB_FUNC BOOL FUN_020314E8(); -THUMB_FUNC void FUN_020314FC(u8 param0, u32 param1, u8 *param2); -THUMB_FUNC void FUN_02031560(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC void FUN_02031574(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC void FUN_02031588(u8 param0); -THUMB_FUNC void FUN_020315A4(); -THUMB_FUNC BOOL FUN_020315D8(u8 param0); -THUMB_FUNC u8 FUN_020315FC(u8 index); -THUMB_FUNC void FUN_0203160C(u32 param0, u32 param1, u8 *param2); -THUMB_FUNC u32 FUN_02031628(); -THUMB_FUNC void FUN_0203162C(u8 param0, u8 param1); -THUMB_FUNC int FUN_02031640(u32 param0, u8 param1); -THUMB_FUNC void FUN_02031668(); -THUMB_FUNC void FUN_0203168C(); -THUMB_FUNC BOOL FUN_020316AC(u32 param0, void *param1); -THUMB_FUNC u8 *FUN_020316E0(int param0); -THUMB_FUNC void FUN_02031704(u32 param0, u32 param1, void *param2); -THUMB_FUNC u32 FUN_02031730(); +void FUN_02031480(u32 heap_id); +void FUN_020314D0(); +BOOL FUN_020314E8(); +void FUN_020314FC(u8 param0, u32 param1, u8 *param2); +void FUN_02031560(u32 param0, u32 param1, u8 *param2); +void FUN_02031574(u32 param0, u32 param1, u8 *param2); +void FUN_02031588(u8 param0); +void FUN_020315A4(); +BOOL FUN_020315D8(u8 param0); +u8 FUN_020315FC(u8 index); +void FUN_0203160C(u32 param0, u32 param1, u8 *param2); +u32 FUN_02031628(); +void FUN_0203162C(u8 param0, u8 param1); +int FUN_02031640(u32 param0, u8 param1); +void FUN_02031668(); +void FUN_0203168C(); +BOOL FUN_020316AC(u32 param0, void *param1); +u8 *FUN_020316E0(int param0); +void FUN_02031704(u32 param0, u32 param1, void *param2); +u32 FUN_02031730(); #endif // POKEDIAMOND_UNK_02031480_H diff --git a/include/unk_0205FA2C.h b/include/unk_0205FA2C.h index 19279a6c..418c7077 100644 --- a/include/unk_0205FA2C.h +++ b/include/unk_0205FA2C.h @@ -80,16 +80,16 @@ struct UnkCallbackStruct2_0205FA2C u16 unk14; }; -THUMB_FUNC u32 FUN_0205FA2C( +u32 FUN_0205FA2C( struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1, u32 heap_id); -THUMB_FUNC u32 FUN_0205FAD8( +u32 FUN_0205FAD8( struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1); -THUMB_FUNC u32 FUN_0205FB34( +u32 FUN_0205FB34( struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1, u32 heap_id); -THUMB_FUNC u32 FUN_0205FBC0( +u32 FUN_0205FBC0( struct UnkCallbackStruct1_0205FA2C *param0, struct UnkSavStruct80 *param1); -THUMB_FUNC int FUN_0205FBE8(struct UnkStruct_0204639C *param0); -THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, +int FUN_0205FBE8(struct UnkStruct_0204639C *param0); +void FUN_0205FC50(struct UnkStruct_0204639C *param0, void **param1, u8 param2, u8 param3, @@ -98,24 +98,24 @@ THUMB_FUNC void FUN_0205FC50(struct UnkStruct_0204639C *param0, u8 param6, u8 param7); -THUMB_FUNC u32 FUN_0205FC9C( +u32 FUN_0205FC9C( struct UnkCallbackStruct2_0205FA2C *param0, struct UnkSavStruct80 *param1); -THUMB_FUNC u32 FUN_0205FCC4( +u32 FUN_0205FCC4( struct UnkCallbackStruct2_0205FA2C *param0, struct UnkSavStruct80 *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); +int FUN_0205FCE8(struct UnkStruct_0204639C *param0); +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); +int FUN_0205FD70(struct UnkStruct_0204639C *param0); +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); +u32 FUN_0205FE10(struct SaveBlock2 *sav2); +u32 FUN_0205FF5C(struct SaveBlock2 *sav2); +void FUN_02060044(u16 **param0, u32 *param1); +u32 FUN_02060064(u32 param0); +u32 FUN_02060070(u32 param0); +u32 FUN_0206007C(struct SaveBlock2 *sav2); +u32 FUN_020600A0(struct SaveBlock2 *sav2); +u32 FUN_020600DC(struct SaveBlock2 *sav2); +BOOL FUN_02060144(u32 **param0); #endif // POKEDIAMOND_UNK_0205FA2C_H diff --git a/include/unk_0206015C.h b/include/unk_0206015C.h index e8a312c2..c285fac9 100644 --- a/include/unk_0206015C.h +++ b/include/unk_0206015C.h @@ -24,7 +24,7 @@ struct UnkStruct_0204652C u8 unkE; // some kind of counter? }; -THUMB_FUNC void FUN_0206015C(struct UnkSavStruct80* savStruct); -THUMB_FUNC BOOL FUN_02060194(struct UnkStruct_0204639C * unkStruct0); +void FUN_0206015C(struct UnkSavStruct80* savStruct); +BOOL FUN_02060194(struct UnkStruct_0204639C * unkStruct0); #endif //UNK_0206015C_H_GUARD -- cgit v1.2.3 From 616cd9b1c1cf789ae990d4236085d1a6748d3850 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 22 May 2021 07:40:46 -0400 Subject: Un-all-caps list menu function typedefs --- include/list_menu.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index 11322674..3f60c6f2 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -22,14 +22,14 @@ struct ListMenuItem // TODO: Document remaining fields. // A lot of these are named based on similar fields in gen 3. -typedef void (*LM_MOVECURSORFUNC)(struct ListMenu *list, s32 index, u8 onInit); -typedef void (*LM_ITEMPRINTFUNC)(struct ListMenu *list, s32 index, u8 y); +typedef void (*LM_MoveCursorFunc_t)(struct ListMenu *list, s32 index, u8 onInit); +typedef void (*LM_ItemPrintFunc_t)(struct ListMenu *list, s32 index, u8 y); struct ListMenuTemplate { /*0x00*/ struct ListMenuItem * items; - /*0x04*/ LM_MOVECURSORFUNC moveCursorFunc; - /*0x08*/ LM_ITEMPRINTFUNC itemPrintFunc; + /*0x04*/ LM_MoveCursorFunc_t moveCursorFunc; + /*0x08*/ LM_ItemPrintFunc_t itemPrintFunc; /*0x0C*/ struct Window * window; /*0x10*/ u16 totalItems; /*0x12*/ u16 maxShowed; -- cgit v1.2.3 From de6f8fc978e5297d3f425d2d6c8517e9bb8e75ff Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 22 May 2021 10:37:04 -0400 Subject: Merge conflicting prototypes --- include/script_buffers.h | 5 +++-- include/text.h | 17 +++++++++++------ include/unk_0200CA44.h | 10 ++++++---- include/window.h | 1 + 4 files changed, 21 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/script_buffers.h b/include/script_buffers.h index d0fff528..51a02e43 100644 --- a/include/script_buffers.h +++ b/include/script_buffers.h @@ -4,6 +4,7 @@ #include "pokemon.h" #include "pokemon_storage_system.h" #include "trainer_data.h" +#include "window.h" struct UnkStruct_0200AA80_sub_sub { @@ -105,7 +106,7 @@ void StringExpandPlaceholders(struct ScrStrBufs * mgr, struct String * dest, str void ScrStrBufs_ResetBuffers(struct ScrStrBufs * mgr); struct UnkStruct_0200B870 * MessagePrinter_new(u32 r5, u32 r6, u32 sp4, u32 r4); void MessagePrinter_delete(struct UnkStruct_0200B870 * a0); -void FUN_0200B9A8(struct UnkStruct_0200B870 * a0, int a1, int a2, int a3, int a4); -void FUN_0200B9EC(struct UnkStruct_0200B870 * string, u32 value, u32 n, enum PrintingMode mode, int sp30, int r5, int r7); +void FUN_0200B9A8(struct UnkStruct_0200B870 * a0, int a1, struct Window * a2, int a3, int a4); +void FUN_0200B9EC(struct UnkStruct_0200B870 * string, u32 value, u32 n, enum PrintingMode mode, struct Window *window, int x, int y); #endif //POKEDIAMOND_SCRIPT_BUFFERS_H diff --git a/include/text.h b/include/text.h index c9afc9b3..57185a05 100644 --- a/include/text.h +++ b/include/text.h @@ -5,6 +5,17 @@ #include "window.h" #include "font.h" +#define CHAR_0 0x00A2 +#define CHAR_1 0x00A3 +#define CHAR_2 0x00A4 +#define CHAR_3 0x00A5 +#define CHAR_4 0x00A6 +#define CHAR_5 0x00A7 +#define CHAR_6 0x00A8 +#define CHAR_7 0x00A9 +#define CHAR_8 0x00AA +#define CHAR_9 0x00AB + struct TextPrinterTemplate { const u16* currentChar; // 0 @@ -26,12 +37,6 @@ struct TextPrinterTemplate u8 unk4; // 17 }; -struct Font -{ - u8 filler[20]; - void * unk20; -}; - struct TextPrinter { struct TextPrinterTemplate printerTemplate; diff --git a/include/unk_0200CA44.h b/include/unk_0200CA44.h index 2e479ab8..6dd208c3 100644 --- a/include/unk_0200CA44.h +++ b/include/unk_0200CA44.h @@ -1,10 +1,12 @@ #ifndef POKEDIAMOND_UNK_0200CA44_H #define POKEDIAMOND_UNK_0200CA44_H -BOOL FUN_0200CA44(void (*r0)(u32, void *), void * r1, void * r2); -BOOL FUN_0200CA60(void (*r0)(u32, void *), void * r1, void * r2); -BOOL FUN_0200CA7C(void (*r0)(u32, void *), void * r1, void * r2); -BOOL FUN_0200CA98(void (*r0)(u32, void *), void * r1, void * r2); +#include "text.h" + +BOOL FUN_0200CA44(void (*r0)(u32, struct TextPrinter *), struct TextPrinter * r1, u32 r2); +BOOL FUN_0200CA60(void (*r0)(u32, struct TextPrinter *), struct TextPrinter * r1, u32 r2); +BOOL FUN_0200CA7C(void (*r0)(u32, struct TextPrinter *), struct TextPrinter * r1, u32 r2); +BOOL FUN_0200CA98(void (*r0)(u32, struct TextPrinter *), struct TextPrinter * r1, u32 r2); void FUN_0200CAB4(s32 unk1); #endif //POKEDIAMOND_UNK_0200CA44_H diff --git a/include/window.h b/include/window.h index ebe3338a..ed3576fb 100644 --- a/include/window.h +++ b/include/window.h @@ -21,5 +21,6 @@ extern void FillWindowPixelRect(struct Window *, u32 fillValue, u16 x, u16 y, u1 extern void ScrollWindow(struct Window *, u8, u8, u8); extern u16 GetWindowWidth(struct Window *); extern u16 GetWindowHeight(struct Window *); +extern void BlitBitmapRectToWindow(struct Window * window, const void * src, u16 srcX, u16 srcY, u16 srcWidth, u16 srcHeight, u16 dstX, u16 dstY, u16 dstWidth, u16 dstHeight); #endif // POKEDIAMOND_WINDOW_H -- cgit v1.2.3 From 412bd487ed5513e52ad47f6eb3709b4d1aab1353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sat, 22 May 2021 18:58:41 +0200 Subject: better field names for Window struct --- include/unk_02016B94.h | 60 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index 6ec223e0..a13f1634 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -83,11 +83,11 @@ struct Window u8 unk04; u8 unk05; u8 unk06; - u8 unk07; - u8 unk08; + u8 width; + u8 height; u8 unk09; - u16 unk0a : 15; - u16 unk0b : 1; + u16 unk0a_0 : 15; + u16 unk0b_15 : 1; void *unk0c; }; @@ -95,7 +95,8 @@ struct UnkStruct_02016B94_2 *FUN_02016B94(u32 heap_id); u32 FUN_02016BB8(u32 *param0); void FUN_02016BBC(const struct GraphicsModes *modes); void FUN_02016BF4(u32 *param0, u32 param1); -void FUN_02016C18(struct UnkStruct_02016B94_2 *param0, u8 param1, struct UnkStruct_02016B94_1 *param2, u8 param3); +void FUN_02016C18( + struct UnkStruct_02016B94_2 *param0, u8 param1, struct UnkStruct_02016B94_1 *param2, u8 param3); void FUN_020170F4(struct UnkStruct_02016B94_2 *param0, u8 param1, u32 param2, u8 param3); u8 FUN_020177DC(u8 param0, u32 param1); void FUN_02017850(u32 param0, u8 *param1, u8 *param2); @@ -113,19 +114,26 @@ void FUN_02017B60(struct UnkStruct_02016B94_2 *param0, fx32 param5, fx32 param6); void FUN_02017B8C(struct UnkStruct_02016B94_2_sub *param0, u32 param1, fx32 val); -void FUN_02017BD0( - struct UnkStruct_02016B94_2 *param0, u32 param1, struct Mtx22 *param2, fx32 param3, fx32 param4); +void FUN_02017BD0(struct UnkStruct_02016B94_2 *param0, + u32 param1, + struct Mtx22 *param2, + fx32 param3, + fx32 param4); void FUN_02017C6C(struct UnkStruct_02016B94_2 *param0, u32 param1); void FUN_02017C98(const void *param0, void *param1, u32 param2); void FUN_02017CD0(struct UnkStruct_02016B94_2 *param0, u32 param1); -void FUN_02017CE8(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017CE8( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017D68(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017DFC(struct UnkStruct_02016B94_2 *param0, u32 param1, void *param2, u32 param3); -void FUN_02017E14(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); -void FUN_02017E40(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017E14( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); +void FUN_02017E40( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 *param2, u32 param3, u32 param4); void FUN_02017E84(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017F18(u32 param0, u32 size, u32 offset, u32 heap_id); -void FUN_02017F48(struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); +void FUN_02017F48( + struct UnkStruct_02016B94_2 *param0, u32 param1, u32 param2, u32 param3, u32 param4); void FUN_02017FB4(u32 param0, void *param1, u32 offset, u32 size); void FUN_02017FE4(u32 param0, u32 param1); u16 FUN_02017FFC(u8 param0, u8 param1, u8 param2); @@ -189,12 +197,22 @@ void FUN_02018540(struct UnkStruct_02016B94_2 *param0, u8 param5, u8 param6, u8 param7); -void FUN_02018590( - struct UnkStruct_02016B94_2_sub *param0, u16 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_02018590(struct UnkStruct_02016B94_2_sub *param0, + u16 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6); void FUN_02018640( struct UnkStruct_02016B94_2_sub *param0, u8 param1, u8 param2, u8 param3, u8 param4, u8 param5); -void FUN_020186B4( - struct UnkStruct_02016B94_2 *param0, u32 param1, u8 param2, u8 param3, u8 param4, u8 param5, u8 param6); +void FUN_020186B4(struct UnkStruct_02016B94_2 *param0, + u32 param1, + u8 param2, + u8 param3, + u8 param4, + u8 param5, + u8 param6); void FUN_02018744(struct UnkStruct_02016B94_2 *param0, u32 param1); void FUN_02018768(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); void FUN_0201878C(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); @@ -238,9 +256,15 @@ void FUN_02019064(struct UnkStruct_02016B94_2 *param0, u8 param6, u8 param7, u16 param8); -void FUN_020190EC( - struct UnkStruct_02016B94_2 *param0, struct Window *param1, u8 param2, u8 param3, u16 param4, u8 param5); -void FUN_02019150(struct UnkStruct_02016B94_2 *param0, struct Window *param1, struct UnkStruct_02016B94_4 *param2); +void FUN_020190EC(struct UnkStruct_02016B94_2 *param0, + struct Window *param1, + u8 param2, + u8 param3, + u16 param4, + u8 param5); +void FUN_02019150(struct UnkStruct_02016B94_2 *param0, + struct Window *param1, + struct UnkStruct_02016B94_4 *param2); void FUN_02019178(struct Window *param0); void FUN_020191A4(struct Window *param0, int param1); void CopyWindowToVram(struct Window *param0); -- cgit v1.2.3 From e14ce23516daf20a5fcd9ca6ca53f30d33c4ef24 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 22 May 2021 18:11:00 -0400 Subject: Decompile list_menu_items --- include/list_menu.h | 7 +------ include/list_menu_items.h | 12 ++++++++++++ include/text.h | 14 ++++++++++---- include/text_02054590.h | 5 +++-- 4 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 include/list_menu_items.h (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index 3f60c6f2..c01bf070 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_LIST_MENU_H #include "list_menu_cursor.h" +#include "list_menu_items.h" #define LIST_HEADER -3 #define LIST_CANCEL -2 @@ -13,12 +14,6 @@ struct ListMenu; -struct ListMenuItem -{ - const u16 * text; - s32 index; -}; - // TODO: Document remaining fields. // A lot of these are named based on similar fields in gen 3. diff --git a/include/list_menu_items.h b/include/list_menu_items.h new file mode 100644 index 00000000..a102c449 --- /dev/null +++ b/include/list_menu_items.h @@ -0,0 +1,12 @@ +#ifndef POKEDIAMOND_LIST_MENU_ITEMS_H +#define POKEDIAMOND_LIST_MENU_ITEMS_H + +#include "string16.h" + +struct ListMenuItem +{ + struct String * text; + s32 value; +}; + +#endif // POKEDIAMOND_LIST_MENU_ITEMS_H diff --git a/include/text.h b/include/text.h index 57185a05..514e8ba7 100644 --- a/include/text.h +++ b/include/text.h @@ -16,9 +16,15 @@ #define CHAR_8 0x00AA #define CHAR_9 0x00AB +union StrbufForPrint +{ + struct String * wrapped; + const u16 * raw; +}; + struct TextPrinterTemplate { - const u16* currentChar; // 0 + union StrbufForPrint currentChar; // 0 struct Window * window; // 4 u8 padding[1]; // 8 u8 fontId; // 9 @@ -76,9 +82,9 @@ BOOL FUN_0201BD44(u32 param0); void FUN_0201BD5C(void); u8 FUN_0201BD70(u32 param0); void FUN_0201BD7C(u32 param0); -u16 AddTextPrinterParameterized(struct Window * window, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u8 (*callback)(struct TextPrinterTemplate *, u16)); -u16 AddTextPrinterParameterized2(struct Window * window, u8 fontId, const u16 *str, u32 x, u32 y, u32 speed, u32 colors, u8 (*callback)(struct TextPrinterTemplate *, u16)); -u16 AddTextPrinterParameterized3(struct Window * window, u32 fontId, const u16 *str, u32 x, u32 y, u32 speed, u32 colors, u32 letterSpacing, u32 lineSpacing, u8 (*callback)(struct TextPrinterTemplate *, u16)); +u16 AddTextPrinterParameterized(struct Window * window, u8 fontId, struct String *str, u32 x, u32 y, u32 speed, u8 (*callback)(struct TextPrinterTemplate *, u16)); +u16 AddTextPrinterParameterized2(struct Window * window, u8 fontId, struct String *str, u32 x, u32 y, u32 speed, u32 colors, u8 (*callback)(struct TextPrinterTemplate *, u16)); +u16 AddTextPrinterParameterized3(struct Window * window, u32 fontId, struct String *str, u32 x, u32 y, u32 speed, u32 colors, u32 letterSpacing, u32 lineSpacing, u8 (*callback)(struct TextPrinterTemplate *, u16)); u16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u32 speed, u8 (*callback)(struct TextPrinterTemplate *, u16)); void RunTextPrinter(u32 param0, struct TextPrinter *printer); u32 RenderFont(struct TextPrinter *printer); diff --git a/include/text_02054590.h b/include/text_02054590.h index b1ee055a..32dca79a 100644 --- a/include/text_02054590.h +++ b/include/text_02054590.h @@ -4,13 +4,14 @@ #include "global.h" #include "options.h" #include "window.h" +#include "string16.h" void FUN_02054590(u32 param0, u32 param1); void FUN_020545B8(u32 param0, u32 param1, u32 param2); void FUN_02054608(struct Window *param0, struct Options *options); void FUN_0205464C(struct Window *param0); -u16 FUN_02054658(struct Window * window, const u16 *str, struct Options *options, u8 param3); -u16 DrawFieldMessage(struct Window * window, const u16 *str, u8 fontId, u32 speed, u8 a4, u32 a5); +u16 FUN_02054658(struct Window * window, struct String *str, struct Options *options, u8 param3); +u16 DrawFieldMessage(struct Window * window, struct String *str, u8 fontId, u32 speed, u8 a4, u32 a5); u8 FUN_020546C8(u32 param0); void FUN_020546E0(u32 param0, u32 param1, u32 param2, u32 param3); void FUN_02054744(struct Window *param0, u32 param1, u32 param2); -- cgit v1.2.3 From 0d0f5b70b03e271d05cd30ccacddd55d75c4e530 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 22 May 2021 19:10:56 -0400 Subject: Silence compiler warnings --- include/list_menu.h | 15 +++++++++++++++ include/list_menu_items.h | 9 +++++++++ include/scrcmd.h | 1 + include/unk_02022504.h | 2 +- include/unk_02025484.h | 2 +- 5 files changed, 27 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index c01bf070..a02e1273 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -69,5 +69,20 @@ struct ListMenu * ListMenuInit(const struct ListMenuTemplate * template, u16 cur s32 ListMenu_ProcessInput(struct ListMenu * list); void DestroyListMenu(struct ListMenu * list, u16 * cursorPos, u16 * itemsAbove); void RedrawListMenu(struct ListMenu * list); +s32 ListMenuTestInputInternal(struct ListMenu * list, const struct ListMenuTemplate * template, u16 cursorPos, u16 itemsAbove, u16 updateFlag, u16 input, u16 *newCursorPos, u16 *newItemsAbove); +s32 ListMenuTestInput(struct ListMenu * list, const struct ListMenuTemplate * template, u16 cursorPos, u16 itemsAbove, u16 input, u16 *newCursorPos, u16 *newItemsAbove); +void ListMenuOverrideSetColors(struct ListMenu * list, u8 cursorPal, u8 fillValue, u8 cursorShadowPal); +void ListMenuGetCurrentItemArrayId(struct ListMenu * list, u16 * index_p); +void ListMenuGetScrollAndRow(struct ListMenu * list, u16 * cursorPos_p, u16 * itemsAbove_p); +u8 ListMenuGetUnk33(struct ListMenu * list); +s32 ListMenuGetValueByArrayId(struct ListMenu * list, s32 index); +s32 ListMenuGetTemplateField(struct ListMenu * list, u32 attr); +void ListMenuSetTemplateField(struct ListMenu * list, u32 attr, s32 value); +void ListMenuGetItemStr(struct ListMenu * list, struct ListMenuItem * items); +void ListMenuPrint(struct ListMenu * list, struct String * str, u8 x, u8 y); +void ListMenuErasePrintedCursor(struct ListMenu * list, u16 itemsAbove); +u8 ListMenuUpdateSelectedRowIndexAndScrollOffset(struct ListMenu *list, u8 movingDown); +void ListMenuScroll(struct ListMenu * list, u8 count, u8 movingDown); +void ListMenuCopyToVram(struct ListMenu * list); #endif // POKEDIAMOND_LIST_MENU_H diff --git a/include/list_menu_items.h b/include/list_menu_items.h index a102c449..ec96d480 100644 --- a/include/list_menu_items.h +++ b/include/list_menu_items.h @@ -2,6 +2,7 @@ #define POKEDIAMOND_LIST_MENU_ITEMS_H #include "string16.h" +#include "msgdata.h" struct ListMenuItem { @@ -9,4 +10,12 @@ struct ListMenuItem s32 value; }; +struct ListMenuItem * ListMenuItems_ctor(u32 count, u32 heap_id); +void ListMenuItems_dtor(struct ListMenuItem * items); +void ListMenuItems_AppendFromMsgData(struct ListMenuItem * items, struct MsgData * msgData, u32 msgNo, s32 value); +void ListMenuItems_AddItem(struct ListMenuItem * items, struct String * str, s32 value); +void ListMenuItems_CopyItem(struct ListMenuItem * items, struct ListMenuItem * src); +struct ListMenuItem * ListMenuItems_SeekEnd(struct ListMenuItem * items, u32 * heap_id_p); +void ListMenuItems_DestroyMenuStrings(struct ListMenuItem * items); + #endif // POKEDIAMOND_LIST_MENU_ITEMS_H diff --git a/include/scrcmd.h b/include/scrcmd.h index 226bbb8c..a1906e2d 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -161,6 +161,7 @@ BOOL ScrCmd_Unk0054(struct ScriptContext *ctx); BOOL FUN_02041464(struct ScriptContext *ctx); BOOL ScrCmd_Unk0055(struct ScriptContext* ctx); BOOL ScrCmd_Unk0056(struct ScriptContext* ctx); +BOOL ScrCmd_Unk0057(struct ScriptContext* ctx); BOOL ScrCmd_Unk0058(struct ScriptContext* ctx); BOOL ScrCmd_Unk0049(struct ScriptContext* ctx); BOOL ScrCmd_Unk004A(struct ScriptContext* ctx); diff --git a/include/unk_02022504.h b/include/unk_02022504.h index aa541f85..62e4def1 100644 --- a/include/unk_02022504.h +++ b/include/unk_02022504.h @@ -9,6 +9,6 @@ struct PCStorage *GetStoragePCPointer(struct SaveBlock2 *sav2); void *FUN_0202251C(struct SaveBlock2 *sav2); void *FUN_02022528(struct SaveBlock2 *sav2); u8 *LoadHallOfFame(struct SaveBlock2 *sav2, u32 heap_id, int *ret_p); -s32 *SaveHallOfFame(struct SaveBlock2 *sav2, u8 *data); +s32 SaveHallOfFame(struct SaveBlock2 *sav2, u8 *data); #endif //POKEDIAMOND_UNK_02022504_H diff --git a/include/unk_02025484.h b/include/unk_02025484.h index 0412dda1..d2feccb3 100644 --- a/include/unk_02025484.h +++ b/include/unk_02025484.h @@ -9,7 +9,7 @@ struct unk_2025484 u8 padding[0x1C]; }; -void FUN_02025484(struct unk_2025484 *r0, u32 r1); +void FUN_02025484(struct unk_2025484 *r0); u32 *FUN_02025490(struct unk_2025484 *r0, u32 r1); u32 *FUN_020254A0(struct unk_2025484 *r0, u32 r1); u32 FUN_020254B4(struct unk_2025484 *r0); -- cgit v1.2.3 From 452a77b6be0a8ecaab453eed4a9031b7b19b3815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Sun, 23 May 2021 09:17:30 +0200 Subject: decompile unk_0200BA78.s --- include/unk_0200BA78.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/unk_0200BA78.h (limited to 'include') diff --git a/include/unk_0200BA78.h b/include/unk_0200BA78.h new file mode 100644 index 00000000..2efe233e --- /dev/null +++ b/include/unk_0200BA78.h @@ -0,0 +1,19 @@ +#ifndef POKEDIAMOND_UNK_0200BA78_H +#define POKEDIAMOND_UNK_0200BA78_H + +#include "global.h" +#include "script_buffers.h" + +void FUN_0200BA78(struct UnkStruct_0200B870 *param0, + int param1, + u32 value, + u32 n, + enum PrintingMode mode, + struct Window *window, + int x, + int y); + +void FUN_0200BAAC( + struct UnkStruct_0200B870 *param0, u32 value, u32 n, enum PrintingMode mode, void *dest); + +#endif // POKEDIAMOND_UNK_0200BA78_H -- cgit v1.2.3 From 0313fd88500d74f9200bdecc637ba99d8daddc7a Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 23 May 2021 13:39:07 -0500 Subject: decomp 020337E8 --- include/unk_020337E8.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/unk_020337E8.h (limited to 'include') diff --git a/include/unk_020337E8.h b/include/unk_020337E8.h new file mode 100644 index 00000000..0a1addf9 --- /dev/null +++ b/include/unk_020337E8.h @@ -0,0 +1,25 @@ +#ifndef POKEDIAMOND_UNK_020337E8_H +#define POKEDIAMOND_UNK_020337E8_H + +#include "global.h" +#include "save_block_2.h" + +// Dummy struct until DWC_account +struct DWC_Struct +{ + int unk0; +}; + +struct DWC_token +{ + // size: 0xC + u8 fill0[0xC]; +}; + +int FUN_020337E8(u32 heap_id); +void FUN_0203380C(struct DWC_Struct *); +int FUN_02033830(struct DWC_Struct *); +BOOL FUN_0203384C(struct SaveBlock2 *); + + +#endif // POKEDIAMOND_UNK_020337E8_H -- cgit v1.2.3 From bc341bc17833d80eae32d8f09509b401830f54d0 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 23 May 2021 14:27:17 -0500 Subject: address review --- include/unk_020337E8.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/unk_020337E8.h b/include/unk_020337E8.h index 0a1addf9..228570ea 100644 --- a/include/unk_020337E8.h +++ b/include/unk_020337E8.h @@ -7,7 +7,7 @@ // Dummy struct until DWC_account struct DWC_Struct { - int unk0; + s32 unk0; }; struct DWC_token @@ -16,9 +16,9 @@ struct DWC_token u8 fill0[0xC]; }; -int FUN_020337E8(u32 heap_id); +s32 FUN_020337E8(u32 heap_id); void FUN_0203380C(struct DWC_Struct *); -int FUN_02033830(struct DWC_Struct *); +s32 FUN_02033830(struct DWC_Struct *); BOOL FUN_0203384C(struct SaveBlock2 *); -- cgit v1.2.3 From 57b9d8fd35548901ccd4ffcdfa7bca7140065036 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 23 May 2021 16:43:24 -0400 Subject: Rename libnns symbols --- include/sdat.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/sdat.h b/include/sdat.h index 3ba8583c..db60e13e 100644 --- a/include/sdat.h +++ b/include/sdat.h @@ -28,20 +28,20 @@ struct SDATFileMgr void * info_p; }; -void SDAT_Init(void); -void * FUN_020C2A94(void *, u32); -void SDAT_Open(struct SDATFileMgr *, char *, void *, u32); -void FUN_020C39CC(void *); -void FUN_020C01A0(void); -int FUN_020C290C(void *); -void FUN_020C2828(void *, int); -BOOL FUN_020C36A8(u32 *, void *); -BOOL FUN_020C3674(u32 *, void *); -BOOL FUN_020C35E0(u32 *, u32 *, void *); -BOOL FUN_020C360C(u32 *, void *); -BOOL FUN_020C3640(u32 *, void *); -void FUN_020C0F80(u32 *); -void FUN_020C1040(int, int); -void FUN_020C0F68(void); +void NNS_SndInit(void); +void * NNS_SndHeapCreate(void *, u32); +void NNS_SndArcInit(struct SDATFileMgr *, char *, void *, u32); +void NNS_SndArcPlayerSetup(void *); +void NNS_SndMain(void); +int NNS_SndHeapSaveState(void *); +void NNS_SndHeapLoadState(void *, int); +BOOL NNS_SndArcLoadGroup(u32 *, void *); +BOOL NNS_SndArcLoadSeq(u32 *, void *); +BOOL NNS_SndArcLoadSeqEx(u32 *, u32 *, void *); +BOOL NNS_SndArcLoadWaveArc(u32 *, void *); +BOOL NNS_SndArcLoadBank(u32 *, void *); +void NNS_SndHandleInit(u32 *); +void NNS_SndPlayerStopSeqByPlayerNo(int, int); +void NNS_SndHandleReleaseSeq(void); #endif //GUARD_LIBSDAT_H -- cgit v1.2.3 From 76c52b48ebc318c72906fb6d8d7876c0915f5e17 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 23 May 2021 17:09:37 -0400 Subject: Replace SDATHeader etc with NNSSndArc --- include/sdat.h | 47 +++++++++++++++++++++++------------------------ include/sound.h | 2 +- 2 files changed, 24 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/sdat.h b/include/sdat.h index db60e13e..53e0a729 100644 --- a/include/sdat.h +++ b/include/sdat.h @@ -1,36 +1,35 @@ #ifndef GUARD_LIBSDAT_H #define GUARD_LIBSDAT_H -struct SDATHeader +#include "SND_main.h" + +typedef struct NNSSndArcHeader { - // Generic header - char magic[4]; - u16 bom; - u16 version; - u32 filesize; - u16 header_size; - u16 section_count; - // SDAT chunks - u32 symb_offset, symb_size; - u32 info_offset, info_size; - u32 fat_offset, fat_size; - u32 file_offset, file_size; -}; + struct SNDBinaryFileHeader fileHeader; + u32 symbolDataOffset; + u32 symbolDataSize; + u32 infoOffset; + u32 infoSize; + u32 fatOffset; + u32 fatSize; + u32 fileImageOffset; + u32 fileImageSize; +} NNSSndArcHeader; -struct SDATFileMgr +typedef struct NNSSndArc { - struct SDATHeader header; - BOOL is_init; - FSFile file; // 00034 - FSFileID fileID; // 7C - void * fat_p; - void * symb_p; - void * info_p; -}; + NNSSndArcHeader header; + BOOL file_open; + FSFile file; + FSFileID fileId; + struct NNSSndArcFat* fat; + struct NNSSndArcSymbol* symbol; + struct NNSSndArcInfo* info; +} NNSSndArc; void NNS_SndInit(void); void * NNS_SndHeapCreate(void *, u32); -void NNS_SndArcInit(struct SDATFileMgr *, char *, void *, u32); +void NNS_SndArcInit(NNSSndArc *, const char *, void *, u32); void NNS_SndArcPlayerSetup(void *); void NNS_SndMain(void); int NNS_SndHeapSaveState(void *); diff --git a/include/sound.h b/include/sound.h index 9b50542f..d48dd9ac 100644 --- a/include/sound.h +++ b/include/sound.h @@ -7,7 +7,7 @@ struct SoundData { - struct SDATFileMgr header; + NNSSndArc header; void * unk_00090; u8 unk_00094[0xBBC00]; u32 unk_BBC94[9]; -- cgit v1.2.3 From 3835a9b1a55a2d8ce6f4159bb0e7f1fecf08b7f1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 23 May 2021 17:20:38 -0400 Subject: NNS SND heap type --- include/sdat.h | 46 ---------------------------------------------- include/sound.h | 16 +++++++++------- 2 files changed, 9 insertions(+), 53 deletions(-) delete mode 100644 include/sdat.h (limited to 'include') diff --git a/include/sdat.h b/include/sdat.h deleted file mode 100644 index 53e0a729..00000000 --- a/include/sdat.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef GUARD_LIBSDAT_H -#define GUARD_LIBSDAT_H - -#include "SND_main.h" - -typedef struct NNSSndArcHeader -{ - struct SNDBinaryFileHeader fileHeader; - u32 symbolDataOffset; - u32 symbolDataSize; - u32 infoOffset; - u32 infoSize; - u32 fatOffset; - u32 fatSize; - u32 fileImageOffset; - u32 fileImageSize; -} NNSSndArcHeader; - -typedef struct NNSSndArc -{ - NNSSndArcHeader header; - BOOL file_open; - FSFile file; - FSFileID fileId; - struct NNSSndArcFat* fat; - struct NNSSndArcSymbol* symbol; - struct NNSSndArcInfo* info; -} NNSSndArc; - -void NNS_SndInit(void); -void * NNS_SndHeapCreate(void *, u32); -void NNS_SndArcInit(NNSSndArc *, const char *, void *, u32); -void NNS_SndArcPlayerSetup(void *); -void NNS_SndMain(void); -int NNS_SndHeapSaveState(void *); -void NNS_SndHeapLoadState(void *, int); -BOOL NNS_SndArcLoadGroup(u32 *, void *); -BOOL NNS_SndArcLoadSeq(u32 *, void *); -BOOL NNS_SndArcLoadSeqEx(u32 *, u32 *, void *); -BOOL NNS_SndArcLoadWaveArc(u32 *, void *); -BOOL NNS_SndArcLoadBank(u32 *, void *); -void NNS_SndHandleInit(u32 *); -void NNS_SndPlayerStopSeqByPlayerNo(int, int); -void NNS_SndHandleReleaseSeq(void); - -#endif //GUARD_LIBSDAT_H diff --git a/include/sound.h b/include/sound.h index d48dd9ac..9e171634 100644 --- a/include/sound.h +++ b/include/sound.h @@ -2,13 +2,15 @@ #define POKEDIAMOND_SOUND_H #include "FS_file.h" -#include "sdat.h" +#include "NNS_SND_arc.h" +#include "NNS_SND_heap.h" +#include "NNS_SND_arc_loader.h" #include "player_data.h" struct SoundData { NNSSndArc header; - void * unk_00090; + NNSSndHeapHandle * heap; // 0x00090 u8 unk_00094[0xBBC00]; u32 unk_BBC94[9]; u32 unk_BBCB8; @@ -54,11 +56,11 @@ void InitSoundData(void * a0, struct Options * a1); void * FUN_02003D38(u32 a0); int FUN_02003F3C(int * a0); void FUN_02003F64(int a0); -BOOL FUN_02003F78(u32 * a0); -BOOL FUN_02003F90(u32 * a0); -BOOL FUN_02003FA8(u32 * a0, u32 * a1); -BOOL FUN_02003FC4(u32 * a0); -BOOL FUN_02003FDC(u32 * a0); +BOOL FUN_02003F78(int a0); +BOOL FUN_02003F90(int a0); +BOOL FUN_02003FA8(int a0, u32 a1); +BOOL FUN_02003FC4(int a0); +BOOL FUN_02003FDC(int a0); u32 * FUN_02003FF4(int a0); u32 FUN_02004018(u32 a0); void DoSoundUpdateFrame(void); -- cgit v1.2.3 From d9808a376ee20a2e6dd57d1f272886f2ad192302 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 23 May 2021 18:48:50 -0400 Subject: Start decompiling Chatot sound data func --- include/sound.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/sound.h b/include/sound.h index 9e171634..adefe938 100644 --- a/include/sound.h +++ b/include/sound.h @@ -12,7 +12,7 @@ struct SoundData NNSSndArc header; NNSSndHeapHandle * heap; // 0x00090 u8 unk_00094[0xBBC00]; - u32 unk_BBC94[9]; + u32 players[9]; u32 unk_BBCB8; u32 unk_BBCBC; u8 unk_BBCC0[0x20]; @@ -54,14 +54,14 @@ struct SoundData struct SoundData * GetSoundDataPointer(void); void InitSoundData(void * a0, struct Options * a1); void * FUN_02003D38(u32 a0); -int FUN_02003F3C(int * a0); -void FUN_02003F64(int a0); -BOOL FUN_02003F78(int a0); -BOOL FUN_02003F90(int a0); -BOOL FUN_02003FA8(int a0, u32 a1); -BOOL FUN_02003FC4(int a0); -BOOL FUN_02003FDC(int a0); -u32 * FUN_02003FF4(int a0); +int GF_Snd_SaveState(int * level_p); +void GF_Snd_RestoreState(int level); +BOOL GF_Snd_LoadGroup(int groupNo); +BOOL GF_Snd_LoadSeq(int seqNo); +BOOL GF_Snd_LoadSeqEx(int seqNo, u32 loadFlag); +BOOL GF_Snd_LoadWaveArc(int waveArcNo); +BOOL GF_Snd_LoadBank(int bankNo); +u32 * FUN_02003FF4(int playerNo); u32 FUN_02004018(u32 a0); void DoSoundUpdateFrame(void); -- cgit v1.2.3 From eb511d34eab6bdbb157a998b9aa5617b7679c242 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 24 May 2021 09:31:37 -0400 Subject: Finish decomping sav_chatot --- include/sav_chatot.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/sav_chatot.h (limited to 'include') diff --git a/include/sav_chatot.h b/include/sav_chatot.h new file mode 100644 index 00000000..858423c5 --- /dev/null +++ b/include/sav_chatot.h @@ -0,0 +1,24 @@ +#ifndef POKEDIAMOND_SAV_CHATOT_H +#define POKEDIAMOND_SAV_CHATOT_H + +#include "save_block_2.h" + +struct SaveChatotSoundClip +{ + // TODO: Fill this in + BOOL exists; + s8 data[1000]; +}; + +u32 Sav2_Chatot_sizeof(void); +void Sav2_Chatot_init(struct SaveChatotSoundClip * chatot); +struct SaveChatotSoundClip * Chatot_new(u32 heap_id); +struct SaveChatotSoundClip * Sav2_Chatot_get(struct SaveBlock2 * sav2); +BOOL Chatot_exists(struct SaveChatotSoundClip * chatot); +void Chatot_invalidate(struct SaveChatotSoundClip * chatot); +s8 * Chatot_GetData(struct SaveChatotSoundClip * chatot); +void Chatot_Decode(s8 * dest, const s8 * data); +void Chatot_Encode(struct SaveChatotSoundClip * chatot, const s8 * data); +void Chatot_copy(struct SaveChatotSoundClip * dest, const struct SaveChatotSoundClip * src); + +#endif //POKEDIAMOND_SAV_CHATOT_H -- cgit v1.2.3 From 3188237ddaf9aefcbea90967a15df7b78fe8e336 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 24 May 2021 09:47:29 -0400 Subject: Propagate type changes to sound.c, main.c --- include/sound.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sound.h b/include/sound.h index adefe938..781c6b5b 100644 --- a/include/sound.h +++ b/include/sound.h @@ -6,12 +6,13 @@ #include "NNS_SND_heap.h" #include "NNS_SND_arc_loader.h" #include "player_data.h" +#include "sav_chatot.h" struct SoundData { NNSSndArc header; NNSSndHeapHandle * heap; // 0x00090 - u8 unk_00094[0xBBC00]; + u8 heapBuffer[0xBBC00]; u32 players[9]; u32 unk_BBCB8; u32 unk_BBCBC; @@ -44,7 +45,7 @@ struct SoundData u32 unk_BCD3C; u64 unk_BCD40; u32 unk_BCD48; - void * unk_BCD4C; + struct SaveChatotSoundClip * chatot; u32 unk_BCD50; u32 unk_BCD54; u32 unk_BCD58; @@ -52,7 +53,7 @@ struct SoundData }; struct SoundData * GetSoundDataPointer(void); -void InitSoundData(void * a0, struct Options * a1); +void InitSoundData(struct SaveChatotSoundClip * chatot, struct Options * options); void * FUN_02003D38(u32 a0); int GF_Snd_SaveState(int * level_p); void GF_Snd_RestoreState(int level); -- cgit v1.2.3 From d523142098cb0d0fb37eca7d91931859776b085d Mon Sep 17 00:00:00 2001 From: tgsm Date: Mon, 24 May 2021 18:23:47 -0400 Subject: Decompile unk_0206439C --- include/unk_0206439C.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/unk_0206439C.h (limited to 'include') diff --git a/include/unk_0206439C.h b/include/unk_0206439C.h new file mode 100644 index 00000000..6d094e5c --- /dev/null +++ b/include/unk_0206439C.h @@ -0,0 +1,15 @@ +#ifndef POKEDIAMOND_UNK_0206439C_H +#define POKEDIAMOND_UNK_0206439C_H + +struct Pokemon; +struct SaveBlock2; + +struct UnkStruct_0206439C +{ + struct Pokemon* pokemon; + void* unk4; +}; + +struct UnkStruct_0206439C* FUN_0206439C(u32 heap_id, u8 mon_idx, struct SaveBlock2* sav2); + +#endif -- cgit v1.2.3 From 8169654ed22031b0aba942913aae72d296c2c83a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 25 May 2021 17:19:59 -0400 Subject: Decompile gf_rtc.c --- include/error_handling.h | 2 +- include/gf_rtc.h | 31 +++++++++++++++++++++++++++++++ include/global.h | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 include/gf_rtc.h (limited to 'include') diff --git a/include/error_handling.h b/include/error_handling.h index 1299fcba..c14c93fe 100644 --- a/include/error_handling.h +++ b/include/error_handling.h @@ -1,6 +1,6 @@ #ifndef POKEDIAMOND_ERROR_HANDLING_H #define POKEDIAMOND_ERROR_HANDLING_H -void ErrorHandling(void); +void GF_AssertFail(void); #endif //POKEDIAMOND_ERROR_HANDLING_H diff --git a/include/gf_rtc.h b/include/gf_rtc.h new file mode 100644 index 00000000..f7a4e2a7 --- /dev/null +++ b/include/gf_rtc.h @@ -0,0 +1,31 @@ +#ifndef POKEDIAMOND_GF_RTC_H +#define POKEDIAMOND_GF_RTC_H + +#include "RTC_api.h" + +enum RTC_Month +{ + RTC_MONTH_JANUARY = 1, + RTC_MONTH_FEBRUARY, + RTC_MONTH_MARCH, + RTC_MONTH_APRIL, + RTC_MONTH_MAY, + RTC_MONTH_JUNE, + RTC_MONTH_JULY, + RTC_MONTH_AUGUST, + RTC_MONTH_SEPTEMBER, + RTC_MONTH_OCTOBER, + RTC_MONTH_NOVEMBER, + RTC_MONTH_DECEMBER, +}; + +enum RTC_TimeOfDay +{ + RTC_TIMEOFDAY_MORN = 0, + RTC_TIMEOFDAY_DAY, + RTC_TIMEOFDAY_EVE, + RTC_TIMEOFDAY_NITE, + RTC_TIMEOFDAY_LATE, +}; + +#endif //POKEDIAMOND_GF_RTC_H diff --git a/include/global.h b/include/global.h index 1c92a1ec..1853dbc3 100644 --- a/include/global.h +++ b/include/global.h @@ -11,7 +11,7 @@ #define NELEMS(a) (sizeof(a) / sizeof(*(a))) -#define GF_ASSERT(expr) do {if (!(expr)) ErrorHandling();} while (0) +#define GF_ASSERT(expr) do {if (!(expr)) GF_AssertFail();} while (0) #ifndef IN_MAIN_C extern const u8 gGameLanguage; -- cgit v1.2.3 From 73e48106d014792276f46e185b1a7ccd30bf4f00 Mon Sep 17 00:00:00 2001 From: tgsm Date: Tue, 25 May 2021 18:37:22 -0400 Subject: Decompile unk_0208A300 --- include/unk_0208A300.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/unk_0208A300.h (limited to 'include') diff --git a/include/unk_0208A300.h b/include/unk_0208A300.h new file mode 100644 index 00000000..9c2ae898 --- /dev/null +++ b/include/unk_0208A300.h @@ -0,0 +1,17 @@ +#ifndef POKEDIAMOND_UNK_0208A300_H +#define POKEDIAMOND_UNK_0208A300_H + +struct UnkStruct_0208A300 +{ + u32 unk0; + u32 unk4; +}; + +struct UnkStruct_0208A300* FUN_0208A300(u32 heap_id); +void FUN_0208A320(struct UnkStruct_0208A300* unk); +u32 FUN_0208A328(struct UnkStruct_0208A300* unk); +void FUN_0208A32C(struct UnkStruct_0208A300* unk, u32 a1); +u32 FUN_0208A330(struct UnkStruct_0208A300* unk); +void FUN_0208A334(struct UnkStruct_0208A300* unk, u32 a1); + +#endif -- cgit v1.2.3 From 52cafb3668633e3c41ab3e69d47848cacb911e1c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 26 May 2021 18:39:41 -0400 Subject: Finish decomping scrcmd_mart.c --- include/constants/decorations.h | 144 ++++++++++++++++++++++++++++++++++++++++ include/scrcmd.h | 7 ++ 2 files changed, 151 insertions(+) create mode 100644 include/constants/decorations.h (limited to 'include') diff --git a/include/constants/decorations.h b/include/constants/decorations.h new file mode 100644 index 00000000..e9b4e947 --- /dev/null +++ b/include/constants/decorations.h @@ -0,0 +1,144 @@ +#ifndef POKEDIAMOND_DECORATIONS_H +#define POKEDIAMOND_DECORATIONS_H + +#define DECORATION_NONE 0 +#define DECORATION_DUMMY_1 1 +#define DECORATION_DUMMY_2 2 +#define DECORATION_DUMMY_3 3 +#define DECORATION_DUMMY_4 4 +#define DECORATION_DUMMY_5 5 +#define DECORATION_BIG_BOULDER 6 +#define DECORATION_YELLOW_CUSHION 7 +#define DECORATION_BLUE_CUSHION 8 +#define DECORATION_WOODEN_CHAIR 9 +#define DECORATION_BIG_TABLE 10 +#define DECORATION_PLAIN_TABLE 11 +#define DECORATION_SMALL_TABLE 12 +#define DECORATION_LONG_TABLE 13 +#define DECORATION_WIDE_TABLE 14 +#define DECORATION_POKE_TABLE 15 +#define DECORATION_BIG_BOOKSHELF 16 +#define DECORATION_SMALL_BOOKSHELF 17 +#define DECORATION_RESEARCH_SHELF 18 +#define DECORATION_BIKE_RACK 19 +#define DECORATION_SHOP_SHELF 20 +#define DECORATION_DISPLAY_SHELF 21 +#define DECORATION_CUPBOARD 22 +#define DECORATION_WOOD_DRESSER 23 +#define DECORATION_PINK_DRESSER 24 +#define DECORATION_TV 25 +#define DECORATION_REFRIGERATOR 26 +#define DECORATION_PRETTY_SINK 27 +#define DECORATION_FEATHERY_BED 28 +#define DECORATION_TRASH_CAN 29 +#define DECORATION_CARDBOARD_BOX 30 +#define DECORATION_CRATE 31 +#define DECORATION_CONTAINER 32 +#define DECORATION_OIL_DRUM 33 +#define DECORATION_BIG_OIL_DRUM 34 +#define DECORATION_IRON_BEAM 35 +#define DECORATION_POTTED_PLANT 36 +#define DECORATION_POKE_FLOWER 37 +#define DECORATION_HEALING_MACHINE 38 +#define DECORATION_LAB_MACHINE 39 +#define DECORATION_TEST_MACHINE 40 +#define DECORATION_GAME_SYSTEM 41 +#define DECORATION_VENDING_MACHINE 42 +#define DECORATION_RED_BIKE 43 +#define DECORATION_GREEN_BIKE 44 +#define DECORATION_BINOCULARS 45 +#define DECORATION_GLOBE 46 +#define DECORATION_GYM_STATUE 47 +#define DECORATION_RED_TENT 48 +#define DECORATION_BLUE_TENT 49 +#define DECORATION_CLEAR_TENT 50 +#define DECORATION_MAZE_BLOCK_1 51 +#define DECORATION_MAZE_BLOCK_2 52 +#define DECORATION_MAZE_BLOCK_3 53 +#define DECORATION_MAZE_BLOCK_4 54 +#define DECORATION_MAZE_BLOCK_5 55 +#define DECORATION_HOLE_TOOL 56 +#define DECORATION_PIT_TOOL 57 +#define DECORATION_SMOKE_TOOL 58 +#define DECORATION_BIG_SMOKE_TOOL 59 +#define DECORATION_ROCK_TOOL 60 +#define DECORATION_ROCKFALL_TOOL 61 +#define DECORATION_FOAM_TOOL 62 +#define DECORATION_BUBBLE_TOOL 63 +#define DECORATION_ALERT_TOOL_1 64 +#define DECORATION_ALERT_TOOL_2 65 +#define DECORATION_ALERT_TOOL_3 66 +#define DECORATION_ALERT_TOOL_4 67 +#define DECORATION_LEAF_TOOL 68 +#define DECORATION_FLOWER_TOOL 69 +#define DECORATION_EMBER_TOOL 70 +#define DECORATION_FIRE_TOOL 71 +#define DECORATION_CUTE_CUP 72 +#define DECORATION_COOL_CUP 73 +#define DECORATION_BEAUTY_CUP 74 +#define DECORATION_TOUGH_CUP 75 +#define DECORATION_CLEVER_CUP 76 +#define DECORATION_BLUE_CRYSTAL 77 +#define DECORATION_PINK_CRYSTAL 78 +#define DECORATION_RED_CRYSTAL 79 +#define DECORATION_YELLOW_CRYSTAL 80 +#define DECORATION_PRETTY_GEM 81 +#define DECORATION_SHINY_GEM 82 +#define DECORATION_MYSTIC_GEM 83 +#define DECORATION_GLITTER_GEM 84 +#define DECORATION_BRONZE_TROPHY 85 +#define DECORATION_SILVER_TROPHY 86 +#define DECORATION_GOLD_TROPHY 87 +#define DECORATION_GREAT_TROPHY 88 +#define DECORATION_BALL_ORNAMENT 89 +#define DECORATION_ROUND_ORNAMENT 90 +#define DECORATION_CLEAR_ORNAMENT 91 +#define DECORATION_CHARMANDER_DOLL 92 +#define DECORATION_BULBASAUR_DOLL 93 +#define DECORATION_SQUIRTLE_DOLL 94 +#define DECORATION_CYNDAQUIL_DOLL 95 +#define DECORATION_CHIKORITA_DOLL 96 +#define DECORATION_TOTODILE_DOLL 97 +#define DECORATION_TORCHIC_DOLL 98 +#define DECORATION_TREECKO_DOLL 99 +#define DECORATION_MUDKIP_DOLL 100 +#define DECORATION_CHIMCHAR_DOLL 101 +#define DECORATION_TURTWIG_DOLL 102 +#define DECORATION_PIPLUP_DOLL 103 +#define DECORATION_PIKACHU_DOLL 104 +#define DECORATION_PLUSLE_DOLL 105 +#define DECORATION_MINUN_DOLL 106 +#define DECORATION_CLEFAIRY_DOLL 107 +#define DECORATION_JIGGLYPUFF_DOLL 108 +#define DECORATION_WOBBUFFET_DOLL 109 +#define DECORATION_MEOWTH_DOLL 110 +#define DECORATION_SKITTY_DOLL 111 +#define DECORATION_GLAMEOW_DOLL 112 +#define DECORATION_BUNEARY_DOLL 113 +#define DECORATION_WEAVILE_DOLL 114 +#define DECORATION_MUNCHLAX_DOLL 115 +#define DECORATION_BONSLY_DOLL 116 +#define DECORATION_MIME_JR__DOLL 117 +#define DECORATION_LUCARIO_DOLL 118 +#define DECORATION_MANTYKE_DOLL 119 +#define DECORATION_BUIZEL_DOLL 120 +#define DECORATION_CHATOT_DOLL 121 +#define DECORATION_MANAPHY_DOLL 122 +#define DECORATION_SNORLAX_DOLL 123 +#define DECORATION_WAILORD_DOLL 124 +#define DECORATION_MAGNEZONE_DOLL 125 +#define DECORATION_DRIFLOON_DOLL 126 +#define DECORATION_HAPPINY_DOLL 127 +#define DECORATION_PACHIRISU_DOLL 128 +#define DECORATION_129 129 +#define DECORATION_130 130 +#define DECORATION_131 131 +#define DECORATION_132 132 +#define DECORATION_WIDE_SOFA 133 +#define DECORATION_BONSAI 134 +#define DECORATION_DAINTY_FLOWERS 135 +#define DECORATION_LOVELY_FLOWERS 136 +#define DECORATION_PRETTY_FLOWERS 137 +#define DECORATION_LAVISH_FLOWERS 138 + +#endif //POKEDIAMOND_DECORATIONS_H diff --git a/include/scrcmd.h b/include/scrcmd.h index a1906e2d..13306ed1 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -107,6 +107,13 @@ BOOL ScrCmd_Unk02CF(struct ScriptContext *ctx); BOOL ScrCmd_Unk02D0(struct ScriptContext *ctx); BOOL ScrCmd_Unk005E(struct ScriptContext *ctx); +// scrcmd_mart.c +BOOL ScrCmd_NormalMart(struct ScriptContext * ctx); +BOOL ScrCmd_SpecialMart(struct ScriptContext * ctx); +BOOL ScrCmd_GoodsMart(struct ScriptContext * ctx); +BOOL ScrCmd_SealsMart(struct ScriptContext * ctx); +BOOL ScrCmd_AccessoriesShop(struct ScriptContext * ctx); + //scrcmd_4.c BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx); BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx); -- cgit v1.2.3 From bfcd4ca46f428ba168c6daf6aa7550b7d8d71a03 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 27 May 2021 20:09:37 -0400 Subject: Start decomping unk_02006864 --- include/unk_02016B94.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h index a13f1634..fec45cd8 100644 --- a/include/unk_02016B94.h +++ b/include/unk_02016B94.h @@ -219,7 +219,7 @@ void FUN_0201878C(struct UnkStruct_02016B94_2 *param0, u32 param1, u16 param2); void *FUN_020187B0(u32 param0); void FUN_02018808(u8 *param0, u32 param1, u8 (*param2)[2], u8 param3); u8 (*FUN_02018848(u8 *param0, u32 param1, u8 param2, u32 heap_id))[2]; -void *FUN_0201886C(struct UnkStruct_02016B94_2 *param0, u32 param1); +void *FUN_0201886C(struct UnkStruct_02016B94_2 *param0, u8 param1); u16 FUN_02018878(struct UnkStruct_02016B94_2 *param0, u32 param1); u8 FUN_02018884(struct UnkStruct_02016B94_2 *param0, u32 param1); void BlitBitmapRect4Bit(struct UnkStruct_02016B94_3 *param0, -- cgit v1.2.3 From fea86c63479708926cce890f65cf7c9217f6fc4c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 29 May 2021 11:17:47 -0400 Subject: Name funcs in gf_gfx_loader --- include/gf_gfx_loader.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/gf_gfx_loader.h (limited to 'include') diff --git a/include/gf_gfx_loader.h b/include/gf_gfx_loader.h new file mode 100644 index 00000000..b95075dc --- /dev/null +++ b/include/gf_gfx_loader.h @@ -0,0 +1,23 @@ +#ifndef POKEDIAMOND_GF_GFX_LOADER_H +#define POKEDIAMOND_GF_GFX_LOADER_H + +#include "unk_02016B94.h" + +u32 GfGfxLoader_LoadCharData(NarcId narcId, s32 memberNo, struct UnkStruct_02016B94_2 * unkStruct02016B94_2, u32 a3, u32 a4, u32 szByte, BOOL isCompressed, u32 heap_id); +void GfGfxLoader_LoadScrnData(NarcId narcId, s32 memberNo, struct UnkStruct_02016B94_2 * unkStruct02016B94_2, u32 a3, u32 a4, u32 szByte, BOOL isCompressed, u32 heap_id); +void GfGfxLoader_GXLoadPal(NarcId narcId, s32 memberNo, u32 whichRoutine, u32 baseAddr, u32 szByte, u32 heap_id); +void GfGfxLoader_GXLoadPalWithSrcOffset(NarcId narcId, s32 memberNo, u32 whichRoutine, u32 srcOffset, u32 baseAddr, u32 szByte, u32 heap_id); +u32 GfGfxLoader_LoadWholePalette(NarcId narcId, s32 memberId, u32 whichRoutine, u32 baseAddr, u32 szByte, BOOL isCompressed, u32 heap_id); +void GfGfxLoader_PartiallyLoadPalette(NarcId narcId, s32 memberId, NNS_G2D_VRAM_TYPE vramType, u32 baseAddr, u32 heap_id, NNSG2dImagePaletteProxy * pPltProxy); +u32 GfGfxLoader_LoadImageMapping(NarcId narcId, s32 memberId, BOOL isCompressed, u32 whichRoutine, u32 szByte, NNS_G2D_VRAM_TYPE type, u32 baseAddr, u32 heap_id, NNSG2dImageProxy *pImgProxy); +void GfGfxLoader_SetObjCntFlagsAndLoadImageMapping(NarcId narcId, s32 memberId, BOOL isCompressed, u32 whichRoutine, u32 szByte, NNS_G2D_VRAM_TYPE type, u32 baseAddr, u32 heap_id, NNSG2dImageProxy * pImageProxy); +void * GfGfxLoader_GetCharData(NarcId narcId, s32 memberId, BOOL isCompressed, NNSG2dCharacterData ** ppCharData, u32 heap_id); +void * GfGfxLoader_GetScrnData(NarcId narcId, s32 memberId, BOOL isCompressed, NNSG2dScreenData ** ppScrData, u32 heap_id); +void * GfGfxLoader_GetPlttData(NarcId narcId, s32 memberId, NNSG2dPaletteData ** ppPltData, u32 heap_id); +void * GfGfxLoader_GetCellBank(NarcId narcId, s32 memberId, BOOL isCompressed, NNSG2dCellDataBank ** ppCellBank, u32 heap_id); +void * GfGfxLoader_GetAnimBank(NarcId narcId, s32 memberId, BOOL isCompressed, NNSG2dAnimBankData ** ppAnimBank, u32 heap_id); +void * GfGfxLoader_UncompressFromNarc(NarcId narcId, s32 memberId, u32 heap_id); +void * GfGfxLoader_LoadFromNarc(NarcId narcId, s32 memberNo, BOOL isCompressed, u32 heap_id, BOOL allocAtEnd); +void * GfGfxLoader_LoadFromNarc_GetSizeOut(NarcId narcId, s32 memberNo, BOOL isCompressed, u32 heap_id, BOOL allocAtEnd, u32 *size_p); + +#endif //POKEDIAMOND_GF_GFX_LOADER_H -- cgit v1.2.3 From 6ed67e61ef078048f054581d0c5a795aa4eb98c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Mon, 31 May 2021 21:52:55 +0200 Subject: decompile unk_0200BB14.s --- include/unk_0200BB14.h | 181 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 include/unk_0200BB14.h (limited to 'include') diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h new file mode 100644 index 00000000..973a9a65 --- /dev/null +++ b/include/unk_0200BB14.h @@ -0,0 +1,181 @@ +#include "global.h" + +struct UnkStruct1 +{ + u32 unk000; + u32 unk004; + u32 unk008; + u8 unk00c[0x12c]; +}; + +struct UnkStruct2 +{ + u8 unk00[0xc]; + u32 unk0c[6]; + u8 unk24[0x34]; +}; + +struct UnkStruct3 +{ + u32 unk00; + s16 unk04; + s16 unk06; + u16 unk08; + u16 unk0a; + u32 unk0c; + u32 unk10; + u32 unk14; + u32 unk18; + u32 unk1c; + u32 unk20; + u32 unk24; +}; + +struct UnkStruct4 +{ + u32 unk00; + u32 unk04; + s32 unk08; + s32 unk0c; + s32 unk10; + u32 unk14; + u32 unk18; + u32 unk1c; + u16 unk20; + u32 unk24; + u32 unk28; + u32 unk2c; +}; + +struct UnkStruct1 *FUN_0200BB14(u32 heap_id); +struct UnkStruct2 *FUN_0200BB34(struct UnkStruct1 *param0); +u32 FUN_0200BB68(u32 param0); +u32 FUN_0200BB6C(u32 *param0, u32 *param1, u32 *param2, u32 param3); +u32 FUN_0200BBF0(u32 *param0, u32 *param1, u32 param2); +void FUN_0200BC14(u32 param0); +void FUN_0200BC1C(u32 *param0); +void FUN_0200BC30(); +void FUN_0200BC38(); +void FUN_0200BC40(u32 *param0); +void FUN_0200BC4C(u32 *param0); +void FUN_0200BC5C(u32 *param0); +void FUN_0200BCB0(u32 *param0); +void FUN_0200BCD0(u32 *param0, void *param1); +void FUN_0200BCE0(u32 *param0, u32 *param1); +void FUN_0200BD04(u32 *param0); +u32 FUN_0200BD20(u32 *param0, u32 *param1, u32 *param2); +u32 FUN_0200BE38(u32 *param0, u32 *param1, struct UnkStruct3 *param2); +u32 FUN_0200BE74(u32 *param0, + u32 *param1, + u32 param2, + s16 param3, + s16 param4, + s16 param5, + u16 param6, + u32 param7, + u32 param8, + u32 param9, + u32 param10, + u32 param11, + u32 param12, + u32 param13); +u32 FUN_0200BF60(u32 *param0, u32 *param1, u32 *param2); +u32 FUN_0200C00C( + u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); +s32 FUN_0200C06C(u32 *param0, + u32 *param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7); +u8 FUN_0200C0DC(u32 param0, + u32 param1, + u32 *param2, + u32 *param3, + u32 param4, + u32 param5, + u32 param6, + u32 param7, + u32 param8, + u32 param9); +u32 FUN_0200C124(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); +u32 FUN_0200C13C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); +u32 *FUN_0200C154(u32 *param0, u32 *param1, u32 *param2); +u32 FUN_0200C334(u32 *param0, u32 param1); +u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); +u32 FUN_0200C358(u32 *param0, u32 param1); +u32 FUN_0200C368(u32 *param0, u32 param1); +u32 FUN_0200C378(u32 *param0, u32 param1); +u32 FUN_0200C388(u32 *param0, u32 param1); +void FUN_0200C398(u32 param0, u32 *param1); +void FUN_0200C3DC(u32 *param0); +u32 FUN_0200C404( + u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); +u32 FUN_0200C474(u32 *param0, u32 param1); +u32 FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); +u32 FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); +u32 FUN_0200C548(u32 param0, u32 *param1, u32 param2); +void FUN_0200C59C(u32 param0); +void FUN_0200C5A8(u32 *param0); +void FUN_0200C5B4(u32 *param0, u32 param1); +void FUN_0200C5C0(u32 *param0, u32 param1); +u32 FUN_0200C5CC(u32 *param0); +void FUN_0200C5D8(u32 param0, u32 param1); +void FUN_0200C5E0(u32 *param0, u32 param1); +void FUN_0200C5EC(u32 param0, u32 param1); +void FUN_0200C5F4(u32 *param0, u32 param1); +u32 FUN_0200C600(u32 param0); +u32 FUN_0200C608(u32 *param0); +void FUN_0200C614(u32 param0); +void FUN_0200C61C(u32 *param0); +void FUN_0200C628(u32 param0); +void FUN_0200C630(u32 *param0); +void FUN_0200C63C(u32 param0, u32 param1); +void FUN_0200C644(u32 *param0, u32 param1); +u8 FUN_0200C650(u32 param0); +u8 FUN_0200C658(u32 *param0); +void FUN_0200C664(u32 param0, u32 param1); +void FUN_0200C66C(u32 *param0, u32 param1); +void FUN_0200C678(u32 param0, u32 param1); +void FUN_0200C680(u32 *param0, u32 param1); +u8 FUN_0200C68C(u32 *param0); +void FUN_0200C698(u32 param0, u32 param1); +u8 FUN_0200C6A4(u32 *param0); +void FUN_0200C6B0(u32 *param0, u32 param1); +void FUN_0200C6BC(u32 param0, u32 param1); +void FUN_0200C6C4(u32 *param0, u32 param1); +u16 FUN_0200C6D0(u32 param0); +u16 FUN_0200C6D8(u32 *param0); +void FUN_0200C6E4(u32 param0, u32 param1, u32 param2); +void FUN_0200C714(u32 *param0, u32 param1, u32 param2); +void FUN_0200C720(u32 param0, u32 param1, u32 param2, u32 param3); +void FUN_0200C750(u32 *param0, u32 param1, u32 param2, u32 param3); +void FUN_0200C75C(u32 param0, u16 *param1, u16 *param2); +void FUN_0200C7A0(u32 *param0, u16 *param1, u16 *param2); +void FUN_0200C7AC(u32 param0, u16 *param1, u16 *param2, u32 param3); +void FUN_0200C7F0(u32 *param0, u16 *param1, u16 *param2, u32 param3); +void FUN_0200C7FC(u32 param0, u16 *param1, u16 *param2); +void FUN_0200C82C(u32 *param0, u16 *param1, u16 *param2); +void FUN_0200C838(u32 param0, u32 param1); +void FUN_0200C840(u32 *param0, u32 param1); +void FUN_0200C84C(u32 param0, f32 param1, f32 param2); +void FUN_0200C884(u32 *param0, f32 param1, f32 param2); +void FUN_0200C890(u32 param0, u16 param1); +void FUN_0200C898(u32 *param0, u16 param1); +void FUN_0200C8A4(u32 param0, u32 param1); +void FUN_0200C8BC(u32 *param0, u32 param1); +void FUN_0200C8C8(u32 param0, u32 param1); +void FUN_0200C8D0(u32 *param0, u32 param1); +void FUN_0200C8DC(u32 *param0, u32 param1, u32 param2); +void FUN_0200C8F8(u32 *param0, u32 param1); +void FUN_0200C904(u32 param0, u32 param1); +void FUN_0200C90C(u32 *param0, u32 param1); +u32 FUN_0200C918( + u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); +u32 FUN_0200C978( + u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); +void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); +void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); +u32 FUN_0200CA40(u32 *param0); -- cgit v1.2.3 From 1aad76b774edbd598fb024d67cf54e7973ade8db Mon Sep 17 00:00:00 2001 From: red031000 Date: Mon, 31 May 2021 21:12:03 +0100 Subject: document a lot of scrcmd commands --- include/scrcmd.h | 156 +++++++++++++++++++++++++++---------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 13306ed1..53f40bda 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -67,7 +67,7 @@ BOOL ScrCmd_Unk01FC(struct ScriptContext* ctx); BOOL ScrCmd_Unk01FD(struct ScriptContext* ctx); BOOL ScrCmd_Unk01FE(struct ScriptContext* ctx); BOOL ScrCmd_Unk01FF(struct ScriptContext* ctx); -BOOL ScrCmd_Unk026D(struct ScriptContext* ctx); +BOOL ScrCmd_MessageUnown(struct ScriptContext* ctx); BOOL ScrCmd_Unk002C(struct ScriptContext* ctx); BOOL ScrCmd_Unk002D(struct ScriptContext* ctx); BOOL ScrCmd_Unk02C0(struct ScriptContext* ctx); @@ -77,9 +77,9 @@ BOOL ScrCmd_Unk002F(struct ScriptContext* ctx); BOOL ScrCmd_WaitButtonAB(struct ScriptContext* ctx); BOOL ScrCmd_WaitButtonABTime(struct ScriptContext *ctx); BOOL ScrCmd_WaitButton(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0032(struct ScriptContext *ctx); +BOOL ScrCmd_WaitButtonABPad(struct ScriptContext *ctx); BOOL ScrCmd_Unk0033(struct ScriptContext *ctx); -BOOL ScrCmd_Unk0034(struct ScriptContext* ctx); +BOOL ScrCmd_CloseMessageBox(struct ScriptContext* ctx); BOOL ScrCmd_Unk0035(struct ScriptContext* ctx); BOOL ScrCmd_ScrollBg(struct ScriptContext* ctx); BOOL ScrCmd_CreateMessageBox(struct ScriptContext* ctx); @@ -118,33 +118,33 @@ BOOL ScrCmd_AccessoriesShop(struct ScriptContext * ctx); BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx); BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx); BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx); -BOOL ScrCmd_Unk00D0(struct ScriptContext* ctx); +BOOL ScrCmd_GetPokemonName(struct ScriptContext* ctx); BOOL ScrCmd_GetItemName(struct ScriptContext* ctx); BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx); BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx); BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx); BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx); BOOL ScrCmd_Unk0280(struct ScriptContext* ctx); -BOOL ScrCmd_Unk00D6(struct ScriptContext* ctx); +BOOL ScrCmd_GetPokemonNickname(struct ScriptContext* ctx); BOOL ScrCmd_Unk0251(struct ScriptContext* ctx); BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx); BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx); BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx); BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx); struct String* FUN_02040AE4(u32 msg_no, u32 heap_id); -BOOL ScrCmd_Unk00DB(struct ScriptContext* ctx); -BOOL ScrCmd_Unk00DC(struct ScriptContext* ctx); -BOOL ScrCmd_Unk00DD(struct ScriptContext* ctx); +BOOL ScrCmd_GetPlayerStarterName(struct ScriptContext* ctx); +BOOL ScrCmd_GetRivalStarterName(struct ScriptContext* ctx); +BOOL ScrCmd_GetCounterpartStarterName(struct ScriptContext* ctx); BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx); BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx); BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx); -BOOL ScrCmd_Unk00E2(struct ScriptContext* ctx); -BOOL ScrCmd_Unk017B(struct ScriptContext* ctx); +BOOL ScrCmd_GetMapName(struct ScriptContext* ctx); +BOOL ScrCmd_GetBerryName(struct ScriptContext* ctx); BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx); BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0272(struct ScriptContext* ctx); +BOOL ScrCmd_GetWhiteRockInscription(struct ScriptContext* ctx); BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0232(struct ScriptContext* ctx); +BOOL ScrCmd_GetRibbonName(struct ScriptContext* ctx); BOOL ScrCmd_GetSealName(struct ScriptContext* ctx); BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx); BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx); @@ -160,46 +160,46 @@ BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx); //scrcmd_sound.c BOOL ScrCmd_Unk02AE(struct ScriptContext *ctx); -BOOL ScrCmd_Unk0050(struct ScriptContext *ctx); -BOOL ScrCmd_Unk0051(struct ScriptContext *ctx); -BOOL ScrCmd_Unk0052(struct ScriptContext *ctx); +BOOL ScrCmd_PlayBgm(struct ScriptContext *ctx); +BOOL ScrCmd_StopBgm(struct ScriptContext *ctx); +BOOL ScrCmd_PlayDefaultBgm(struct ScriptContext *ctx); BOOL ScrCmd_Unk0053(struct ScriptContext *ctx); -BOOL ScrCmd_Unk0054(struct ScriptContext *ctx); +BOOL ScrCmd_FadeOutBgm(struct ScriptContext *ctx); BOOL FUN_02041464(struct ScriptContext *ctx); -BOOL ScrCmd_Unk0055(struct ScriptContext* ctx); +BOOL ScrCmd_FadeInBgm(struct ScriptContext* ctx); BOOL ScrCmd_Unk0056(struct ScriptContext* ctx); BOOL ScrCmd_Unk0057(struct ScriptContext* ctx); BOOL ScrCmd_Unk0058(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0049(struct ScriptContext* ctx); -BOOL ScrCmd_Unk004A(struct ScriptContext* ctx); -BOOL ScrCmd_Unk004B(struct ScriptContext* ctx); +BOOL ScrCmd_PlayFanfare(struct ScriptContext* ctx); +BOOL ScrCmd_StopFanfare(struct ScriptContext* ctx); +BOOL ScrCmd_PlayFanfareWait(struct ScriptContext* ctx); BOOL FUN_02041540(struct ScriptContext* ctx); -BOOL ScrCmd_Unk004C(struct ScriptContext* ctx); +BOOL ScrCmd_PlayCry(struct ScriptContext* ctx); BOOL ScrCmd_PlayCryWait(struct ScriptContext* ctx); BOOL FUN_02041598(struct ScriptContext* ctx); -BOOL ScrCmd_Unk004F(struct ScriptContext* ctx); +BOOL ScrCmd_PlaySoundWait(struct ScriptContext* ctx); BOOL FUN_020415CC(struct ScriptContext* ctx); -BOOL ScrCmd_PlayBgm(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0059(struct ScriptContext* ctx); -BOOL ScrCmd_Unk005A(struct ScriptContext* ctx); -BOOL ScrCmd_Unk005B(struct ScriptContext* ctx); -BOOL ScrCmd_Unk005C(struct ScriptContext* ctx); +BOOL ScrCmd_PlaySound(struct ScriptContext* ctx); +BOOL ScrCmd_CheckChatotCry(struct ScriptContext* ctx); +BOOL ScrCmd_StartChatotRecord(struct ScriptContext* ctx); +BOOL ScrCmd_StopChatotRecord(struct ScriptContext* ctx); +BOOL ScrCmd_SaveChatotCry(struct ScriptContext* ctx); BOOL ScrCmd_Unk005D(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0283(struct ScriptContext *ctx); +BOOL ScrCmd_SetVolume(struct ScriptContext *ctx); //scrcmd_8.c BOOL ScrCmd_Unk021D(struct ScriptContext* ctx); -//scrcmd_11.c -BOOL ScrCmd_Unk017D(struct ScriptContext* ctx); -BOOL ScrCmd_Unk017E(struct ScriptContext* ctx); -BOOL ScrCmd_Unk017F(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0180(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0181(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0182(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0183(struct ScriptContext* ctx); +//scrcmd_berry_trees.c +BOOL ScrCmd_GetBerryTreeGrowth(struct ScriptContext* ctx); +BOOL ScrCmd_GetBerryTreeType(struct ScriptContext* ctx); +BOOL ScrCmd_GetBerryTreeMulch(struct ScriptContext* ctx); +BOOL ScrCmd_GetBerryTreeWater(struct ScriptContext* ctx); +BOOL ScrCmd_GetBerryTreeAmount(struct ScriptContext* ctx); +BOOL ScrCmd_SetBerryTreeMulch(struct ScriptContext* ctx); +BOOL ScrCmd_SetBerryTreeType(struct ScriptContext* ctx); BOOL ScrCmd_Unk0184(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0185(struct ScriptContext* ctx); +BOOL ScrCmd_TakeBerryTreeBerries(struct ScriptContext* ctx); //scrcmd_13.c BOOL ScrCmd_Unk0253(struct ScriptContext* ctx); @@ -208,9 +208,9 @@ BOOL ScrCmd_Unk0255(struct ScriptContext* ctx); BOOL ScrCmd_Unk0256(struct ScriptContext* ctx); //scrcmd_coins.c -BOOL ScrCmd_Unk0075(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0076(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0077(struct ScriptContext* ctx); +BOOL ScrCmd_ShowCoinBox(struct ScriptContext* ctx); +BOOL ScrCmd_HideCoinBox(struct ScriptContext* ctx); +BOOL ScrCmd_UpdateCoinBox(struct ScriptContext* ctx); BOOL ScrCmd_GetCoins(struct ScriptContext* ctx); BOOL ScrCmd_GiveCoins(struct ScriptContext* ctx); BOOL ScrCmd_TakeCoinsImmediate(struct ScriptContext* ctx); @@ -225,18 +225,18 @@ BOOL ScrCmd_TakeMoneyImmediate(struct ScriptContext* ctx); BOOL ScrCmd_TakeMoneyAddress(struct ScriptContext* ctx); BOOL ScrCmd_HasEnoughMoneyImmediate(struct ScriptContext* ctx); BOOL ScrCmd_HasEnoughMoneyAddress(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0072(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0073(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0074(struct ScriptContext* ctx); +BOOL ScrCmd_ShowMoneyBox(struct ScriptContext* ctx); +BOOL ScrCmd_HideMoneyBox(struct ScriptContext* ctx); +BOOL ScrCmd_UpdateMoneyBox(struct ScriptContext* ctx); //scrcmd_daycare.c -BOOL ScrCmd_Unk016D(struct ScriptContext* ctx); -BOOL ScrCmd_Unk016E(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01A8(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01A9(struct ScriptContext* ctx); +BOOL ScrCmd_GetDaycarePokemonNames(struct ScriptContext* ctx); +BOOL ScrCmd_GetDaycareStatus(struct ScriptContext* ctx); +BOOL ScrCmd_DeleteDaycareEgg(struct ScriptContext* ctx); +BOOL ScrCmd_GiveDaycareEgg(struct ScriptContext* ctx); BOOL ScrCmd_Unk01A4(struct ScriptContext* ctx); BOOL ScrCmd_Unk01AA(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01AE(struct ScriptContext* ctx); +BOOL ScrCmd_GetDaycareLevel(struct ScriptContext* ctx); BOOL ScrCmd_Unk01AF(struct ScriptContext* ctx); BOOL ScrCmd_Unk01B0(struct ScriptContext* ctx); BOOL ScrCmd_Unk01BC(struct ScriptContext* ctx); @@ -250,10 +250,10 @@ BOOL ScrCmd_Unk01AD(struct ScriptContext* ctx); //scrcmd_18.c BOOL ScrCmd_GiveMon(struct ScriptContext* ctx); -//scrcmd_19.c -BOOL ScrCmd_Unk01F1(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01F4(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01F5(struct ScriptContext* ctx); +//scrcmd_fossils.c +BOOL ScrCmd_CountFossils(struct ScriptContext* ctx); +BOOL ScrCmd_GetFossilPokemon(struct ScriptContext* ctx); +BOOL ScrCmd_GetFossilMinimumAmount(struct ScriptContext* ctx); BOOL ScrCmd_Unk01F2(struct ScriptContext* ctx); BOOL ScrCmd_Unk01F3(struct ScriptContext* ctx); @@ -263,24 +263,24 @@ BOOL ScrCmd_Unk02A6(struct ScriptContext* ctx); //scrcmd_flags.c BOOL ScrCmd_HasSinnohDex(struct ScriptContext* ctx); BOOL ScrCmd_GiveSinnohDex(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0159(struct ScriptContext* ctx); -BOOL ScrCmd_Unk015A(struct ScriptContext* ctx); +BOOL ScrCmd_HasRunningShoes(struct ScriptContext* ctx); +BOOL ScrCmd_GiveRunningShoes(struct ScriptContext* ctx); BOOL ScrCmd_HasBadge(struct ScriptContext* ctx); BOOL ScrCmd_GiveBadge(struct ScriptContext* ctx); -BOOL ScrCmd_Unk015E(struct ScriptContext* ctx); +BOOL ScrCmd_GiveBag(struct ScriptContext* ctx); BOOL ScrCmd_GetTotalEarnedBadges(struct ScriptContext* ctx); -BOOL ScrCmd_Unk015F(struct ScriptContext* ctx); +BOOL ScrCmd_HasBag(struct ScriptContext* ctx); BOOL ScrCmd_Unk0160(struct ScriptContext* ctx); BOOL ScrCmd_Unk0161(struct ScriptContext* ctx); BOOL ScrCmd_Unk0162(struct ScriptContext* ctx); BOOL ScrCmd_Unk0163(struct ScriptContext* ctx); BOOL ScrCmd_Unk0164(struct ScriptContext* ctx); BOOL ScrCmd_Unk0165(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0166(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0167(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01CF(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01D0(struct ScriptContext* ctx); -BOOL ScrCmd_Unk01D1(struct ScriptContext* ctx); +BOOL ScrCmd_CheckGameCompleted(struct ScriptContext* ctx); +BOOL ScrCmd_SetGameCompleted(struct ScriptContext* ctx); +BOOL ScrCmd_GetSetStrength(struct ScriptContext* ctx); +BOOL ScrCmd_GetSetFlash(struct ScriptContext* ctx); +BOOL ScrCmd_GetSetDefog(struct ScriptContext* ctx); //scrcmd_items.c BOOL ScrCmd_GiveItem(struct ScriptContext* ctx); @@ -292,23 +292,23 @@ BOOL ScrCmd_GetItemPocketId(struct ScriptContext* ctx); BOOL ScrCmd_Unk0081(struct ScriptContext* ctx); BOOL ScrCmd_Unk0082(struct ScriptContext* ctx); -//scrcmd_23.c -BOOL ScrCmd_Unk0083(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0084(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0085(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0086(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0087(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0088(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0089(struct ScriptContext* ctx); -BOOL ScrCmd_Unk008A(struct ScriptContext* ctx); -BOOL ScrCmd_Unk008B(struct ScriptContext* ctx); -BOOL ScrCmd_Unk008C(struct ScriptContext* ctx); -BOOL ScrCmd_Unk008D(struct ScriptContext* ctx); -BOOL ScrCmd_Unk008E(struct ScriptContext* ctx); -BOOL ScrCmd_Unk008F(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0090(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0091(struct ScriptContext* ctx); -BOOL ScrCmd_Unk0092(struct ScriptContext* ctx); +//scrcmd_underground.c +BOOL ScrCmd_GiveSecretBaseDecoration(struct ScriptContext* ctx); +BOOL ScrCmd_TakeSecretBaseDecoration(struct ScriptContext* ctx); +BOOL ScrCmd_HasSpaceForDecoration(struct ScriptContext* ctx); +BOOL ScrCmd_GetDecorationCount(struct ScriptContext* ctx); +BOOL ScrCmd_GiveUndergroundTrap(struct ScriptContext* ctx); +BOOL ScrCmd_TakeUndergroundTrap(struct ScriptContext* ctx); +BOOL ScrCmd_HasSpaceForTrap(struct ScriptContext* ctx); +BOOL ScrCmd_GetTrapCount(struct ScriptContext* ctx); +BOOL ScrCmd_GiveTreasure(struct ScriptContext* ctx); +BOOL ScrCmd_TakeTreasure(struct ScriptContext* ctx); +BOOL ScrCmd_HasSpaceForTreasure(struct ScriptContext* ctx); +BOOL ScrCmd_GetTreasureCount(struct ScriptContext* ctx); +BOOL ScrCmd_GiveUndergroundSphere(struct ScriptContext* ctx); +BOOL ScrCmd_TakeUndergroundSphere(struct ScriptContext* ctx); +BOOL ScrCmd_HasSpaceForSphere(struct ScriptContext* ctx); +BOOL ScrCmd_GetSphereCount(struct ScriptContext* ctx); //scrcmd_24.c BOOL ScrCmd_Unk01C6(struct ScriptContext* ctx); -- cgit v1.2.3 From 0e5566e7d26509088d0528f6b0946afa882a4532 Mon Sep 17 00:00:00 2001 From: tgsm Date: Tue, 1 Jun 2021 01:05:51 -0400 Subject: Document scrcmd_20 -> scrcmd_prizes --- include/scrcmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/scrcmd.h b/include/scrcmd.h index 53f40bda..91cb306c 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -257,8 +257,8 @@ BOOL ScrCmd_GetFossilMinimumAmount(struct ScriptContext* ctx); BOOL ScrCmd_Unk01F2(struct ScriptContext* ctx); BOOL ScrCmd_Unk01F3(struct ScriptContext* ctx); -//scrcmd_20.c -BOOL ScrCmd_Unk02A6(struct ScriptContext* ctx); +//scrcmd_prizes.c +BOOL ScrCmd_GetPrizeItemIdAndCost(struct ScriptContext* ctx); //scrcmd_flags.c BOOL ScrCmd_HasSinnohDex(struct ScriptContext* ctx); -- cgit v1.2.3 From f8e4e3e590fd2e4fb2aaafda7a269a874b952af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 1 Jun 2021 19:57:57 +0200 Subject: fewer ugly array access --- include/unk_0200BB14.h | 82 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 29 deletions(-) (limited to 'include') diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index 973a9a65..33fe0aee 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -5,14 +5,19 @@ struct UnkStruct1 u32 unk000; u32 unk004; u32 unk008; - u8 unk00c[0x12c]; + u32 unk00c; + u8 unk010[0x128]; }; struct UnkStruct2 { - u8 unk00[0xc]; + u32 unk00; + u32 unk04; + u32 *unk08; u32 unk0c[6]; - u8 unk24[0x34]; + u32 *unk24[6]; + u32 unk3c[6]; + s32 unk54; }; struct UnkStruct3 @@ -31,10 +36,14 @@ struct UnkStruct3 u32 unk24; }; +struct UnkStruct7 { + u8 unk00[0x24]; +}; + struct UnkStruct4 { u32 unk00; - u32 unk04; + struct UnkStruct7 *unk04; s32 unk08; s32 unk0c; s32 unk10; @@ -47,23 +56,38 @@ struct UnkStruct4 u32 unk2c; }; + + + +struct UnkStruct6 { + struct UnkStruct7 *unk0; + u32 unk4; +}; +struct UnkStruct5 { + u32 unk00; + struct UnkStruct7 *unk04; + struct UnkStruct6 *unk08; + u32 unk0c; +}; + + struct UnkStruct1 *FUN_0200BB14(u32 heap_id); struct UnkStruct2 *FUN_0200BB34(struct UnkStruct1 *param0); u32 FUN_0200BB68(u32 param0); -u32 FUN_0200BB6C(u32 *param0, u32 *param1, u32 *param2, u32 param3); -u32 FUN_0200BBF0(u32 *param0, u32 *param1, u32 param2); +u32 FUN_0200BB6C(struct UnkStruct1 *param0, u32 *param1, u32 *param2, u32 param3); +u32 FUN_0200BBF0(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 param2); void FUN_0200BC14(u32 param0); void FUN_0200BC1C(u32 *param0); void FUN_0200BC30(); void FUN_0200BC38(); -void FUN_0200BC40(u32 *param0); -void FUN_0200BC4C(u32 *param0); -void FUN_0200BC5C(u32 *param0); +void FUN_0200BC40(struct UnkStruct2 *param0); +void FUN_0200BC4C(struct UnkStruct2 *param0); +void FUN_0200BC5C(struct UnkStruct2 *param0); void FUN_0200BCB0(u32 *param0); -void FUN_0200BCD0(u32 *param0, void *param1); -void FUN_0200BCE0(u32 *param0, u32 *param1); +void FUN_0200BCD0(struct UnkStruct1 *param0, struct UnkStruct2 *param1); +void FUN_0200BCE0(struct UnkStruct1 *param0, struct UnkStruct2 *param1); void FUN_0200BD04(u32 *param0); -u32 FUN_0200BD20(u32 *param0, u32 *param1, u32 *param2); +u32 FUN_0200BD20(struct UnkStruct1 *param0, struct UnkStruct2 *param1, const char **param2); u32 FUN_0200BE38(u32 *param0, u32 *param1, struct UnkStruct3 *param2); u32 FUN_0200BE74(u32 *param0, u32 *param1, @@ -79,40 +103,40 @@ u32 FUN_0200BE74(u32 *param0, u32 param11, u32 param12, u32 param13); -u32 FUN_0200BF60(u32 *param0, u32 *param1, u32 *param2); +u32 FUN_0200BF60(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2); u32 FUN_0200C00C( - u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); + u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); s32 FUN_0200C06C(u32 *param0, - u32 *param1, + struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6, - u32 param7); + s32 param7); u8 FUN_0200C0DC(u32 param0, u32 param1, u32 *param2, - u32 *param3, + struct UnkStruct2 *param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, - u32 param9); -u32 FUN_0200C124(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); -u32 FUN_0200C13C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); -u32 *FUN_0200C154(u32 *param0, u32 *param1, u32 *param2); + s32 param9); +u32 FUN_0200C124(u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); +u32 FUN_0200C13C(u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); +struct UnkStruct5 *FUN_0200C154(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2); u32 FUN_0200C334(u32 *param0, u32 param1); u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); -u32 FUN_0200C358(u32 *param0, u32 param1); -u32 FUN_0200C368(u32 *param0, u32 param1); -u32 FUN_0200C378(u32 *param0, u32 param1); -u32 FUN_0200C388(u32 *param0, u32 param1); -void FUN_0200C398(u32 param0, u32 *param1); +u32 FUN_0200C358(struct UnkStruct2 *param0, u32 param1); +u32 FUN_0200C368(struct UnkStruct2 *param0, u32 param1); +u32 FUN_0200C378(struct UnkStruct2 *param0, u32 param1); +u32 FUN_0200C388(struct UnkStruct2 *param0, u32 param1); +void FUN_0200C398(struct UnkStruct1 *param0, struct UnkStruct2 *param1); void FUN_0200C3DC(u32 *param0); u32 FUN_0200C404( - u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); + u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); u32 FUN_0200C474(u32 *param0, u32 param1); u32 FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); u32 FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); @@ -173,9 +197,9 @@ void FUN_0200C8F8(u32 *param0, u32 param1); void FUN_0200C904(u32 param0, u32 param1); void FUN_0200C90C(u32 *param0, u32 param1); u32 FUN_0200C918( - u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); + u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); u32 FUN_0200C978( - u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 param6); + u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); u32 FUN_0200CA40(u32 *param0); -- cgit v1.2.3 From 8e4dda14ff3f4390af69d52b928f987f3618e9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 1 Jun 2021 20:02:08 +0200 Subject: rename structs --- include/unk_0200BB14.h | 74 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'include') diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index 33fe0aee..6c4cb22c 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -1,6 +1,6 @@ #include "global.h" -struct UnkStruct1 +struct UnkStruct_0200BB14_1 { u32 unk000; u32 unk004; @@ -9,7 +9,7 @@ struct UnkStruct1 u8 unk010[0x128]; }; -struct UnkStruct2 +struct UnkStruct_0200BB14_2 { u32 unk00; u32 unk04; @@ -20,7 +20,7 @@ struct UnkStruct2 s32 unk54; }; -struct UnkStruct3 +struct UnkStruct_0200BB14_3 { u32 unk00; s16 unk04; @@ -36,14 +36,14 @@ struct UnkStruct3 u32 unk24; }; -struct UnkStruct7 { +struct UnkStruct_0200BB14_sub { u8 unk00[0x24]; }; -struct UnkStruct4 +struct UnkStruct_0200BB14_4 { u32 unk00; - struct UnkStruct7 *unk04; + struct UnkStruct_0200BB14_sub *unk04; s32 unk08; s32 unk0c; s32 unk10; @@ -59,36 +59,36 @@ struct UnkStruct4 -struct UnkStruct6 { - struct UnkStruct7 *unk0; +struct UnkStruct_0200BB14_6 { + struct UnkStruct_0200BB14_sub *unk0; u32 unk4; }; -struct UnkStruct5 { +struct UnkStruct_0200BB14_5 { u32 unk00; - struct UnkStruct7 *unk04; - struct UnkStruct6 *unk08; + struct UnkStruct_0200BB14_sub *unk04; + struct UnkStruct_0200BB14_6 *unk08; u32 unk0c; }; -struct UnkStruct1 *FUN_0200BB14(u32 heap_id); -struct UnkStruct2 *FUN_0200BB34(struct UnkStruct1 *param0); +struct UnkStruct_0200BB14_1 *FUN_0200BB14(u32 heap_id); +struct UnkStruct_0200BB14_2 *FUN_0200BB34(struct UnkStruct_0200BB14_1 *param0); u32 FUN_0200BB68(u32 param0); -u32 FUN_0200BB6C(struct UnkStruct1 *param0, u32 *param1, u32 *param2, u32 param3); -u32 FUN_0200BBF0(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 param2); +u32 FUN_0200BB6C(struct UnkStruct_0200BB14_1 *param0, u32 *param1, u32 *param2, u32 param3); +u32 FUN_0200BBF0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2); void FUN_0200BC14(u32 param0); void FUN_0200BC1C(u32 *param0); void FUN_0200BC30(); void FUN_0200BC38(); -void FUN_0200BC40(struct UnkStruct2 *param0); -void FUN_0200BC4C(struct UnkStruct2 *param0); -void FUN_0200BC5C(struct UnkStruct2 *param0); +void FUN_0200BC40(struct UnkStruct_0200BB14_2 *param0); +void FUN_0200BC4C(struct UnkStruct_0200BB14_2 *param0); +void FUN_0200BC5C(struct UnkStruct_0200BB14_2 *param0); void FUN_0200BCB0(u32 *param0); -void FUN_0200BCD0(struct UnkStruct1 *param0, struct UnkStruct2 *param1); -void FUN_0200BCE0(struct UnkStruct1 *param0, struct UnkStruct2 *param1); +void FUN_0200BCD0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); +void FUN_0200BCE0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200BD04(u32 *param0); -u32 FUN_0200BD20(struct UnkStruct1 *param0, struct UnkStruct2 *param1, const char **param2); -u32 FUN_0200BE38(u32 *param0, u32 *param1, struct UnkStruct3 *param2); +u32 FUN_0200BD20(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, const char **param2); +u32 FUN_0200BE38(u32 *param0, u32 *param1, struct UnkStruct_0200BB14_3 *param2); u32 FUN_0200BE74(u32 *param0, u32 *param1, u32 param2, @@ -103,11 +103,11 @@ u32 FUN_0200BE74(u32 *param0, u32 param11, u32 param12, u32 param13); -u32 FUN_0200BF60(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2); +u32 FUN_0200BF60(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); u32 FUN_0200C00C( - u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); + u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); s32 FUN_0200C06C(u32 *param0, - struct UnkStruct2 *param1, + struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, @@ -117,26 +117,26 @@ s32 FUN_0200C06C(u32 *param0, u8 FUN_0200C0DC(u32 param0, u32 param1, u32 *param2, - struct UnkStruct2 *param3, + struct UnkStruct_0200BB14_2 *param3, u32 param4, u32 param5, u32 param6, u32 param7, u32 param8, s32 param9); -u32 FUN_0200C124(u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); -u32 FUN_0200C13C(u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); -struct UnkStruct5 *FUN_0200C154(struct UnkStruct1 *param0, struct UnkStruct2 *param1, u32 *param2); +u32 FUN_0200C124(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); +u32 FUN_0200C13C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); +struct UnkStruct_0200BB14_5 *FUN_0200C154(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); u32 FUN_0200C334(u32 *param0, u32 param1); u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); -u32 FUN_0200C358(struct UnkStruct2 *param0, u32 param1); -u32 FUN_0200C368(struct UnkStruct2 *param0, u32 param1); -u32 FUN_0200C378(struct UnkStruct2 *param0, u32 param1); -u32 FUN_0200C388(struct UnkStruct2 *param0, u32 param1); -void FUN_0200C398(struct UnkStruct1 *param0, struct UnkStruct2 *param1); +u32 FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); +u32 FUN_0200C368(struct UnkStruct_0200BB14_2 *param0, u32 param1); +u32 FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); +u32 FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); +void FUN_0200C398(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200C3DC(u32 *param0); u32 FUN_0200C404( - u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); + u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); u32 FUN_0200C474(u32 *param0, u32 param1); u32 FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); u32 FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); @@ -197,9 +197,9 @@ void FUN_0200C8F8(u32 *param0, u32 param1); void FUN_0200C904(u32 param0, u32 param1); void FUN_0200C90C(u32 *param0, u32 param1); u32 FUN_0200C918( - u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); + u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); u32 FUN_0200C978( - u32 *param0, struct UnkStruct2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); + u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); u32 FUN_0200CA40(u32 *param0); -- cgit v1.2.3 From 66c988dd6b2d62e930d897c4a4d0c575464c8d0c Mon Sep 17 00:00:00 2001 From: red031000 Date: Tue, 1 Jun 2021 19:03:15 +0100 Subject: decomp unk_02033778.c --- include/unk_02033778.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 include/unk_02033778.h (limited to 'include') diff --git a/include/unk_02033778.h b/include/unk_02033778.h new file mode 100644 index 00000000..e1f64e05 --- /dev/null +++ b/include/unk_02033778.h @@ -0,0 +1,9 @@ +#ifndef POKEDIAMOND_UNK_02033778_H +#define POKEDIAMOND_UNK_02033778_H + +#include "nitro/types.h" + +void FUN_02033778(u32 param0); +void FUN_020337C8(u32 param0, u32 param1, u32 param2, u32 language); + +#endif //POKEDIAMOND_UNK_02033778_H -- cgit v1.2.3 From fda07fecf5c113c5fa9c861f737fead0c0e1dac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 1 Jun 2021 20:56:33 +0200 Subject: use better types --- include/unk_0200BB14.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index 6c4cb22c..d6e530dc 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -74,8 +74,8 @@ struct UnkStruct_0200BB14_5 { struct UnkStruct_0200BB14_1 *FUN_0200BB14(u32 heap_id); struct UnkStruct_0200BB14_2 *FUN_0200BB34(struct UnkStruct_0200BB14_1 *param0); u32 FUN_0200BB68(u32 param0); -u32 FUN_0200BB6C(struct UnkStruct_0200BB14_1 *param0, u32 *param1, u32 *param2, u32 param3); -u32 FUN_0200BBF0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2); +BOOL FUN_0200BB6C(struct UnkStruct_0200BB14_1 *param0, u32 *param1, u32 *param2, u32 param3); +BOOL FUN_0200BBF0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2); void FUN_0200BC14(u32 param0); void FUN_0200BC1C(u32 *param0); void FUN_0200BC30(); @@ -87,7 +87,7 @@ void FUN_0200BCB0(u32 *param0); void FUN_0200BCD0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200BCE0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200BD04(u32 *param0); -u32 FUN_0200BD20(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, const char **param2); +BOOL FUN_0200BD20(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, const char **param2); u32 FUN_0200BE38(u32 *param0, u32 *param1, struct UnkStruct_0200BB14_3 *param2); u32 FUN_0200BE74(u32 *param0, u32 *param1, @@ -103,8 +103,8 @@ u32 FUN_0200BE74(u32 *param0, u32 param11, u32 param12, u32 param13); -u32 FUN_0200BF60(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); -u32 FUN_0200C00C( +BOOL FUN_0200BF60(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); +BOOL FUN_0200C00C( u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); s32 FUN_0200C06C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, @@ -135,12 +135,12 @@ u32 FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); u32 FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); void FUN_0200C398(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200C3DC(u32 *param0); -u32 FUN_0200C404( +BOOL FUN_0200C404( u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); -u32 FUN_0200C474(u32 *param0, u32 param1); -u32 FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); -u32 FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); -u32 FUN_0200C548(u32 param0, u32 *param1, u32 param2); +BOOL FUN_0200C474(u32 *param0, u32 param1); +BOOL FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); +BOOL FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); +BOOL FUN_0200C548(u32 param0, u32 *param1, u32 param2); void FUN_0200C59C(u32 param0); void FUN_0200C5A8(u32 *param0); void FUN_0200C5B4(u32 *param0, u32 param1); @@ -196,9 +196,9 @@ void FUN_0200C8DC(u32 *param0, u32 param1, u32 param2); void FUN_0200C8F8(u32 *param0, u32 param1); void FUN_0200C904(u32 param0, u32 param1); void FUN_0200C90C(u32 *param0, u32 param1); -u32 FUN_0200C918( +BOOL FUN_0200C918( u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); -u32 FUN_0200C978( +BOOL FUN_0200C978( u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); -- cgit v1.2.3 From 0bf0edfc394e301d80e10357f778a3451267e50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Calixte?= Date: Tue, 1 Jun 2021 20:57:30 +0200 Subject: add header guards --- include/unk_0200BB14.h | 80 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/unk_0200BB14.h b/include/unk_0200BB14.h index d6e530dc..a252fd93 100644 --- a/include/unk_0200BB14.h +++ b/include/unk_0200BB14.h @@ -1,3 +1,6 @@ +#ifndef POKEDIAMOND_UNK_0200BB14_H +#define POKEDIAMOND_UNK_0200BB14_H + #include "global.h" struct UnkStruct_0200BB14_1 @@ -36,7 +39,8 @@ struct UnkStruct_0200BB14_3 u32 unk24; }; -struct UnkStruct_0200BB14_sub { +struct UnkStruct_0200BB14_sub +{ u8 unk00[0x24]; }; @@ -56,26 +60,25 @@ struct UnkStruct_0200BB14_4 u32 unk2c; }; - - - -struct UnkStruct_0200BB14_6 { +struct UnkStruct_0200BB14_6 +{ struct UnkStruct_0200BB14_sub *unk0; u32 unk4; }; -struct UnkStruct_0200BB14_5 { +struct UnkStruct_0200BB14_5 +{ u32 unk00; struct UnkStruct_0200BB14_sub *unk04; struct UnkStruct_0200BB14_6 *unk08; u32 unk0c; }; - struct UnkStruct_0200BB14_1 *FUN_0200BB14(u32 heap_id); struct UnkStruct_0200BB14_2 *FUN_0200BB34(struct UnkStruct_0200BB14_1 *param0); u32 FUN_0200BB68(u32 param0); BOOL FUN_0200BB6C(struct UnkStruct_0200BB14_1 *param0, u32 *param1, u32 *param2, u32 param3); -BOOL FUN_0200BBF0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2); +BOOL FUN_0200BBF0( + struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2); void FUN_0200BC14(u32 param0); void FUN_0200BC1C(u32 *param0); void FUN_0200BC30(); @@ -87,7 +90,8 @@ void FUN_0200BCB0(u32 *param0); void FUN_0200BCD0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200BCE0(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200BD04(u32 *param0); -BOOL FUN_0200BD20(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, const char **param2); +BOOL FUN_0200BD20( + struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, const char **param2); u32 FUN_0200BE38(u32 *param0, u32 *param1, struct UnkStruct_0200BB14_3 *param2); u32 FUN_0200BE74(u32 *param0, u32 *param1, @@ -103,9 +107,15 @@ u32 FUN_0200BE74(u32 *param0, u32 param11, u32 param12, u32 param13); -BOOL FUN_0200BF60(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); -BOOL FUN_0200C00C( - u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); +BOOL FUN_0200BF60( + struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); +BOOL FUN_0200C00C(u32 *param0, + struct UnkStruct_0200BB14_2 *param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + s32 param6); s32 FUN_0200C06C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, @@ -124,9 +134,20 @@ u8 FUN_0200C0DC(u32 param0, u32 param7, u32 param8, s32 param9); -u32 FUN_0200C124(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); -u32 FUN_0200C13C(u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, s32 param5); -struct UnkStruct_0200BB14_5 *FUN_0200C154(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); +u32 FUN_0200C124(u32 *param0, + struct UnkStruct_0200BB14_2 *param1, + u32 param2, + u32 param3, + u32 param4, + s32 param5); +u32 FUN_0200C13C(u32 *param0, + struct UnkStruct_0200BB14_2 *param1, + u32 param2, + u32 param3, + u32 param4, + s32 param5); +struct UnkStruct_0200BB14_5 *FUN_0200C154( + struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1, u32 *param2); u32 FUN_0200C334(u32 *param0, u32 param1); u32 FUN_0200C344(u32 *param0, u32 param1, u32 param2); u32 FUN_0200C358(struct UnkStruct_0200BB14_2 *param0, u32 param1); @@ -135,8 +156,13 @@ u32 FUN_0200C378(struct UnkStruct_0200BB14_2 *param0, u32 param1); u32 FUN_0200C388(struct UnkStruct_0200BB14_2 *param0, u32 param1); void FUN_0200C398(struct UnkStruct_0200BB14_1 *param0, struct UnkStruct_0200BB14_2 *param1); void FUN_0200C3DC(u32 *param0); -BOOL FUN_0200C404( - u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); +BOOL FUN_0200C404(u32 *param0, + struct UnkStruct_0200BB14_2 *param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + s32 param6); BOOL FUN_0200C474(u32 *param0, u32 param1); BOOL FUN_0200C4A8(u32 param0, u32 *param1, u32 param2); BOOL FUN_0200C4F4(u32 param0, u32 *param1, u32 param2); @@ -196,10 +222,22 @@ void FUN_0200C8DC(u32 *param0, u32 param1, u32 param2); void FUN_0200C8F8(u32 *param0, u32 param1); void FUN_0200C904(u32 param0, u32 param1); void FUN_0200C90C(u32 *param0, u32 param1); -BOOL FUN_0200C918( - u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); -BOOL FUN_0200C978( - u32 *param0, struct UnkStruct_0200BB14_2 *param1, u32 param2, u32 param3, u32 param4, u32 param5, s32 param6); +BOOL FUN_0200C918(u32 *param0, + struct UnkStruct_0200BB14_2 *param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + s32 param6); +BOOL FUN_0200C978(u32 *param0, + struct UnkStruct_0200BB14_2 *param1, + u32 param2, + u32 param3, + u32 param4, + u32 param5, + s32 param6); void FUN_0200C9D8(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); void FUN_0200CA0C(u32 *param0, u32 *param1, u32 param2, u32 param3, u32 param4, u32 param5); u32 FUN_0200CA40(u32 *param0); + +#endif // POKEDIAMOND_UNK_0200BB14_H -- cgit v1.2.3