blob: 0aab144a21ed5695f698cd55971ab446d35f1c39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
#ifndef MENU_H
#define MENU_H
#include "global.h"
typedef struct {
u16 unk;
u8 transitionType;
u8 unk4;
u8 state;
u8 unk6;
u8 unk7;
u8 unk8;
u16 unk2;
u16 fadeInTime;
u8 filler2[4];
u32 filler3[3];
} MenuControls;
typedef struct {
u8 aButtonX;
u8 aButtonY;
u8 aButtonText;
u8 bButtonX;
u8 bButtonY;
u8 bButtonText;
u8 rButtonX;
u8 rButtonY;
u8 rButtonText;
u8 settingDict[0];
} PACKED KeyButtonLayout;
extern void sub_080A70AC(const KeyButtonLayout*);
typedef struct {
/*0x00*/ u8 field_0x0;
/*0x01*/ u8 column_idx;
/*0x02*/ u8 field_0x2;
/*0x03*/ u8 field_0x3;
/*0x04*/ u8 field_0x4;
/*0x05*/ u8 menuType;
/*0x06*/ u8 overlayType;
/*0x07*/ u8 storyPanelIndex;
/*0x08*/ u16 transitionTimer;
/*0x0a*/ u16 field_0xa;
/*0x0c*/ u8* field_0xc;
} Menu;
typedef struct {
/*0x00*/ Menu base;
/*0x10*/ union {
s32 i;
u16 h[2];
s16 sh[2];
u8 a[4];
} unk10;
/*0x12*/ // u8 field_0x12;
/*0x13*/ // u8 unk13;
/*0x14*/ u8 unk14;
/*0x15*/ u8 unk15;
/*0x16*/ u8 unk16;
/* */ // While struct offsets are usually loaded indirectly, this one is often loaded
/* */ // directly in the code. This happens when you take the address off the field with '&`.
/* */ // Perhaps they had a macro to cast this to different sized arrays.
/*0x17*/ u8 selectMtx;
/*0x18*/ u16 unk18;
/*0x1a*/ union SplitHWord unk1a;
/*0x1c*/ u8 unk1c;
/*0x1d*/ u8 unk1d;
/*0x1e*/ u8 unk1e;
/*0x1f*/ s8 unk1f;
/*0x20*/ u8 unk20;
/*0x21*/ u8 unk21;
/*0x22*/ u8 filler22[6];
/*0x28*/ u8 unk28;
/*0x29*/ u8 unk29;
/*0x2a*/ u8 unk2a;
/*0x2b*/ u8 unk2b;
/*0x2c*/ s8 unk2c;
/*0x2d*/ u8 unk2d;
/*0x2e*/ union SplitHWord unk2e;
} GenericMenu;
static_assert(sizeof(GenericMenu) == 0x30);
typedef struct {
/*0x00*/ Menu base;
/*0x10*/ union SplitWord unk10;
/*0x14*/ u8 filler14[4];
/*0x18*/ u16 unk18;
/*0x1a*/ u16 unk1a;
/*0x1c*/ u8 filler1c[14];
/*0x2a*/ u8 unk2a;
/*0x2b*/ u8 filler2b[1];
/*0x2c*/ s8 unk2c;
/*0x2d*/ u8 filler2d[2];
/*0x2f*/ s8 unk2f;
} KinstoneMenu;
typedef struct {
/*0x00*/ Menu base;
/*0x10*/ union {
u16 h[2];
u8 a[4];
} unk10;
/*0x14*/ u8 filler14[6];
/*0x1a*/ u8 unk1a;
/*0x1b*/ u8 filler1b[1];
/*0x1c*/ u8 figure_idx;
/*0x1d*/ u8 unk1d;
/*0x1e*/ u8 unk1e;
/*0x1f*/ s8 unk1f;
/*0x20*/ u8 unk20;
/*0x21*/ bool8 duplicate;
/*0x22*/ u8 filler22[0xc];
/*0x2e*/ u16 unk2e;
} FigurineMenu;
typedef struct {
/*0x00*/ Menu base;
/*0x10*/ u8 items[17]; // unsure about size
} PauseMenu;
extern Menu gMenu;
#define gGenericMenu (*(GenericMenu*)&gMenu)
#define gKinstoneMenu (*(KinstoneMenu*)&gMenu)
#define gFigurineMenu (*(FigurineMenu*)&gMenu)
#define gPauseMenu (*(PauseMenu*)&gMenu)
extern u8 gUpdateVisibleTiles;
#endif // MENU_H
|