Get rid of the fakematch in the Windows struct

This commit is contained in:
DizzyEggg
2025-02-28 21:56:14 +01:00
parent ee9401e833
commit 05a1d0aec8
4 changed files with 257 additions and 598 deletions

View File

@@ -51,7 +51,8 @@ typedef struct Window
const WindowHeader *unk14;
} Window;
#define WINDOW_DUMMY (Window) {.type = WINDOW_TYPE_NORMAL, .width = 0}
// 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_TYPE_0 0
#define WINDOW_TYPE_WITHOUT_BORDER 1
@@ -64,10 +65,6 @@ typedef struct Window
typedef struct Windows {
Window id[MAX_WINDOWS];
// Something ugly, so that sub_805FD74 could match weird compiler memcpy/stack initialization
#ifndef NONMATCHING
u8 fakeMatch[0];
#endif // NONMATCHING
} Windows;
#endif // GUARD_STR_TEXT_H