From 6b0268e0c0fb98014cb72f8a918a33c0645162d2 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 10 Jan 2017 23:15:38 -0500 Subject: finish decompiling field_control_avatar.c (#182) * start decompiling field_control_avatar.c * remove field_control_player_avatar.c * finish decompiling * cleanup * var and flag constants --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a5932d175..a9056ed55 100644 --- a/include/global.h +++ b/include/global.h @@ -410,11 +410,11 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0xA8*/ struct SaveBlock2_Sub filler_A8; }; -struct UnkStruct_8054FF8_Substruct +struct MapPosition { s16 x; s16 y; - u8 field_8; + u8 height; }; struct UnkStruct_8054FF8 @@ -423,7 +423,7 @@ struct UnkStruct_8054FF8 u8 b; u8 c; u8 d; - struct UnkStruct_8054FF8_Substruct sub; + struct MapPosition sub; u16 field_C; }; -- cgit v1.2.3 From 0db72319326c6b29b0fdcdd1e7767a7e7ba46a1d Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 12 Jan 2017 00:53:22 -0500 Subject: decompile braille_puzzles.c (#187) * begin decompiling braille_puzzles.c * finish decompiling braille_puzzles.c --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a9056ed55..8965fcd38 100644 --- a/include/global.h +++ b/include/global.h @@ -271,7 +271,7 @@ struct MailStruct /*0x20*/ u16 itemId; }; -struct SaveBlock1 +struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; /*0x04*/ struct WarpData location; -- cgit v1.2.3 From 97004d4c90d307e139e833f53dc1610ded01ef38 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 14 Jan 2017 19:25:40 -0800 Subject: decompile unknown_debug_menu --- include/global.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 8965fcd38..22927f749 100644 --- a/include/global.h +++ b/include/global.h @@ -380,7 +380,14 @@ struct Pokedex struct SaveBlock2_Sub { - /*0x0000, 0x00A8*/ u8 filler_000[0x4C8]; + /*0x0000, 0x00A8*/ u8 filler_000[0x4AE]; + /*0x04AE, 0x0556*/ u8 var_4AE; + /*0x04AF, 0x0557*/ u8 var_4AF; + /*0x04B0, 0x0558*/ u16 var_4B0; + /*0x04B2, 0x055A*/ u16 var_4B2; + /*0x04B4, 0x055C*/ u16 var_4B4; + /*0x04B6, 0x055E*/ u16 var_4B6; + /*0x04B8, 0x0560*/ u8 filler_4B8[0x10]; /*0x04C8, 0x0570*/ u16 var_4C8; /*0x04CA, 0x0572*/ u16 var_4CA; /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; -- cgit v1.2.3 From 648c6c7093f5173694562929f615380f297ad306 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Tue, 17 Jan 2017 13:41:12 +0100 Subject: Move `gStringVar` declarations to text.h --- include/global.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 22927f749..736a1a5dc 100644 --- a/include/global.h +++ b/include/global.h @@ -15,11 +15,6 @@ #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 -extern u8 gStringVar1[]; -extern u8 gStringVar2[]; -extern u8 gStringVar3[]; -extern u8 gStringVar4[]; - enum { VERSION_SAPPHIRE = 1, -- cgit v1.2.3 From b6b5453431af46791fd9d211efac64464c1dff85 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 29 Jan 2017 20:59:54 -0500 Subject: start decompiling mauville_old_man.c (#225) * some labels and enumerate player speeds * clear up speed enums * GetPlayerSpeed * oops * start decompiling mauville_old_man.c * formatting * decompile more of mauville_old_man.c * someone fix this please * formatting * make ROM build again * formatting again --- include/global.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 736a1a5dc..6c8b60484 100644 --- a/include/global.h +++ b/include/global.h @@ -266,6 +266,35 @@ struct MailStruct /*0x20*/ u16 itemId; }; +struct UnkMauvilleOldManStruct +{ + u8 unk_2D94; + u8 unk_2D95; + /*0x2D96*/ u16 mauvilleOldMan_ecArray[6]; + /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; + /*0x2DAE*/ u8 playerName[8]; + /*0x2DB6*/ u8 filler_2DB6[0x3]; + /*0x2DB9*/ u8 playerTrainerId[4]; + u8 unk_2DBD; + /* size = 0x1E */ +}; + +struct UnkMauvilleOldManStruct2 +{ + u8 filler0; + u8 unk1; + u8 unk2; + u16 mauvilleOldMan_ecArray[10]; + u16 mauvilleOldMan_ecArray2[6]; + u8 fillerF[0x4]; + /* size = 0x1E */ +}; + +typedef union OldMan { + struct UnkMauvilleOldManStruct oldMan1; + struct UnkMauvilleOldManStruct2 oldMan2; +} OldMan; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -331,7 +360,10 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B1C*/ u16 unk2B1C[4]; /*0x2B24*/ u8 filler_2B24[0x28]; /*0x2B4C*/ struct MailStruct mail[16]; - /*0x2D8C*/ u8 filler_2D8C[0x48]; + /*0x2D8C*/ u8 filler_2D8C[0x8]; + OldMan oldMan; + ///*0x2D94*/ struct UnkMauvilleOldManStruct oldManStruct; + /*0x2DBC*/ u8 filler_2DBC[0x18]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x100]; /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; -- cgit v1.2.3 From 9813caaf5345ea28f8230d41461618673779c2fb Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Tue, 31 Jan 2017 03:08:44 -0500 Subject: make ROM match again (#227) * some labels and enumerate player speeds * clear up speed enums * GetPlayerSpeed * oops * start decompiling mauville_old_man.c * formatting * decompile more of mauville_old_man.c * someone fix this please * formatting * make ROM build again * formatting again * make ROM match again --- include/global.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 6c8b60484..56338a9e8 100644 --- a/include/global.h +++ b/include/global.h @@ -276,7 +276,7 @@ struct UnkMauvilleOldManStruct /*0x2DB6*/ u8 filler_2DB6[0x3]; /*0x2DB9*/ u8 playerTrainerId[4]; u8 unk_2DBD; - /* size = 0x1E */ + /* size = 0x2C */ }; struct UnkMauvilleOldManStruct2 @@ -286,8 +286,8 @@ struct UnkMauvilleOldManStruct2 u8 unk2; u16 mauvilleOldMan_ecArray[10]; u16 mauvilleOldMan_ecArray2[6]; - u8 fillerF[0x4]; - /* size = 0x1E */ + u8 fillerF[0x2]; + /* size = 0x2C */ }; typedef union OldMan { @@ -361,9 +361,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B24*/ u8 filler_2B24[0x28]; /*0x2B4C*/ struct MailStruct mail[16]; /*0x2D8C*/ u8 filler_2D8C[0x8]; - OldMan oldMan; - ///*0x2D94*/ struct UnkMauvilleOldManStruct oldManStruct; - /*0x2DBC*/ u8 filler_2DBC[0x18]; + /*0x2D94*/ OldMan oldMan; + /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x100]; /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; -- cgit v1.2.3 From 6035511c139549a0291b6b3d43b9b080f792b2b6 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 18 Mar 2017 04:00:15 +0100 Subject: reorganize and add new headers for many files --- include/global.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 56338a9e8..ad08af84f 100644 --- a/include/global.h +++ b/include/global.h @@ -71,6 +71,11 @@ enum BAG_KEYITEMS }; +struct TextStruct +{ + const u8 *text; +}; + struct Coords16 { s16 x; @@ -167,7 +172,8 @@ struct RamScript struct SB1_2EFC_Struct { - u8 unknown[0x20]; + u16 var; + u8 unknown[0x1E]; }; struct EasyChatPair @@ -295,6 +301,25 @@ typedef union OldMan { struct UnkMauvilleOldManStruct2 oldMan2; } OldMan; +struct Unk_SB_Access_Struct1 +{ + u8 filler0[0xF8]; + struct SB1_2EFC_Struct sb1_2EFC_struct[5]; +}; + +struct Unk_SB_Access_Struct2 +{ + struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20 + /*0x2F84*/ u8 filler[0x18]; +}; + +/*0x2E04*/ +typedef union SB_Struct { + struct Unk_SB_Access_Struct1 unkSB1; + struct Unk_SB_Access_Struct2 unkSB2; +} SB_Struct; +// size is 0x198 + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -364,8 +389,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ u8 filler_2DFC[0x100]; - /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + /*0x2DFC*/ u8 filler_2DFC[0x8]; + /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ u8 filler_2F9C[0xA0]; /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; -- cgit v1.2.3