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 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