From 1639432546f7951e4208ffbf3bf9ddce41c7a4e4 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 15 Dec 2024 15:28:34 +0100 Subject: [PATCH] up to gUnknown_203B2A0 --- data/data_8270000.s | 67 ------------------------------------ src/code_8012A18_1.c | 2 +- src/code_8015080.c | 2 +- src/code_801602C.c | 2 +- src/code_801AFA4.c | 2 +- src/code_801B3C0.c | 2 +- src/code_801B60C.c | 2 +- src/code_801C8C4.c | 8 ++--- src/code_801D014.c | 4 +-- src/code_801D9E4.c | 2 +- src/code_801EE10.c | 2 +- src/code_801F428.c | 4 +-- src/code_801F808.c | 2 +- src/code_80227B8.c | 2 +- src/code_8023144.c | 8 ++--- src/felicity_bank.c | 2 +- src/gulpin_shop.c | 2 +- src/gulpin_shop_801FB50.c | 2 +- src/hints_menu1.c | 2 +- src/hints_menu2.c | 2 +- src/iq_skill_info_menu.c | 2 +- src/iq_skill_list_menu.c | 2 +- src/iq_skill_menu.c | 2 +- src/kangaskhan_storage1.c | 2 +- src/kangaskhan_storage2.c | 2 +- src/kecleon_bros1.c | 2 +- src/kecleon_bros2.c | 4 +-- src/kecleon_bros3.c | 4 +-- src/kecleon_bros4.c | 6 ++-- src/options_menu1.c | 2 +- src/options_menu2.c | 2 +- src/string_format.c | 72 ++++++++++++++++++++++++--------------- src/wigglytuff_shop1.c | 8 ++--- src/wigglytuff_shop2.c | 2 +- src/wigglytuff_shop3.c | 2 +- sym_ewram2.txt | 45 ------------------------ sym_ewram_init.txt | 34 ++++++++++++++++++ 37 files changed, 125 insertions(+), 189 deletions(-) diff --git a/data/data_8270000.s b/data/data_8270000.s index a60aa4d2a..32e5ca3e3 100644 --- a/data/data_8270000.s +++ b/data/data_8270000.s @@ -3,73 +3,6 @@ .global gUnknown_8270000 gUnknown_8270000: @ 8270000 @ replacing .incbin "baserom.gba", 0x00270000, 0x2724 - -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x02, 0x00, 0x0f, 0x00 -.byte 0x1a, 0x00, 0x05, 0x00 -.byte 0x07, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x40, 0x00, 0x00, 0x00 -.byte 0x07, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x03, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x03, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 -.byte 0x01, 0x00, 0x00, 0x00 -.byte 0x00, 0x00, 0x00, 0x00 .byte 0x02, 0x00, 0x00, 0x00 .byte 0x01, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00 diff --git a/src/code_8012A18_1.c b/src/code_8012A18_1.c index 90c86568b..f22d32e7b 100644 --- a/src/code_8012A18_1.c +++ b/src/code_8012A18_1.c @@ -24,7 +24,7 @@ struct unkStruct_203B1FC u8 unkFC[54]; }; -extern struct unkStruct_203B1FC *gUnknown_203B1FC; +EWRAM_INIT struct unkStruct_203B1FC *gUnknown_203B1FC = NULL; s32 sub_8015F44(void) { diff --git a/src/code_8015080.c b/src/code_8015080.c index 8333ad277..f90e6288a 100644 --- a/src/code_8015080.c +++ b/src/code_8015080.c @@ -15,7 +15,7 @@ struct unkStruct_203B1F8 u8 buffer[0x400]; }; -EWRAM_DATA_2 struct unkStruct_203B1F8 *gUnknown_203B1F8 = {0}; +EWRAM_INIT struct unkStruct_203B1F8 *gUnknown_203B1F8 = {NULL}; const UnkTextStruct2 gUnknown_80DAF70 = { 0x00, 0x00, 0x00, 0x00, diff --git a/src/code_801602C.c b/src/code_801602C.c index e32492bda..7e166967b 100644 --- a/src/code_801602C.c +++ b/src/code_801602C.c @@ -9,7 +9,7 @@ #include "text_util.h" #include "text.h" -static EWRAM_DATA_2 struct unkStruct_203B200 *sUnknown_203B200 = {0}; +static EWRAM_INIT struct unkStruct_203B200 *sUnknown_203B200 = {NULL}; #include "data/code_801602C.h" diff --git a/src/code_801AFA4.c b/src/code_801AFA4.c index be210b9d1..9e1a7999e 100644 --- a/src/code_801AFA4.c +++ b/src/code_801AFA4.c @@ -9,7 +9,7 @@ #include "moves.h" #include "pokemon_mid.h" -static EWRAM_DATA_2 unkStruct_203B22C *sUnknown_203B22C = {0}; +static EWRAM_INIT unkStruct_203B22C *sUnknown_203B22C = {NULL}; #include "data/code_801AFA4.h" diff --git a/src/code_801B3C0.c b/src/code_801B3C0.c index 934f5bcf1..0da13b7cb 100644 --- a/src/code_801B3C0.c +++ b/src/code_801B3C0.c @@ -10,7 +10,7 @@ #include "sprite.h" #include "text.h" -static EWRAM_DATA_2 unkStruct_203B230 *sUnknown_203B230 = {0}; +static EWRAM_INIT unkStruct_203B230 *sUnknown_203B230 = {NULL}; #include "data/code_801B3C0.h" // 80DBA4C diff --git a/src/code_801B60C.c b/src/code_801B60C.c index de11bbf51..3873b1a66 100644 --- a/src/code_801B60C.c +++ b/src/code_801B60C.c @@ -16,7 +16,7 @@ #include "pokemon.h" #include "text.h" -static EWRAM_DATA_2 unkStruct_203B234 *sUnknown_203B234 = {0}; +static EWRAM_INIT unkStruct_203B234 *sUnknown_203B234 = {NULL}; #include "data/code_801B60C.h" // 80DBA58 diff --git a/src/code_801C8C4.c b/src/code_801C8C4.c index ffe5c85b3..c8ade824b 100644 --- a/src/code_801C8C4.c +++ b/src/code_801C8C4.c @@ -8,10 +8,10 @@ #include "menu_input.h" #include "text.h" -static EWRAM_DATA_2 struct unkStruct_203B244 *sUnknown_203B244 = {0}; -static EWRAM_DATA_2 u32 sUnknown_203B248 = {0}; -static EWRAM_DATA_2 u16 sUnknown_203B24C = {0}; -static EWRAM_DATA_2 u16 sUnknown_203B24E = {0}; +static EWRAM_INIT struct unkStruct_203B244 *sUnknown_203B244 = {NULL}; +static EWRAM_INIT u32 sUnknown_203B248 = {0}; +static EWRAM_INIT u16 sUnknown_203B24C = {0}; +static EWRAM_INIT u16 sUnknown_203B24E = {0}; #include "data/code_801C8C4.h" diff --git a/src/code_801D014.c b/src/code_801D014.c index 9070cffc7..0769db871 100644 --- a/src/code_801D014.c +++ b/src/code_801D014.c @@ -29,8 +29,8 @@ #include "wonder_mail_802C4C8.h" #include "wonder_mail_802C860.h" -static EWRAM_DATA_2 struct unk_203B250 *sUnknown_203B250 = {0}; -static EWRAM_DATA_2 u32 sUnknown_203B254 = {0}; +static EWRAM_INIT struct unk_203B250 *sUnknown_203B250 = {NULL}; +static EWRAM_INIT u32 sUnknown_203B254 = {0}; extern const struct FileArchive gTitleMenuFileArchive; diff --git a/src/code_801D9E4.c b/src/code_801D9E4.c index c08511f99..bb9c1acf6 100644 --- a/src/code_801D9E4.c +++ b/src/code_801D9E4.c @@ -10,7 +10,7 @@ #include "text.h" #include "structs/struct_sub80095e4.h" -static EWRAM_DATA_2 struct struct_Sub80095E4_2 *sUnknown_203B258 = {0}; +static EWRAM_INIT struct struct_Sub80095E4_2 *sUnknown_203B258 = {NULL}; extern struct unkStruct_81188F0 gUnknown_81188F0[10]; diff --git a/src/code_801EE10.c b/src/code_801EE10.c index 64419cd96..8195a3377 100644 --- a/src/code_801EE10.c +++ b/src/code_801EE10.c @@ -10,7 +10,7 @@ #include "code_80118A4.h" #include "menu_input.h" -EWRAM_DATA_2 unkStruct_203B270 *gUnknown_203B270 = {0}; +EWRAM_INIT unkStruct_203B270 *gUnknown_203B270 = {NULL}; const UnkTextStruct2 gUnknown_80DC240 = { 0x00, 0x00, 0x00, 0x00, diff --git a/src/code_801F428.c b/src/code_801F428.c index 0ad2978d0..f6a3dc033 100644 --- a/src/code_801F428.c +++ b/src/code_801F428.c @@ -18,9 +18,7 @@ struct unkStruct_203B274 unkStruct_808E218_arg unk8; struct_Sub80095E4_2 s348; }; -EWRAM_DATA_2 struct unkStruct_203B274 *gUnknown_203B274 = {0}; - -extern u8 gFormatBuffer_Monsters[]; +EWRAM_INIT struct unkStruct_203B274 *gUnknown_203B274 = {NULL}; static const UnkTextStruct2 sUnknown_80DC2AC = { 0, 0, 0, 0, diff --git a/src/code_801F808.c b/src/code_801F808.c index 63602e66e..7e42bc5a9 100644 --- a/src/code_801F808.c +++ b/src/code_801F808.c @@ -29,7 +29,7 @@ struct unkStruct_203B278 MenuInputStructSub unkC8; }; -EWRAM_DATA_2 struct unkStruct_203B278 *gUnknown_203B278 = {0}; +EWRAM_INIT struct unkStruct_203B278 *gUnknown_203B278 = {NULL}; static const UnkTextStruct2 sUnknown_80DC2F8 = { 0, 0, 0, 0, diff --git a/src/code_80227B8.c b/src/code_80227B8.c index 0af45692d..1558bce6d 100644 --- a/src/code_80227B8.c +++ b/src/code_80227B8.c @@ -16,7 +16,7 @@ #include "pokemon_3.h" #include "text.h" -static EWRAM_DATA_2 unkStruct_203B294 *sUnknown_203B294 = {0}; +static EWRAM_INIT unkStruct_203B294 *sUnknown_203B294 = {NULL}; #include "data/code_80227B8.h" diff --git a/src/code_8023144.c b/src/code_8023144.c index faa295813..5d6736145 100644 --- a/src/code_8023144.c +++ b/src/code_8023144.c @@ -13,11 +13,11 @@ #include "pokemon_3.h" #include "text.h" -static EWRAM_DATA_2 u32 gUnknown_203B298 = {0}; -static EWRAM_DATA_2 u16 gUnknown_203B29C = {0}; -static EWRAM_DATA_2 u16 gUnknown_203B29E = {0}; +static EWRAM_INIT u32 gUnknown_203B298 = {1}; +static EWRAM_INIT u16 gUnknown_203B29C = {0}; +static EWRAM_INIT u16 gUnknown_203B29E = {0}; -static IWRAM_DATA unkStruct_3001B5C *gUnknown_3001B5C = {0}; +static IWRAM_DATA unkStruct_3001B5C *gUnknown_3001B5C = {NULL}; #include "data/code_8023144.h" diff --git a/src/felicity_bank.c b/src/felicity_bank.c index e571720e1..1280b9034 100644 --- a/src/felicity_bank.c +++ b/src/felicity_bank.c @@ -10,7 +10,7 @@ #include "pokemon.h" #include "text.h" -static EWRAM_DATA_2 FelicityBankWork *sFelicityBankWork = {0}; +static EWRAM_INIT FelicityBankWork *sFelicityBankWork = {NULL}; #include "data/felicity_bank.h" diff --git a/src/gulpin_shop.c b/src/gulpin_shop.c index 8be813358..4db64dde4 100644 --- a/src/gulpin_shop.c +++ b/src/gulpin_shop.c @@ -13,7 +13,7 @@ #include "moves.h" #include "text.h" -static EWRAM_DATA_2 GulpinShopWork *sGulpinShopWork = {0}; +static EWRAM_INIT GulpinShopWork *sGulpinShopWork = {NULL}; #include "data/gulpin_shop.h" diff --git a/src/gulpin_shop_801FB50.c b/src/gulpin_shop_801FB50.c index 7759c94b0..6e23d53a7 100644 --- a/src/gulpin_shop_801FB50.c +++ b/src/gulpin_shop_801FB50.c @@ -19,7 +19,7 @@ #include "pokemon_mid.h" #include "text.h" -EWRAM_DATA_2 unkStruct_203B27C *gUnknown_203B27C = {0}; +EWRAM_INIT unkStruct_203B27C *gUnknown_203B27C = {NULL}; #include "data/gulpin_shop_801FB50.h" diff --git a/src/hints_menu1.c b/src/hints_menu1.c index aaa79b90b..fc94254bb 100644 --- a/src/hints_menu1.c +++ b/src/hints_menu1.c @@ -9,7 +9,7 @@ #include "text.h" #include "structs/struct_sub80095e4.h" -static EWRAM_DATA_2 struct_Sub80095E4 *sUnknown_203B264 = {0}; +static EWRAM_INIT struct_Sub80095E4 *sUnknown_203B264 = {NULL}; #include "data/hints_menu1.h" diff --git a/src/hints_menu2.c b/src/hints_menu2.c index 7c05d2472..f37017e67 100644 --- a/src/hints_menu2.c +++ b/src/hints_menu2.c @@ -9,7 +9,7 @@ #include "text.h" #include "structs/struct_sub80095e4.h" -static EWRAM_DATA_2 struct_Sub80095E4_2 *sUnknown_203B268 = {0}; +static EWRAM_INIT struct_Sub80095E4_2 *sUnknown_203B268 = {NULL}; #include "data/hints_menu2.h" diff --git a/src/iq_skill_info_menu.c b/src/iq_skill_info_menu.c index 66142d3d2..1a9091f84 100644 --- a/src/iq_skill_info_menu.c +++ b/src/iq_skill_info_menu.c @@ -11,7 +11,7 @@ #include "sprite.h" #include "text.h" -static EWRAM_DATA_2 struct IQSkillInfoMenu *sIQSkillInfoMenu = {0}; +static EWRAM_INIT struct IQSkillInfoMenu *sIQSkillInfoMenu = {NULL}; #include "data/iq_skill_info_menu.h" diff --git a/src/iq_skill_list_menu.c b/src/iq_skill_list_menu.c index fa684fcb6..8ae25c0a7 100644 --- a/src/iq_skill_list_menu.c +++ b/src/iq_skill_list_menu.c @@ -10,7 +10,7 @@ #include "pokemon_3.h" #include "text.h" -static EWRAM_DATA_2 struct IQSkillListMenu *sIQSkillListMenu = {0}; +static EWRAM_INIT struct IQSkillListMenu *sIQSkillListMenu = {NULL}; #include "data/iq_skill_list_menu.h" diff --git a/src/iq_skill_menu.c b/src/iq_skill_menu.c index 0a90295d3..b06603f73 100644 --- a/src/iq_skill_menu.c +++ b/src/iq_skill_menu.c @@ -11,7 +11,7 @@ #include "pokemon_3.h" #include "text.h" -static EWRAM_DATA_2 struct IQSkillMenu *sIQSkillMenu = {0}; +static EWRAM_INIT struct IQSkillMenu *sIQSkillMenu = {NULL}; #include "data/iq_skill_menu.h" diff --git a/src/kangaskhan_storage1.c b/src/kangaskhan_storage1.c index bf6a4a08e..410fbd3c3 100644 --- a/src/kangaskhan_storage1.c +++ b/src/kangaskhan_storage1.c @@ -13,7 +13,7 @@ #include "pokemon.h" #include "text.h" -EWRAM_DATA_2 struct KangaskhanStorageWork *gKangaskhanStorageWork = {0}; +EWRAM_INIT struct KangaskhanStorageWork *gKangaskhanStorageWork = {NULL}; #include "data/kangaskhan_storage1.h" // 80DB748 diff --git a/src/kangaskhan_storage2.c b/src/kangaskhan_storage2.c index 1989f52ec..830d2490c 100644 --- a/src/kangaskhan_storage2.c +++ b/src/kangaskhan_storage2.c @@ -12,7 +12,7 @@ #include "menu_input.h" #include "text.h" -static EWRAM_DATA_2 unkStruct_203B20C *sUnknown_203B20C = {0}; +static EWRAM_INIT unkStruct_203B20C *sUnknown_203B20C = {NULL}; #include "data/kangaskhan_storage2.h" diff --git a/src/kecleon_bros1.c b/src/kecleon_bros1.c index d4e8eb169..f42766aca 100644 --- a/src/kecleon_bros1.c +++ b/src/kecleon_bros1.c @@ -17,7 +17,7 @@ #include "pokemon.h" #include "text.h" -static EWRAM_DATA_2 KecleonBrosWork1 *sKecleonBrosWork1 = {0}; +static EWRAM_INIT KecleonBrosWork1 *sKecleonBrosWork1 = {NULL}; #include "data/kecleon_bros1.h" diff --git a/src/kecleon_bros2.c b/src/kecleon_bros2.c index 1389f1331..e071f6169 100644 --- a/src/kecleon_bros2.c +++ b/src/kecleon_bros2.c @@ -11,8 +11,8 @@ #include "text.h" #include "structs/struct_sub80095e4.h" -static EWRAM_DATA_2 struct_Sub80095E4_2 *gUnknown_203B214 = {0}; -static EWRAM_DATA_2 u16 gUnknown_203B218 = {0}; +static EWRAM_INIT struct_Sub80095E4_2 *gUnknown_203B214 = {NULL}; +static EWRAM_INIT u16 gUnknown_203B218 = {0}; #include "data/kecleon_bros2.h" diff --git a/src/kecleon_bros3.c b/src/kecleon_bros3.c index a64ca4f7c..795957ecd 100644 --- a/src/kecleon_bros3.c +++ b/src/kecleon_bros3.c @@ -11,8 +11,8 @@ #include "text.h" #include "structs/struct_sub80095e4.h" -static EWRAM_DATA_2 struct_Sub80095E4_2 *gUnknown_203B21C = {0}; -static EWRAM_DATA_2 u16 gUnknown_203B220 = {0}; +static EWRAM_INIT struct_Sub80095E4_2 *gUnknown_203B21C = {NULL}; +static EWRAM_INIT u16 gUnknown_203B220 = {0}; #include "data/kecleon_bros3.h" diff --git a/src/kecleon_bros4.c b/src/kecleon_bros4.c index 7e018a1ba..cb75b5065 100644 --- a/src/kecleon_bros4.c +++ b/src/kecleon_bros4.c @@ -12,9 +12,9 @@ #include "menu_input.h" #include "text.h" -static EWRAM_DATA_2 unkStruct_203B224 *gUnknown_203B224 = {0}; -static EWRAM_DATA_2 u16 gUnknown_203B228 = {0}; -static EWRAM_DATA_2 u16 gUnknown_203B22A = {0}; +static EWRAM_INIT unkStruct_203B224 *gUnknown_203B224 = {NULL}; +static EWRAM_INIT u16 gUnknown_203B228 = {0}; +static EWRAM_INIT u16 gUnknown_203B22A = {0}; #include "data/kecleon_bros4.h" diff --git a/src/options_menu1.c b/src/options_menu1.c index 9044fdf04..4e0222a96 100644 --- a/src/options_menu1.c +++ b/src/options_menu1.c @@ -33,7 +33,7 @@ enum OptionsMenuStates OPTIONS_MENU_CONFIRM_NEW_OPTIONS, }; -static EWRAM_DATA_2 struct unkStruct_203B25C *sUnknown_203B25C = {0}; +static EWRAM_INIT struct unkStruct_203B25C *sUnknown_203B25C = {NULL}; #include "data/options_menu1.h" diff --git a/src/options_menu2.c b/src/options_menu2.c index afc930945..80fe8e084 100644 --- a/src/options_menu2.c +++ b/src/options_menu2.c @@ -9,7 +9,7 @@ #include "options_menu2.h" #include "text.h" -static EWRAM_DATA_2 struct unkStruct_203B260 *sUnknown_203B260 = {0}; +static EWRAM_INIT struct unkStruct_203B260 *sUnknown_203B260 = {NULL}; #include "data/options_menu2.h" diff --git a/src/string_format.c b/src/string_format.c index fcd6b0938..338be3397 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -100,7 +100,6 @@ struct UnkStruct_203B198 struct SubStruct_203B198 unk48; }; -extern struct UnkStruct_203B198 gUnknown_203B198; extern UnkTextStruct1 gUnknown_2027370[4]; extern void (*gUnknown_203B088)(s32 a0); @@ -177,6 +176,23 @@ static UNUSED EWRAM_DATA u8 sUnusedEwram1[4] = {0}; static EWRAM_DATA MenuInputStructSub gUnknown_202EC28 = {0}; +static EWRAM_INIT struct UnkStruct_203B198 sUnknown_203B198 = { + .unk0 = { + .unk8 = {2, 15}, + .unkC = 26, + .unkE = 5, + .unk10 = 7, + }, + .unk18 = 0x40, + .unk1C = 7, + .unk30 = { + .unk4 = 3, + }, + .unk48 = { + .unk4 = 3, + } +}; + void sub_8014144(void) { gUnknown_202E744 = 0; @@ -226,41 +242,41 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me gUnknown_202EC1C = r9; sub_801317C(&gUnknown_202EC28); if (flags & 0x10) { - gUnknown_203B198.unk0 = gUnknown_80D48DC; + sUnknown_203B198.unk0 = gUnknown_80D48DC; } else { - gUnknown_203B198.unk0 = gUnknown_80D48C4; + sUnknown_203B198.unk0 = gUnknown_80D48C4; } - gUnknown_203B198.unk24 = 0; - gUnknown_203B198.unk26 = 0; - gUnknown_203B198.unk28 = 0; - gUnknown_203B198.unk18 = 0x40; + sUnknown_203B198.unk24 = 0; + sUnknown_203B198.unk26 = 0; + sUnknown_203B198.unk28 = 0; + sUnknown_203B198.unk18 = 0x40; if (monPortraitPtr != NULL && monPortraitPtr->faceData != NULL && monPortraitPtr->faceData->sprites[monPortraitPtr->spriteId].gfx != 0) { s32 i; - gUnknown_203B198.unk20.x = monPortraitPtr->pos.x; - gUnknown_203B198.unk20.y = monPortraitPtr->pos.y; - gUnknown_203B198.unk24 = 5; - gUnknown_203B198.unk26 = 5; - gUnknown_203B198.unk28 = 5; + sUnknown_203B198.unk20.x = monPortraitPtr->pos.x; + sUnknown_203B198.unk20.y = monPortraitPtr->pos.y; + sUnknown_203B198.unk24 = 5; + sUnknown_203B198.unk26 = 5; + sUnknown_203B198.unk28 = 5; for (i = 0; i < 16; i++) { SetBGPaletteBufferColorArray(224 + i, &monPortraitPtr->faceData->sprites[monPortraitPtr->spriteId].pal[i]); } portraitOn = TRUE; if (monPortraitPtr->unkE) { - gUnknown_203B198.unk1C = 7; + sUnknown_203B198.unk1C = 7; } else { - gUnknown_203B198.unk1C = 5; + sUnknown_203B198.unk1C = 5; } } - gUnknown_203B198.unk30 = gUnknown_80D48AC; - gUnknown_203B198.unk48 = gUnknown_80D48AC; + sUnknown_203B198.unk30 = gUnknown_80D48AC; + sUnknown_203B198.unk48 = gUnknown_80D48AC; ResetUnusedInputStruct(); - xxx_call_save_unk_text_struct_800641C(&gUnknown_203B198.unk0, TRUE, TRUE); + xxx_call_save_unk_text_struct_800641C(&sUnknown_203B198.unk0, TRUE, TRUE); gUnknown_202E748.unk0 = 4; gUnknown_202E748.unk2 = 4; gUnknown_202E748.unk8 = 0x70; @@ -632,7 +648,7 @@ static void sub_8014A88(void) if (menuItem->text == NULL) break; - r5 += 12;; + r5 += 12; FormatString(menuItem->text, text, text + sizeof(text), 0); val = sub_8008ED0(text); if (r7 < val) { @@ -644,21 +660,21 @@ static void sub_8014A88(void) if (r5 % 8) r2++; - gUnknown_203B198.unk30.unk4 = gUnknown_202EC10; + sUnknown_203B198.unk30.unk4 = gUnknown_202EC10; r1 = r7 / 8; r1 += 2; - gUnknown_203B198.unk30.unkC = r1; - gUnknown_203B198.unk30.unk10 = r2; - gUnknown_203B198.unk30.unkE = r2; - gUnknown_203B198.unk30.unk8 = 28 - r1; - gUnknown_203B198.unk30.unkA = 14 - r2; - gUnknown_203B198.unk0.unk0 = 0x80; - gUnknown_203B198.unk18 = 0xC0; + sUnknown_203B198.unk30.unkC = r1; + sUnknown_203B198.unk30.unk10 = r2; + sUnknown_203B198.unk30.unkE = r2; + sUnknown_203B198.unk30.unk8 = 28 - r1; + sUnknown_203B198.unk30.unkA = 14 - r2; + sUnknown_203B198.unk0.unk0 = 0x80; + sUnknown_203B198.unk18 = 0xC0; if (sNeverWrittenToUnknownStructPtr != NULL) { - gUnknown_203B198.unk48 = sNeverWrittenToUnknownStructPtr->unk0; + sUnknown_203B198.unk48 = sNeverWrittenToUnknownStructPtr->unk0; } ResetUnusedInputStruct(); - xxx_call_save_unk_text_struct_800641C(&gUnknown_203B198.unk0, TRUE, FALSE); + xxx_call_save_unk_text_struct_800641C(&sUnknown_203B198.unk0, TRUE, FALSE); sub_8012D60(&gUnknown_202EBC0, sDialogueMenuItems, gUnknown_80D48A0, gUnknown_202EC18, gUnknown_202EC1C, 2); if (sNeverWrittenToUnknownStructPtr != NULL) { sub_80073B8(3); diff --git a/src/wigglytuff_shop1.c b/src/wigglytuff_shop1.c index 75366c121..4a62baf7d 100644 --- a/src/wigglytuff_shop1.c +++ b/src/wigglytuff_shop1.c @@ -12,10 +12,10 @@ #include "text.h" #include "wigglytuff_shop1.h" -static EWRAM_DATA_2 WigglytuffShop1Work *sWigglytuffShop1Work = {0}; -static EWRAM_DATA_2 u32 sUnknown_203B284 = {0}; -static EWRAM_DATA_2 u16 sUnknown_203B288 = {0}; -static EWRAM_DATA_2 u16 sUnknown_203B28A = {0}; +static EWRAM_INIT WigglytuffShop1Work *sWigglytuffShop1Work = {NULL}; +static EWRAM_INIT u32 sUnknown_203B284 = {0}; +static EWRAM_INIT u16 sUnknown_203B288 = {0}; +static EWRAM_INIT u16 sUnknown_203B28A = {0}; #include "data/wigglytuff_shop1.h" diff --git a/src/wigglytuff_shop2.c b/src/wigglytuff_shop2.c index d4066b24c..da0764b3b 100644 --- a/src/wigglytuff_shop2.c +++ b/src/wigglytuff_shop2.c @@ -13,7 +13,7 @@ #include "text.h" #include "wigglytuff_shop2.h" -static EWRAM_DATA_2 WigglytuffShop2Work *sWigglytuffShop2Work = {0}; +static EWRAM_INIT WigglytuffShop2Work *sWigglytuffShop2Work = {NULL}; #include "data/wigglytuff_shop2.h" diff --git a/src/wigglytuff_shop3.c b/src/wigglytuff_shop3.c index 9523949fc..eabf966ef 100644 --- a/src/wigglytuff_shop3.c +++ b/src/wigglytuff_shop3.c @@ -17,7 +17,7 @@ #include "wigglytuff_shop2.h" #include "wigglytuff_shop3.h" -static EWRAM_DATA_2 WigglytuffShop3Work *sWigglytuffShop3Work = {0}; +static EWRAM_INIT WigglytuffShop3Work *sWigglytuffShop3Work = {NULL}; #include "data/wigglytuff_shop3.h" diff --git a/sym_ewram2.txt b/sym_ewram2.txt index d699a0d05..69f8d6365 100644 --- a/sym_ewram2.txt +++ b/sym_ewram2.txt @@ -1,50 +1,5 @@ .align 2 - - - - - -gUnknown_203B198: /* 203B198 (sub_8014248 - sub_8014A88) */ - .space 0x60 - -.include "src/code_8015080.o" - -gUnknown_203B1FC: /* 203B1FC (sub_80151C0 - sub_8015F84) */ - .space 0x4 - -.include "src/code_801602C.o" -.include "src/felicity_bank.o" -.include "src/kangaskhan_storage1.o" -.include "src/kangaskhan_storage2.o" -.include "src/kecleon_bros1.o" -.include "src/kecleon_bros2.o" -.include "src/kecleon_bros3.o" -.include "src/kecleon_bros4.o" -.include "src/code_801AFA4.o" -.include "src/code_801B3C0.o" -.include "src/code_801B60C.o" -.include "src/iq_skill_menu.o" -.include "src/iq_skill_list_menu.o" -.include "src/iq_skill_info_menu.o" -.include "src/code_801C8C4.o" -.include "src/code_801D014.o" -.include "src/code_801D9E4.o" -.include "src/options_menu1.o" -.include "src/options_menu2.o" -.include "src/hints_menu1.o" -.include "src/hints_menu2.o" -.include "src/gulpin_shop.o" -.include "src/code_801EE10.o" -.include "src/code_801F428.o" -.include "src/code_801F808.o" -.include "src/gulpin_shop_801FB50.o" -.include "src/wigglytuff_shop1.o" -.include "src/wigglytuff_shop2.o" -.include "src/wigglytuff_shop3.o" -.include "src/code_80227B8.o" -.include "src/code_8023144.o" - gUnknown_203B2A0: /* 203B2A0 (sub_8023868 - sub_8023C60) */ .space 0x4 diff --git a/sym_ewram_init.txt b/sym_ewram_init.txt index c1f2b5fbb..184f3f5ce 100644 --- a/sym_ewram_init.txt +++ b/sym_ewram_init.txt @@ -21,3 +21,37 @@ .include "src/save_write.o" .include "src/quick_save_read.o" .include "src/quick_save_write.o" +.include "src/string_format.o" +.include "src/code_8015080.o" +.include "src/code_8012A18_1.o" +.include "src/code_801602C.o" +.include "src/felicity_bank.o" +.include "src/kangaskhan_storage1.o" +.include "src/kangaskhan_storage2.o" +.include "src/kecleon_bros1.o" +.include "src/kecleon_bros2.o" +.include "src/kecleon_bros3.o" +.include "src/kecleon_bros4.o" +.include "src/code_801AFA4.o" +.include "src/code_801B3C0.o" +.include "src/code_801B60C.o" +.include "src/iq_skill_menu.o" +.include "src/iq_skill_list_menu.o" +.include "src/iq_skill_info_menu.o" +.include "src/code_801C8C4.o" +.include "src/code_801D014.o" +.include "src/code_801D9E4.o" +.include "src/options_menu1.o" +.include "src/options_menu2.o" +.include "src/hints_menu1.o" +.include "src/hints_menu2.o" +.include "src/gulpin_shop.o" +.include "src/code_801EE10.o" +.include "src/code_801F428.o" +.include "src/code_801F808.o" +.include "src/gulpin_shop_801FB50.o" +.include "src/wigglytuff_shop1.o" +.include "src/wigglytuff_shop2.o" +.include "src/wigglytuff_shop3.o" +.include "src/code_80227B8.o" +.include "src/code_8023144.o"