-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathnamespace_RectMenu.h
159 lines (127 loc) · 3.29 KB
/
namespace_RectMenu.h
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
enum MenuFlags
{
// menu's X position will be used to center it horizontally
CENTER_ON_X = 1,
// menu's Y position will be used to center it vertically
CENTER_ON_Y = 2,
// menu will be centered on these coordinates
CENTER_ON_COORDS = 3,
// only draws the menu's title
ONLY_DRAW_TITLE = 4,
// 8
// allows drawing another menu box while a menu box is being drawn
// position is automatically derived from originating menu, so cascading windows are easier
DRAW_NEXT_MENU_IN_HIERARCHY = 0x10,
DISABLE_INPUT_ALLOW_FUNCPTRS = 0x20,
// menu will display a single row that changes as you press a direction
// kind of like scrolling
SHOW_ONLY_HIGHLIT_ROW = 0x40,
// instead of the big font, menu will use the small font
USE_SMALL_FONT = 0x80,
// 0x100
// 0x200
EXECUTE_FUNCPTR = 0x400,
// 0x800
// needs a better name, apparently it's for when it's closed/closing
NEEDS_TO_CLOSE = 0x1000,
INVISIBLE = 0x2000,
// title will use big text
// to be used in conjunction with "USE_SMALL_FONT_IN_ROWS"
BIG_TEXT_IN_TITLE = 0x4000,
ALL_PLAYERS_USE_MENU = 0x8000,
KEEP_INPUTS_IN_SUBMENU = 0x10000,
// 0x20000
// 0x40000
// 0x80000
MENU_CANT_GO_BACK = 0x100000,
// 0x200000
// 0x400000
MUTE_SOUND_OF_MOVING_CURSOR = 0x800000
};
struct MenuRow
{
// can have values above 0xFF,
// such as 0x155 for "Controller 1C",
// sometimes the top bit 0x8000 is used,
// like VS 2P,3P,4P in main menu, to
// determine if the row is "locked"
// 0x0
short stringIndex;
// 0x2
char rowOnPressUp;
// 0x3
char rowOnPressDown;
// 0x4
char rowOnPressLeft;
// 0x5
char rowOnPressRight;
};
struct RectMenu
{
// 0x0
short stringIndexTitle; // string index of title (null, with no row)
// position for current frame
unsigned short posX_curr; // X position
unsigned short posY_curr; // Y position
// 0x6
unsigned short unk1;
// 0x8
// This is an int, see FUN_800469dc
// & 1, centers posY
// & 2, centers posX
// & 4, draw only title bar
// & 0x10, draw ptrNextBox_InHierarchy
// & 0x20, disable menu input, allow menu funcptr
// & 0x40, show only highlighted row
// & 0x28, main menu character select (better meaning)?
// & 0x80, tiny text in rows
// & 0xFF, row height (state>>7)
// & 0x400, execute menu funcptr
// & 0x800, ??? used in 221 menu
// & 0x1000, needs to close
// & 0x2000, invisible
// & 0x4000, big text in title
// & 0x8000, anyone can use menu
// & 0x100000, top of menu hierarchy
// & 0x800000, mute sound of moving cursor
unsigned int state;
// 0xC
struct MenuRow* rows;
// 0x10
void (*funcPtr)(struct RectMenu* m);
// 0x14
// text color, box color, etc
// one-byte variable with
// two-byte alignment
u_short drawStyle;
// 0x16
// position for previous frame
short posX_prev;
short posY_prev;
// 0x1a
short rowSelected;
// 0x1c
short unk1c;
// 0x1e
// no idea, used in save/load
short unk1e;
// 0x20
short width;
short height;
// 0x24
struct RectMenu* ptrNextBox_InHierarchy;
// 0x28
struct RectMenu* ptrPrevBox_InHierarchy;
// End of struct
// in UsaRetail, full struct
// size is 0x2C
#if BUILD == SepReview
unsigned char theRest[8]; // extra size?
#endif
};
_Static_assert(sizeof(struct MenuRow) == 6);
#if BUILD != SepReview
_Static_assert(sizeof(struct RectMenu) == 0x2C);
#else
_Static_assert(sizeof(struct RectMenu) == 0x34);
#endif