From 746006911096730ea6d5f14bfff5957ef9b5bc2c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 11:35:31 -0500 Subject: sub_8143910 --- include/global.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index d5bfc5241..899508993 100644 --- a/include/global.h +++ b/include/global.h @@ -591,6 +591,18 @@ struct FameCheckerSaveData #define NUM_EASY_CHAT_EXTRA_PHRASES 33 #define EASY_CHAT_EXTRA_PHRASES_SIZE ((NUM_EASY_CHAT_EXTRA_PHRASES >> 3) + (NUM_EASY_CHAT_EXTRA_PHRASES % 8 ? 1 : 0)) +struct MEventBuffer1 +{ + u32 crc; + u8 data[0x1bc]; +}; + +struct MEventBuffer2 +{ + u32 crc; + u8 data[0x14c]; +}; + struct SaveBlock1 { /*0x0000*/ struct Coords16 pos; -- cgit v1.2.3 From cec95ebfb41f8381feeb87ff889ebc1d89827ec6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 14:02:49 -0500 Subject: through sub_8143DBC --- include/global.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 899508993..456f2c083 100644 --- a/include/global.h +++ b/include/global.h @@ -591,18 +591,34 @@ struct FameCheckerSaveData #define NUM_EASY_CHAT_EXTRA_PHRASES 33 #define EASY_CHAT_EXTRA_PHRASES_SIZE ((NUM_EASY_CHAT_EXTRA_PHRASES >> 3) + (NUM_EASY_CHAT_EXTRA_PHRASES % 8 ? 1 : 0)) -struct MEventBuffer1 +struct MEventBuffer_3120 { u32 crc; - u8 data[0x1bc]; + u16 data[222]; }; -struct MEventBuffer2 +struct MEventBuffer_32E0 { u32 crc; - u8 data[0x14c]; + u16 data[166]; }; +struct MEventBuffer_3430 +{ + u32 crc; + u16 data[18]; +}; + +struct MEventBuffers +{ + /*0x000 0x3120*/ struct MEventBuffer_3120 buffer_000; + /*0x1c0 0x32e0*/ struct MEventBuffer_32E0 buffer_1c0; + /*0x310 0x3430*/ struct MEventBuffer_3430 buffer_310; + /*0x338 0x3458*/ u16 unk_338[4]; + /*0x340 0x3460*/ struct MysteryEventStruct unk_340; + /*0x344 0x3464*/ u8 filler_344[0x28]; +}; // 0x36C 0x348C + struct SaveBlock1 { /*0x0000*/ struct Coords16 pos; @@ -650,9 +666,8 @@ struct SaveBlock1 /*0x309C*/ u8 giftRibbons[52]; /*0x30D0*/ struct Roamer roamer; /*0x30EC*/ struct EnigmaBerry enigmaBerry; - /*0x3120*/ u8 filler3120[0x340]; - /*0x3460*/ struct MysteryEventStruct unk_3460; - /*0x3464*/ u8 filler_3464[0x1b8]; + /*0x3120*/ struct MEventBuffers unk_3120; + /*0x348C*/ u8 filler_3464[0x190]; /*0x361C*/ struct RamScript ramScript; /*0x3A08*/ u8 filler3A08[12]; /*0x3A14*/ u8 seen2[DEX_FLAGS_NO]; -- cgit v1.2.3 From 159f242e32532f14496abaa8d2f96e9c3d30d720 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 15:33:58 -0500 Subject: through sub_8144018 --- include/global.h | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 456f2c083..df2926d0b 100644 --- a/include/global.h +++ b/include/global.h @@ -264,7 +264,9 @@ struct SaveBlock2 /*0x098*/ struct Time localTimeOffset; /*0x0A0*/ struct Time lastBerryTreeUpdate; /*0x0A8*/ u32 field_A8; - /*0x0AC*/ u8 filler_AC[0x9ec]; + /*0x0AC*/ u8 filler_AC[0x3F4]; + /*0x4A0*/ u32 unk_4A0[0x2F]; + /*0x55c*/ u8 filler_55C[0x53C]; /*0xA98*/ u8 unk_A98[2][16]; /*0xAB8*/ u8 filler_AB8[0x468]; /*0xF20*/ u32 encryptionKey; @@ -591,22 +593,48 @@ struct FameCheckerSaveData #define NUM_EASY_CHAT_EXTRA_PHRASES 33 #define EASY_CHAT_EXTRA_PHRASES_SIZE ((NUM_EASY_CHAT_EXTRA_PHRASES >> 3) + (NUM_EASY_CHAT_EXTRA_PHRASES % 8 ? 1 : 0)) +struct MEventBuffer_3120_Sub +{ + u16 unk_00; + u8 unk_02; + u16 filler_04[220]; +}; + struct MEventBuffer_3120 { u32 crc; - u16 data[222]; + struct MEventBuffer_3120_Sub data; +}; + +struct MEventBuffer_32E0_Sub +{ + u16 unk_00; + u16 unk_02; + u8 filler_04[4]; + u8 unk_08_0:2; + u8 unk_08_2:4; + u8 unk_08_6:2; + u8 unk_09; + u8 filler_0A[322]; }; struct MEventBuffer_32E0 { u32 crc; - u16 data[166]; + struct MEventBuffer_32E0_Sub data; +}; + +struct MEventBuffer_3430_Sub +{ + u8 filler_00[6]; + u16 unk_06; + u8 filler_08[28]; }; struct MEventBuffer_3430 { u32 crc; - u16 data[18]; + struct MEventBuffer_3430_Sub data; }; struct MEventBuffers -- cgit v1.2.3 From 51622adaec9fd47a8f1be2b61b1f4521cc9d47da Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 18:15:22 -0500 Subject: through sub_8144218 --- 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 df2926d0b..04f89802c 100644 --- a/include/global.h +++ b/include/global.h @@ -628,7 +628,7 @@ struct MEventBuffer_3430_Sub { u8 filler_00[6]; u16 unk_06; - u8 filler_08[28]; + u16 unk_08[2][7]; }; struct MEventBuffer_3430 -- cgit v1.2.3 From 939ae833c3364d7ea7543c4db56df5c90b4e9d8d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 19:17:38 -0500 Subject: through sub_81445C0 --- include/global.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 04f89802c..92e6b7da1 100644 --- a/include/global.h +++ b/include/global.h @@ -626,7 +626,9 @@ struct MEventBuffer_32E0 struct MEventBuffer_3430_Sub { - u8 filler_00[6]; + u16 unk_00; + u16 unk_02; + u16 unk_04; u16 unk_06; u16 unk_08[2][7]; }; -- cgit v1.2.3 From 9200df7516151a84d0fcdda84259179eafafcabb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 20:56:53 -0500 Subject: Finish decomp of mevent.s --- 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 92e6b7da1..b1c6adcf3 100644 --- a/include/global.h +++ b/include/global.h @@ -646,7 +646,7 @@ struct MEventBuffers /*0x310 0x3430*/ struct MEventBuffer_3430 buffer_310; /*0x338 0x3458*/ u16 unk_338[4]; /*0x340 0x3460*/ struct MysteryEventStruct unk_340; - /*0x344 0x3464*/ u8 filler_344[0x28]; + /*0x344 0x3464*/ u32 unk_344[2][5]; }; // 0x36C 0x348C struct SaveBlock1 -- cgit v1.2.3 From 5e98e6b8df930bb386acc5ce21940a122fd497ce Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 29 Nov 2018 21:02:08 -0500 Subject: Fix this field's name to be consistent with offset --- 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 b1c6adcf3..1dae2f75f 100644 --- a/include/global.h +++ b/include/global.h @@ -697,7 +697,7 @@ struct SaveBlock1 /*0x30D0*/ struct Roamer roamer; /*0x30EC*/ struct EnigmaBerry enigmaBerry; /*0x3120*/ struct MEventBuffers unk_3120; - /*0x348C*/ u8 filler_3464[0x190]; + /*0x348C*/ u8 filler_348C[0x190]; /*0x361C*/ struct RamScript ramScript; /*0x3A08*/ u8 filler3A08[12]; /*0x3A14*/ u8 seen2[DEX_FLAGS_NO]; -- cgit v1.2.3 From 294b150d70385a117e1324fd1e13bab25bfaabc9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 30 Nov 2018 08:47:58 -0500 Subject: Set up to decomp mevent_server --- include/global.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 1dae2f75f..5b07796cc 100644 --- a/include/global.h +++ b/include/global.h @@ -28,6 +28,8 @@ #endif // __APPLE__ #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +// GF's lingo +#define NELEMS ARRAY_COUNT // useful math macros -- cgit v1.2.3 From 884f1934e8bf34813701f745140f1d8429e8beaf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 2 Dec 2018 10:02:39 -0500 Subject: start decompiling mevent_8145654 --- 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 5b07796cc..7c663a813 100644 --- a/include/global.h +++ b/include/global.h @@ -599,7 +599,7 @@ struct MEventBuffer_3120_Sub { u16 unk_00; u8 unk_02; - u16 filler_04[220]; + u8 filler_04[440]; }; struct MEventBuffer_3120 -- cgit v1.2.3 From cd42b22d6b450b1fc1d79b046fe7cd1a0fdcf543 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 2 Dec 2018 13:33:03 -0500 Subject: sub_8145A98 --- include/global.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 7c663a813..783a2c375 100644 --- a/include/global.h +++ b/include/global.h @@ -612,12 +612,16 @@ struct MEventBuffer_32E0_Sub { u16 unk_00; u16 unk_02; - u8 filler_04[4]; + u32 unk_04; u8 unk_08_0:2; u8 unk_08_2:4; u8 unk_08_6:2; u8 unk_09; - u8 filler_0A[322]; + u8 unk_0A[40]; + u8 unk_32[40]; + u8 unk_5A[4][40]; + u8 unk_FA[40]; + u8 unk_122[40]; }; struct MEventBuffer_32E0 -- cgit v1.2.3 From 5151db6054d0704584fdf53e55840e262cde32a4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 2 Dec 2018 17:25:59 -0500 Subject: sub_8146288 --- include/global.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 783a2c375..840c90725 100644 --- a/include/global.h +++ b/include/global.h @@ -599,6 +599,7 @@ struct MEventBuffer_3120_Sub { u16 unk_00; u8 unk_02; + u8 unk_03; u8 filler_04[440]; }; -- cgit v1.2.3 From 59b87e9d2af887401736d8fd06d3a9266e3983e5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 3 Dec 2018 10:09:28 -0500 Subject: sub_8146980 --- include/global.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 840c90725..775b3115e 100644 --- a/include/global.h +++ b/include/global.h @@ -600,7 +600,8 @@ struct MEventBuffer_3120_Sub u16 unk_00; u8 unk_02; u8 unk_03; - u8 filler_04[440]; + u8 unk_04[40]; + u8 unk_2C[10][40]; }; struct MEventBuffer_3120 -- cgit v1.2.3