From 6cc3f98aaf9b9cd108d3e3f9e29d45f124b6d1ca Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 2 Mar 2025 15:24:33 +0100 Subject: [PATCH] Use Window and WindowTemplate --- asm/code_805D8C8.s | 6 +- include/code_801B3C0.h | 2 +- include/code_801B60C.h | 2 +- include/code_801D014.h | 2 +- include/code_801EE10.h | 2 +- include/code_80227B8.h | 2 +- include/code_8024458.h | 4 +- include/code_802DB28.h | 2 +- include/code_802DE84.h | 4 +- include/credits1.h | 2 +- include/debug_menu1.h | 2 +- include/debug_menu2.h | 2 +- include/debug_menu3.h | 2 +- include/debug_menu4.h | 2 +- include/dungeon_submenu.h | 2 +- include/felicity_bank.h | 2 +- include/friend_area_action_menu.h | 2 +- include/friend_list_menu.h | 2 +- include/friend_rescue.h | 4 +- include/gulpin_shop.h | 2 +- include/gulpin_shop_801FB50.h | 2 +- include/iq_skill_info_menu.h | 2 +- include/iq_skill_menu.h | 2 +- include/kangaskhan_storage1.h | 2 +- include/kangaskhan_storage2.h | 2 +- include/kecleon_bros1.h | 2 +- include/luminous_cave.h | 2 +- include/mailbox.h | 2 +- include/main_menu1.h | 4 +- include/main_menu2.h | 2 +- include/makuhita_dojo1.h | 2 +- include/menu_input.h | 8 +- include/options_menu1.h | 2 +- include/options_menu2.h | 4 +- include/other_menus1.h | 2 +- include/party_list_menu.h | 2 +- include/pelipper_board.h | 2 +- include/pokemon_news2.h | 2 +- include/post_office_guide2.h | 4 +- include/rescue_password_menu.h | 4 +- include/save_menu.h | 2 +- include/structs/menu.h | 2 +- include/structs/str_text.h | 16 +- include/structs/struct_sub80095e4.h | 4 +- include/text.h | 6 +- include/thank_you_wonder_mail.h | 4 +- include/trade_items_menu.h | 4 +- include/wigglytuff_shop2.h | 4 +- include/wigglytuff_shop3.h | 2 +- include/wonder_mail.h | 4 +- include/wonder_mail_802C860.h | 2 +- include/wonder_mail_802D098.h | 2 +- src/code_8015080.c | 22 +-- src/code_801EE10.c | 6 +- src/code_801F428.c | 4 +- src/code_801F808.c | 6 +- src/code_8031D70.c | 8 +- src/code_803E724.c | 10 +- src/code_805D8C8.c | 4 +- src/code_8066D04.c | 14 +- src/code_8072F3C.c | 6 +- src/credits1.c | 4 +- src/data/adventure_log.h | 4 +- src/data/code_801602C.h | 2 +- src/data/code_801B60C.h | 6 +- src/data/code_801C8C4.h | 4 +- src/data/code_801D014.h | 6 +- src/data/code_801D9E4.h | 4 +- src/data/code_80227B8.h | 6 +- src/data/code_8023144.h | 4 +- src/data/code_8023868.h | 4 +- src/data/code_8024458.h | 4 +- src/data/code_802DB28.h | 2 +- src/data/code_802DE84.h | 4 +- src/data/debug_menu1.h | 4 +- src/data/debug_menu2.h | 6 +- src/data/debug_menu3.h | 4 +- src/data/debug_menu4.h | 6 +- src/data/felicity_bank.h | 6 +- src/data/friend_area_action_menu.h | 10 +- src/data/friend_list_menu.h | 8 +- src/data/friend_rescue_menus.h | 8 +- src/data/gulpin_shop.h | 6 +- src/data/gulpin_shop_801FB50.h | 10 +- src/data/hints_menu1.h | 4 +- src/data/hints_menu2.h | 4 +- src/data/iq_skill_list_menu.h | 4 +- src/data/iq_skill_menu.h | 4 +- src/data/kangaskhan_storage1.h | 8 +- src/data/kangaskhan_storage2.h | 10 +- src/data/kecleon_bros1.h | 8 +- src/data/kecleon_bros2.h | 4 +- src/data/kecleon_bros3.h | 4 +- src/data/kecleon_bros4.h | 4 +- src/data/luminous_cave.h | 4 +- src/data/main_menu1.h | 2 +- src/data/main_menu2.h | 18 +- src/data/makuhita_dojo1.h | 2 +- src/data/makuhita_dojo2.h | 4 +- src/data/options_menu1.h | 4 +- src/data/options_menu2.h | 4 +- src/data/other_menus1.h | 36 ++-- src/data/party_list_menu.h | 10 +- src/data/personality_test1.h | 2 +- src/data/personality_test2.h | 6 +- src/data/pokemon_news1.h | 4 +- src/data/pokemon_news2.h | 4 +- src/data/pokemon_news3.h | 4 +- src/data/post_office_guide2.h | 4 +- src/data/trade_items_menu.h | 6 +- src/data/wigglytuff_shop1.h | 4 +- src/data/wigglytuff_shop2.h | 4 +- src/data/wigglytuff_shop3.h | 6 +- src/data/wonder_mail_1.h | 4 +- src/data/wonder_mail_802C10C.h | 4 +- src/data/wonder_mail_802C4C8.h | 4 +- src/data/wonder_mail_802C860.h | 6 +- src/data/wonder_mail_802CDD4.h | 4 +- src/data/wonder_mail_802D098.h | 10 +- src/dungeon_menu_items.c | 14 +- src/dungeon_menu_moves.c | 22 +-- src/dungeon_menu_team.c | 32 ++-- src/dungeon_message.c | 2 +- src/dungeon_submenu.c | 6 +- src/friend_areas_map_util.c | 4 +- src/friend_rescue.c | 2 +- src/load_screen.c | 10 +- src/mailbox.c | 8 +- src/main_menu1.c | 8 +- src/menu_input.c | 42 ++-- src/mission_reward.c | 4 +- src/other_menus1.c | 2 +- src/pelipper_board.c | 8 +- src/personality_test1.c | 2 +- src/rescue_password_menu.c | 22 +-- src/save_menu.c | 4 +- src/string_format.c | 14 +- src/text.c | 284 ++++++++++++++-------------- src/thank_you_wonder_mail.c | 6 +- src/unk_menu_203B360.c | 6 +- src/wonder_mail_3_mid.c | 8 +- src/wonder_mail_4.c | 4 +- src/wonder_mail_5.c | 8 +- src/wonder_mail_6.c | 8 +- src/wonder_mail_main_menu.c | 2 +- src/world_map.c | 4 +- 146 files changed, 554 insertions(+), 554 deletions(-) diff --git a/asm/code_805D8C8.s b/asm/code_805D8C8.s index ce6be2775..5a653821b 100644 --- a/asm/code_805D8C8.s +++ b/asm/code_805D8C8.s @@ -4653,7 +4653,7 @@ _08065F16: .align 2, 0 _08065F28: .4byte gGameOptionsRef _08065F2C: .4byte gDungeonMenu -_08065F30: .4byte gUnknown_2027370 +_08065F30: .4byte gWindows _08065F34: .4byte gUnknown_80FF774 _08065F38: .4byte gUnknown_80FF7EC _08065F3C: .4byte gRealInputs @@ -4910,7 +4910,7 @@ _08066134: .4byte gUnknown_203B43C _08066138: .4byte gUnknown_8106D08 _0806613C: .4byte gUnknown_202F2F8 _08066140: .4byte gUnknown_202F2FC -_08066144: .4byte gUnknown_2027370 +_08066144: .4byte gWindows _08066148: .4byte gUnknown_8106D68 _0806614C: .4byte gRealInputs _08066150: @@ -5344,7 +5344,7 @@ _080664C0: pop {r0} bx r0 .align 2, 0 -_080664C8: .4byte gUnknown_2027370 +_080664C8: .4byte gWindows _080664CC: .4byte gDungeonFramesCounter _080664D0: .4byte gUnknown_202F300 _080664D4: .4byte 0x0000feff diff --git a/include/code_801B3C0.h b/include/code_801B3C0.h index 116f9816e..76ad0b429 100644 --- a/include/code_801B3C0.h +++ b/include/code_801B3C0.h @@ -17,7 +17,7 @@ typedef struct unkStruct_203B230 u8 fill18[0x20 - 0x18]; u32 unk20; u32 unk24; - Windows unk28; + WindowTemplates unk28; MenuInputStructSub unk88; } unkStruct_203B230; diff --git a/include/code_801B60C.h b/include/code_801B60C.h index 4ef7556ea..b673b5934 100644 --- a/include/code_801B60C.h +++ b/include/code_801B60C.h @@ -20,7 +20,7 @@ typedef struct unkStruct_203B234 MenuStruct unk78; /* 0xC8 */ u32 menuAction; MenuItem unkCC[5]; - Windows windows; + WindowTemplates windows; } unkStruct_203B234; bool8 sub_801B60C(u32, u8 id, u8 quantity); diff --git a/include/code_801D014.h b/include/code_801D014.h index ef70e1780..a79d975e8 100644 --- a/include/code_801D014.h +++ b/include/code_801D014.h @@ -21,7 +21,7 @@ struct unk_203B250 MenuStruct unk18; MenuItem unk68[8]; u16 unkA8[8]; - Windows windows; + WindowTemplates windows; }; // size: 0x8 diff --git a/include/code_801EE10.h b/include/code_801EE10.h index 73aca6d6c..a519b0572 100644 --- a/include/code_801EE10.h +++ b/include/code_801EE10.h @@ -21,7 +21,7 @@ typedef struct unkStruct_203B270 /* 0x1C */ MenuInputStruct input; u32 unk50; u32 unk54; - Windows windows; + WindowTemplates windows; const u8 *text; } unkStruct_203B270; diff --git a/include/code_80227B8.h b/include/code_80227B8.h index 96accc32c..4e8d7658c 100644 --- a/include/code_80227B8.h +++ b/include/code_80227B8.h @@ -26,7 +26,7 @@ typedef struct unkStruct_203B294 /* 0xF4 */ u32 menuAction; MenuItem unkF8[8]; u16 unk138[8]; - Windows windows; + WindowTemplates windows; } unkStruct_203B294; bool8 sub_80227B8(PokemonStruct1 *pkmn); diff --git a/include/code_8024458.h b/include/code_8024458.h index 7c40da5d5..624120372 100644 --- a/include/code_8024458.h +++ b/include/code_8024458.h @@ -15,8 +15,8 @@ struct unkStruct_203B2AC struct unkStruct_808FF20 unk4C; struct UnkInfoTabStruct unkB0; u32 unkE0; - Window *unkE4; - Windows unkE8; + WindowTemplate *unkE4; + WindowTemplates unkE8; WindowHeader unk148; }; diff --git a/include/code_802DB28.h b/include/code_802DB28.h index e9f040ce9..ca94c97a7 100644 --- a/include/code_802DB28.h +++ b/include/code_802DB28.h @@ -15,7 +15,7 @@ struct unkStruct_203B2FC /* 0x30 */ u8 jobSlotIndex; /* 0x34 */ WonderMail *jobInfo; /* 0x38 */ struct MonPortraitMsg monPortrait; - Windows unk48; + WindowTemplates unk48; }; bool8 sub_802DB28(u8 jobSlotIndex, u8 dungeon); diff --git a/include/code_802DE84.h b/include/code_802DE84.h index efe8f24ed..c1492410e 100644 --- a/include/code_802DE84.h +++ b/include/code_802DE84.h @@ -11,8 +11,8 @@ struct unkStruct_203B300 MenuInputStructSub unk0; /* 0xC */ unkStruct_802C39C *mail; u32 unk10; - Window *unk14; - Windows unk18; + WindowTemplate *unk14; + WindowTemplates unk18; u8 unk78[4]; }; diff --git a/include/credits1.h b/include/credits1.h index 39c029595..5a1130ad0 100644 --- a/include/credits1.h +++ b/include/credits1.h @@ -6,7 +6,7 @@ // size: 0x6C typedef struct Credits1Work { - Windows unk0; + WindowTemplates unk0; s32 unk60; s32 unk64; /* 0x68 */ s32 creditsCategoryIndex; diff --git a/include/debug_menu1.h b/include/debug_menu1.h index 0fec0caaf..35912eb33 100644 --- a/include/debug_menu1.h +++ b/include/debug_menu1.h @@ -8,7 +8,7 @@ struct DebugMenu { MenuStruct unk0[4]; - Windows unk140; + WindowTemplates unk140; u32 fill1A0; }; diff --git a/include/debug_menu2.h b/include/debug_menu2.h index 39cbed18c..aaa5709db 100644 --- a/include/debug_menu2.h +++ b/include/debug_menu2.h @@ -14,7 +14,7 @@ typedef struct unkStruct_203B3F0 MenuStruct unk4C; unkStructFor8013AA0 unk9C; u8 fillCC[0xD8 - 0xCC]; - Windows unkD8; + WindowTemplates unkD8; } unkStruct_203B3F0; #endif // GUARD_DEBUG_MENU2_H diff --git a/include/debug_menu3.h b/include/debug_menu3.h index a5851b53a..0a5d923d6 100644 --- a/include/debug_menu3.h +++ b/include/debug_menu3.h @@ -12,7 +12,7 @@ typedef struct unkStruct_203B3F4 /* 0x8 */ u32 menuAction; /* 0xC */ MenuItem menuItems[8]; MenuStruct unk4C; - Windows unk9C; + WindowTemplates unk9C; } unkStruct_203B3F4; #endif // GUARD_DEBUG_MENU3_H diff --git a/include/debug_menu4.h b/include/debug_menu4.h index 7a886483a..9c78bd347 100644 --- a/include/debug_menu4.h +++ b/include/debug_menu4.h @@ -17,7 +17,7 @@ typedef struct unkStruct_203B3F8 unkStructFor8013AA0 unk60; MenuItem unk90[8]; u16 unkD0[8]; - Windows unkE0; + WindowTemplates unkE0; } unkStruct_203B3F8; #endif // GUARD_DEBUG_MENU4_H diff --git a/include/dungeon_submenu.h b/include/dungeon_submenu.h index bdabc762f..a9eead764 100644 --- a/include/dungeon_submenu.h +++ b/include/dungeon_submenu.h @@ -3,6 +3,6 @@ #include "structs/str_text.h" -void CreateDungeonMenuSubWindow(Window *mainWindow, s32 subWindowX); +void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX); #endif diff --git a/include/felicity_bank.h b/include/felicity_bank.h index c4044d49d..7bf8b85b9 100644 --- a/include/felicity_bank.h +++ b/include/felicity_bank.h @@ -22,7 +22,7 @@ typedef struct FelicityBankWork unkStructFor8013AA0 unk64; /* 0x94 */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unkA8; + WindowTemplates unkA8; } FelicityBankWork; bool8 CreateFelicityBank(s32 mode); diff --git a/include/friend_area_action_menu.h b/include/friend_area_action_menu.h index 132d5d898..b95fb01a6 100644 --- a/include/friend_area_action_menu.h +++ b/include/friend_area_action_menu.h @@ -65,7 +65,7 @@ struct unkStruct_203B2BC MenuItem menuItems[4]; u8 fill120[0x16C - 0x13C]; u16 unk16C[10]; - Windows unk180; + WindowTemplates unk180; }; u32 sub_8027074(void); diff --git a/include/friend_list_menu.h b/include/friend_list_menu.h index a4c6d619f..d60b1af81 100644 --- a/include/friend_list_menu.h +++ b/include/friend_list_menu.h @@ -31,7 +31,7 @@ typedef struct unkStruct_203B2B4 MenuStruct unk78; MenuItem unkC8[8]; u16 unk108[8]; - Windows unk118; + WindowTemplates unk118; } unkStruct_203B2B4; bool8 CreateFriendListMenu(s32 param_1); diff --git a/include/friend_rescue.h b/include/friend_rescue.h index a349b7fad..95b8bbf8f 100644 --- a/include/friend_rescue.h +++ b/include/friend_rescue.h @@ -23,8 +23,8 @@ typedef struct WonderMailStruct_203B33C unkStruct_203B480 unk1E8; u8 unk218; MenuStruct unk21C[4]; - Windows unk35C; - Windows unk3BC; + WindowTemplates unk35C; + WindowTemplates unk3BC; /* 0x41C */ Item item; u32 unk420; // Is this supposed to be a File like 203B2C4? u8 unk424[0x100]; diff --git a/include/gulpin_shop.h b/include/gulpin_shop.h index 4f5ef9b9d..fb798ae74 100644 --- a/include/gulpin_shop.h +++ b/include/gulpin_shop.h @@ -27,7 +27,7 @@ typedef struct GulpinShopWork u8 fillC8[0x118 - 0xC8]; /* 0x118 */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unk12C; + WindowTemplates unk12C; } GulpinShopWork; bool8 CreateGulpinShop(u32 mode, s16 pokeSpecies, Move *moves); diff --git a/include/gulpin_shop_801FB50.h b/include/gulpin_shop_801FB50.h index f0237f115..a141f018d 100644 --- a/include/gulpin_shop_801FB50.h +++ b/include/gulpin_shop_801FB50.h @@ -35,7 +35,7 @@ typedef struct unkStruct_203B27C u8 fill11C[0x16C - 0x11C]; /* 0x16C */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unk180; + WindowTemplates unk180; } unkStruct_203B27C; bool8 sub_801FB50(u32 mode); diff --git a/include/iq_skill_info_menu.h b/include/iq_skill_info_menu.h index d6f9dd661..5efb2c2a6 100644 --- a/include/iq_skill_info_menu.h +++ b/include/iq_skill_info_menu.h @@ -16,7 +16,7 @@ struct IQSkillInfoMenu u8 fill14[0x20 - 0x18]; u32 unk20; u32 unk24; - Windows unk28; + WindowTemplates unk28; MenuInputStructSub unk88; }; diff --git a/include/iq_skill_menu.h b/include/iq_skill_menu.h index 6a39ff357..06acfe5e8 100644 --- a/include/iq_skill_menu.h +++ b/include/iq_skill_menu.h @@ -19,7 +19,7 @@ struct IQSkillMenu /* 0x30 */ s32 menuAction; MenuItem unk34[8]; MenuStruct unk74; - Windows unkC4; + WindowTemplates unkC4; }; bool8 CreateIQSkillMenu(s16 species); diff --git a/include/kangaskhan_storage1.h b/include/kangaskhan_storage1.h index ecb31853d..dbaf17aee 100644 --- a/include/kangaskhan_storage1.h +++ b/include/kangaskhan_storage1.h @@ -47,7 +47,7 @@ struct KangaskhanStorageWork unkStructFor8013AA0 unkA8; /* 0xD8 */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unkEC; + WindowTemplates unkEC; }; bool8 CreateKangaskhanStorage(u32 mode); diff --git a/include/kangaskhan_storage2.h b/include/kangaskhan_storage2.h index 8fea21f32..dc88a73d9 100644 --- a/include/kangaskhan_storage2.h +++ b/include/kangaskhan_storage2.h @@ -27,7 +27,7 @@ typedef struct unkStruct_203B20C u16 unk60[8]; MenuStruct unk70; unkStructFor8013AA0 unkC0; - Windows unkF0; + WindowTemplates unkF0; } unkStruct_203B20C; bool8 sub_8017E1C(void); diff --git a/include/kecleon_bros1.h b/include/kecleon_bros1.h index 054ad9a75..5219dcebb 100644 --- a/include/kecleon_bros1.h +++ b/include/kecleon_bros1.h @@ -65,7 +65,7 @@ typedef struct KecleonBrosWork1 /* 0x84 */ MenuStruct menu; /* 0xD4 */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unkE8; + WindowTemplates unkE8; } KecleonBrosWork1; // mode corresponds to the enum: KecleonBrosMode diff --git a/include/luminous_cave.h b/include/luminous_cave.h index b18f45210..d96fae220 100644 --- a/include/luminous_cave.h +++ b/include/luminous_cave.h @@ -33,7 +33,7 @@ typedef struct LuminousCaveWork u8 unk110; u8 unk111; u8 unk112; - Windows unk114; + WindowTemplates unk114; } LuminousCaveWork; void CleanLuminousCave(void); diff --git a/include/mailbox.h b/include/mailbox.h index 6c181fd09..138537de5 100644 --- a/include/mailbox.h +++ b/include/mailbox.h @@ -19,7 +19,7 @@ struct unkStruct_203B304 MenuStruct unk6C; MenuItem menuItems[8]; u16 unkFC[8]; - Windows unk10C; + WindowTemplates unk10C; }; extern void SetMailboxState(u32); diff --git a/include/main_menu1.h b/include/main_menu1.h index 1ebc93f99..5f26006b5 100644 --- a/include/main_menu1.h +++ b/include/main_menu1.h @@ -38,12 +38,12 @@ void CleanUpMenu(void); void DeleteMainMenu(void); MainMenu1Work *GetMainMenu(void); void InitMainMenu(void); -void SetMenuItems(MenuStruct *, Windows *, s32 index, const Window *, const MenuItem *menuItems, bool8, u32 menuAction, bool8 unused); +void SetMenuItems(MenuStruct *, WindowTemplates *, s32 index, const WindowTemplate *, const MenuItem *menuItems, bool8, u32 menuAction, bool8 unused); void SetUpMenu(void); s32 UpdateMenu(void); void sub_8035C1C(void); -void sub_8035CC0(Windows *dataArray, u32 index); +void sub_8035CC0(WindowTemplates *dataArray, u32 index); void sub_8035CF4(MenuStruct *menu, u32 index, bool8); void sub_8035D1C(void); s16 sub_8035D3C(void); diff --git a/include/main_menu2.h b/include/main_menu2.h index d53af187c..221488aed 100644 --- a/include/main_menu2.h +++ b/include/main_menu2.h @@ -9,7 +9,7 @@ typedef struct MainMenu2Work { u32 unk0; MenuStruct unk4[4]; - Windows unk144; + WindowTemplates unk144; /* 0x1A4 */ u32 currMenuChoice; } MainMenu2Work; diff --git a/include/makuhita_dojo1.h b/include/makuhita_dojo1.h index 8c1301bb5..3fc978859 100644 --- a/include/makuhita_dojo1.h +++ b/include/makuhita_dojo1.h @@ -30,7 +30,7 @@ typedef struct MakuhitaDojoWork1 u8 fill38[0x58 - 0x38]; /* 0x58 */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unk6C; + WindowTemplates unk6C; } MakuhitaDojoWork1; void MakuhitaDojo_Delete(void); diff --git a/include/menu_input.h b/include/menu_input.h index 3b28cc41c..615919427 100644 --- a/include/menu_input.h +++ b/include/menu_input.h @@ -9,9 +9,9 @@ s32 GetKeyPress(MenuInputStruct *r0); s32 sub_8012AE8(void); void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 param_6); void sub_8012C60(u32 x, u32 y, u32 param_3, u32 color, u32 param_5); -void sub_8012CAC(Window *param_1, const MenuItem *param_2); -void sub_8012D08(Window *param_1, s32 param_2); -void sub_8012D34(Window *param_1, s32 param_2); +void sub_8012CAC(WindowTemplate *param_1, const MenuItem *param_2); +void sub_8012D08(WindowTemplate *param_1, s32 param_2); +void sub_8012D34(WindowTemplate *param_1, s32 param_2); void sub_8012D60(MenuStruct *param_1, const MenuItem *menuItems, const u32 *colorArray, u16 *param_4, s32 menuAction, s32 index); void sub_8012E04(MenuStruct *param_1, const MenuItem *menuItems, const u32 *colorArray, u16 *param_4, s32 menuAction, s32 index); void sub_8012EA4(MenuStruct *param_1, bool8 r1); @@ -49,7 +49,7 @@ void sub_8013C68(unkStructFor8013AA0 *); void sub_8013D10(unkStructFor8013AA0 *); void sub_8013E54(void); void sub_8013F84(void); -void sub_80140B4(Windows *); +void sub_80140B4(WindowTemplates *); #endif // GUARD_MENU_INPUT_H diff --git a/include/options_menu1.h b/include/options_menu1.h index 10247f132..d927bef9f 100644 --- a/include/options_menu1.h +++ b/include/options_menu1.h @@ -14,7 +14,7 @@ struct unkStruct_203B25C /* 0x1C */ MenuStruct menu; /* 0x6C */ MenuItem menuItems[8]; u16 unkAC[8]; - Windows unkBC; + WindowTemplates unkBC; }; bool8 sub_801DCC4(void); diff --git a/include/options_menu2.h b/include/options_menu2.h index f326e23b8..e0a140ca1 100644 --- a/include/options_menu2.h +++ b/include/options_menu2.h @@ -11,8 +11,8 @@ struct unkStruct_203B260 /* 0x4 */ MenuInputStructSub unk4; /* 0x10 */ MenuInputStruct input; u32 unk44; - Window *unk48; - Windows unk4C; + WindowTemplate *unk48; + WindowTemplates unk4C; }; bool8 sub_801E198(GameOptions *optionsMenu); diff --git a/include/other_menus1.h b/include/other_menus1.h index ad0e478f8..c87546e97 100644 --- a/include/other_menus1.h +++ b/include/other_menus1.h @@ -18,7 +18,7 @@ typedef struct unkStruct_203B35C u32 unk14; u8 fill18[0x1C - 0x18]; MenuStruct unk1C[4]; - Windows unk15C; + WindowTemplates unk15C; unkStruct_8035D94 unk1BC[2]; unkStruct_203B480 unk1CC; unkStruct_203B480 unk1FC; diff --git a/include/party_list_menu.h b/include/party_list_menu.h index f4ad8476e..c698012f1 100644 --- a/include/party_list_menu.h +++ b/include/party_list_menu.h @@ -32,7 +32,7 @@ typedef struct unkStruct_203B2B8 MenuItem unk16C[10]; MenuItem unk1BC[10]; u16 unk20C[10]; - Windows unk220; + WindowTemplates unk220; } unkStruct_203B2B8; bool8 CreatePartyListMenu(PokemonStruct1 *pokeStruct); diff --git a/include/pelipper_board.h b/include/pelipper_board.h index fc4892d72..b1f31c58e 100644 --- a/include/pelipper_board.h +++ b/include/pelipper_board.h @@ -17,7 +17,7 @@ struct unkStruct_203B308 MenuStruct unk6C; MenuItem menuItems[8]; u16 unkFC[8]; - Windows unk10C; + WindowTemplates unk10C; }; extern struct unkStruct_203B308 *gPelipperBoard; diff --git a/include/pokemon_news2.h b/include/pokemon_news2.h index d019d67e4..a3bad811f 100644 --- a/include/pokemon_news2.h +++ b/include/pokemon_news2.h @@ -14,7 +14,7 @@ struct unkStruct_203B2D4 const u8 *unk10[4]; u32 unk20; u32 unk24; - Windows unk28; + WindowTemplates unk28; MenuInputStructSub unk88; }; diff --git a/include/post_office_guide2.h b/include/post_office_guide2.h index a30bb5f71..95f782ac8 100644 --- a/include/post_office_guide2.h +++ b/include/post_office_guide2.h @@ -11,8 +11,8 @@ typedef struct unkStruct_203B330 u8 unkC; /* 0xD */ u8 dungeonIndex; u32 unk10; - Window *unk14; - Windows unk18; + WindowTemplate *unk14; + WindowTemplates unk18; } unkStruct_203B330; bool8 sub_80319A4(u8, u8 dungeon, s32); diff --git a/include/rescue_password_menu.h b/include/rescue_password_menu.h index 7c3563a94..e7c58b5cc 100644 --- a/include/rescue_password_menu.h +++ b/include/rescue_password_menu.h @@ -12,8 +12,8 @@ struct RescuePasswordMenu u32 currMenu; u32 state; MenuStruct unk8[4]; - Windows unk148; - Windows unk1A8; + WindowTemplates unk148; + WindowTemplates unk1A8; SpriteOAM unk208; u32 unk210; }; diff --git a/include/save_menu.h b/include/save_menu.h index 00bad9724..27d4e79e5 100644 --- a/include/save_menu.h +++ b/include/save_menu.h @@ -9,7 +9,7 @@ typedef struct SaveMenuWork /* 0x0 */ u32 currMenu; u32 unk4; MenuStruct unk8[4]; - Windows unk148; + WindowTemplates unk148; SpriteOAM unk1A8; u32 unk1B0; // Sprite count? } SaveMenuWork; diff --git a/include/structs/menu.h b/include/structs/menu.h index 78c36955d..9ab020421 100644 --- a/include/structs/menu.h +++ b/include/structs/menu.h @@ -72,7 +72,7 @@ typedef struct unkStructFor8013AA0 s32 unkC; // maxInclusive? s32 unk10; s32 unk14; // index of unk18? But read as chosenValue..? - Window *unk18; + WindowTemplate *unk18; s32 unk1C; // width of prompt? s32 unk20; // height of prompt? u8 unk24; // related to unk10 diff --git a/include/structs/str_text.h b/include/structs/str_text.h index 159a82efb..86a0c65bf 100644 --- a/include/structs/str_text.h +++ b/include/structs/str_text.h @@ -2,7 +2,7 @@ #define GUARD_STR_TEXT_H // size: 0x48 -typedef struct UnkTextStruct1 +typedef struct Window { s16 unk0; s16 unk2; @@ -26,7 +26,7 @@ typedef struct UnkTextStruct1 u8 unk44; bool8 unk45; u8 unk46; -} UnkTextStruct1; +} Window; typedef struct WindowHeader { @@ -39,7 +39,7 @@ typedef struct WindowHeader #include "structs/str_position.h" // size: 0x18 -typedef struct Window +typedef struct WindowTemplate { u8 unk0; s32 type; @@ -49,10 +49,10 @@ typedef struct Window s16 unk10; // In most cases it's the same as height. If it's smaller than height, the window may look glitchy. Maybe something with tile allocation/how the window is filled? s16 unk12; const WindowHeader *unk14; -} Window; +} WindowTemplate; // All fields are zeroed out except for type which is set to WINDOW_TYPE_NORMAL. -#define WINDOW_DUMMY (Window) {.unk0 = 0, .type = WINDOW_TYPE_NORMAL, .width = 0, .pos = {0, 0}, .height = 0, .unk10 = 0, .unk12 = 0, .unk14 = NULL} +#define WINDOW_DUMMY (WindowTemplate) {.unk0 = 0, .type = WINDOW_TYPE_NORMAL, .width = 0, .pos = {0, 0}, .height = 0, .unk10 = 0, .unk12 = 0, .unk14 = NULL} #define WINDOW_TYPE_0 0 #define WINDOW_TYPE_WITHOUT_BORDER 1 @@ -63,8 +63,8 @@ typedef struct Window #define MAX_WINDOWS 4 -typedef struct Windows { - Window id[MAX_WINDOWS]; -} Windows; +typedef struct WindowTemplates { + WindowTemplate id[MAX_WINDOWS]; +} WindowTemplates; #endif // GUARD_STR_TEXT_H diff --git a/include/structs/struct_sub80095e4.h b/include/structs/struct_sub80095e4.h index 19eaea943..64c730531 100644 --- a/include/structs/struct_sub80095e4.h +++ b/include/structs/struct_sub80095e4.h @@ -12,8 +12,8 @@ typedef struct struct_Sub80095E4 { /* 0x0 */ MenuInputStruct input; u32 unk34; - Window *unk38; - Windows windows; + WindowTemplate *unk38; + WindowTemplates windows; // size: 0x9C } struct_Sub80095E4; diff --git a/include/text.h b/include/text.h index 4ee3844fb..ac8b7a4bd 100644 --- a/include/text.h +++ b/include/text.h @@ -49,7 +49,7 @@ struct UnkDrawStringStruct s32 unk30; }; -extern UnkTextStruct1 gUnknown_2027370[4]; +extern Window gWindows[MAX_WINDOWS]; extern u8 gUnknown_202749A[11]; extern bool8 gUnknown_20274A5; extern u16 gUnknown_202B038[4][32][32]; // Usage points to these dimensions @@ -63,8 +63,8 @@ u32 UpdateFadeInTile(u32 a0); u32 sub_80063B0(void); void SelectCharmap(u32 a0); void SetCharacterMask(int a0); -void ShowWindows(const Windows *windows, bool8 a1, bool8 a2); -void RestoreUnkTextStruct_8006518(Windows *unkData); +void ShowWindows(const WindowTemplates *windows, bool8 a1, bool8 a2); +void RestoreUnkTextStruct_8006518(WindowTemplates *unkData); u32 sub_8006544(u32 index); void sub_8007334(s32 a0); void sub_80073B8(s32 a0); diff --git a/include/thank_you_wonder_mail.h b/include/thank_you_wonder_mail.h index 8761e25dc..f418f6bc0 100644 --- a/include/thank_you_wonder_mail.h +++ b/include/thank_you_wonder_mail.h @@ -22,8 +22,8 @@ typedef struct WonderMailStruct_203B2C4 unkStruct_203B480 unk1E8; /* 0x218 */ s8 mailIndex; MenuStruct unk21C[4]; - Windows unk35C; - Windows unk3BC; + WindowTemplates unk35C; + WindowTemplates unk3BC; Item unk41C; /* 0x420 */ struct MonPortraitMsg monPortrait; u32 unk430; diff --git a/include/trade_items_menu.h b/include/trade_items_menu.h index 6fa5cc386..9535c11d9 100644 --- a/include/trade_items_menu.h +++ b/include/trade_items_menu.h @@ -47,8 +47,8 @@ struct TradeItemsMenu u32 unk10; unkStructFor8013AA0 unk14; MenuStruct unk44[4]; - Windows unk184; - Windows unk1E4; + WindowTemplates unk184; + WindowTemplates unk1E4; // TODO These might be structs... struct TradeItem unk244; diff --git a/include/wigglytuff_shop2.h b/include/wigglytuff_shop2.h index b3477fd49..402d9fc74 100644 --- a/include/wigglytuff_shop2.h +++ b/include/wigglytuff_shop2.h @@ -13,8 +13,8 @@ typedef struct WigglytuffShop2Work u32 pokemonStatus[0x10]; /* 0x70 */ s32 numPokemoninFriendArea; s32 unk74; - Window *unk78; - Windows unk7C; + WindowTemplate *unk78; + WindowTemplates unk7C; u8 unkDC[4]; } WigglytuffShop2Work; diff --git a/include/wigglytuff_shop3.h b/include/wigglytuff_shop3.h index 59ae014c2..0466a1b27 100644 --- a/include/wigglytuff_shop3.h +++ b/include/wigglytuff_shop3.h @@ -54,7 +54,7 @@ typedef struct WigglytuffShop3Work MenuStruct unk6C; /* 0xBC */ struct MonPortraitMsg monPortrait; struct MonPortraitMsg *monPortraitPtr; - Windows unkD0; + WindowTemplates unkD0; u32 unk130; u32 unk134; } WigglytuffShop3Work; diff --git a/include/wonder_mail.h b/include/wonder_mail.h index 04690941d..40db9e853 100644 --- a/include/wonder_mail.h +++ b/include/wonder_mail.h @@ -22,8 +22,8 @@ typedef struct WonderMailStruct_203B2C0 u8 fill16A[0x218 - 0x1B8]; /* 0x218 */ u8 mailIndex; MenuStruct unk21C[4]; - Windows unk35C; - Windows unk3BC; + WindowTemplates unk35C; + WindowTemplates unk3BC; /* 0x41C */ u32 unkfill; // ItemSlot? /* 0x420 */ struct MonPortraitMsg monPortrait; /* 0x430 */ u8 padding3[0x534 - 0x430]; diff --git a/include/wonder_mail_802C860.h b/include/wonder_mail_802C860.h index c4436fc70..8dffc5b5c 100644 --- a/include/wonder_mail_802C860.h +++ b/include/wonder_mail_802C860.h @@ -19,7 +19,7 @@ struct unkStruct_203B2F0 MenuItem unk10C[8]; MenuItem unk14C[8]; u8 fill18C[0x19C - 0x18C]; - Windows unk19C; + WindowTemplates unk19C; }; bool8 InitializeJobListMenu(u32); diff --git a/include/wonder_mail_802D098.h b/include/wonder_mail_802D098.h index 85fb329d9..529d066c5 100644 --- a/include/wonder_mail_802D098.h +++ b/include/wonder_mail_802D098.h @@ -34,7 +34,7 @@ typedef struct unkStruct_203B2F8 MenuItem unk118[8]; MenuItem unk158[8]; u16 unk198[8]; - Windows unk1A8; + WindowTemplates unk1A8; } unkStruct_203B2F8; bool8 GetWonderMailAccepted(void); diff --git a/src/code_8015080.c b/src/code_8015080.c index 72ff7c990..40a86da0e 100644 --- a/src/code_8015080.c +++ b/src/code_8015080.c @@ -16,13 +16,13 @@ struct unkStruct_203B1F8 // size: 0x4B4 u32 menuAction; MenuStruct unk4; - Windows windows; + WindowTemplates windows; u8 buffer[0x400]; }; EWRAM_INIT struct unkStruct_203B1F8 *gUnknown_203B1F8 = {NULL}; -const Window gUnknown_80DAF70 = { +const WindowTemplate gUnknown_80DAF70 = { 0x00, 0x03, 0x00, 0x00, @@ -31,7 +31,7 @@ const Window gUnknown_80DAF70 = { NULL }; -const Window gUnknown_80DAF88 = { +const WindowTemplate gUnknown_80DAF88 = { 0x00, 0x03, 0x02, 0x02, @@ -40,7 +40,7 @@ const Window gUnknown_80DAF88 = { NULL }; -const Window gUnknown_80DAFA0 = { +const WindowTemplate gUnknown_80DAFA0 = { 0x00, 0x03, 0x16, 0x0F, @@ -251,7 +251,7 @@ static const u8 *const gUnknown_80DB4F4[] = _("END"), }; -static const Window gUnknown_80DB538 = { +static const WindowTemplate gUnknown_80DB538 = { 0x00, 0x03, 0x00, 0x00, @@ -260,7 +260,7 @@ static const Window gUnknown_80DB538 = { NULL }; -static const Window gUnknown_80DB550 = { +static const WindowTemplate gUnknown_80DB550 = { 0x00, 0x01, 0x01, 0x0A, @@ -269,7 +269,7 @@ static const Window gUnknown_80DB550 = { NULL }; -static const Window gUnknown_80DB568 = { +static const WindowTemplate gUnknown_80DB568 = { 0x00, 0x01, 0x04, 0x03, @@ -278,7 +278,7 @@ static const Window gUnknown_80DB568 = { NULL }; -static const Window gUnknown_80DB580 = { +static const WindowTemplate gUnknown_80DB580 = { 0x00, 0x01, 0x01, 0x02, @@ -356,7 +356,7 @@ struct unkStruct_203B1FC u8 *unkF8; u8 unkFC[56]; u8 *unk134; - Windows windows; + WindowTemplates windows; }; extern struct unkStruct_203B1FC *gUnknown_203B1FC; @@ -640,7 +640,7 @@ bool8 sub_8015748(void) void sub_80157D8(void) { - UnkTextStruct1 *txtPtr = &gUnknown_2027370[1]; + Window *txtPtr = &gWindows[1]; // Note: for cases 4 and 5, the code is identical except for different position structs. if (gUnknown_203B1FC->unk0 == 4) { @@ -675,7 +675,7 @@ void sub_80157D8(void) void sub_80158BC(void) { s32 x, y; - UnkTextStruct1 *txtPtr = &gUnknown_2027370[0]; + Window *txtPtr = &gWindows[0]; u32 var; switch (sub_8012AE8()) { diff --git a/src/code_801EE10.c b/src/code_801EE10.c index d28889cb4..1e7d99c40 100644 --- a/src/code_801EE10.c +++ b/src/code_801EE10.c @@ -13,7 +13,7 @@ EWRAM_INIT unkStruct_203B270 *gUnknown_203B270 = {NULL}; -const Window gUnknown_80DC240 = { +const WindowTemplate gUnknown_80DC240 = { 0x00, 0x03, 0x00, 0x00, @@ -24,7 +24,7 @@ const Window gUnknown_80DC240 = { const WindowHeader gUnkData_80DC258 = {0x01, 0x00, 0x0F, 0x00}; -const Window gUnknown_80DC25C = { +const WindowTemplate gUnknown_80DC25C = { 0, 6, 0x2, 0x2, @@ -33,7 +33,7 @@ const Window gUnknown_80DC25C = { &gUnkData_80DC258 }; -const Window gUnknown_80DC274 = { +const WindowTemplate gUnknown_80DC274 = { 0, 3, 0x2, 0xF, diff --git a/src/code_801F428.c b/src/code_801F428.c index 00a688777..589d34eb9 100644 --- a/src/code_801F428.c +++ b/src/code_801F428.c @@ -20,7 +20,7 @@ struct unkStruct_203B274 }; EWRAM_INIT struct unkStruct_203B274 *gUnknown_203B274 = {NULL}; -static const Window sUnknown_80DC2AC = { +static const WindowTemplate sUnknown_80DC2AC = { 0, 3, 0, 0, @@ -28,7 +28,7 @@ static const Window sUnknown_80DC2AC = { 0, 0, NULL }; -static const Window sUnknown_80DC2C4 = { +static const WindowTemplate sUnknown_80DC2C4 = { 0, 6, 2, 2, diff --git a/src/code_801F808.c b/src/code_801F808.c index b08b685ed..e40893097 100644 --- a/src/code_801F808.c +++ b/src/code_801F808.c @@ -23,15 +23,15 @@ struct unkStruct_203B278 u32 unk24; MenuInputStruct unk28; u32 unk5C; - Window *unk60; - Windows windows; + WindowTemplate *unk60; + WindowTemplates windows; WindowHeader unkC4; MenuInputStructSub unkC8; }; EWRAM_INIT struct unkStruct_203B278 *gUnknown_203B278 = {NULL}; -static const Window sUnknown_80DC2F8 = { +static const WindowTemplate sUnknown_80DC2F8 = { 0, 3, 0, 0, diff --git a/src/code_8031D70.c b/src/code_8031D70.c index 27dfee0a1..1b951474f 100644 --- a/src/code_8031D70.c +++ b/src/code_8031D70.c @@ -18,15 +18,15 @@ struct unkStruct_203B334 u32 mailIndex; MenuInputStructSub unk4; u32 unk10; - Window *unk14; - Windows unk18; + WindowTemplate *unk14; + WindowTemplates unk18; u8 unk78[4]; }; EWRAM_INIT struct unkStruct_203B334 *gUnknown_203B334 = {NULL}; extern unkStruct_203B480 *gUnknown_203B480; -const Window gUnknown_80E1FA8 = { +const WindowTemplate gUnknown_80E1FA8 = { 0, 3, 0x0, 0x0, @@ -37,7 +37,7 @@ const Window gUnknown_80E1FA8 = { const WindowHeader gUnkData_80E1FC0 = {0x01, 0x00, 0x0A, 0x00}; -const Window gUnknown_80E1FC4 = { +const WindowTemplate gUnknown_80E1FC4 = { 0, 6, 0x2, 0x2, diff --git a/src/code_803E724.c b/src/code_803E724.c index 42a795d6b..2c2857fb3 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -173,7 +173,7 @@ void sub_803EA10(void) SetBGPaletteBufferColorRGB(248, &gFontPalette[8], gDungeonBrightness, NULL); } -static const struct Windows gUnknown_80F62B0 = +static const struct WindowTemplates gUnknown_80F62B0 = { .id = { [0] = { @@ -191,7 +191,7 @@ static const struct Windows gUnknown_80F62B0 = } }; -static const struct Windows gUnknown_80F6310 = +static const struct WindowTemplates gUnknown_80F6310 = { .id = { [0] = { @@ -209,7 +209,7 @@ static const struct Windows gUnknown_80F6310 = } }; -static const struct Windows gUnknown_80F6370 = +static const struct WindowTemplates gUnknown_80F6370 = { .id = { [0] = { @@ -243,7 +243,7 @@ static const struct Windows gUnknown_80F6370 = } }; -static const struct Windows gUnknown_80F63D0 = +static const struct WindowTemplates gUnknown_80F63D0 = { .id = { [0] = { @@ -353,7 +353,7 @@ void sub_803EC94(void) sub_801317C(&gDungeonMenu.unk28); } -void DungeonShowWindows(Windows *a0, bool8 a1) +void DungeonShowWindows(WindowTemplates *a0, bool8 a1) { gUnknown_202EDD0 = 10; sub_8052210(0); diff --git a/src/code_805D8C8.c b/src/code_805D8C8.c index 457d35ca1..93755abac 100644 --- a/src/code_805D8C8.c +++ b/src/code_805D8C8.c @@ -39,7 +39,7 @@ void sub_8068310(s32 size, u16 **param_2) void sub_8068344(void) { if ((gDungeonFramesCounter & 8) != 0) { - UnkTextStruct1 *ptr = &gUnknown_2027370[0]; + Window *ptr = &gWindows[0]; SpriteOAM sprite = {0}; SpriteSetAffine1(&sprite, 0); @@ -63,7 +63,7 @@ void sub_8068344(void) void sub_80684C4(void) { if ((gDungeonFramesCounter & 8) != 0) { - UnkTextStruct1 *ptr = &gUnknown_2027370[0]; + Window *ptr = &gWindows[0]; SpriteOAM sprite = {0}; SpriteSetAffine1(&sprite, 0); diff --git a/src/code_8066D04.c b/src/code_8066D04.c index abe76700b..1a1d8cbb8 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -904,13 +904,13 @@ extern void sub_8068344(void); bool8 CanSubMenuItemBeChosen(s32 param_1); void sub_8068310(s32 a0, PokemonStruct1 **a1); void sub_8067F00(u8 a0, PokemonStruct1 **a1, s32 a2, s32 a3, s32 a4); -extern void DungeonShowWindows(Windows *a0, u8 a1); +extern void DungeonShowWindows(WindowTemplates *a0, u8 a1); u32 sub_8014140(s32 a0, const void *a1); void sub_8083D1C(void); void PlayDungeonConfirmationSE(void); void PlayDungeonCancelSE(void); void sub_806806C(PokemonStruct1 *a0); -void CreateDungeonMenuSubWindow(Windows *a0, s32 a1); +void CreateDungeonMenuSubWindow(WindowTemplates *a0, s32 a1); extern void sub_803EAF0(u32, u8 *); extern const s32 gUnknown_8106E80[]; @@ -925,7 +925,7 @@ static const u8 gUnknown_8106DA4[] = { 0x01, 0, 0x38, 0, 0, 0, 0x18, 0, 0x18, 0, 0, 0, 0x02, 0, 0x38, 0, 0x68, 0, 0x18, 0, 0x18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static const Windows gUnknown_8106DC8 = { +static const WindowTemplates gUnknown_8106DC8 = { .id = { [0] = { @@ -958,7 +958,7 @@ void sub_8067A80(u8 a0, s32 a1, s32 a2, PokemonStruct1 **a3) { s32 i; s32 r10; - Windows spTxtStruct = gUnknown_8106DC8; + WindowTemplates spTxtStruct = gUnknown_8106DC8; gUnknown_202F30C = 0; r10 = 0; @@ -1251,7 +1251,7 @@ void sub_806806C(PokemonStruct1 *a0) { struct unkStruct_808FF20 unkStruct; struct UnkInfoTabStruct var_C8; - Windows spTxtStruct = {0}; + WindowTemplates spTxtStruct = {0}; s32 r7; spTxtStruct.id[0].type = WINDOW_TYPE_WITH_HEADER; @@ -1295,8 +1295,8 @@ void sub_806806C(PokemonStruct1 *a0) sub_808FF20(&unkStruct, a0, gDungeon->unk644.unk16); CreatePokemonInfoTabScreen(spF8[r7], r7, &unkStruct, &var_C8, 0); - gDungeonMenu.unkC = (gUnknown_2027370[0].unk0 + 15) * 8; - gDungeonMenu.unkE = ((gUnknown_2027370[0].unk2 + 1) * 8) - 2; + gDungeonMenu.unkC = (gWindows[0].unk0 + 15) * 8; + gDungeonMenu.unkE = ((gWindows[0].unk2 + 1) * 8) - 2; while (1) { s32 r5; diff --git a/src/code_8072F3C.c b/src/code_8072F3C.c index 38c7c4101..00b9a3d1e 100644 --- a/src/code_8072F3C.c +++ b/src/code_8072F3C.c @@ -29,7 +29,7 @@ struct unkStruct_203B314 EWRAM_INIT struct unkStruct_203B314 *gUnknown_203B314 = {NULL}; -const Window gUnknown_80E06FC = { +const WindowTemplate gUnknown_80E06FC = { 0x00, 0x03, 0x00, 0x00, @@ -38,7 +38,7 @@ const Window gUnknown_80E06FC = { NULL }; -const Window gUnknown_80E0714 = { +const WindowTemplate gUnknown_80E0714 = { 0x00, 0x06, 0x02, 0x02, @@ -46,7 +46,7 @@ const Window gUnknown_80E0714 = { 0x0E, 0x00, NULL }; -const Window gUnknown_80E072C = { +const WindowTemplate gUnknown_80E072C = { 0x00, 0x06, 0x02, 0x02, diff --git a/src/credits1.c b/src/credits1.c index 4b00e775c..1d66e0026 100644 --- a/src/credits1.c +++ b/src/credits1.c @@ -8,8 +8,8 @@ static EWRAM_INIT Credits1Work *sCredits1Work = {NULL}; -extern const Window gUnknown_80E4A10; -extern const Window gUnknown_80E4A28; +extern const WindowTemplate gUnknown_80E4A10; +extern const WindowTemplate gUnknown_80E4A28; extern const u32 gUnknown_80E4A40[]; extern const CreditsData* gCreditsTable[27]; diff --git a/src/data/adventure_log.h b/src/data/adventure_log.h index 37308cd0a..e57826d59 100644 --- a/src/data/adventure_log.h +++ b/src/data/adventure_log.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E1FF0 = +static const WindowTemplate sUnknown_80E1FF0 = { 0, 3, @@ -8,7 +8,7 @@ static const Window sUnknown_80E1FF0 = NULL }; -static const Window sUnknown_80E2008 = +static const WindowTemplate sUnknown_80E2008 = { 0, 6, diff --git a/src/data/code_801602C.h b/src/data/code_801602C.h index 5c29147dc..4cdb3b6ca 100644 --- a/src/data/code_801602C.h +++ b/src/data/code_801602C.h @@ -5,7 +5,7 @@ enum MENU_ACTION_NO, }; -UNUSED static const Window sUnknown_80DB670 = +UNUSED static const WindowTemplate sUnknown_80DB670 = { 0, 3, diff --git a/src/data/code_801B60C.h b/src/data/code_801B60C.h index 0bb10ae5d..01588c736 100644 --- a/src/data/code_801B60C.h +++ b/src/data/code_801B60C.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBA58 = { +static const WindowTemplate sUnknown_80DBA58 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DBA58 = { NULL }; -static const Window sUnknown_80DBA70 = { +static const WindowTemplate sUnknown_80DBA70 = { 0, 3, 20, 4, @@ -16,7 +16,7 @@ static const Window sUnknown_80DBA70 = { NULL }; -static const Window sUnknown_80DBA88 = { +static const WindowTemplate sUnknown_80DBA88 = { 0, 3, 20, 14, diff --git a/src/data/code_801C8C4.h b/src/data/code_801C8C4.h index ff666225a..eadec3e8c 100644 --- a/src/data/code_801C8C4.h +++ b/src/data/code_801C8C4.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBE3C = { +static const WindowTemplate sUnknown_80DBE3C = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DBE3C = { NULL }; -static const Window sUnknown_80DBE54 = { +static const WindowTemplate sUnknown_80DBE54 = { 0, 6, 2, 2, diff --git a/src/data/code_801D014.h b/src/data/code_801D014.h index 376c6f6f3..a2f79ca41 100644 --- a/src/data/code_801D014.h +++ b/src/data/code_801D014.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBE7C = { +static const WindowTemplate sUnknown_80DBE7C = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DBE7C = { }; static const WindowHeader sUnknown_80DBE94 = {1, 0, 7, 0}; -static const Window sUnknown_80DBE98 = { +static const WindowTemplate sUnknown_80DBE98 = { 0, 6, 2, 2, @@ -17,7 +17,7 @@ static const Window sUnknown_80DBE98 = { &sUnknown_80DBE94 }; -static const Window sUnknown_80DBEB0[MAX_WINDOWS] = +static const WindowTemplate sUnknown_80DBEB0[MAX_WINDOWS] = { { 0, diff --git a/src/data/code_801D9E4.h b/src/data/code_801D9E4.h index 33fc54c10..05aa19e53 100644 --- a/src/data/code_801D9E4.h +++ b/src/data/code_801D9E4.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBF70 = { +static const WindowTemplate sUnknown_80DBF70 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DBF70 = { NULL }; -static const Window sUnknown_80DBF88 = { +static const WindowTemplate sUnknown_80DBF88 = { 0, 6, 2, 2, diff --git a/src/data/code_80227B8.h b/src/data/code_80227B8.h index 3427469eb..25cc207d1 100644 --- a/src/data/code_80227B8.h +++ b/src/data/code_80227B8.h @@ -5,7 +5,7 @@ static const MenuItem sUnknown_80DC584[3] = {NULL, 1}, }; -static const Window sUnknown_80DC5A4 = +static const WindowTemplate sUnknown_80DC5A4 = { 0, 3, @@ -14,7 +14,7 @@ static const Window sUnknown_80DC5A4 = 0, 0, NULL }; -static const Window sUnknown_80DC5BC = +static const WindowTemplate sUnknown_80DC5BC = { 0, 3, @@ -23,7 +23,7 @@ static const Window sUnknown_80DC5BC = 3, 0, NULL }; -static const Window sUnknown_80DC5D4 = +static const WindowTemplate sUnknown_80DC5D4 = { 0, 3, diff --git a/src/data/code_8023144.h b/src/data/code_8023144.h index 286bf91b3..19ed68ad8 100644 --- a/src/data/code_8023144.h +++ b/src/data/code_8023144.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC904 = +static const WindowTemplate sUnknown_80DC904 = { 0, 3, @@ -8,7 +8,7 @@ static const Window sUnknown_80DC904 = NULL }; -static const Window sUnknown_80DC91C = +static const WindowTemplate sUnknown_80DC91C = { 0, 6, diff --git a/src/data/code_8023868.h b/src/data/code_8023868.h index 23a3f657e..2222d6cb9 100644 --- a/src/data/code_8023868.h +++ b/src/data/code_8023868.h @@ -1,5 +1,5 @@ //static // MAKE STATIC WHEN code_8023868.s IS DONE -const Window sUnknown_80DC950 = { +const WindowTemplate sUnknown_80DC950 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ const Window sUnknown_80DC950 = { NULL }; //static // MAKE STATIC WHEN code_8023868.s IS DONE -const Window sUnknown_80DC968 = { +const WindowTemplate sUnknown_80DC968 = { 0, 6, 2, 2, diff --git a/src/data/code_8024458.h b/src/data/code_8024458.h index 69ff03565..6f3437de5 100644 --- a/src/data/code_8024458.h +++ b/src/data/code_8024458.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC9B0 = { +static const WindowTemplate sUnknown_80DC9B0 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DC9B0 = { NULL }; -static const Window sUnknown_80DC9C8 = { +static const WindowTemplate sUnknown_80DC9C8 = { 0, 6, 2, 2, diff --git a/src/data/code_802DB28.h b/src/data/code_802DB28.h index b41239deb..74a9165cf 100644 --- a/src/data/code_802DB28.h +++ b/src/data/code_802DB28.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E016C = { +static const WindowTemplate sUnknown_80E016C = { 0, 3, 0, 0, diff --git a/src/data/code_802DE84.h b/src/data/code_802DE84.h index 2b93977e1..b228a2ede 100644 --- a/src/data/code_802DE84.h +++ b/src/data/code_802DE84.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E0248 = { +static const WindowTemplate sUnknown_80E0248 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80E0248 = { }; static const WindowHeader sUnknown_80E0260 = {1, 0, 18, 0}; -static const Window sUnknown_80E0264 = { +static const WindowTemplate sUnknown_80E0264 = { 0, 6, 2, 2, diff --git a/src/data/debug_menu1.h b/src/data/debug_menu1.h index bf0f7f226..ce9c362b3 100644 --- a/src/data/debug_menu1.h +++ b/src/data/debug_menu1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E7D40 = { +static const WindowTemplate sUnknown_80E7D40 = { 0, 3, 0, 0, @@ -6,7 +6,7 @@ static const Window sUnknown_80E7D40 = { 0, 0, NULL }; -static const Window sUnknown_80E7D58 = { +static const WindowTemplate sUnknown_80E7D58 = { 0, 3, 2, 2, diff --git a/src/data/debug_menu2.h b/src/data/debug_menu2.h index 4cc4d3f3f..a9a8aff24 100644 --- a/src/data/debug_menu2.h +++ b/src/data/debug_menu2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E7E34 = +static const WindowTemplate sUnknown_80E7E34 = { 0, 3, @@ -8,7 +8,7 @@ static const Window sUnknown_80E7E34 = NULL }; -static const Window sUnknown_80E7E4C = +static const WindowTemplate sUnknown_80E7E4C = { 0, 3, @@ -18,7 +18,7 @@ static const Window sUnknown_80E7E4C = NULL }; -static const Window sUnknown_80E7E64 = +static const WindowTemplate sUnknown_80E7E64 = { 0, 3, diff --git a/src/data/debug_menu3.h b/src/data/debug_menu3.h index 4155d7d84..b61916104 100644 --- a/src/data/debug_menu3.h +++ b/src/data/debug_menu3.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E7E8C = +static const WindowTemplate sUnknown_80E7E8C = { 0, 3, @@ -8,7 +8,7 @@ static const Window sUnknown_80E7E8C = NULL }; -static const Window sUnknown_80E7EA4 = +static const WindowTemplate sUnknown_80E7EA4 = { 0, 3, diff --git a/src/data/debug_menu4.h b/src/data/debug_menu4.h index 7a9a30388..b5cf883e2 100644 --- a/src/data/debug_menu4.h +++ b/src/data/debug_menu4.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E7ED4 = +static const WindowTemplate sUnknown_80E7ED4 = { 0, 3, @@ -8,7 +8,7 @@ static const Window sUnknown_80E7ED4 = NULL }; -static const Window sUnknown_80E7EEC = +static const WindowTemplate sUnknown_80E7EEC = { 0, 3, @@ -18,7 +18,7 @@ static const Window sUnknown_80E7EEC = NULL }; -static const Window sUnknown_80E7F04 = +static const WindowTemplate sUnknown_80E7F04 = { 0, 3, diff --git a/src/data/felicity_bank.h b/src/data/felicity_bank.h index 7077a7b41..b5f6f1fdc 100644 --- a/src/data/felicity_bank.h +++ b/src/data/felicity_bank.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB6DC = { +static const WindowTemplate sUnknown_80DB6DC = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB6DC = { NULL }; -static const Window sUnknown_80DB6F4 = { +static const WindowTemplate sUnknown_80DB6F4 = { 0, 3, 2, 3, @@ -16,7 +16,7 @@ static const Window sUnknown_80DB6F4 = { NULL }; -static const Window sUnknown_80DB70C = { +static const WindowTemplate sUnknown_80DB70C = { 0, 3, 17, 8, diff --git a/src/data/friend_area_action_menu.h b/src/data/friend_area_action_menu.h index e29774519..5af41ec09 100644 --- a/src/data/friend_area_action_menu.h +++ b/src/data/friend_area_action_menu.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DD6EC = +static const WindowTemplate sUnknown_80DD6EC = { 0, 0x03, @@ -8,7 +8,7 @@ static const Window sUnknown_80DD6EC = NULL }; -static const Window sUnknown_80DD704 = +static const WindowTemplate sUnknown_80DD704 = { 0, 0x03, @@ -18,7 +18,7 @@ static const Window sUnknown_80DD704 = NULL }; -static const Window sUnknown_80DD71C = +static const WindowTemplate sUnknown_80DD71C = { 0, 0x03, @@ -28,7 +28,7 @@ static const Window sUnknown_80DD71C = NULL }; -static const Window sUnknown_80DD734 = +static const WindowTemplate sUnknown_80DD734 = { 0, 0x03, @@ -38,7 +38,7 @@ static const Window sUnknown_80DD734 = NULL }; -static const Window sUnknown_80DD74C = +static const WindowTemplate sUnknown_80DD74C = { 0, 0x03, diff --git a/src/data/friend_list_menu.h b/src/data/friend_list_menu.h index 19dfd7359..2652a9448 100644 --- a/src/data/friend_list_menu.h +++ b/src/data/friend_list_menu.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DD148 = { +static const WindowTemplate sUnknown_80DD148 = { 0, 0x03, 0x00, 0x00, @@ -7,7 +7,7 @@ static const Window sUnknown_80DD148 = { NULL }; -static const Window sUnknown_80DD160 = { +static const WindowTemplate sUnknown_80DD160 = { 0, 0x03, 0x13, 0x04, @@ -16,7 +16,7 @@ static const Window sUnknown_80DD160 = { NULL }; -static const Window sUnknown_80DD178 = { +static const WindowTemplate sUnknown_80DD178 = { 0, 0x03, 0x14, 0x04, @@ -25,7 +25,7 @@ static const Window sUnknown_80DD178 = { NULL }; -static const Window sUnknown_80DD190 = { +static const WindowTemplate sUnknown_80DD190 = { 0, 0x03, 0x02, 0x11, diff --git a/src/data/friend_rescue_menus.h b/src/data/friend_rescue_menus.h index 8c16570ac..3647c6f61 100644 --- a/src/data/friend_rescue_menus.h +++ b/src/data/friend_rescue_menus.h @@ -102,7 +102,7 @@ const MenuItem gUnknown_80E22F0[] = { {NULL, 8}, }; -const Window gUnknown_80E231C = +const WindowTemplate gUnknown_80E231C = { 0, 0x03, @@ -112,7 +112,7 @@ const Window gUnknown_80E231C = NULL }; -const Window gUnknown_80E2334 = +const WindowTemplate gUnknown_80E2334 = { 0, 0x03, @@ -142,7 +142,7 @@ const MenuItem gUnknown_80E23A8[] = { {NULL, 8}, }; -const Window gUnknown_80E23F0 = +const WindowTemplate gUnknown_80E23F0 = { 0, 0x03, @@ -159,7 +159,7 @@ const MenuItem gUnknown_80E2408[] = { {NULL, 8}, }; -UNUSED static const Window sUnused = +UNUSED static const WindowTemplate sUnused = { 0, 0x03, diff --git a/src/data/gulpin_shop.h b/src/data/gulpin_shop.h index 4c2daef02..0d52850df 100644 --- a/src/data/gulpin_shop.h +++ b/src/data/gulpin_shop.h @@ -1,4 +1,4 @@ -static const Window gUnknown_80DC11C = { +static const WindowTemplate gUnknown_80DC11C = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window gUnknown_80DC11C = { NULL }; -static const Window gUnknown_80DC134 = { +static const WindowTemplate gUnknown_80DC134 = { 0, 3, 22, 4, @@ -16,7 +16,7 @@ static const Window gUnknown_80DC134 = { NULL }; -UNUSED static const Window gUnknown_80DC14C = { +UNUSED static const WindowTemplate gUnknown_80DC14C = { 0, 3, 22, 14, diff --git a/src/data/gulpin_shop_801FB50.h b/src/data/gulpin_shop_801FB50.h index b9455ce27..340388da4 100644 --- a/src/data/gulpin_shop_801FB50.h +++ b/src/data/gulpin_shop_801FB50.h @@ -1,4 +1,4 @@ -static const Window gUnknown_80DC31C = { +static const WindowTemplate gUnknown_80DC31C = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window gUnknown_80DC31C = { NULL }; -static const Window gUnknown_80DC334 = { +static const WindowTemplate gUnknown_80DC334 = { 0, 3, 19, 4, @@ -16,7 +16,7 @@ static const Window gUnknown_80DC334 = { NULL }; -static const Window gUnknown_80DC34C = { +static const WindowTemplate gUnknown_80DC34C = { 0, 3, 22, 4, @@ -25,7 +25,7 @@ static const Window gUnknown_80DC34C = { NULL }; -UNUSED static const Window gUnknown_80DC364 = { +UNUSED static const WindowTemplate gUnknown_80DC364 = { 0, 3, 22, 14, @@ -34,7 +34,7 @@ UNUSED static const Window gUnknown_80DC364 = { NULL }; -static const Window gUnknown_80DC37C = { +static const WindowTemplate gUnknown_80DC37C = { 0, 3, 22, 3, diff --git a/src/data/hints_menu1.h b/src/data/hints_menu1.h index bab8d705a..1f45f1c8d 100644 --- a/src/data/hints_menu1.h +++ b/src/data/hints_menu1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC0A0 = { +static const WindowTemplate sUnknown_80DC0A0 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DC0A0 = { }; static const WindowHeader sUnknown_80DC0B8 = {1, 0, 8, 0}; -static const Window sUnknown_80DC0BC = { +static const WindowTemplate sUnknown_80DC0BC = { 0, 6, 2, 2, diff --git a/src/data/hints_menu2.h b/src/data/hints_menu2.h index bc545320f..05d2103c8 100644 --- a/src/data/hints_menu2.h +++ b/src/data/hints_menu2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC0E4 = { +static const WindowTemplate sUnknown_80DC0E4 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DC0E4 = { NULL }; -static const Window sUnknown_80DC0FC = { +static const WindowTemplate sUnknown_80DC0FC = { 0, 6, 2, 2, diff --git a/src/data/iq_skill_list_menu.h b/src/data/iq_skill_list_menu.h index 61a0dbe50..a440b396d 100644 --- a/src/data/iq_skill_list_menu.h +++ b/src/data/iq_skill_list_menu.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBDD8 = { +static const WindowTemplate sUnknown_80DBDD8 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DBDD8 = { NULL }; -static const Window sUnknown_80DBDF0 = { +static const WindowTemplate sUnknown_80DBDF0 = { 0, 6, 2, 2, diff --git a/src/data/iq_skill_menu.h b/src/data/iq_skill_menu.h index 75a4c0ea4..6aa346928 100644 --- a/src/data/iq_skill_menu.h +++ b/src/data/iq_skill_menu.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBD98 = { +static const WindowTemplate sUnknown_80DBD98 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DBD98 = { NULL }; -static const Window sUnknown_80DBDB0 = { +static const WindowTemplate sUnknown_80DBDB0 = { 0, 3, 20, 4, diff --git a/src/data/kangaskhan_storage1.h b/src/data/kangaskhan_storage1.h index ba09975f2..f65384233 100644 --- a/src/data/kangaskhan_storage1.h +++ b/src/data/kangaskhan_storage1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB748 = { +static const WindowTemplate sUnknown_80DB748 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB748 = { NULL }; -static const Window sUnknown_80DB760 = { +static const WindowTemplate sUnknown_80DB760 = { 0, 3, 20, 4, @@ -16,7 +16,7 @@ static const Window sUnknown_80DB760 = { NULL }; -static const Window sUnknown_80DB778 = { +static const WindowTemplate sUnknown_80DB778 = { 0, 3, 20, 9, @@ -25,7 +25,7 @@ static const Window sUnknown_80DB778 = { NULL }; -static const Window sUnknown_80DB790 = { +static const WindowTemplate sUnknown_80DB790 = { 0, 3, 20, 14, diff --git a/src/data/kangaskhan_storage2.h b/src/data/kangaskhan_storage2.h index fdbc9976f..aca2c1eb1 100644 --- a/src/data/kangaskhan_storage2.h +++ b/src/data/kangaskhan_storage2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB7B8 = { +static const WindowTemplate sUnknown_80DB7B8 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB7B8 = { NULL }; -static const Window sUnknown_80DB7D0 = { +static const WindowTemplate sUnknown_80DB7D0 = { 0, 3, 3, 3, @@ -16,7 +16,7 @@ static const Window sUnknown_80DB7D0 = { NULL }; -static const Window sUnknown_80DB7E8 = { +static const WindowTemplate sUnknown_80DB7E8 = { 0, 3, 20, 4, @@ -25,7 +25,7 @@ static const Window sUnknown_80DB7E8 = { NULL }; -static const Window sUnknown_80DB800 = { +static const WindowTemplate sUnknown_80DB800 = { 0, 3, 20, 9, @@ -34,7 +34,7 @@ static const Window sUnknown_80DB800 = { NULL }; -static const Window sUnknown_80DB818 = { +static const WindowTemplate sUnknown_80DB818 = { 0, 3, 20, 14, diff --git a/src/data/kecleon_bros1.h b/src/data/kecleon_bros1.h index e0bbf1366..a4f3fba9c 100644 --- a/src/data/kecleon_bros1.h +++ b/src/data/kecleon_bros1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB840 = { +static const WindowTemplate sUnknown_80DB840 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB840 = { NULL }; -static const Window sUnknown_80DB858 = { +static const WindowTemplate sUnknown_80DB858 = { 0, 3, 20, 4, @@ -16,7 +16,7 @@ static const Window sUnknown_80DB858 = { NULL }; -static const Window sUnknown_80DB870 = { +static const WindowTemplate sUnknown_80DB870 = { 0, 3, 20, 9, @@ -25,7 +25,7 @@ static const Window sUnknown_80DB870 = { NULL }; -static const Window sUnknown_80DB888 = { +static const WindowTemplate sUnknown_80DB888 = { 0, 3, 20, 14, diff --git a/src/data/kecleon_bros2.h b/src/data/kecleon_bros2.h index cd27baf16..5329bd0d3 100644 --- a/src/data/kecleon_bros2.h +++ b/src/data/kecleon_bros2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB8B4 = { +static const WindowTemplate sUnknown_80DB8B4 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB8B4 = { NULL }; -static const Window sUnknown_80DB8CC = { +static const WindowTemplate sUnknown_80DB8CC = { 0, 6, 2, 2, diff --git a/src/data/kecleon_bros3.h b/src/data/kecleon_bros3.h index 986a1542e..7518164cf 100644 --- a/src/data/kecleon_bros3.h +++ b/src/data/kecleon_bros3.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB8FC = { +static const WindowTemplate sUnknown_80DB8FC = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB8FC = { NULL }; -static const Window sUnknown_80DB914 = { +static const WindowTemplate sUnknown_80DB914 = { 0, 6, 2, 2, diff --git a/src/data/kecleon_bros4.h b/src/data/kecleon_bros4.h index 7b9d49c08..1b6b164cf 100644 --- a/src/data/kecleon_bros4.h +++ b/src/data/kecleon_bros4.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DB944 = { +static const WindowTemplate sUnknown_80DB944 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DB944 = { NULL }; -static const Window sUnknown_80DB95C = { +static const WindowTemplate sUnknown_80DB95C = { 0, 6, 2, 2, diff --git a/src/data/luminous_cave.h b/src/data/luminous_cave.h index 066ee4ae8..f6421bcf9 100644 --- a/src/data/luminous_cave.h +++ b/src/data/luminous_cave.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC9E8 = { +static const WindowTemplate sUnknown_80DC9E8 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DC9E8 = { NULL }; -static const Window sUnknown_80DCA00 = { +static const WindowTemplate sUnknown_80DCA00 = { 0, 3, 20, 4, diff --git a/src/data/main_menu1.h b/src/data/main_menu1.h index 8f03055ab..3d100f536 100644 --- a/src/data/main_menu1.h +++ b/src/data/main_menu1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E59A8 = { +static const WindowTemplate sUnknown_80E59A8 = { 0, 3, 0, 0, diff --git a/src/data/main_menu2.h b/src/data/main_menu2.h index c8e88f1c9..7b8024001 100644 --- a/src/data/main_menu2.h +++ b/src/data/main_menu2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E59C8 = { +static const WindowTemplate sUnknown_80E59C8 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80E59C8 = { NULL }; -static const Window sUnknown_80E59E0 = { +static const WindowTemplate sUnknown_80E59E0 = { 0, 3, 2, 2, @@ -22,7 +22,7 @@ static const MenuItem sUnknown_80E59F8[] = { {NULL, 0xFFDD}, }; -UNUSED static const Window sUnknown_80E5A29 = { +UNUSED static const WindowTemplate sUnknown_80E5A29 = { 0, 3, 2, 2, @@ -36,7 +36,7 @@ UNUSED static const MenuItem sUnknown_80E5A44[] = { {NULL, 0xFFDD}, }; -static const Window sUnknown_80E5A60 = { +static const WindowTemplate sUnknown_80E5A60 = { 0, 3, 2, 2, @@ -45,7 +45,7 @@ static const Window sUnknown_80E5A60 = { NULL }; -static const Window sUnknown_80E5A78 = { +static const WindowTemplate sUnknown_80E5A78 = { 0, 3, 2, 2, @@ -73,7 +73,7 @@ static const MenuItem sUnknown_80E5AFC[] = { {NULL, 0xFFDD}, }; -static const Window sUnknown_80E5B34 = { +static const WindowTemplate sUnknown_80E5B34 = { 0, 3, 2, 2, @@ -101,7 +101,7 @@ static const MenuItem sUnknown_80E5B8C[] = { {NULL, 0xFFDD}, }; -static const Window sUnknown_80E5BC4 = { +static const WindowTemplate sUnknown_80E5BC4 = { 0, 3, 2, 2, @@ -129,7 +129,7 @@ static const MenuItem sUnknown_80E5C18[] = { {NULL, 0xFFDD}, }; -UNUSED static const Window sUnknown_80E5C50 = { +UNUSED static const WindowTemplate sUnknown_80E5C50 = { 0, 3, 2, 2, @@ -150,7 +150,7 @@ UNUSED static const MenuItem sUnknown_80E5C9C[] = { {NULL, 0xFFDD}, }; -static const Window sUnknown_80E5CB4 = { +static const WindowTemplate sUnknown_80E5CB4 = { 0, 3, 2, 15, diff --git a/src/data/makuhita_dojo1.h b/src/data/makuhita_dojo1.h index 6f49398e4..a5a72b2a0 100644 --- a/src/data/makuhita_dojo1.h +++ b/src/data/makuhita_dojo1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E0760 = { +static const WindowTemplate sUnknown_80E0760 = { 0, 3, 0, 0, diff --git a/src/data/makuhita_dojo2.h b/src/data/makuhita_dojo2.h index bd23d5d29..c2a77bb33 100644 --- a/src/data/makuhita_dojo2.h +++ b/src/data/makuhita_dojo2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E07EC = { +static const WindowTemplate sUnknown_80E07EC = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80E07EC = { NULL }; -static const Window sUnknown_80E0804 = { +static const WindowTemplate sUnknown_80E0804 = { 0, 6, 2, 2, diff --git a/src/data/options_menu1.h b/src/data/options_menu1.h index fbe669c26..d7099dca9 100644 --- a/src/data/options_menu1.h +++ b/src/data/options_menu1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DBFB0 = { +static const WindowTemplate sUnknown_80DBFB0 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DBFB0 = { }; static const WindowHeader sUnknown_80DBFC8 = {1, 0, 7, 0}; -static const Window sUnknown_80DBFCC = { +static const WindowTemplate sUnknown_80DBFCC = { 0, 6, 2, 2, diff --git a/src/data/options_menu2.h b/src/data/options_menu2.h index 4fa347641..34b8deeed 100644 --- a/src/data/options_menu2.h +++ b/src/data/options_menu2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC020 = { +static const WindowTemplate sUnknown_80DC020 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DC020 = { }; static const WindowHeader sUnknown_80DC038 = {1, 0, 10, 0}; -static const Window sUnknown_80DC03C = { +static const WindowTemplate sUnknown_80DC03C = { 0, 6, 2, 2, diff --git a/src/data/other_menus1.h b/src/data/other_menus1.h index 28137b35f..d81733ebe 100644 --- a/src/data/other_menus1.h +++ b/src/data/other_menus1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E653C = { +static const WindowTemplate sUnknown_80E653C = { 0, 3, 0, 0, @@ -6,7 +6,7 @@ static const Window sUnknown_80E653C = { 0, 0, NULL }; -static const Window sUnknown_80E6554 = { +static const WindowTemplate sUnknown_80E6554 = { 0, 3, 3, 8, @@ -50,7 +50,7 @@ static const MenuItem sUnknown_80E667C[] = { {NULL, 3}, }; -static const Window sUnknown_80E66BC = { +static const WindowTemplate sUnknown_80E66BC = { 0, 3, 3, 8, @@ -66,7 +66,7 @@ static const MenuItem sUnknown_80E66D4[] = { {NULL, 3}, }; -static const Window sUnknown_80E6748 = { +static const WindowTemplate sUnknown_80E6748 = { 0, 3, 3, 8, @@ -82,7 +82,7 @@ static const MenuItem sUnknown_80E6760[] = { {NULL, 3}, }; -static const Window sUnknown_80E67D4 = { +static const WindowTemplate sUnknown_80E67D4 = { 0, 3, 3, 8, @@ -98,7 +98,7 @@ static const MenuItem sUnknown_80E67EC[] = { {NULL, 3}, }; -static const Window sUnknown_80E6830 = { +static const WindowTemplate sUnknown_80E6830 = { 0, 3, 3, 8, @@ -114,7 +114,7 @@ static const MenuItem sUnknown_80E6848[] = { {NULL, 3}, }; -static const Window sUnknown_80E689C = { +static const WindowTemplate sUnknown_80E689C = { 0, 3, 3, 8, @@ -130,7 +130,7 @@ static const MenuItem sUnknown_80E68B4[] = { {NULL, 3}, }; -static const Window sUnknown_80E6938 = { +static const WindowTemplate sUnknown_80E6938 = { 0, 3, 3, 8, @@ -146,7 +146,7 @@ static const MenuItem sUnknown_80E6950[] = { {NULL, 3}, }; -static const Window sUnknown_80E69B0 = { +static const WindowTemplate sUnknown_80E69B0 = { 0, 3, 3, 8, @@ -162,7 +162,7 @@ static const MenuItem sUnknown_80E69C8[] = { {NULL, 3}, }; -static const Window sUnknown_80E6A10 = { +static const WindowTemplate sUnknown_80E6A10 = { 0, 3, 3, 8, @@ -178,7 +178,7 @@ static const MenuItem sUnknown_80E6A28[] = { {NULL, 3}, }; -static const Window sUnknown_80E6A74 = { +static const WindowTemplate sUnknown_80E6A74 = { 0, 3, 3, 8, @@ -194,7 +194,7 @@ static const MenuItem sUnknown_80E6A8C[] = { {NULL, 3}, }; -UNUSED static const Window sUnknown_80E6AEC = { +UNUSED static const WindowTemplate sUnknown_80E6AEC = { 0, 3, 3, 8, @@ -210,7 +210,7 @@ UNUSED static const MenuItem sUnknown_80E6B04[] = { {NULL, 3}, }; -static const Window sUnknown_80E6B78 = { +static const WindowTemplate sUnknown_80E6B78 = { 0, 3, 3, 8, @@ -226,7 +226,7 @@ static const MenuItem sUnknown_80E6B90[] = { {NULL, 3}, }; -static const Window sUnknown_80E6BF4 = { +static const WindowTemplate sUnknown_80E6BF4 = { 0, 3, 3, 8, @@ -242,7 +242,7 @@ static const MenuItem sUnknown_80E6C0C[] = { {NULL, 3}, }; -static const Window sUnknown_80E6C50 = { +static const WindowTemplate sUnknown_80E6C50 = { 0, 3, 3, 8, @@ -258,7 +258,7 @@ static const MenuItem sUnknown_80E6C68[] = { {NULL, 3}, }; -static const Window sUnknown_80E6CD0 = { +static const WindowTemplate sUnknown_80E6CD0 = { 0, 3, 3, 8, @@ -274,7 +274,7 @@ static const MenuItem sUnknown_80E6CE8[] = { {NULL, 3}, }; -static const Window sUnknown_80E6D54 = { +static const WindowTemplate sUnknown_80E6D54 = { 0, 3, 3, 8, @@ -290,7 +290,7 @@ static const MenuItem sUnknown_80E6D6C[] = { {NULL, 3}, }; -static const Window sUnknown_80E6DDC = { +static const WindowTemplate sUnknown_80E6DDC = { 0, 3, 3, 8, diff --git a/src/data/party_list_menu.h b/src/data/party_list_menu.h index ef5bba45b..e20505631 100644 --- a/src/data/party_list_menu.h +++ b/src/data/party_list_menu.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DD310 = { +static const WindowTemplate sUnknown_80DD310 = { 0, 0x03, 0x00, 0x00, @@ -7,7 +7,7 @@ static const Window sUnknown_80DD310 = { NULL }; -static const Window sUnknown_80DD328 = { +static const WindowTemplate sUnknown_80DD328 = { 0, 0x03, 0x13, 0x03, @@ -16,7 +16,7 @@ static const Window sUnknown_80DD328 = { NULL }; -static const Window sUnknown_80DD340 = { +static const WindowTemplate sUnknown_80DD340 = { 0, 0x03, 0x14, 0x04, @@ -25,7 +25,7 @@ static const Window sUnknown_80DD340 = { NULL }; -static const Window sUnknown_80DD358 = { +static const WindowTemplate sUnknown_80DD358 = { 0, 0x03, 0x02, 0x11, @@ -34,7 +34,7 @@ static const Window sUnknown_80DD358 = { NULL }; -static const Window sUnknown_80DD370 = { +static const WindowTemplate sUnknown_80DD370 = { 0, 0x03, 0x02, 0x03, diff --git a/src/data/personality_test1.h b/src/data/personality_test1.h index 3bd46e7a4..83c818aaa 100644 --- a/src/data/personality_test1.h +++ b/src/data/personality_test1.h @@ -819,7 +819,7 @@ static const u8* const sPersonalityTypeDescriptionTable[NUM_PERSONALITIES] = { [QUIRKY] = DESC_QUIRKY }; -static const Window sUnknown_80F4244 = { +static const WindowTemplate sUnknown_80F4244 = { 0, 5, 12, 6, diff --git a/src/data/personality_test2.h b/src/data/personality_test2.h index 4bf932a2c..c6a519cc5 100644 --- a/src/data/personality_test2.h +++ b/src/data/personality_test2.h @@ -12,7 +12,7 @@ const s16 gPartners[NUM_PARTNERS] = MONSTER_MUDKIP }; -const Window gUnknown_80F4278 = +const WindowTemplate gUnknown_80F4278 = { 0, 0x03, @@ -22,7 +22,7 @@ const Window gUnknown_80F4278 = NULL }; -const Window gUnknown_80F4290 = +const WindowTemplate gUnknown_80F4290 = { 0, 0x06, @@ -32,7 +32,7 @@ const Window gUnknown_80F4290 = NULL }; -const Window gUnknown_80F42A8 = +const WindowTemplate gUnknown_80F42A8 = { 0, 0x05, diff --git a/src/data/pokemon_news1.h b/src/data/pokemon_news1.h index 263418f51..a500570d3 100644 --- a/src/data/pokemon_news1.h +++ b/src/data/pokemon_news1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFBD0 = { +static const WindowTemplate sUnknown_80DFBD0 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DFBD0 = { }; static const WindowHeader sUnknown_80DFBE8 = {1, 0, 12, 0}; -static const Window sUnknown_80DFBEC = { +static const WindowTemplate sUnknown_80DFBEC = { 0, 6, 2, 2, diff --git a/src/data/pokemon_news2.h b/src/data/pokemon_news2.h index 4421b92d1..22678591d 100644 --- a/src/data/pokemon_news2.h +++ b/src/data/pokemon_news2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFC18 = { +static const WindowTemplate sUnknown_80DFC18 = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DFC18 = { }; static const WindowHeader sUnknown_80DFC30 = {1, 0, 22, 0}; -static const Window sUnknown_80DFC34 = { +static const WindowTemplate sUnknown_80DFC34 = { 0, 6, 2, 2, diff --git a/src/data/pokemon_news3.h b/src/data/pokemon_news3.h index a3219ea5b..f8e6096f6 100644 --- a/src/data/pokemon_news3.h +++ b/src/data/pokemon_news3.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFC5C = { +static const WindowTemplate sUnknown_80DFC5C = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DFC5C = { NULL }; -static const Window sUnknown_80DFC74 = { +static const WindowTemplate sUnknown_80DFC74 = { 0, 6, 2, 2, diff --git a/src/data/post_office_guide2.h b/src/data/post_office_guide2.h index 879a6f9be..5fdf0f6c8 100644 --- a/src/data/post_office_guide2.h +++ b/src/data/post_office_guide2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80E1EFC = +static const WindowTemplate sUnknown_80E1EFC = { 0, 3, @@ -10,7 +10,7 @@ static const Window sUnknown_80E1EFC = static const WindowHeader sUnknown_80E1F14 = {1, 0, 8, 0}; -static const Window sUnknown_80E1F18 = +static const WindowTemplate sUnknown_80E1F18 = { 0, 6, diff --git a/src/data/trade_items_menu.h b/src/data/trade_items_menu.h index fc0fe5349..430c45caa 100644 --- a/src/data/trade_items_menu.h +++ b/src/data/trade_items_menu.h @@ -10,7 +10,7 @@ static const MenuItem sUnknown_80E60D4[] = { {NULL, 0}, }; -static const Window sUnknown_80E60EC = +static const WindowTemplate sUnknown_80E60EC = { 0, 3, @@ -27,7 +27,7 @@ static const MenuItem sUnknown_80E6104[] = { {NULL, 0}, }; -static const Window unused = +static const WindowTemplate unused = { 0, 3, @@ -43,7 +43,7 @@ static const MenuItem sUnknown_80E6154[] = { {NULL, 0}, }; -static const Window sUnknown_80E6174 = +static const WindowTemplate sUnknown_80E6174 = { 0, 3, diff --git a/src/data/wigglytuff_shop1.h b/src/data/wigglytuff_shop1.h index 4857a05a2..04b147a41 100644 --- a/src/data/wigglytuff_shop1.h +++ b/src/data/wigglytuff_shop1.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC464 = { +static const WindowTemplate sUnknown_80DC464 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DC464 = { NULL }; -static const Window sUnknown_80DC47C = { +static const WindowTemplate sUnknown_80DC47C = { 0, 6, 2, 2, diff --git a/src/data/wigglytuff_shop2.h b/src/data/wigglytuff_shop2.h index 755dc97f3..866ba4d70 100644 --- a/src/data/wigglytuff_shop2.h +++ b/src/data/wigglytuff_shop2.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC4BC = { +static const WindowTemplate sUnknown_80DC4BC = { 0, 3, 0, 0, @@ -8,7 +8,7 @@ static const Window sUnknown_80DC4BC = { }; static const WindowHeader sUnknown_80DC4D4 = {1, 0, 18, 0}; -static const Window sUnknown_80DC4D8 = { +static const WindowTemplate sUnknown_80DC4D8 = { 0, 6, 2, 2, diff --git a/src/data/wigglytuff_shop3.h b/src/data/wigglytuff_shop3.h index 664450bdd..c530f9abb 100644 --- a/src/data/wigglytuff_shop3.h +++ b/src/data/wigglytuff_shop3.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DC534 = { +static const WindowTemplate sUnknown_80DC534 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DC534 = { NULL }; -static const Window sUnknown_80DC54C = { +static const WindowTemplate sUnknown_80DC54C = { 0, 3, 21, 4, @@ -16,7 +16,7 @@ static const Window sUnknown_80DC54C = { NULL }; -static const Window sUnknown_80DC564 = { +static const WindowTemplate sUnknown_80DC564 = { 0, 3, 21, 14, diff --git a/src/data/wonder_mail_1.h b/src/data/wonder_mail_1.h index dc01b51b1..a1a5004f4 100644 --- a/src/data/wonder_mail_1.h +++ b/src/data/wonder_mail_1.h @@ -40,7 +40,7 @@ const MenuItem gUnknown_80DDAA0[] = { {NULL, 10}, }; -const Window gUnknown_80DDACC = +const WindowTemplate gUnknown_80DDACC = { 0, 0x03, @@ -50,7 +50,7 @@ const Window gUnknown_80DDACC = NULL }; -const Window gUnknown_80DDAE4 = +const WindowTemplate gUnknown_80DDAE4 = { 0, 0x03, diff --git a/src/data/wonder_mail_802C10C.h b/src/data/wonder_mail_802C10C.h index 29c1dd42d..8f3e6db46 100644 --- a/src/data/wonder_mail_802C10C.h +++ b/src/data/wonder_mail_802C10C.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFC9C = { +static const WindowTemplate sUnknown_80DFC9C = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DFC9C = { NULL }; -static const Window sUnknown_80DFCB4 = { +static const WindowTemplate sUnknown_80DFCB4 = { 0, 6, 2, 2, diff --git a/src/data/wonder_mail_802C4C8.h b/src/data/wonder_mail_802C4C8.h index ab724e7c8..a18bb1199 100644 --- a/src/data/wonder_mail_802C4C8.h +++ b/src/data/wonder_mail_802C4C8.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFCE4 = { +static const WindowTemplate sUnknown_80DFCE4 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DFCE4 = { NULL }; -static const Window sUnknown_80DFCFC = { +static const WindowTemplate sUnknown_80DFCFC = { 0, 6, 2, 2, diff --git a/src/data/wonder_mail_802C860.h b/src/data/wonder_mail_802C860.h index fbc98490e..41ac16dc9 100644 --- a/src/data/wonder_mail_802C860.h +++ b/src/data/wonder_mail_802C860.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFD28 = { +static const WindowTemplate sUnknown_80DFD28 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DFD28 = { NULL }; -static const Window sUnknown_80DFD40 = { +static const WindowTemplate sUnknown_80DFD40 = { 0, 4, 21, 6, @@ -16,7 +16,7 @@ static const Window sUnknown_80DFD40 = { NULL }; -static const Window sUnknown_80DFD58 = { +static const WindowTemplate sUnknown_80DFD58 = { 0, 4, 21, 15, diff --git a/src/data/wonder_mail_802CDD4.h b/src/data/wonder_mail_802CDD4.h index ee7620403..2d672cc57 100644 --- a/src/data/wonder_mail_802CDD4.h +++ b/src/data/wonder_mail_802CDD4.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFD8C = { +static const WindowTemplate sUnknown_80DFD8C = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DFD8C = { NULL }; -static const Window sUnknown_80DFDA4 = { +static const WindowTemplate sUnknown_80DFDA4 = { 0, 6, 2, 2, diff --git a/src/data/wonder_mail_802D098.h b/src/data/wonder_mail_802D098.h index b0c43817a..8da5defd3 100644 --- a/src/data/wonder_mail_802D098.h +++ b/src/data/wonder_mail_802D098.h @@ -1,4 +1,4 @@ -static const Window sUnknown_80DFDD4 = { +static const WindowTemplate sUnknown_80DFDD4 = { 0, 3, 0, 0, @@ -7,7 +7,7 @@ static const Window sUnknown_80DFDD4 = { NULL }; -UNUSED static const Window sUnknown_80DFDEC = { +UNUSED static const WindowTemplate sUnknown_80DFDEC = { 0, 3, 3, 3, @@ -16,7 +16,7 @@ UNUSED static const Window sUnknown_80DFDEC = { NULL }; -static const Window sUnknown_80DFE04 = { +static const WindowTemplate sUnknown_80DFE04 = { 0, 3, 21, 6, @@ -25,7 +25,7 @@ static const Window sUnknown_80DFE04 = { NULL }; -static const Window sUnknown_80DFE1C = { +static const WindowTemplate sUnknown_80DFE1C = { 0, 3, 21, 15, @@ -34,7 +34,7 @@ static const Window sUnknown_80DFE1C = { NULL }; -UNUSED static const Window sUnknown_80DFE34 = { +UNUSED static const WindowTemplate sUnknown_80DFE34 = { 0, 3, 21, 15, diff --git a/src/dungeon_menu_items.c b/src/dungeon_menu_items.c index 199b88ca7..8144b4bcd 100644 --- a/src/dungeon_menu_items.c +++ b/src/dungeon_menu_items.c @@ -52,7 +52,7 @@ extern u8 *GetDungeonSubMenuItemString(s32 param_1); extern bool8 CanSubMenuItemBeChosen(s32 param_1); extern s32 gDungeonSubMenuItemsCount; extern const u8 gUnknown_8106B50[]; -extern void DungeonShowWindows(Windows *a0, u8 a1); +extern void DungeonShowWindows(WindowTemplates *a0, u8 a1); extern Item * sub_8044CC8(Entity *param_1, ActionParameter *param_2, UNUSED s32 a3); extern void sub_8044F5C(u16 param_1, u8 param_2); extern void sub_8044FF0(u16 param_1); @@ -79,7 +79,7 @@ static UNUSED EWRAM_DATA u8 sUnused[4] = {0}; static EWRAM_DATA s16 sUnknown_202F248[8] = {0}; static EWRAM_DATA s32 sUnknown_202F258 = 0; -static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, Windows *a4, WindowHeader *a5); +static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 a2, bool8 a3, WindowTemplates *a4, WindowHeader *a5); static s32 sub_8060800(WindowHeader *a0, s32 a1); static bool8 sub_8060860(s32 a0); static void sub_8060890(DungeonPos *a0); @@ -120,7 +120,7 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) EntityInfo *a0Info = GetEntInfo(a0); WindowHeader header; - Windows windows = + WindowTemplates windows = { .id = { @@ -381,12 +381,12 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) static const struct unkStruct_8090F58 gUnknown_8106B60 = {1, 1, 0, 80, 1}; -static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 showWhichWindow, bool8 a3, Windows *windows, WindowHeader *a5) +static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 showWhichWindow, bool8 a3, WindowTemplates *windows, WindowHeader *a5) { s32 i, x, y; s32 r10; - UnkTextStruct1 *txtStrPtr; - Window whichWindow = { + Window *txtStrPtr; + WindowTemplate whichWindow = { .type = WINDOW_TYPE_NORMAL, .pos = {2, 4}, .width = 6, @@ -447,7 +447,7 @@ static void PrintOnDungeonItemsMenu(s32 a0, Entity *a1, bool8 showWhichWindow, b } DungeonShowWindows(windows, 1); - txtStrPtr = &gUnknown_2027370[0]; + txtStrPtr = &gWindows[0]; gDungeonMenu.unkC = (txtStrPtr->unk0 + 0x10) * 8; gDungeonMenu.unkE = ((txtStrPtr->unk2 + 1) * 8) - 2; sub_80137B0(&gDungeonMenu, 0x70); diff --git a/src/dungeon_menu_moves.c b/src/dungeon_menu_moves.c index a6a7a66b0..8f3c22f9b 100644 --- a/src/dungeon_menu_moves.c +++ b/src/dungeon_menu_moves.c @@ -40,7 +40,7 @@ extern void sub_803EAF0(u32, u8 *); extern void sub_803E708(s32 a0, s32 a1); extern void sub_8044F5C(u16 param_1, u8 param_2); extern void sub_8044FF0(u16 param_1); -extern void DungeonShowWindows(Windows *a0, u8 a1); +extern void DungeonShowWindows(WindowTemplates *a0, u8 a1); extern s32 GetTeamMemberEntityIndex(Entity *pokemon); extern u32 sub_8062D88(void); extern void ChangeDungeonCameraPos(DungeonPos *pos, s32 a1, u8 a2, u8 a3); @@ -62,11 +62,11 @@ extern s32 gUnknown_202F2D8; extern s32 sub_8044FB4(u16 param_1); extern const u8 *const gUnknown_80FE978; -extern const Window gUnknown_8106CAC; +extern const WindowTemplate gUnknown_8106CAC; extern const u8 *const gUnknown_80FDFE8; extern const u8 gUnknown_8106CC4[]; -void sub_80633E4(Entity *entity, EntityInfo *entInfo, u8 a2, Windows *windows, WindowHeader *header, u8 *arg5, s32 arg6, s32 arg7); +void sub_80633E4(Entity *entity, EntityInfo *entInfo, u8 a2, WindowTemplates *windows, WindowHeader *header, u8 *arg5, s32 arg6, s32 arg7); void sub_8063698(Entity *entity, u8 a1, u8 a2); void sub_80637BC(ActionContainer *a0, s32 a1, s32 a2); void sub_80637A4(ActionContainer *a0, s32 a1); @@ -193,7 +193,7 @@ bool8 ShowDungeonMovesMenu(Entity * entity, u8 a1, u8 a2, s32 a3, s32 a4) bool8 unkBool = TRUE; EntityInfo *leaderInfo = GetEntInfo(GetLeader()); WindowHeader header; - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, @@ -425,10 +425,10 @@ bool8 ShowDungeonMovesMenu(Entity * entity, u8 a1, u8 a2, s32 a3, s32 a4) return ret; } -void sub_80633E4(Entity *entity, EntityInfo *entInfo, u8 a2, Windows *windows, WindowHeader *header, u8 *arg5, s32 arg6, s32 arg7) +void sub_80633E4(Entity *entity, EntityInfo *entInfo, u8 a2, WindowTemplates *windows, WindowHeader *header, u8 *arg5, s32 arg6, s32 arg7) { s32 i, movesCount; - Window windowNew = gUnknown_8106CAC; + WindowTemplate windowNew = gUnknown_8106CAC; header->f0 = arg7; header->f1 = arg6; @@ -460,8 +460,8 @@ void sub_80633E4(Entity *entity, EntityInfo *entInfo, u8 a2, Windows *windows, W windows->id[2] = windowNew; DungeonShowWindows(windows, TRUE); sub_80137B0(&gDungeonMenu, 0); - gDungeonMenu.unkC = (gUnknown_2027370[0].unk0 + 16) * 8; - gDungeonMenu.unkE = ((gUnknown_2027370[0].unk2 + 1) * 8) - 2; + gDungeonMenu.unkC = (gWindows[0].unk0 + 16) * 8; + gDungeonMenu.unkE = ((gWindows[0].unk2 + 1) * 8) - 2; SetMessageArgument_2(gFormatBuffer_Monsters[0], entInfo, 0); for (i = 0; i < MAX_MON_MOVES; i++) { Move *move = &entInfo->moves.moves[i]; @@ -603,7 +603,7 @@ void sub_80637E8(ActionContainer *a0) void sub_8063834(Move *moves, s32 a1, s32 a2) { - Windows windows; + WindowTemplates windows; WindowHeader header; struct subStruct_203B240 *statuses[4]; s32 i, count, currId; @@ -632,8 +632,8 @@ void sub_8063834(Move *moves, s32 a1, s32 a2) gDungeonMenu.unk1E = currId; gDungeonMenu.unk20 = count; - gDungeonMenu.unkC = (gUnknown_2027370[0].unk0 + 23) * 8; - gDungeonMenu.unkE = ((gUnknown_2027370[0].unk2 + 1) * 8) - 2; + gDungeonMenu.unkC = (gWindows[0].unk0 + 23) * 8; + gDungeonMenu.unkE = ((gWindows[0].unk2 + 1) * 8) - 2; gDungeonMenu.unk14.x = 0; gDungeonMenu.unk4 = 0; gDungeonMenu.firstEntryY = 16; diff --git a/src/dungeon_menu_team.c b/src/dungeon_menu_team.c index 4e043346b..c4690f68f 100644 --- a/src/dungeon_menu_team.c +++ b/src/dungeon_menu_team.c @@ -110,7 +110,7 @@ extern u8 *GetDungeonSubMenuItemString(s32 param_1); extern bool8 CanSubMenuItemBeChosen(s32 param_1); extern s32 gDungeonSubMenuItemsCount; extern const u8 gUnknown_8106B50[]; -extern void DungeonShowWindows(Windows *a0, u8 a1); +extern void DungeonShowWindows(WindowTemplates *a0, u8 a1); extern Item * sub_8044CC8(Entity *param_1, ActionParameter *param_2, UNUSED s32 a3); extern void sub_8044F5C(u16 param_1, u8 param_2); extern void sub_8044FF0(u16 param_1); @@ -158,7 +158,7 @@ struct UnkFieldTeamMenuStruct u8 unk14[MAX_TEAM_MEMBERS]; }; -static void PrintOnDungeonTeamMenu(struct UnkFieldTeamMenuStruct *a0, Windows *windows, bool8 a2); +static void PrintOnDungeonTeamMenu(struct UnkFieldTeamMenuStruct *a0, WindowTemplates *windows, bool8 a2); static void sub_806145C(struct UnkFieldTeamMenuStruct *a0); static void ChosenSubMenuToAction(ActionContainer *a0, struct UnkFieldTeamMenuStruct *a1); static void PrintMonTactics(s32 firstId, u8 *tacticIds, EntityInfo *mon, s32 windowId); @@ -179,7 +179,7 @@ bool8 ShowDungeonTeamMenu(Entity *a0) s32 i; bool32 r10, ret; struct UnkFieldTeamMenuStruct sp; - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, @@ -323,7 +323,7 @@ bool8 ShowDungeonTeamMenu(Entity *a0) return ret; } -static void PrintOnDungeonTeamMenu(struct UnkFieldTeamMenuStruct *a0, Windows *windows, bool8 a2) +static void PrintOnDungeonTeamMenu(struct UnkFieldTeamMenuStruct *a0, WindowTemplates *windows, bool8 a2) { s32 r0; DungeonPos pos; @@ -511,7 +511,7 @@ static void ChosenSubMenuToAction(ActionContainer *a0, struct UnkFieldTeamMenuSt void ShowDungeonTacticsMenu(ActionContainer *a0) { - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, @@ -746,7 +746,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) s32 subWindowIds[6]; struct unkStruct_808FF20 unkMonStruct; struct UnkInfoTabStruct unkInfoTabStruct; - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, @@ -810,7 +810,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) bool8 hasIqSkills = FALSE; bool8 hasStatusProblems = FALSE; bool8 addCursorSprite = TRUE; - UnkTextStruct1 *unkTxtStr1Ptr = &gUnknown_2027370[0]; + Window *unkTxtStr1Ptr = &gWindows[0]; sTeamWindowHeader.f0 = totalSubWindows; sTeamWindowHeader.f1 = currSubWindowId; @@ -1197,7 +1197,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) static void ShowUpArrowSprite(void) { if ((gDungeonFramesCounter & 8) != 0) { - UnkTextStruct1 *txtStrPtr = &gUnknown_2027370[0]; + Window *txtStrPtr = &gWindows[0]; SpriteOAM sprite = {0}; SpriteSetAffine1(&sprite, 0); @@ -1222,7 +1222,7 @@ static void ShowUpArrowSprite(void) static void ShowDownArrowSprite(void) { if ((gDungeonFramesCounter & 8) != 0) { - UnkTextStruct1 *ptr = &gUnknown_2027370[0]; + Window *ptr = &gWindows[0]; SpriteOAM sprite = {0}; SpriteSetAffine1(&sprite, 0); @@ -1245,7 +1245,7 @@ static void ShowDownArrowSprite(void) void ShowStatusDescriptionMenuArrow(void) { if ((gDungeonFramesCounter & 8) != 0) { - UnkTextStruct1 *ptr = &gUnknown_2027370[0]; + Window *ptr = &gWindows[0]; SpriteSetAffine1(&gUnknown_202F268, 0); SpriteSetAffine2(&gUnknown_202F268, 0); @@ -1293,7 +1293,7 @@ void ShowStatusesDescriptionMenu(s32 count, struct subStruct_203B240 **strings) static void ShowIqDescriptionWindow(u8 iqSkillId) { MenuInputStructSub menuSub; - Windows windows; + WindowTemplates windows; WindowHeader header; struct subStruct_203B240 *result[4]; @@ -1346,7 +1346,7 @@ static void ShowIqDescriptionWindow(u8 iqSkillId) static void ShowTacticDescriptionWindow(u8 tacticId) { MenuInputStructSub menuSub; - Windows windows; + WindowTemplates windows; WindowHeader header; struct subStruct_203B240 *result[4]; @@ -1401,7 +1401,7 @@ static void ShowStatusInfoWindow(s32 statusId) const u8 *str; MenuInputStructSub menuSub; WindowHeader header; - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, @@ -1448,7 +1448,7 @@ static void ShowStatusInfoWindow(s32 statusId) } static const WindowHeader sBottomWindowHeader = {1, 0, 15, 0}; -static const Window sMovesSubMenu = { +static const WindowTemplate sMovesSubMenu = { .type = WINDOW_TYPE_WITH_HEADER, .pos = {2, 10}, .width = 18, @@ -1457,7 +1457,7 @@ static const Window sMovesSubMenu = { .unk12 = 0, .unk14 = &sBottomWindowHeader, }; -static const Window sItemSubMenu = { +static const WindowTemplate sItemSubMenu = { .type = WINDOW_TYPE_WITH_HEADER, .pos = {2, 10}, .width = 18, @@ -1470,7 +1470,7 @@ static const Window sItemSubMenu = { Entity *ShowDungeonToWhichMonMenu(s32 *teamId, s32 caseId) { struct UnkFieldTeamMenuStruct unkStruct; - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_NORMAL, // Since the window has a header, it should probably be WINDOW_TYPE_WTIH_HEADER. diff --git a/src/dungeon_message.c b/src/dungeon_message.c index 208fa09b0..15c821c3b 100644 --- a/src/dungeon_message.c +++ b/src/dungeon_message.c @@ -1046,7 +1046,7 @@ static bool8 TryScrollLogDown(s32 a0) static void CreateMessageLogArrow(bool8 upArrow, s32 y) { - struct UnkTextStruct1 *unkStr = &gUnknown_2027370[0]; + struct Window *unkStr = &gWindows[0]; if (!(gDungeonFramesCounter & 8)) { SpriteSetAffine1(&sMessageLogArrowSpriteOAM, 0); SpriteSetAffine2(&sMessageLogArrowSpriteOAM, 0); diff --git a/src/dungeon_submenu.c b/src/dungeon_submenu.c index 92a90afd6..d77e36680 100644 --- a/src/dungeon_submenu.c +++ b/src/dungeon_submenu.c @@ -12,12 +12,12 @@ extern s32 gDungeonSubMenuItemsCount; extern u8 *GetDungeonSubMenuItemString(s32 param_1); extern bool8 CanSubMenuItemBeChosen(s32 param_1); -extern void DungeonShowWindows(Windows *a0, u8 a1); +extern void DungeonShowWindows(WindowTemplates *a0, u8 a1); -void CreateDungeonMenuSubWindow(Window *mainWindow, s32 subWindowX) +void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX) { s32 i; - Windows windows = { + WindowTemplates windows = { .id = { [0] = WINDOW_DUMMY, [1] = { diff --git a/src/friend_areas_map_util.c b/src/friend_areas_map_util.c index f2d2cb1df..fd167d0a8 100644 --- a/src/friend_areas_map_util.c +++ b/src/friend_areas_map_util.c @@ -258,7 +258,7 @@ void FriendAreasMap_PrintCurrAreaName(void) u8 txt[200]; s32 id = gFriendAreasMapPtr->currLocationId; const struct FriendAreaLocationInfo *locationInfo = &gFriendAreasMapPtr->locationsInfo[id]; - Windows windows = {0}; + WindowTemplates windows = {0}; windows.id[0].type = WINDOW_TYPE_NORMAL; windows.id[0].pos.x = 7; @@ -295,7 +295,7 @@ void FriendAreasMap_PrintAvailableSubAreas(void) const struct FriendAreaLocationInfo *locationInfo = &gFriendAreasMapPtr->locationsInfo[id]; MenuInputStruct *menuInput = &gFriendAreasMapPtr->menu; WindowHeader header; - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_WITH_HEADER, diff --git a/src/friend_rescue.c b/src/friend_rescue.c index da673ddcb..0f02fb76a 100644 --- a/src/friend_rescue.c +++ b/src/friend_rescue.c @@ -32,7 +32,7 @@ extern void SetFriendRescueMenuState(u32); extern TeamInventory *gTeamInventoryRef; -// NOTE: MenuItems and Window defined in here.. +// NOTE: MenuItems and WindowTemplate defined in here.. #include "data/friend_rescue_menus.h" const u8 gUnknown_80E25F4[] = "What would you like to do?"; diff --git a/src/load_screen.c b/src/load_screen.c index d15c565e5..acc17b55f 100644 --- a/src/load_screen.c +++ b/src/load_screen.c @@ -29,7 +29,7 @@ struct LoadScreen // size: 0x27c u32 currMenu; MenuStruct unk4[4]; - Windows unk144; + WindowTemplates unk144; /* 0x1A4 */ u8 formattedTeamName[0x24]; /* 0x1C8 */ u8 formattedPlayerName[0x24]; /* 0x1EC */ u8 formattedLocation[0x24]; @@ -48,7 +48,7 @@ void sub_80397B4(void); extern void sub_80920D8(u8 *); -const Window gUnknown_80E75F8 = { +const WindowTemplate gUnknown_80E75F8 = { 0, 0x03, 0x00, 0x00, @@ -57,7 +57,7 @@ const Window gUnknown_80E75F8 = { NULL }; -const Window gUnknown_80E7610 = { +const WindowTemplate gUnknown_80E7610 = { 0, 0x03, 0x02, 0x02, @@ -80,7 +80,7 @@ EWRAM_INIT MenuItem gUnknown_203B378[2] = { EWRAM_INIT u32 gUnknown_203B388[12] = {0xC, 0xC, 0xE, 0xE, 0xD, 0xE, 0xC, 0xD, 0xD, 0xB, 0xB, 0xB}; EWRAM_INIT u32 gUnknown_203B3B8[12] = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x1A, 0x18, 0x1B, 0x16, 0x19, 0x17}; -const Window gUnknown_80E762C = { +const WindowTemplate gUnknown_80E762C = { 0, 0x03, 0x02, 0x0F, @@ -124,7 +124,7 @@ const MenuItem gDeleteSaveConfirmMenuItems[3] = {NULL, 3}, }; -const Window gUnknown_80E7784 = +const WindowTemplate gUnknown_80E7784 = { 0, 0x03, diff --git a/src/mailbox.c b/src/mailbox.c index ead63f107..b9126a1e0 100644 --- a/src/mailbox.c +++ b/src/mailbox.c @@ -20,7 +20,7 @@ EWRAM_INIT struct unkStruct_203B304 *gUnknown_203B304 = {NULL}; -const Window gUnknown_80E0284 = +const WindowTemplate gUnknown_80E0284 = { 0, 0x03, @@ -30,7 +30,7 @@ const Window gUnknown_80E0284 = NULL }; -const Window gUnknown_80E029C = +const WindowTemplate gUnknown_80E029C = { 0, 0x03, @@ -40,7 +40,7 @@ const Window gUnknown_80E029C = NULL }; -const Window gUnknown_80E02B4 = +const WindowTemplate gUnknown_80E02B4 = { 0, 0x04, @@ -50,7 +50,7 @@ const Window gUnknown_80E02B4 = NULL }; -const Window gUnknown_80E02CC = +const WindowTemplate gUnknown_80E02CC = { 0, 0x04, diff --git a/src/main_menu1.c b/src/main_menu1.c index adf9cc8ae..b1627fbb9 100644 --- a/src/main_menu1.c +++ b/src/main_menu1.c @@ -291,9 +291,9 @@ void sub_8035C1C(void) sMainMenu->sub.unk2D = 0; } -void SetMenuItems(MenuStruct *a0, Windows *a1, s32 index, const Window *a3, const MenuItem *menuItems, bool8 a5, u32 menuAction, bool8 unused) +void SetMenuItems(MenuStruct *a0, WindowTemplates *a1, s32 index, const WindowTemplate *a3, const MenuItem *menuItems, bool8 a5, u32 menuAction, bool8 unused) { - Window *winPtrs = a1->id; + WindowTemplate *winPtrs = a1->id; winPtrs[index] = *a3; ResetUnusedInputStruct(); ShowWindows(a1, TRUE, TRUE); @@ -306,9 +306,9 @@ void SetMenuItems(MenuStruct *a0, Windows *a1, s32 index, const Window *a3, cons a0[index].unk4C = TRUE; } -void sub_8035CC0(Windows *dataArray, u32 index) +void sub_8035CC0(WindowTemplates *dataArray, u32 index) { - Window *winPtrs; + WindowTemplate *winPtrs; RestoreUnkTextStruct_8006518(dataArray); winPtrs = dataArray->id; diff --git a/src/menu_input.c b/src/menu_input.c index a0b0ea261..4eedb7408 100644 --- a/src/menu_input.c +++ b/src/menu_input.c @@ -18,7 +18,7 @@ const u32 gDefaultMenuTextColors[3] = { COLOR_WHITE_2, COLOR_RED, COLOR_RED }; const WindowHeader UnkData_80D47C4 = {0x01, 0x00, 0x10, 0x00}; -const Window gUnknown_80D47C8[MAX_WINDOWS] = { +const WindowTemplate gUnknown_80D47C8[MAX_WINDOWS] = { 0, 0x06, 0x02, 0x02, @@ -223,7 +223,7 @@ void sub_8012C60(u32 x, u32 y, u32 a2, u32 color, u32 a4) xxx_call_draw_char(x + add_x, y, uVar2, color, a4); } -void sub_8012CAC(Window *a0, const MenuItem *a1) +void sub_8012CAC(WindowTemplate *a0, const MenuItem *a1) { s32 length; s32 maxLength; @@ -244,7 +244,7 @@ void sub_8012CAC(Window *a0, const MenuItem *a1) sub_8012D08(a0, count); } -void sub_8012D08(Window *param_1, s32 param_2) +void sub_8012D08(WindowTemplate *param_1, s32 param_2) { s32 sVar2; s16 sVar3; @@ -258,7 +258,7 @@ void sub_8012D08(Window *param_1, s32 param_2) param_1->unk10 = sVar3; } -void sub_8012D34(struct Window *param_1, s32 param_2) +void sub_8012D34(struct WindowTemplate *param_1, s32 param_2) { s32 sVar2; s16 sVar3; @@ -386,15 +386,15 @@ void sub_8012EBC(MenuStruct *param_1) const u32 *colorArray; s32 counter; s32 index; - Windows textStack; + WindowTemplates textStack; u8 buffer[256]; - UnkTextStruct1 *ptr_text; - Window *ptr_text2; + Window *ptr_text; + WindowTemplate *ptr_text2; if (param_1->unk4D) { sub_80073B8(param_1->index); index = param_1->index; - ptr_text = &gUnknown_2027370[index]; + ptr_text = &gWindows[index]; if (ptr_text->unkC == 6) { ptr_text2 = &textStack.id[index]; @@ -540,9 +540,9 @@ bool8 sub_8013114(MenuStruct *param_1, s32 *menuAction) static void sub_8013134(MenuInputStruct *param_1, u32 menuItemCounter, u32 index) { - UnkTextStruct1 *temp; + Window *temp; - temp = &gUnknown_2027370[index]; + temp = &gWindows[index]; param_1->unk0 = index; param_1->menuIndex = 0; @@ -700,10 +700,10 @@ void sub_8013660(MenuInputStruct *param_1) void UpdateMenuCursorSpriteCoords(MenuInputStruct *param_1) { s32 index; - UnkTextStruct1 *temp; + Window *temp; index = param_1->unk0; - temp = &gUnknown_2027370[index]; + temp = &gWindows[index]; param_1->unk8.x = temp->unk0 * 8 + param_1->unk4; param_1->unk8.y = temp->unk2 * 8 + GetMenuEntryYCoord(param_1, param_1->menuIndex); } @@ -798,12 +798,12 @@ void sub_80137B0(MenuInputStruct *param_1, s32 param_2) iVar2 = param_2 << 8; } else { - if (gUnknown_2027370[param_1->unk0].unkC == 6) + if (gWindows[param_1->unk0].unkC == 6) iVar1 = 16; else iVar1 = 0; - iVar2 = (gUnknown_2027370[param_1->unk0].unk6 * 8 - iVar1) << 8; + iVar2 = (gWindows[param_1->unk0].unk6 * 8 - iVar1) << 8; } param_1->unk10 = iVar2 / param_1->unk1C; @@ -931,10 +931,10 @@ void sub_8013984(MenuInputStruct *param_1) { s32 iVar2; s32 iVar4; - UnkTextStruct1 *ptr; + Window *ptr; iVar4 = param_1->unk0; - ptr = &gUnknown_2027370[iVar4]; + ptr = &gWindows[iVar4]; if (param_1->unk1C == 0) param_1->unk1C++; @@ -1085,9 +1085,9 @@ void sub_8013D10(unkStructFor8013AA0 *a0) { s32 x, y; u8 uVar4; - UnkTextStruct1 *ptr; + Window *ptr; - ptr = &gUnknown_2027370[a0->unk14]; + ptr = &gWindows[a0->unk14]; uVar4 = a0->unk24; switch (sub_8012AE8()) { @@ -1152,7 +1152,7 @@ static bool8 sub_8013DD0(unkStructFor8013AA0 *a0) void sub_8013E54(void) { - UnkTextStruct1 *ptr = &gUnknown_2027370[0]; + Window *ptr = &gWindows[0]; SpriteOAM SStack_18 = {0}; SpriteSetAffine1(&SStack_18, 0); @@ -1174,7 +1174,7 @@ void sub_8013E54(void) void sub_8013F84(void) { - UnkTextStruct1 *ptr = &gUnknown_2027370[0]; + Window *ptr = &gWindows[0]; SpriteOAM SStack_18 = {0}; SpriteSetAffine1(&SStack_18, 0); @@ -1194,7 +1194,7 @@ void sub_8013F84(void) AddSprite(&SStack_18,0x100,0,0x0); } -void sub_80140B4(Windows *a0) +void sub_80140B4(WindowTemplates *a0) { s32 i; diff --git a/src/mission_reward.c b/src/mission_reward.c index b35434301..5973a4e68 100644 --- a/src/mission_reward.c +++ b/src/mission_reward.c @@ -22,7 +22,7 @@ struct unkStruct_203B310 /* 0xC */ s32 itemRewardIndex; unkStruct_802F204 *unk10; /* 0x14 */ struct MonPortraitMsg monPortrait; - Windows unk24; + WindowTemplates unk24; }; EWRAM_INIT struct unkStruct_203B310 *gUnknown_203B310 = {NULL}; @@ -41,7 +41,7 @@ enum FriendRewardStates REWARD_EXIT, }; -const Window gUnknown_80E041C = { +const WindowTemplate gUnknown_80E041C = { 0, 0x03, 0x00, 0x00, diff --git a/src/other_menus1.c b/src/other_menus1.c index 9c3b97911..60001409f 100644 --- a/src/other_menus1.c +++ b/src/other_menus1.c @@ -119,7 +119,7 @@ static void sub_80371B8(void) { unkStruct_8035D94 *item; const MenuItem *MenuItems; - const Window *puVar5; + const WindowTemplate *puVar5; puVar5 = NULL; MenuItems = NULL; diff --git a/src/pelipper_board.c b/src/pelipper_board.c index 05fc3f7aa..13a521c0b 100644 --- a/src/pelipper_board.c +++ b/src/pelipper_board.c @@ -20,7 +20,7 @@ EWRAM_INIT struct unkStruct_203B308 *gPelipperBoard = {NULL}; -const Window gUnknown_80E0330 = +const WindowTemplate gUnknown_80E0330 = { 0, 0x03, @@ -30,7 +30,7 @@ const Window gUnknown_80E0330 = NULL }; -const Window gUnknown_80E0348 = +const WindowTemplate gUnknown_80E0348 = { 0, 0x03, @@ -40,7 +40,7 @@ const Window gUnknown_80E0348 = NULL }; -const Window gUnknown_80E0360 = +const WindowTemplate gUnknown_80E0360 = { 0, 0x04, @@ -50,7 +50,7 @@ const Window gUnknown_80E0360 = NULL }; -const Window gUnknown_80E0378 = +const WindowTemplate gUnknown_80E0378 = { 0, 0x04, diff --git a/src/personality_test1.c b/src/personality_test1.c index 8eed940c8..20a2253b9 100644 --- a/src/personality_test1.c +++ b/src/personality_test1.c @@ -386,7 +386,7 @@ static void PersonalityTest_DisplayStarterSprite(void) s32 paletteIndex; s32 emotionId; const u8 *gfx; - Windows stackArray; + WindowTemplates stackArray; starterID = sPersonalityTestTracker->unk4.StarterID; RestoreUnkTextStruct_8006518(&stackArray); diff --git a/src/rescue_password_menu.c b/src/rescue_password_menu.c index 77d0d9ebd..7c38bfb8a 100644 --- a/src/rescue_password_menu.c +++ b/src/rescue_password_menu.c @@ -26,7 +26,7 @@ EWRAM_INIT u8 gUnknown_203B368 = {1}; EWRAM_INIT u32 gUnknown_203B36C = {65502}; EWRAM_INIT struct RescuePasswordMenu *gRescuePasswordMenu = {NULL}; -const Window gUnknown_80E71E4 = { +const WindowTemplate gUnknown_80E71E4 = { 0, 0x03, 0x00, 0x00, @@ -35,7 +35,7 @@ const Window gUnknown_80E71E4 = { NULL }; -const Window gUnknown_80E71FC = { +const WindowTemplate gUnknown_80E71FC = { 0, 0x03, 0x03, 0x09, @@ -59,7 +59,7 @@ ALIGNED(4) const u8 CheckAgain_80E7234[] = _("{CENTER_ALIGN}Please check it agai ALIGNED(4) const u8 IncorrectPassword_80E7250[] = _("{CENTER_ALIGN}Incorrect password!"); ALIGNED(4) const u8 Error_80E7268[] = _("{CENTER_ALIGN}{COLOR RED}Error!{RESET} "); -const Window gUnknown_80E7278 = { +const WindowTemplate gUnknown_80E7278 = { 0, 0x03, 0x03, 0x09, @@ -83,7 +83,7 @@ ALIGNED(4) const u8 DATA_80E72B0[] = " "; ALIGNED(4) const u8 PasswordAccept_80E72B4[] = _("{CENTER_ALIGN}The password has been accepted."); ALIGNED(4) const u8 Success_80E72D8[] = _("{CENTER_ALIGN}{COLOR CYAN_G}Success!{RESET} "); -const Window gUnknown_80E72EC = { +const WindowTemplate gUnknown_80E72EC = { 0, 0x03, 0x03, 0x09, @@ -103,7 +103,7 @@ const MenuItem gUnknown_80E7304[4] = { ALIGNED(4) const u8 NotSOSMail_80E7324[] = _("{CENTER_ALIGN}This is not an {COLOR CYAN_G}SOS Mail{RESET}."); -const Window gUnknown_80E7344 = { +const WindowTemplate gUnknown_80E7344 = { 0, 0x03, 0x03, 0x09, @@ -123,7 +123,7 @@ const MenuItem gUnknown_80E735C[4] = { ALIGNED(4) const u8 ReceiveSOSMail_80E737C[] = _("{CENTER_ALIGN}This {COLOR CYAN_G}SOS Mail{RESET} has been received already."); -const Window gUnknown_80E73AC = { +const WindowTemplate gUnknown_80E73AC = { 0, 0x03, 0x03, 0x09, @@ -143,7 +143,7 @@ const MenuItem gUnknown_80E73C4[4] = { ALIGNED(4) const u8 sUnknown_80E73E4[] = _("{CENTER_ALIGN}This is not an {COLOR CYAN_G}A-OK Mail{RESET}."); -const Window gUnknown_80E7408 = { +const WindowTemplate gUnknown_80E7408 = { 0, 0x03, 0x03, 0x09, @@ -163,7 +163,7 @@ const MenuItem gUnknown_80E7420[4] = { ALIGNED(4) const u8 sUnknown_80E7440[] = _("{CENTER_ALIGN}This {COLOR CYAN_G}A-OK Mail{RESET} cannot be used."); -const Window gUnknown_80E7468 = { +const WindowTemplate gUnknown_80E7468 = { 0, 0x03, 0x03, 0x09, @@ -182,7 +182,7 @@ const MenuItem gUnknown_80E7480[4] = { }; ALIGNED(4) const u8 sUnknown_80E74A0[] = _("{CENTER_ALIGN}This is not a {COLOR CYAN_G}Thank-You Mail{RESET}."); -const Window gUnknown_80E74C8 = { +const WindowTemplate gUnknown_80E74C8 = { 0, 0x03, 0x03, 0x09, @@ -202,7 +202,7 @@ const MenuItem gUnknown_80E74E0[4] = { ALIGNED(4) const u8 sUnknown_80E7500[] = _("{CENTER_ALIGN}This {COLOR CYAN_G}Thank-You Mail{RESET} cannot be used."); -const Window gUnknown_80E752C = { +const WindowTemplate gUnknown_80E752C = { 0, 0x03, 0x03, 0x09, @@ -221,7 +221,7 @@ const MenuItem gUnknown_80E7544[4] = { }; ALIGNED(4) const u8 sUnknown_80E7564[] = _("{CENTER_ALIGN}This is not a {COLOR CYAN_G}Wonder Mail{RESET}."); -const Window gUnknown_80E7588 = { +const WindowTemplate gUnknown_80E7588 = { 0, 0x03, 0x03, 0x09, diff --git a/src/save_menu.c b/src/save_menu.c index 3ff3fb918..74e5a7c2f 100644 --- a/src/save_menu.c +++ b/src/save_menu.c @@ -12,7 +12,7 @@ static EWRAM_INIT SaveMenuWork *sUnknown_203B364 = {NULL}; -const Window gUnknown_80E6F20 = +const WindowTemplate gUnknown_80E6F20 = { 0, 0x03, @@ -22,7 +22,7 @@ const Window gUnknown_80E6F20 = NULL }; -const Window gUnknown_80E6F38 = +const WindowTemplate gUnknown_80E6F38 = { 0, 0x03, diff --git a/src/string_format.c b/src/string_format.c index 21130c246..f2daf62bd 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -60,7 +60,7 @@ u32 sub_8014140(void) // This kinda looks like the 'true' beginning of the file static const u32 gUnknown_80D48A0[] = {0x7, 0x2, 0x2}; -static const struct Window gUnknown_80D48AC = { +static const struct WindowTemplate gUnknown_80D48AC = { 0x00, 0x03, 0x00, 0x00, @@ -68,7 +68,7 @@ static const struct Window gUnknown_80D48AC = { 0x00, 0x00, 0x00 }; -static const Window gUnknown_80D48C4 = { +static const WindowTemplate gUnknown_80D48C4 = { 0x00, 0x00, 0x02, 0x0F, @@ -77,7 +77,7 @@ static const Window gUnknown_80D48C4 = { NULL }; -static const Window gUnknown_80D48DC = { +static const WindowTemplate gUnknown_80D48DC = { 0x00, 0x02, 0x02, 0x08, @@ -148,7 +148,7 @@ static EWRAM_DATA s32 gUnknown_202EC1C = 0; // Only read, but never written to. Possibly used in Blue? struct NeverWrittenToStruct202EC20 { - struct Window unk0; + struct WindowTemplate unk0; const u8 *unk18; }; static EWRAM_DATA struct NeverWrittenToStruct202EC20 *sNeverWrittenToUnknownStructPtr = NULL; @@ -156,7 +156,7 @@ static UNUSED EWRAM_DATA u8 sUnusedEwram1[4] = {0}; static EWRAM_DATA MenuInputStructSub gUnknown_202EC28 = {0}; -static EWRAM_INIT Windows sUnknown_203B198 = { +static EWRAM_INIT WindowTemplates sUnknown_203B198 = { .id = { [0] = { .pos = {2, 15}, @@ -260,7 +260,7 @@ void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const Me gUnknown_202E748.unk0 = 4; gUnknown_202E748.unk2 = 4; gUnknown_202E748.unk8 = 0x70; - gUnknown_202E748.unkA = (gUnknown_2027370[0].unk2 * 8) + 34; + gUnknown_202E748.unkA = (gWindows[0].unk2 * 8) + 34; gUnknown_202E748.unk10 = 7; gUnknown_202E748.unk1C = 0; gUnknown_202E748.unk20 = 0; @@ -541,7 +541,7 @@ void DrawDialogueBoxString(void) } gUnknown_202E748.unk8 = 0x70; - gUnknown_202E748.unkA = (gUnknown_2027370[0].unk2 * 8) + 34; + gUnknown_202E748.unkA = (gWindows[0].unk2 * 8) + 34; } keepLooping = FALSE; } diff --git a/src/text.c b/src/text.c index 3a1960192..9ee4c9fee 100644 --- a/src/text.c +++ b/src/text.c @@ -23,7 +23,7 @@ extern const char gUnknown_80B88C0[]; // "fontsppa" // system_sbin.s extern const struct FileArchive gSystemFileArchive; -EWRAM_DATA UnkTextStruct1 gUnknown_2027370[4] = {0}; +EWRAM_DATA Window gWindows[MAX_WINDOWS] = {0}; EWRAM_DATA static struct CharMapStruct *sCharmaps[2] = {NULL}; EWRAM_DATA static s16 sCharacterSpacing = 0; EWRAM_DATA u8 gUnknown_202749A[11] = {0}; @@ -33,7 +33,7 @@ EWRAM_DATA static s32 sCurrentCharmap = 0; EWRAM_DATA static vu32 sUnknown_20274B0 = 0; EWRAM_DATA static u32 sUnknown_20274B4[0xEC0] = {0}; EWRAM_DATA static OpenedFile *sCharmapFiles[3] = {NULL}; -EWRAM_DATA static Windows sUnknown_202AFC0 = {0}; +EWRAM_DATA static WindowTemplates sSavedWindows = {0}; EWRAM_DATA static s32 sUnknown_202B020 = 0; EWRAM_DATA static s32 sUnknown_202B024 = 0; EWRAM_DATA static s32 sCharHeight[2] = {0}; @@ -41,13 +41,13 @@ EWRAM_DATA static u32 sTextShadowMask = 0; // Some text color info is stored; re EWRAM_DATA static u8 sDrawTextShadow = 0; EWRAM_DATA ALIGNED(4) u16 gUnknown_202B038[4][32][32] = {0}; -IWRAM_DATA static s16 gUnknown_3000E94[161] = {0}; +IWRAM_DATA ALIGNED(4) static s16 gUnknown_3000E94[161] = {0}; // These text-related functions were deemed important as they're copied and run from IWRAM for improved performance. -static void ScrollDownWindowInternal(UnkTextStruct1 *txtStructs, s32 id); -static void ScrollUpWindowInternal(UnkTextStruct1 *txtStructs, s32 id); -static void sub_82729B8(UnkTextStruct1 *txtStructs, s32 id); -static void sub_8272A8C(UnkTextStruct1 *txtStructs, s32 id); +static void ScrollDownWindowInternal(Window *txtStructs, s32 id); +static void ScrollUpWindowInternal(Window *txtStructs, s32 id); +static void sub_82729B8(Window *txtStructs, s32 id); +static void sub_8272A8C(Window *txtStructs, s32 id); void ScrollDownWindow(s32 windowId); void ScrollUpWindow(s32 windowId); void sub_82729A4(s32 id); @@ -61,32 +61,32 @@ EWRAM_INIT void (*gIwramTextFunc4)(s32 a0) = sub_8272A78; // This variable is only used in InitGraphics function, which may or may not belong to text.c EWRAM_INIT u8 gUnknown_203B090 = 0; -static void SaveUnkTextStructAndXXX_8006438(const Windows *a0, bool8 a1, bool8 a2, DungeonPos *a3); -static void sub_8006554(UnkTextStruct1 *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, const Window *a5, bool8 a6, u32 a7, DungeonPos *a8, u8 a9); -static void sub_800677C(UnkTextStruct1 *a0, s32 a1, u16 *a2, u8 a3); -static void sub_80069CC(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4); -static void sub_8006AC4(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4); -static void sub_8006B70(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4); -static void sub_8006C44(UnkTextStruct1 *a0, s32 a1, u16 *a2, u8 a3); -static void sub_8006E94(UnkTextStruct1 *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 *a4); -static u32 xxx_draw_char(struct UnkTextStruct1 *a0, s32 x, s32 y, u32 a3, u32 color, u32 a5); +static void ShowWindowsInternal(const WindowTemplates *a0, bool8 a1, bool8 a2, DungeonPos *a3); +static void AddWindow(Window *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, const WindowTemplate *a5, bool8 a6, u32 a7, DungeonPos *a8, u8 a9); +static void sub_800677C(Window *a0, s32 a1, u16 *a2, u8 a3); +static void sub_80069CC(Window *a0, s32 a1, s32 a2, s32 a3, u16 *a4); +static void sub_8006AC4(Window *a0, s32 a1, s32 a2, s32 a3, u16 *a4); +static void sub_8006B70(Window *a0, s32 a1, s32 a2, s32 a3, u16 *a4); +static void sub_8006C44(Window *a0, s32 a1, u16 *a2, u8 a3); +static void sub_8006E94(Window *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 *a4); +static u32 xxx_draw_char(struct Window *a0, s32 x, s32 y, u32 a3, u32 color, u32 a5); static void nullsub_129(u32 a0, s32 x, s32 y, s32 a3, u32 color); -static void sub_8007958(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color); -static void sub_8007AA4(struct UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color); -static void sub_8007BA8(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color); -static void sub_8007D00(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color); -static void sub_8007E64(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8); -static void sub_8008030(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8); -static void DisplayMonPortrait(UnkTextStruct1 *a0, u16 a1[32][32], s32 a2, const u8 *compressedData, u32 a4); -static void DisplayMonPortraitFlipped(UnkTextStruct1 *a0, s32 a1, const u8 *compressedData, s32 a3); -static void sub_80084A4(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 a8); -static void sub_8008818(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5); -static bool8 xxx_update_bg_vram(UnkTextStruct1 *a0); -static void sub_800898C(void); -static void sub_80089AC(const Window *r4, DungeonPos *r5_Str); -static void PrepareTextbox_8008C6C(UnkTextStruct1 *strArr, u32 strId); -static void xxx_draw_string(UnkTextStruct1 *strArr, s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 characterSpacing, s32 lineSpacing); -static const u8 *HandleTextFormat(UnkTextStruct1 *strArr, const u8 *str, struct UnkDrawStringStruct *sp); +static void sub_8007958(Window *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color); +static void sub_8007AA4(struct Window *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color); +static void sub_8007BA8(Window *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color); +static void sub_8007D00(Window *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color); +static void sub_8007E64(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8); +static void sub_8008030(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8); +static void DisplayMonPortrait(Window *a0, u16 a1[32][32], s32 a2, const u8 *compressedData, u32 a4); +static void DisplayMonPortraitFlipped(Window *a0, s32 a1, const u8 *compressedData, s32 a3); +static void sub_80084A4(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 a8); +static void sub_8008818(Window *a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5); +static bool8 xxx_update_bg_vram(Window *a0); +static void ResetWindowBgData(void); +static void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str); +static void PrepareTextbox_8008C6C(Window *strArr, u32 strId); +static void xxx_draw_string(Window *strArr, s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 characterSpacing, s32 lineSpacing); +static const u8 *HandleTextFormat(Window *strArr, const u8 *str, struct UnkDrawStringStruct *sp); static void sub_8009388(void); static s32 InterpretColorChar(u8 a0); @@ -110,7 +110,7 @@ static const u32 gUnknown_80B853C[16] = 0xEEEEEEEE, }; -static const Windows sDummyWindows = +static const WindowTemplates sDummyWindows = { .id = { [0] = WINDOW_DUMMY, @@ -182,9 +182,9 @@ void LoadCharmaps(void) sCharHeight[1] = 12; for (k = 0; k < 4; k++) { - gUnknown_2027370[k].unk4 = 0; - gUnknown_2027370[k].unk8 = 0; - gUnknown_2027370[k].unk46 = 0; + gWindows[k].unk4 = 0; + gWindows[k].unk8 = 0; + gWindows[k].unk46 = 0; } sCharacterSpacing = 0; @@ -272,34 +272,34 @@ void SetCharacterMask(int a0) sTextShadowMask = retval; } -void ShowWindows(const Windows *windows, bool8 a1, bool8 a2) +void ShowWindows(const WindowTemplates *winTemplates, bool8 a1, bool8 a2) { DungeonPos positionModifier = {0, 0}; - SaveUnkTextStructAndXXX_8006438(windows, a1, a2, &positionModifier); + ShowWindowsInternal(winTemplates, a1, a2, &positionModifier); } // https://decomp.me/scratch/xF5Y1 -static void SaveUnkTextStructAndXXX_8006438(const Windows *a0, bool8 a1, bool8 a2, DungeonPos *a3) +static void ShowWindowsInternal(const WindowTemplates *winTemplates, bool8 a1, bool8 a2, DungeonPos *positionModifier) { s32 i; u32 r9; r9 = 2; - if (a0 == NULL) - a0 = &sDummyWindows; + if (winTemplates == NULL) + winTemplates = &sDummyWindows; if (a2) sub_8009388(); - sub_800898C(); + ResetWindowBgData(); - for (i = 0; i < 4; i++) { - sUnknown_202AFC0.id[i] = a0->id[i]; + for (i = 0; i < MAX_WINDOWS; i++) { + sSavedWindows.id[i] = winTemplates->id[i]; - if (a0->id[i].width) { - sub_8006554(gUnknown_2027370, (u32 *)VRAM, sUnknown_20274B4, &gUnknown_202B038[0][0][0], gUnknown_80B8804[i], &a0->id[i], a1, r9, a3, 0); - sub_80089AC(&a0->id[i], a3); - r9 += a0->id[i].width * a0->id[i].unk10; + if (winTemplates->id[i].width != 0) { + AddWindow(gWindows, (u32 *)VRAM, sUnknown_20274B4, &gUnknown_202B038[0][0][0], gUnknown_80B8804[i], &winTemplates->id[i], a1, r9, positionModifier, 0); + sub_80089AC(&winTemplates->id[i], positionModifier); + r9 += winTemplates->id[i].width * winTemplates->id[i].unk10; } } @@ -316,11 +316,11 @@ UNUSED static void nullsub_152(void) { } -void RestoreUnkTextStruct_8006518(Windows *unkData) +void RestoreUnkTextStruct_8006518(WindowTemplates *unkData) { s32 i; for (i = 0; i < 4; i++) - unkData->id[i] = sUnknown_202AFC0.id[i]; + unkData->id[i] = sSavedWindows.id[i]; } UNUSED static void nullsub_153(void) @@ -333,9 +333,9 @@ u32 sub_8006544(u32 index) } // a1 is a VRAM pointer -static void sub_8006554(UnkTextStruct1 *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, const Window *a5, bool8 a6, u32 a7, DungeonPos *a8, u8 a9) +static void AddWindow(Window *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, const WindowTemplate *winTemplate, bool8 a6, u32 a7, DungeonPos *a8, u8 a9) { - UnkTextStruct1 *t1; + Window *t1; s32 iVar3; s32 iVar5; s32 iVar6; @@ -347,28 +347,28 @@ static void sub_8006554(UnkTextStruct1 *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, c s32 j; t1 = &a0[a4]; - iVar3 = a5->pos.x + a8->x; - iVar5 = a5->pos.y + a8->y; + iVar3 = winTemplate->pos.x + a8->x; + iVar5 = winTemplate->pos.y + a8->y; t1->unk0 = iVar3; t1->unk2 = iVar5; - t1->unk4 = a5->width; - t1->unk8 = a5->unk10; - t1->unk6 = a5->height; - t1->unkC = a5->type; + t1->unk4 = winTemplate->width; + t1->unk8 = winTemplate->unk10; + t1->unk6 = winTemplate->height; + t1->unkC = winTemplate->type; t1->unk10 = a7; if (t1->unkC == 6) t1->unk14 = a7; else - t1->unk14 = a7 + a5->unk12 * t1->unk4; + t1->unk14 = a7 + winTemplate->unk12 * t1->unk4; t1->unk18 = &a2[t1->unk10 * 8]; t1->unk1C = &a2[t1->unk14 * 8]; - t1->unk24 = a5->unk12; + t1->unk24 = winTemplate->unk12; t1->unk28 = &a1[t1->unk14 * 8]; if (t1->unkC == 6) - t1->unk2C = t1->unk4 * (t1->unk6 + a5->unk12) * 32; + t1->unk2C = t1->unk4 * (t1->unk6 + winTemplate->unk12) * 32; else t1->unk2C = t1->unk4 * t1->unk6 * 32; @@ -381,16 +381,16 @@ static void sub_8006554(UnkTextStruct1 *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, c if (t1->unk8 == 0) return; - if ((a5->unk0 & 0xA0) != 0x80) { + if ((winTemplate->unk0 & 0xA0) != 0x80) { temp = iVar5 - 1; if (t1->unkC == 6) { uVar1 = a6 ? t1->unk14 : 0; - sub_8006E94(t1, temp, uVar1, a5->unk14, a3); + sub_8006E94(t1, temp, uVar1, winTemplate->unk14, a3); temp = iVar5 + 2; - uVar1 = a6 ? t1->unk14 + t1->unk4 * (a5->unk12 + 2) : 0; + uVar1 = a6 ? t1->unk14 + t1->unk4 * (winTemplate->unk12 + 2) : 0; numI = t1->unk6 - 2; } else { @@ -420,13 +420,13 @@ static void sub_8006554(UnkTextStruct1 *a0, u32 *a1, u32 *a2, u16 *a3, u32 a4, c sub_8006C44(t1, temp, a3, a9); } - if ((a5->unk0 & 0x80) == 0) + if ((winTemplate->unk0 & 0x80) == 0) PrepareTextbox_8008C6C(a0, a4); t1->unk46 = 0; } -static void sub_800677C(UnkTextStruct1 *a0, s32 a1, u16 *a2, u8 a3) +static void sub_800677C(Window *a0, s32 a1, u16 *a2, u8 a3) { s32 iVar5; s32 i; @@ -499,7 +499,7 @@ static void sub_800677C(UnkTextStruct1 *a0, s32 a1, u16 *a2, u8 a3) } } -static void sub_80069CC(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4) +static void sub_80069CC(Window *a0, s32 a1, s32 a2, s32 a3, u16 *a4) { if (a2 > 28) return; @@ -540,7 +540,7 @@ static void sub_80069CC(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4) } } -static void sub_8006AC4(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4) +static void sub_8006AC4(Window *a0, s32 a1, s32 a2, s32 a3, u16 *a4) { if (a2 > 28) return; @@ -567,7 +567,7 @@ static void sub_8006AC4(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4) } } -static void sub_8006B70(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4) +static void sub_8006B70(Window *a0, s32 a1, s32 a2, s32 a3, u16 *a4) { if (a2 > 28) return; @@ -608,7 +608,7 @@ static void sub_8006B70(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, u16 *a4) } } -static void sub_8006C44(UnkTextStruct1 *a0, s32 a1, u16 *a2, u8 a3) +static void sub_8006C44(Window *a0, s32 a1, u16 *a2, u8 a3) { s32 iVar5; s32 i; @@ -683,7 +683,7 @@ static void sub_8006C44(UnkTextStruct1 *a0, s32 a1, u16 *a2, u8 a3) // Not even close but I don't feel like continuing atm https://decomp.me/scratch/F58jg /* -void sub_8006E94(UnkTextStruct1 *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 *a4) +void sub_8006E94(Window *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 *a4) { s32 bVar1; s32 iVar2; @@ -867,7 +867,7 @@ void sub_8006E94(UnkTextStruct1 *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 } */ NAKED -static void sub_8006E94(UnkTextStruct1 *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 *a4) +static void sub_8006E94(Window *a0, s32 a1, u32 a2, const WindowHeader *a3, u16 *a4) { asm_unified( "\tpush {r4-r7,lr}\n" @@ -1465,7 +1465,7 @@ static void sub_8006E94(UnkTextStruct1 *a0, s32 a1, u32 a2, const WindowHeader * void sub_8007334(s32 a0) { s32 i, j; - struct UnkTextStruct1 *textStructPtr = &gUnknown_2027370[a0]; + struct Window *textStructPtr = &gWindows[a0]; s32 r5 = textStructPtr->unk14; s32 r6 = textStructPtr->unk2; for (i = 0; i < textStructPtr->unk6; i++) { @@ -1486,9 +1486,9 @@ UNUSED static void nullsub_154(void) void sub_80073B8(s32 a0) { - UnkTextStruct1 *r1; + Window *r1; - r1 = &gUnknown_2027370[a0]; + r1 = &gWindows[a0]; r1->unk3C = &r1->unk1C[(u32)r1->unk2C >> 2]; r1->unk40 = r1->unk1C; @@ -1501,9 +1501,9 @@ UNUSED static void nullsub_155(void) void sub_80073E0(s32 a0) { - UnkTextStruct1 *r1; + Window *r1; - r1 = &gUnknown_2027370[a0]; + r1 = &gWindows[a0]; if (r1->unk44 == 0) { r1->unk30 = &r1->unk28[r1->unk3C - r1->unk1C]; @@ -1526,7 +1526,7 @@ UNUSED static void nullsub_156(void) u32 xxx_call_draw_char(s32 x, s32 y, u32 a2, u32 color, u32 a4) { - return xxx_draw_char(gUnknown_2027370, x, y, a2, color, a4); + return xxx_draw_char(gWindows, x, y, a2, color, a4); } UNUSED static bool8 sub_8007464(void) @@ -1534,7 +1534,7 @@ UNUSED static bool8 sub_8007464(void) return FALSE; } -static u32 xxx_draw_char(struct UnkTextStruct1 *a0, s32 x, s32 y, u32 a3, u32 color, u32 a5) +static u32 xxx_draw_char(struct Window *a0, s32 x, s32 y, u32 a3, u32 color, u32 a5) { u32 *r3; const struct unkShiftData *shiftData; @@ -1544,7 +1544,7 @@ static u32 xxx_draw_char(struct UnkTextStruct1 *a0, s32 x, s32 y, u32 a3, u32 co const u16 *local_3c; s32 i; s32 xDiv8, yDiv8; - struct UnkTextStruct1 *r5 = &a0[a5]; + struct Window *r5 = &a0[a5]; s32 sp18 = gUnknown_80B853C[color & 0xF]; u8 var_2C; u32 r4; @@ -1739,20 +1739,20 @@ UNUSED static void sub_80078E8(u32 a0, s32 x, s32 y, s32 a3, u32 color) void sub_800792C(u32 a0, s32 x, s32 y, s32 a3, u32 color) { - sub_8007958(gUnknown_2027370, a0, x, y, a3, color); + sub_8007958(gWindows, a0, x, y, a3, color); } static void nullsub_129(u32 a0, s32 x, s32 y, s32 a3, u32 color) { } -static void sub_8007958(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color) +static void sub_8007958(Window *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color) { u32 uVar4; u32 *dest; s32 r4; const struct unkShiftData *shiftData; - UnkTextStruct1 *r5; + Window *r5; s32 r6; u32 r9; s32 lol; @@ -1810,16 +1810,16 @@ static void sub_8007958(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, u32 co void sub_8007A78(u32 a0, s32 x, s32 y, s32 a3, u32 color) { - sub_8007AA4(gUnknown_2027370, a0, x, y, a3, color); + sub_8007AA4(gWindows, a0, x, y, a3, color); } UNUSED static void nullsub_157(void) { } -static void sub_8007AA4(struct UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color) +static void sub_8007AA4(struct Window *a0, u32 a1, s32 x, s32 y, s32 a4, u32 color) { - struct UnkTextStruct1 *r4 = &a0[a1]; + struct Window *r4 = &a0[a1]; u32 ip = gUnknown_80B853C[color & 0xF] + 0x11111111; const u32 unkBits[] = {0xF, 0xF0, 0xF00, 0xF000, 0xF0000, 0xF00000, 0xF000000, 0xF0000000}; s32 r3 = y / 8; @@ -1857,7 +1857,7 @@ static void sub_8007AA4(struct UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, void sub_8007B7C(u32 a0, s32 x, s32 y, s32 a3, u32 color) { - sub_8007BA8(gUnknown_2027370, a0, x, y, a3, color); + sub_8007BA8(gWindows, a0, x, y, a3, color); } UNUSED static void nullsub_158(void) @@ -1865,7 +1865,7 @@ UNUSED static void nullsub_158(void) } #ifdef NONMATCHING // https://decomp.me/scratch/AU1bH -static void sub_8007BA8(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color) +static void sub_8007BA8(Window *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color) { s32 iVar1; // r1 s32 iVar3; @@ -1874,7 +1874,7 @@ static void sub_8007BA8(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 co u32 *r4; u32 r5; u32 r6; - UnkTextStruct1 *ip; + Window *ip; s32 sp4; s32 sp8; u32 sp1C; // Used correctly @@ -1937,7 +1937,7 @@ static void sub_8007BA8(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 co } #else NAKED -static void sub_8007BA8(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color) +static void sub_8007BA8(Window *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color) { asm_unified( "push {r4-r7,lr}\n" @@ -2107,7 +2107,7 @@ static void sub_8007BA8(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 co UNUSED static void sub_8007CD4(u32 a0, s32 a1, s32 a2, s32 a3, s32 a4) { - sub_8007D00(gUnknown_2027370, a0, a1, a2, a3, a4); + sub_8007D00(gWindows, a0, a1, a2, a3, a4); } UNUSED static void nullsub_159(void) @@ -2115,7 +2115,7 @@ UNUSED static void nullsub_159(void) } NAKED // Very similar to sub_8007BA8 -static void sub_8007D00(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color) +static void sub_8007D00(Window *a0, u32 a1, s32 x, s32 y, s32 a4, s32 color) { asm_unified( "push {r4-r7,lr}\n" @@ -2278,17 +2278,17 @@ static void sub_8007D00(UnkTextStruct1 *a0, u32 a1, s32 x, s32 y, s32 a4, s32 co void sub_8007E20(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6) { - sub_8007E64(gUnknown_2027370, gUnknown_202B038[0], a0, a1, a2, a3, a4, a5, a6); + sub_8007E64(gWindows, gUnknown_202B038[0], a0, a1, a2, a3, a4, a5, a6); } UNUSED static void nullsub_160(void) { } -static void sub_8007E64(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8) +static void sub_8007E64(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8) { s32 i, j; - UnkTextStruct1 *strPtr = &a0[a2]; + Window *strPtr = &a0[a2]; a3 /= 8; a4 /= 8; @@ -2355,7 +2355,7 @@ static u32 FlipPixelsHorizontally(u32 a0) UNUSED static void sub_8007FEC(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6) { - sub_8008030(gUnknown_2027370, gUnknown_202B038[0], a0, a1, a2, a3, a4, a5, a6); + sub_8008030(gWindows, gUnknown_202B038[0], a0, a1, a2, a3, a4, a5, a6); } UNUSED static void nullsub_161(void) @@ -2363,10 +2363,10 @@ UNUSED static void nullsub_161(void) } // Similar to sub_8007E64 -static void sub_8008030(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8) +static void sub_8008030(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 *a7, u32 a8) { s32 i, j; - UnkTextStruct1 *strPtr = &a0[a2]; + Window *strPtr = &a0[a2]; a3 /= 8; a4 /= 8; @@ -2416,7 +2416,7 @@ static void sub_8008030(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 UNUSED static void sub_80081A4(s32 a0, s32 a3, s32 a4, s32 a7Id) { s32 i, j, a5, a6; - UnkTextStruct1 *strPtr = &gUnknown_2027370[a0]; + Window *strPtr = &gWindows[a0]; const u32 *a7 = gUnknown_80B86B4[a7Id]; a3 /= 8; @@ -2459,17 +2459,17 @@ UNUSED static void sub_80081A4(s32 a0, s32 a3, s32 a4, s32 a7Id) void DisplayMonPortraitSprite(s32 a0, const u8 *compressedData, s32 a2) { - DisplayMonPortrait(gUnknown_2027370, gUnknown_202B038[0], a0, compressedData, a2); + DisplayMonPortrait(gWindows, gUnknown_202B038[0], a0, compressedData, a2); } UNUSED static void nullsub_162(void) { } -static void DisplayMonPortrait(UnkTextStruct1 *a0, u16 a1[32][32], s32 a2, const u8 *compressedData, u32 a4) +static void DisplayMonPortrait(Window *a0, u16 a1[32][32], s32 a2, const u8 *compressedData, u32 a4) { s32 i, j; - UnkTextStruct1 *strPtr = &a0[a2]; + Window *strPtr = &a0[a2]; a4 *= 4096; DecompressAT((u8 *)strPtr->unk18, (strPtr->unk4 * 32) * strPtr->unk8, compressedData); @@ -2511,17 +2511,17 @@ static void sub_8008334(u32 *r7, u32 *r12) void DisplayMonPortraitSpriteFlipped(s32 a0, const u8 *compressedData, s32 a1) { - DisplayMonPortraitFlipped(gUnknown_2027370, a0, compressedData, a1); + DisplayMonPortraitFlipped(gWindows, a0, compressedData, a1); } UNUSED static void nullsub_163(void) { } -static void DisplayMonPortraitFlipped(UnkTextStruct1 *a0, s32 a1, const u8 *compressedData, s32 a3) +static void DisplayMonPortraitFlipped(Window *a0, s32 a1, const u8 *compressedData, s32 a3) { s32 i, j; - UnkTextStruct1 *strPtr = &a0[a1]; + Window *strPtr = &a0[a1]; DisplayMonPortraitSprite(a1, compressedData, a3); for (i = 0; i < strPtr->unk8; i++) { @@ -2550,7 +2550,7 @@ static void DisplayMonPortraitFlipped(UnkTextStruct1 *a0, s32 a1, const u8 *comp UNUSED static void sub_8008468(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 a6) { - sub_80084A4(gUnknown_2027370, gUnknown_202B038[0], a0, a1, a2, a3, a4, a6); + sub_80084A4(gWindows, gUnknown_202B038[0], a0, a1, a2, a3, a4, a6); } UNUSED static void nullsub_164(void) @@ -2558,10 +2558,10 @@ UNUSED static void nullsub_164(void) } // Effectively unused -static void sub_80084A4(UnkTextStruct1 *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 a8) +static void sub_80084A4(Window *a0, u16 a1[32][32], u32 a2, s32 a3, s32 a4, s32 a5, s32 a6, u32 a8) { s32 i, j; - UnkTextStruct1 *strPtr = &a0[a2]; + Window *strPtr = &a0[a2]; a3 /= 8; a4 /= 8; @@ -2686,11 +2686,11 @@ static const u32 gUnknown_80B8868[] = 0xFFF00000, 0xFF000000, 0xF0000000 }; -UNUSED static void sub_80086C8(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5) +UNUSED static void sub_80086C8(Window *a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5) { u32 *r5; s32 r2, r0, r1; - UnkTextStruct1 *strPtr = &a0[a1]; + Window *strPtr = &a0[a1]; if (a2 < 0) { a4 += a2; @@ -2756,17 +2756,17 @@ UNUSED static void sub_80086C8(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, s32 a void sub_80087EC(s32 a0, s32 a1, s32 a2, s32 a3, s32 a4) { - sub_8008818(gUnknown_2027370, a0, a1, a2, a3, a4); + sub_8008818(gWindows, a0, a1, a2, a3, a4); } UNUSED static void nullsub_176(void) { } -static void sub_8008818(UnkTextStruct1 *a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5) +static void sub_8008818(Window *a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5) { s32 i, j; - UnkTextStruct1 *strPtr = &a0[a1]; + Window *strPtr = &a0[a1]; s32 a2Div = a2 / 8; s32 a3Div = a3 / 8; @@ -2800,18 +2800,18 @@ bool8 xxx_call_update_bg_vram(void) gUnknown_20274A5 = FALSE; sub_80099C0(); } - ret = xxx_update_bg_vram(gUnknown_2027370); + ret = xxx_update_bg_vram(gWindows); return ret; } -static bool8 xxx_update_bg_vram(UnkTextStruct1 *a0) +static bool8 xxx_update_bg_vram(Window *a0) { s32 i, j; u32 r5; bool8 ret = FALSE; for (i = 0; i < 4; i++) { - UnkTextStruct1 *strPtr = &a0[i]; + Window *strPtr = &a0[i]; if (strPtr->unk4 == 0) continue; r5 = strPtr->unk38; @@ -2854,7 +2854,7 @@ static bool8 xxx_update_bg_vram(UnkTextStruct1 *a0) return ret; } -static void sub_800898C(void) +static void ResetWindowBgData(void) { s32 i; @@ -2863,7 +2863,7 @@ static void sub_800898C(void) } } -static void sub_80089AC(const Window *r4, DungeonPos *r5_Str) +static void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str) { u8 *r6; @@ -3020,17 +3020,17 @@ static void sub_80089AC(const Window *r4, DungeonPos *r5_Str) void CallPrepareTextbox_8008C54(u32 strId) { - PrepareTextbox_8008C6C(gUnknown_2027370, strId); + PrepareTextbox_8008C6C(gWindows, strId); } UNUSED static void nullsub_169(void) { } -static void PrepareTextbox_8008C6C(UnkTextStruct1 *strArr, u32 strId) +static void PrepareTextbox_8008C6C(Window *strArr, u32 strId) { s32 i; - UnkTextStruct1 *strPtr = &strArr[strId]; + Window *strPtr = &strArr[strId]; if (!strPtr->unk45) { s32 count = (strPtr->unk4 * strPtr->unk8) * 32; @@ -3072,7 +3072,7 @@ static void PrepareTextbox_8008C6C(UnkTextStruct1 *strArr, u32 strId) bool8 sub_8008D8C(u32 strId) { - UnkTextStruct1 *strPtr = &gUnknown_2027370[strId]; + Window *strPtr = &gWindows[strId]; return (strPtr->unk38 != 0); } @@ -3193,12 +3193,12 @@ s32 sub_8008ED0(const u8 *str) void PrintStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing) { - xxx_draw_string(gUnknown_2027370, x, y, str, windowId, terminatingChr, 0, lineSpacing); + xxx_draw_string(gWindows, x, y, str, windowId, terminatingChr, 0, lineSpacing); } void PrintStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr) { - xxx_draw_string(gUnknown_2027370, x, y, str, windowId, terminatingChr, 0, 13); + xxx_draw_string(gWindows, x, y, str, windowId, terminatingChr, 0, 13); } UNUSED static void nullsub_170(void) @@ -3208,14 +3208,14 @@ UNUSED static void nullsub_170(void) // Identical to PrintStringOnWindow UNUSED static void UnusedPrintStringOnWindow(s32 x, u32 y, const u8 *str, u32 windowId, u32 terminatingChr) { - xxx_draw_string(gUnknown_2027370, x, y, str, windowId, terminatingChr, 0, 13); + xxx_draw_string(gWindows, x, y, str, windowId, terminatingChr, 0, 13); } UNUSED static void nullsub_171(void) { } -static void xxx_draw_string(UnkTextStruct1 *strArr, s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 characterSpacing, s32 lineSpacing) +static void xxx_draw_string(Window *strArr, s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 characterSpacing, s32 lineSpacing) { struct UnkDrawStringStruct sp; u32 currChr; @@ -3292,7 +3292,7 @@ static const u8 *sub_800915C(s16 *a0, const u8 *str) const u8 *xxx_handle_format_global(const u8 *str, struct UnkDrawStringStruct *unkStrPtr) { - return HandleTextFormat(gUnknown_2027370, str, unkStrPtr); + return HandleTextFormat(gWindows, str, unkStrPtr); } UNUSED static s32 sub_80091A8(s32 a0) @@ -3300,7 +3300,7 @@ UNUSED static s32 sub_80091A8(s32 a0) return a0 + 1; } -static const u8 *HandleTextFormat(UnkTextStruct1 *strArr, const u8 *str, struct UnkDrawStringStruct *sp) +static const u8 *HandleTextFormat(Window *strArr, const u8 *str, struct UnkDrawStringStruct *sp) { while (1) { if (str[0] == '#') { @@ -3465,7 +3465,7 @@ UNUSED static void sub_8009488(s32 strArrId) { s32 i, j; s32 id0, id1; - UnkTextStruct1 *strPtr = &gUnknown_2027370[strArrId]; + Window *strPtr = &gWindows[strArrId]; id0 = strPtr->unk2; for (i = 0; i < strPtr->unk6; i++) { @@ -3486,7 +3486,7 @@ UNUSED static void nullsub_172(void) void sub_8009524(s32 strArrId) { s32 i, j; - UnkTextStruct1 *strPtr = &gUnknown_2027370[strArrId]; + Window *strPtr = &gWindows[strArrId]; s32 id0 = strPtr->unk2 - 1; for (i = 0; i < strPtr->unk6 + 2; i++) { @@ -3645,12 +3645,12 @@ void InitGraphics(void) // These functions run from IWRAM for improved performance. IWRAM_INIT void ScrollDownWindow(s32 windowId) { - ScrollDownWindowInternal(gUnknown_2027370, windowId); + ScrollDownWindowInternal(gWindows, windowId); } -IWRAM_INIT static void ScrollDownWindowInternal(UnkTextStruct1 *txtStructs, s32 windowId) +IWRAM_INIT static void ScrollDownWindowInternal(Window *txtStructs, s32 windowId) { - UnkTextStruct1 *txtStructPtr = &txtStructs[windowId]; + Window *txtStructPtr = &txtStructs[windowId]; if (txtStructPtr->unk8 > 0) { s32 i, j; @@ -3708,12 +3708,12 @@ IWRAM_INIT static void ScrollDownWindowInternal(UnkTextStruct1 *txtStructs, s32 IWRAM_INIT void ScrollUpWindow(s32 windowId) { - ScrollUpWindowInternal(gUnknown_2027370, windowId); + ScrollUpWindowInternal(gWindows, windowId); } -IWRAM_INIT static void ScrollUpWindowInternal(UnkTextStruct1 *txtStructs, s32 windowId) +IWRAM_INIT static void ScrollUpWindowInternal(Window *txtStructs, s32 windowId) { - UnkTextStruct1 *txtStructPtr = &txtStructs[windowId]; + Window *txtStructPtr = &txtStructs[windowId]; if (txtStructPtr->unk8 > 0) { s32 i, j; @@ -3787,13 +3787,13 @@ IWRAM_INIT static void ScrollUpWindowInternal(UnkTextStruct1 *txtStructs, s32 wi IWRAM_INIT void sub_82729A4(s32 id) { - sub_82729B8(gUnknown_2027370, id); + sub_82729B8(gWindows, id); } -IWRAM_INIT static void sub_82729B8(UnkTextStruct1 *txtStructs, s32 id) +IWRAM_INIT static void sub_82729B8(Window *txtStructs, s32 id) { s32 i, j; - UnkTextStruct1 *txtStructPtr = &txtStructs[id]; + Window *txtStructPtr = &txtStructs[id]; u32 *dstPtr = txtStructPtr->unk18; s32 id8 = txtStructPtr->unk20 + 8; s32 id9 = txtStructPtr->unk20 + 9; @@ -3841,13 +3841,13 @@ IWRAM_INIT static void sub_82729B8(UnkTextStruct1 *txtStructs, s32 id) IWRAM_INIT void sub_8272A78(s32 id) { - sub_8272A8C(gUnknown_2027370, id); + sub_8272A8C(gWindows, id); } -IWRAM_INIT static void sub_8272A8C(UnkTextStruct1 *txtStructs, s32 id) +IWRAM_INIT static void sub_8272A8C(Window *txtStructs, s32 id) { s32 i, j; - UnkTextStruct1 *txtStructPtr = &txtStructs[id]; + Window *txtStructPtr = &txtStructs[id]; u32 *dstPtr = txtStructPtr->unk18; s32 id8 = txtStructPtr->unk20 + 8; diff --git a/src/thank_you_wonder_mail.c b/src/thank_you_wonder_mail.c index 6b784017e..a3daad4eb 100644 --- a/src/thank_you_wonder_mail.c +++ b/src/thank_you_wonder_mail.c @@ -75,7 +75,7 @@ const Item gUnknown_80DED44 = ITEM_FLAG_EXISTS, 0, ITEM_NOTHING }; -const Window gUnknown_80DED48 = +const WindowTemplate gUnknown_80DED48 = { 0, 0x03, @@ -85,7 +85,7 @@ const Window gUnknown_80DED48 = NULL }; -const Window gUnknown_80DED60 = +const WindowTemplate gUnknown_80DED60 = { 0, 0x03, @@ -103,7 +103,7 @@ const MenuItem gUnknown_80DED78[] = }; // Unused -const Window gUnknown_80DEDA0 = +const WindowTemplate gUnknown_80DEDA0 = { 0, 0x03, diff --git a/src/unk_menu_203B360.c b/src/unk_menu_203B360.c index 84262722d..2ecf24159 100644 --- a/src/unk_menu_203B360.c +++ b/src/unk_menu_203B360.c @@ -15,14 +15,14 @@ typedef struct unkStruct_203B360 /* 0x0 */ u32 currMenu; u32 unk4; // state MenuStruct unk8[4]; - Windows unk148; + WindowTemplates unk148; SpriteOAM unk1A8; u32 unk1B0; // sprite count? } unkStruct_203B360; static EWRAM_INIT unkStruct_203B360 *sUnknown_203B360 = {NULL}; -const Window gUnknown_80E6E7C = { +const WindowTemplate gUnknown_80E6E7C = { 0, 0x03, 0x00, 0x00, @@ -31,7 +31,7 @@ const Window gUnknown_80E6E7C = { NULL }; -const Window gUnknown_80E6E94 = { +const WindowTemplate gUnknown_80E6E94 = { 0, 0x03, 0x05, 0x09, diff --git a/src/wonder_mail_3_mid.c b/src/wonder_mail_3_mid.c index 545d90dbd..f9b848b27 100644 --- a/src/wonder_mail_3_mid.c +++ b/src/wonder_mail_3_mid.c @@ -19,7 +19,7 @@ struct unkStruct_203B30C unkStruct_802C39C unk8; MenuStruct unk60; MenuItem unkB0[8]; - Windows unkF0; + WindowTemplates unkF0; }; static EWRAM_INIT struct unkStruct_203B30C *gUnknown_203B30C = {NULL}; @@ -31,7 +31,7 @@ extern void sub_802F004(); extern void sub_802F088(); extern void sub_802F108(void); -const Window gUnknown_80E03C4 = { +const WindowTemplate gUnknown_80E03C4 = { 0, 0x03, 0x00, 0x00, @@ -39,7 +39,7 @@ const Window gUnknown_80E03C4 = { 0x00, 0x00, NULL }; -const Window gUnknown_80E03DC = { +const WindowTemplate gUnknown_80E03DC = { 0, 0x03, 0x03, 0x03, @@ -47,7 +47,7 @@ const Window gUnknown_80E03DC = { 0x03, 0x00, NULL }; -const Window gUnknown_80E03F4 = { +const WindowTemplate gUnknown_80E03F4 = { 0, 0x03, 0x15, 0x06, diff --git a/src/wonder_mail_4.c b/src/wonder_mail_4.c index c0f71b37f..3127dd633 100644 --- a/src/wonder_mail_4.c +++ b/src/wonder_mail_4.c @@ -26,7 +26,7 @@ static EWRAM_INIT struct unkStruct_203B320 *gUnknown_203B320 = {NULL}; extern unkStruct_203B480 *gUnknown_203B480; -const Window gUnknown_80E083C = { +const WindowTemplate gUnknown_80E083C = { 0, 0x03, 0x00, 0x00, @@ -35,7 +35,7 @@ const Window gUnknown_80E083C = { NULL }; -const Window gUnknown_80E0854 = { +const WindowTemplate gUnknown_80E0854 = { 0, 0x06, 0x02, 0x02, diff --git a/src/wonder_mail_5.c b/src/wonder_mail_5.c index ec366a25e..6ff971b1b 100644 --- a/src/wonder_mail_5.c +++ b/src/wonder_mail_5.c @@ -20,8 +20,8 @@ struct unkStruct_203B324 MenuInputStructSub unk0; u8 mailIndex; u32 windowID; - Window *unk14; - Windows unk18; + WindowTemplate *unk14; + WindowTemplates unk18; }; static EWRAM_INIT struct unkStruct_203B324 *gUnknown_203B324 = {NULL}; @@ -29,7 +29,7 @@ static EWRAM_INIT struct unkStruct_203B324 *gUnknown_203B324 = {NULL}; extern unkStruct_203B480 *gUnknown_203B480; -const Window gUnknown_80E0900 = { +const WindowTemplate gUnknown_80E0900 = { 0, 0x03, 0x00, 0x00, @@ -40,7 +40,7 @@ const Window gUnknown_80E0900 = { const WindowHeader gUnknown_80E0918 = {0x01, 0x00, 0x12, 0x00}; -const Window gUnknown_80E091C = { +const WindowTemplate gUnknown_80E091C = { 0, 0x06, 0x02, 0x02, diff --git a/src/wonder_mail_6.c b/src/wonder_mail_6.c index 7ffa730c0..2a834a5bb 100644 --- a/src/wonder_mail_6.c +++ b/src/wonder_mail_6.c @@ -17,7 +17,7 @@ struct unkStruct_203B328 u8 mailIndex; MenuStruct unk8; MenuStruct unk58; - Windows unkA8; + WindowTemplates unkA8; /* 0x108 */ struct MonPortraitMsg monPortrait; u32 wonderMailType; }; @@ -48,7 +48,7 @@ const MenuItem gUnknown_80E0968[] = {NULL, CANCEL_ACTION} }; -const Window gUnknown_80E0990 = { +const WindowTemplate gUnknown_80E0990 = { 0, 0x03, 0x00, 0x00, @@ -56,7 +56,7 @@ const Window gUnknown_80E0990 = { 0x00, 0x00, NULL }; -const Window gUnknown_80E09A8 = { +const WindowTemplate gUnknown_80E09A8 = { 0, 0x03, 0x13, 0x0B, @@ -64,7 +64,7 @@ const Window gUnknown_80E09A8 = { 0x03, 0x00, NULL }; -const Window gUnknown_80E09C0 = { +const WindowTemplate gUnknown_80E09C0 = { 0, 0x03, 0x11, 0x0F, diff --git a/src/wonder_mail_main_menu.c b/src/wonder_mail_main_menu.c index 6c2598492..5cec3e8e2 100644 --- a/src/wonder_mail_main_menu.c +++ b/src/wonder_mail_main_menu.c @@ -49,7 +49,7 @@ struct unkStruct_203B3E8 u8 unk38_u8[0x30]; // idk why it fills to 0x30 instead... } UNK38; u8 fill68[0x1EC - 0x68]; - Windows unk1EC; + WindowTemplates unk1EC; u32 unk24C; /* 0x250 */ u32 wonderMailStatus; unkStruct_803B344 unk254; diff --git a/src/world_map.c b/src/world_map.c index 844299fb0..436764068 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -38,7 +38,7 @@ extern void sub_80117AC(void); extern void sub_8011760(void); static EWRAM_INIT struct WorldMap *sWorldMapPtr = NULL; -static EWRAM_INIT Windows sWorldMapWindows = { +static EWRAM_INIT WindowTemplates sWorldMapWindows = { .id = { [0] = { .type = WINDOW_TYPE_NORMAL, @@ -483,7 +483,7 @@ static void AnimateSprites(bool8 a0) static void PrintDungeonName(DungeonLocation *dungLocation) { - Windows windows = { + WindowTemplates windows = { .id = { [0] = { .type = WINDOW_TYPE_NORMAL,