From e968ef8aa3d89aaf31aa6157ba1ea2fa30662587 Mon Sep 17 00:00:00 2001 From: Kermalis <29823718+Kermalis@users.noreply.github.com> Date: Mon, 10 Mar 2025 00:48:34 -0400 Subject: [PATCH] Fix merge conflicts --- include/structs/str_text.h | 4 ++-- src/code_803E724.c | 20 ++++++++-------- src/code_8066D04.c | 4 ++-- src/dungeon_menu_items.c | 4 +++- src/dungeon_menu_moves.c | 12 +++++----- src/dungeon_menu_others.c | 42 +++++++++++++++++----------------- src/dungeon_menu_recruitment.c | 6 ++--- src/dungeon_menu_stairs.c | 12 +++++----- src/dungeon_menu_team.c | 28 +++++++++++------------ src/dungeon_menu_tile.c | 12 +++++----- src/dungeon_submenu.c | 6 ++--- src/friend_areas_map_util.c | 6 ++--- src/string_format.c | 16 ++++++++++--- src/text.c | 8 +++---- src/world_map.c | 10 ++++---- 15 files changed, 101 insertions(+), 89 deletions(-) diff --git a/include/structs/str_text.h b/include/structs/str_text.h index ecceaada8..2befd0e4f 100644 --- a/include/structs/str_text.h +++ b/include/structs/str_text.h @@ -64,12 +64,12 @@ typedef struct WindowTemplate #define MAX_WINDOWS 4 // 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, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .unk10 = 0, .unk12 = 0, .header = NULL } +#define WIN_TEMPLATE_DUMMY (WindowTemplate) { .unk0 = 0, .type = WINDOW_TYPE_NORMAL, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .unk10 = 0, .unk12 = 0, .header = NULL } // size: 0x60 typedef struct WindowTemplates { - /* 0x0 */ sWindowTemplate id[MAX_WINDOWS]; + /* 0x0 */ WindowTemplate id[MAX_WINDOWS]; } WindowTemplates; #endif // GUARD_STR_TEXT_H \ No newline at end of file diff --git a/src/code_803E724.c b/src/code_803E724.c index 389c4cf3d..8807f6e81 100644 --- a/src/code_803E724.c +++ b/src/code_803E724.c @@ -185,9 +185,9 @@ static const struct WindowTemplates gUnknown_80F62B0 = .unk12 = 0, .header = NULL, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -203,9 +203,9 @@ static const struct WindowTemplates gUnknown_80F6310 = .unk12 = 0, .header = NULL, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -239,7 +239,7 @@ static const struct WindowTemplates gUnknown_80F6370 = .unk12 = 0, .header = NULL, }, - [3] = WINDOW_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -255,9 +255,9 @@ static const struct WindowTemplates gUnknown_80F63D0 = .unk12 = 2, .header = NULL, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/code_8066D04.c b/src/code_8066D04.c index 1aef855c1..3b60aa4e2 100644 --- a/src/code_8066D04.c +++ b/src/code_8066D04.c @@ -949,8 +949,8 @@ static const WindowTemplates gUnknown_8106DC8 = { .unk12 = 0, .header = NULL }, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/dungeon_menu_items.c b/src/dungeon_menu_items.c index 2ee3ce904..e38732557 100644 --- a/src/dungeon_menu_items.c +++ b/src/dungeon_menu_items.c @@ -133,7 +133,9 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1) .unk10 = 0x10, .header = &header, }, - WINDOW_DUMMY, WINDOW_DUMMY, WINDOW_DUMMY + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY }, }; diff --git a/src/dungeon_menu_moves.c b/src/dungeon_menu_moves.c index 7fadce616..6cdf7a5a6 100644 --- a/src/dungeon_menu_moves.c +++ b/src/dungeon_menu_moves.c @@ -208,9 +208,9 @@ bool8 ShowDungeonMovesMenu(Entity * entity, bool8 addLinkOptions, bool8 addUseMo .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; u8 unk[4]; @@ -946,9 +946,9 @@ bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBP .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; Move movesLocal[8]; diff --git a/src/dungeon_menu_others.c b/src/dungeon_menu_others.c index b330713de..abd6c8536 100644 --- a/src/dungeon_menu_others.c +++ b/src/dungeon_menu_others.c @@ -493,9 +493,9 @@ static void PrintOthersMenuOptions(void) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -566,9 +566,9 @@ static void PrintQuickSaveMenuOptions(void) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -619,9 +619,9 @@ static void PrintGameOptions(void) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -674,9 +674,9 @@ static void PrintDungeonOptions(void) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; s32 mapOptionUnderscoreWidths[] = {16, 25, 27}; @@ -765,9 +765,9 @@ static void PrintOthersOptions(void) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; s32 underscoreWidths[] = {19, 17, 25}; @@ -953,9 +953,9 @@ static void PrintHintsMenu(void) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -1008,9 +1008,9 @@ static void ShowChosenHintWindow(s32 hintId) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/dungeon_menu_recruitment.c b/src/dungeon_menu_recruitment.c index 5e6f895c6..d2406bb34 100644 --- a/src/dungeon_menu_recruitment.c +++ b/src/dungeon_menu_recruitment.c @@ -72,9 +72,9 @@ static const WindowTemplates sRecruitmentSearchWindows = { .unk12 = 2, .header = &sRecruitmentWindowHeader, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/dungeon_menu_stairs.c b/src/dungeon_menu_stairs.c index ed059ec8c..0b155bd8b 100644 --- a/src/dungeon_menu_stairs.c +++ b/src/dungeon_menu_stairs.c @@ -58,9 +58,9 @@ void ShowDungeonStairsMenu(Entity *mon) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -178,9 +178,9 @@ static void ShowStairsDescription(DungeonPos *pos) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; s32 i, statusesCount; diff --git a/src/dungeon_menu_team.c b/src/dungeon_menu_team.c index 17eb834b9..451b71063 100644 --- a/src/dungeon_menu_team.c +++ b/src/dungeon_menu_team.c @@ -188,9 +188,9 @@ bool8 ShowDungeonTeamMenu(Entity *a0) .unk12 = 0, .header = &sTeamWindowHeader, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -520,9 +520,9 @@ void ShowDungeonTacticsMenu(ActionContainer *a0) .unk12 = 2, .header = &sTeamWindowHeader, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; EntityInfo *monInfo; @@ -755,9 +755,9 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq) .unk12 = 2, .header = &sTeamWindowHeader, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; s32 r8; @@ -1410,9 +1410,9 @@ static void ShowStatusInfoWindow(s32 statusId) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -1488,8 +1488,8 @@ Entity *ShowDungeonToWhichMonMenu(s32 *teamId, s32 caseId) .unk12 = 0, .header = NULL, }, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; bool8 bPress = FALSE; diff --git a/src/dungeon_menu_tile.c b/src/dungeon_menu_tile.c index e0e76768f..5649d89e7 100644 --- a/src/dungeon_menu_tile.c +++ b/src/dungeon_menu_tile.c @@ -53,9 +53,9 @@ void ShowDungeonTileMenu(Entity *mon) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -168,9 +168,9 @@ static void ShowTileDescription(DungeonPos *pos) .unk12 = 0, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; u8 trapName[0x60]; diff --git a/src/dungeon_submenu.c b/src/dungeon_submenu.c index d77e36680..c5db577b7 100644 --- a/src/dungeon_submenu.c +++ b/src/dungeon_submenu.c @@ -19,7 +19,7 @@ void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX) s32 i; WindowTemplates windows = { .id = { - [0] = WINDOW_DUMMY, + [0] = WIN_TEMPLATE_DUMMY, [1] = { .type = WINDOW_TYPE_NORMAL, .pos = {22, 4}, @@ -27,8 +27,8 @@ void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX) .height = 4, .unk10 = 4, }, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/friend_areas_map_util.c b/src/friend_areas_map_util.c index c245a59fd..031996473 100644 --- a/src/friend_areas_map_util.c +++ b/src/friend_areas_map_util.c @@ -305,9 +305,9 @@ void FriendAreasMap_PrintAvailableSubAreas(void) .unk10 = 2, .header = &header, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/string_format.c b/src/string_format.c index 03197d8c1..9449d9fd8 100644 --- a/src/string_format.c +++ b/src/string_format.c @@ -159,17 +159,27 @@ static EWRAM_DATA MenuInputStructSub gUnknown_202EC28 = {0}; static EWRAM_INIT WindowTemplates sUnknown_203B198 = { .id = { [0] = { - .pos = {2, 15}, + .unk0 = 0, + .type = WINDOW_TYPE_0, + .pos = { .x = 2, .y = 15 }, .width = 26, .height = 5, .unk10 = 7, + .unk12 = 0, + .header = NULL, }, [1] = { .unk0 = 0x40, .type = WINDOW_TYPE_7, + .pos = { .x = 0, .y = 0 }, + .width = 0, + .height = 0, + .unk10 = 0, + .unk12 = 0, + .header = NULL, }, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/text.c b/src/text.c index b14c37e19..ba7800165 100644 --- a/src/text.c +++ b/src/text.c @@ -113,10 +113,10 @@ static const u32 gUnknown_80B853C[16] = static const WindowTemplates sDummyWindows = { .id = { - [0] = WINDOW_DUMMY, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [0] = WIN_TEMPLATE_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; diff --git a/src/world_map.c b/src/world_map.c index d1343ced9..67f3d3cb4 100644 --- a/src/world_map.c +++ b/src/world_map.c @@ -54,8 +54,8 @@ static EWRAM_INIT WindowTemplates sWorldMapWindows = { .height = 3, .unk10 = 3, }, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } }; @@ -492,9 +492,9 @@ static void PrintDungeonName(DungeonLocation *dungLocation) .height = 2, .unk10 = 2, }, - [1] = WINDOW_DUMMY, - [2] = WINDOW_DUMMY, - [3] = WINDOW_DUMMY, + [1] = WIN_TEMPLATE_DUMMY, + [2] = WIN_TEMPLATE_DUMMY, + [3] = WIN_TEMPLATE_DUMMY, } };