From 7040e8e9568a21ef8417c7de6e47fd636dcd7865 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Oct 2018 12:10:33 -0400 Subject: sub_8146C30 --- include/global.h | 21 ++++++++++++++++++++- include/mevent.h | 6 ++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 include/mevent.h (limited to 'include') diff --git a/include/global.h b/include/global.h index 75911b9f2..2b35e303d 100644 --- a/include/global.h +++ b/include/global.h @@ -466,6 +466,14 @@ struct RecordMixingDayCareMail bool16 holdsItem[DAYCARE_MON_COUNT]; }; +struct MysteryEventStruct +{ + u8 unk_0_0:2; + u8 unk_0_2:6; + u8 unk_1; + u8 filler_2[0x1ba]; +}; + #define MAP_OBJECTS_COUNT 16 #define BERRY_TREES_COUNT 128 #define FLAGS_COUNT 300 @@ -476,7 +484,18 @@ struct SaveBlock1 { /*0x0000*/ u8 filler[0x4]; /*0x0004*/ struct WarpData location; - /*0x000C*/ u8 fillerC[0x3610]; + /*0x0C*/ struct WarpData warp1; + /*0x14*/ struct WarpData warp2; + /*0x1C*/ struct WarpData lastHealLocation; + /*0x24*/ struct WarpData warp4; + /*0x002C*/ u8 filler2C[0x60C]; + /*0x638*/ u8 trainerRematchStepCounter; + u8 filler_639; + /*0x63a*/ u8 trainerRematches[100]; + /*0x06A0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT]; + /*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64]; + /*0x0EE0*/ u8 fillerEE0[0x2580]; + /*0x3460*/ struct MysteryEventStruct unk_3460; /*0x361C*/ struct RamScript ramScript; /*0x3A08*/ u8 filler3A08[0x44]; /*0x3A4C*/ u8 rivalName[PLAYER_NAME_LENGTH]; diff --git a/include/mevent.h b/include/mevent.h new file mode 100644 index 000000000..b196d655b --- /dev/null +++ b/include/mevent.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MEVENT_H +#define GUARD_MEVENT_H + +struct MysteryEventStruct * sub_8143D94(void); + +#endif //GUARD_MEVENT_H -- cgit v1.2.3 From 4dd5029fdc505636d8ac00add5425bb22fd082ba Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Oct 2018 14:24:44 -0400 Subject: sub_8146CA4 --- include/event_data.h | 1 + include/global.h | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/event_data.h b/include/event_data.h index f829d3b87..a5c9efe0d 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -29,6 +29,7 @@ u8 *GetFlagPointer(u16 id); u8 FlagSet(u16 id); u8 FlagClear(u16 id); bool8 FlagGet(u16 id); +u16 * sub_806E454(u16 id); extern u16 gSpecialVar_0x8000; extern u16 gSpecialVar_0x8001; diff --git a/include/global.h b/include/global.h index 2b35e303d..5a7cc134d 100644 --- a/include/global.h +++ b/include/global.h @@ -468,10 +468,11 @@ struct RecordMixingDayCareMail struct MysteryEventStruct { - u8 unk_0_0:2; - u8 unk_0_2:6; - u8 unk_1; - u8 filler_2[0x1ba]; + u32 unk_0_0:2; + u32 unk_0_2:3; + u32 unk_0_5:3; + u32 unk_1:8; + u32 unk_2:16; }; #define MAP_OBJECTS_COUNT 16 @@ -496,6 +497,7 @@ struct SaveBlock1 /*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64]; /*0x0EE0*/ u8 fillerEE0[0x2580]; /*0x3460*/ struct MysteryEventStruct unk_3460; + /*0x3464*/ u8 filler_3464[0x1b8]; /*0x361C*/ struct RamScript ramScript; /*0x3A08*/ u8 filler3A08[0x44]; /*0x3A4C*/ u8 rivalName[PLAYER_NAME_LENGTH]; -- cgit v1.2.3 From 6b27e999f242f51a81bef70c40a378d5adbaf9e2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Oct 2018 14:40:46 -0400 Subject: through sub_8146D94 --- include/event_data.h | 1 + include/mevent.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/event_data.h b/include/event_data.h index a5c9efe0d..914217588 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -30,6 +30,7 @@ u8 FlagSet(u16 id); u8 FlagClear(u16 id); bool8 FlagGet(u16 id); u16 * sub_806E454(u16 id); +bool32 sub_806E2BC(void); extern u16 gSpecialVar_0x8000; extern u16 gSpecialVar_0x8001; diff --git a/include/mevent.h b/include/mevent.h index b196d655b..a611a98a8 100644 --- a/include/mevent.h +++ b/include/mevent.h @@ -2,5 +2,6 @@ #define GUARD_MEVENT_H struct MysteryEventStruct * sub_8143D94(void); +bool32 sub_8143E1C(void); #endif //GUARD_MEVENT_H -- cgit v1.2.3 From d348c44eb66a30d50a742d900760826a863c5759 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Oct 2018 14:58:51 -0400 Subject: Finish decompile of menews_jisan.s --- include/global.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 5a7cc134d..11a79ebe8 100644 --- a/include/global.h +++ b/include/global.h @@ -468,11 +468,10 @@ struct RecordMixingDayCareMail struct MysteryEventStruct { - u32 unk_0_0:2; - u32 unk_0_2:3; - u32 unk_0_5:3; - u32 unk_1:8; - u32 unk_2:16; + u8 unk_0_0:2; + u8 unk_0_2:3; + u8 unk_0_5:3; + u8 unk_1; }; #define MAP_OBJECTS_COUNT 16 -- cgit v1.2.3 From 1d50bcb0b95e52fb43c22a3348ac033b3534f860 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Oct 2018 16:02:11 -0400 Subject: Cleanup and create menews_jisan header --- include/event_data.h | 2 ++ include/gba/defines.h | 1 + include/menews_jisan.h | 8 ++++++++ 3 files changed, 11 insertions(+) create mode 100644 include/menews_jisan.h (limited to 'include') diff --git a/include/event_data.h b/include/event_data.h index 914217588..f28ed4f75 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -51,4 +51,6 @@ extern u16 gSpecialVar_MonBoxId; extern u16 gSpecialVar_MonBoxPos; extern u16 gSpecialVar_0x8014; +extern u16 gUnknown_20370D0; + #endif // GUARD_EVENT_DATA_H diff --git a/include/gba/defines.h b/include/gba/defines.h index fe81770e3..a0ef506dd 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -69,5 +69,6 @@ #define WIN_RANGE(a, b) (((a) << 8) | (b)) #define NAKED __attribute__((naked)) +#define UNUSED __attribute__((unused)) #endif // GUARD_GBA_DEFINES diff --git a/include/menews_jisan.h b/include/menews_jisan.h new file mode 100644 index 000000000..8dc1d0a99 --- /dev/null +++ b/include/menews_jisan.h @@ -0,0 +1,8 @@ +#ifndef GUARD_MENEWS_JISAN_H +#define GUARD_MENEWS_JISAN_H + +void sub_8146C30(u32 a0); +void sub_8146C88(void); +void sub_8146CA4(void); + +#endif //GUARD_MENEWS_JISAN_H -- cgit v1.2.3