Merge branch 'master' into stuff

This commit is contained in:
Kermalis
2025-03-10 04:31:38 +00:00
committed by GitHub
231 changed files with 9096 additions and 14597 deletions

View File

@@ -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

View File

@@ -259,16 +259,6 @@ typedef struct SpriteOAM
(spritePtr)->attrib2 |= _xSpriteVal; \
}
// Hacky way of matching functions in menu_input.c AddMenuCursorSprite_, sub_801332C sub_8013470
#define SpriteSetX_MatrixNumSize0(spritePtr, _x) \
{ \
u32 _xSpriteVal = _x; \
_xSpriteVal &= SPRITEOAM_MAX_X; \
_xSpriteVal <<= SPRITEOAM_SHIFT_X; \
(spritePtr)->attrib2 &= ~SPRITEOAM_MASK_X; \
(spritePtr)->attrib2 = _xSpriteVal; \
}
#define SpriteGetY(spritePtr)(((spritePtr)->unk6 >> SPRITEOAM_SHIFT_WORKING_Y) & SPRITEOAM_MAX_WORKING_Y)
#define SpriteGetY_LocalVar(spritePtr, _y) \

View File

@@ -98,8 +98,8 @@ typedef struct UnkDungeonGlobal_unk181E8_sub
u8 unk18218; // x30
u8 unk18219; // x31
u8 unk1821A; // x32
u8 unk1821B; // x33
u8 unk1821C; // x34
u8 rotateModeDirection; // x33
u8 prevRotateModeDirection; // x34
u8 fill1821D; // x35
s16 unk36; // x36
s16 unk38; // x38
@@ -249,7 +249,7 @@ typedef struct unkDungeon644
/* 0x8 */ unkStruct_Dungeon64C unk8;
/* 0x10 */ u8 unk10;
/* 0x11 */ u8 fill11[3];
/* 0x14 */ u8 unk14;
/* 0x14 */ bool8 canRecruit;
/* 0x15 */ u8 unk15;
/* 0x16 */ u8 unk16;
/* 0x17 */ u8 unk17;

View File

@@ -2,14 +2,14 @@
#define GUARD_STR_TEXT_H
// size: 0x48
typedef struct UnkTextStruct1
typedef struct Window
{
s16 unk0;
s16 unk2;
s16 unk4;
s16 unk6;
s16 x;
s16 y;
s16 width;
s16 height;
s16 unk8;
u32 unkC;
s32 type;
u32 unk10;
u32 unk14;
u32 *unk18;
@@ -26,21 +26,21 @@ typedef struct UnkTextStruct1
u8 unk44;
bool8 unk45;
u8 unk46;
} UnkTextStruct1;
} Window;
// size: 0x4
typedef struct WindowHeader
{
/* 0x0 */ u8 f0;
/* 0x1 */ u8 f1;
/* 0x2 */ u8 f2;
/* 0x0 */ u8 count; // How many headers there are, it's used for windows which can be scrolled left/right
/* 0x1 */ u8 currId; // Id of the current header
/* 0x2 */ u8 width;
/* 0x3 */ u8 f3;
} WindowHeader;
#include "structs/str_position.h"
// size: 0x18
typedef struct Window
typedef struct WindowTemplate
{
u8 unk0;
/* 0x4 */ s32 type;
@@ -49,30 +49,27 @@ typedef struct Window
/* 0xE */ s16 height;
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;
#define WINDOW_DUMMY (Window) { .unk0 = 0, .type = WINDOW_TYPE_NORMAL, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .unk10 = 0, .unk12 = 0, .unk14 = NULL }
const WindowHeader *header;
} WindowTemplate;
#define WINDOW_TYPE_0 0
#define WINDOW_TYPE_WITHOUT_BORDER 1
//#define WINDOW_TYPE_2 2
#define WINDOW_TYPE_2 2
#define WINDOW_TYPE_NORMAL 3
//#define WINDOW_TYPE_4 4
#define WINDOW_TYPE_4 4
#define WINDOW_TYPE_FILL_TRANSPARENT 5
#define WINDOW_TYPE_WITH_HEADER 6
#define WINDOW_TYPE_7 7
#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 }
// size: 0x60
typedef struct Windows
typedef struct WindowTemplates
{
/* 0x0 */ 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;
/* 0x0 */ sWindowTemplate id[MAX_WINDOWS];
} WindowTemplates;
#endif // GUARD_STR_TEXT_H

View File

@@ -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;