SSBM Decomp
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef MELEE_MN_TYPES_H
2#define MELEE_MN_TYPES_H
3
4#include "platform.h"
5
6#include <placeholder.h>
7
8#include "mn/forward.h" // IWYU pragma: export
9
10#include <baselib/sislib.h>
11
12typedef struct {
13 u8 cursor; // @todo are these arbitrary variables the menus can use in any
14 // way?
15 u8 unk1;
16 u8 unk2;
17 u8 unk3;
19} Menu;
20// size 0x8
21
22#ifdef M2CTX
23typedef struct Menu_GObj Menu_GObj;
24struct Menu_GObj {
25 /* +0 */ u16 classifier;
26 /* +2 */ u8 p_link;
27 /* +3 */ u8 gx_link;
28 /* +4 */ u8 p_priority;
29 /* +5 */ u8 render_priority;
30 /* +6 */ u8 obj_kind;
31 /* +7 */ u8 user_data_kind;
32 /* +8 */ Menu_GObj* next;
33 /* +C */ Menu_GObj* prev;
34 /* +10 */ Menu_GObj* next_gx;
35 /* +14 */ Menu_GObj* prev_gx;
36 /* +18 */ HSD_GObjProc* proc;
37 /* +1C */ void (*rendered)(Menu_GObj* gobj, s32 code);
38 /* +20 */ u64 gxlink_prios;
39 /* +28 */ HSD_JObj* hsd_obj;
40 /* +2C */ Menu* user_data;
41 /* +30 */ void (*user_data_remove_func)(Fighter* data);
42 /* +34 */ void* x34_unk;
43};
44#else
45typedef struct HSD_GObj Menu_GObj;
46#endif
47
49 /*0x00*/ s8 c_kind;
50 /*0x01*/ u8 slot_type;
51 /*0x02*/ s8 stocks; // stocks
52 /*0x03*/ u8 color; // color
53 /*0x04*/ u8 slot; // port
54 /*0x05*/ s8 x5; // spawnpos32
55 /*0x06*/ s8 spawn_dir; // spawn direction
56 /*0x07*/ u8 sub_color; // subcolor
57 /*0x08*/ s8 handicap; // handicap
58 /*0x09*/ u8 team; // team
59 /*0x0A*/ s8 xA; // nametag
60 /*0x0B*/ u8 xB;
61 /*0x0C*/ u8 xC_b0 : 1;
62 u8 xC_b1 : 1;
63 u8 xC_b2 : 1;
64 u8 xC_b3 : 1;
65 u8 xC_b4 : 1;
66 u8 xC_b5 : 1;
67 u8 xC_b6 : 1;
68 u8 xC_b7 : 1;
69 /*0x0D*/ u8 xD_b0 : 1;
70 u8 xD_b1 : 1;
71 u8 xD_b2 : 1;
72 u8 xD_b3 : 1;
73 u8 xD_b4 : 1;
74 u8 xD_b5 : 1;
75 u8 xD_b6 : 1;
76 u8 xD_b7 : 1;
77 /*0x0E*/ u8 xE;
78 /*0x0F*/ u8 cpu_level; // CPU level
79 /*0x10*/ u16 x10;
80 /*0x12*/ u16 x12;
81 /*0x14*/ u16 hp;
82 /*0x18*/ float x18;
83 /*0x1C*/ float x1C;
84 /*0x20*/ float x20;
85};
86
88 u32 x0_0 : 3; // match mode? 1 = stock mode, 2 = coin mode?
89 u32 x0_3 : 3;
90 u32 x0_6 : 1;
91 u32 x0_7 : 1;
92
93 u32 x1_0 : 1;
94 u32 x1_1 : 1;
95 u32 x1_2 : 1;
96 u32 x1_3 : 1;
97 u32 x1_4 : 1;
98 u32 x1_5 : 1;
99 u32 timer_shows_hours : 1; // false=65:00.00, true=1:05:00.00
100
101 u32 x1_7 : 1;
102
103 u32 x2_0 : 1;
104 u32 x2_1 : 1;
105 u32 x2_2 : 1;
106 u32 x2_3 : 1;
107 u32 x2_4 : 1;
108 u32 x2_5 : 1;
109 u32 x2_6 : 1;
110 u32 x2_7 : 1;
111
112 u32 x3_0 : 1;
113 u32 x3_1 : 1;
114 u32 x3_2 : 1;
115 u32 x3_3 : 1;
116 u32 x3_4 : 1;
117 u32 x3_5 : 1;
118 u32 x3_6 : 1;
119 u32 x3_7 : 1;
120
121 u32 x4_0 : 1;
122 u32 x4_1 : 1;
123 u32 x4_2 : 1;
124 u32 x4_3 : 1;
125 u32 x4_4 : 1;
126 u32 x4_5 : 1;
127 u32 x4_6 : 1;
128 u32 x4_7 : 1;
129
130 u32 x5_0 : 1;
131 u32 x5_1 : 1;
132 u32 x5_2 : 1;
133 u32 x5_3 : 1;
134 u32 x5_4 : 1;
135 u32 x5_5 : 1;
136 u32 x5_6 : 1;
137 u32 x5_7 : 1;
138
139 u8 x6;
140 u8 x7; // end graphic / SFX type
141 u8 x8; // is teams
142 u8 x9;
143 u8 xA;
144 s8 xB; // item frequency
145 s8 xC; // SD penalty
146 u8 xD;
147 u16 xE; // InternalStageId
148
149 u32 x10; // time limit
150 u8 x14;
151 u32 x18;
152 u32 x1C_pad[(0x20 - 0x1C) / 4];
153
154 u64 x20; // item mask
155 int x28;
156 float x2C;
157 float x30; // damage ratio
158 float x34; // game speed
159 void (*x38)(int); // on unpause callback
160 void (*x3C)(int); // on pause callback (conditional?)
161 int (*x40)(void); // on pause callback
162 void (*x44)(void); // on VS match start callback
163 void (*x48)(void); // ingame pre-frame callback
164 void (*x4C)(void); // ingame post-frame callback
165 void (*x50)(int); // on VS match end callback
166 struct {
167 u8 pad_x0[0x10];
168 u8 x10_b0 : 1;
169 u8 x10_b1 : 1;
170 }* x54;
171 int x58;
172 u8 pad_x5C[0x60 - 0x5C];
173};
174
179
181 /* +0 */ s8 loser;
183 /* +2 */ s8 winner;
184 /* +3 */ u8 unk_0x3;
185 /* +4 */ u8 unk_0x4;
186 /* +5 */ u8 unk_0x5;
187 /* +6 */ u8 unk_0x6;
188 /* +7 */ u8 unk_0x7;
190};
191
199
201 u16 mode_ffa_frame; // 0x00 - Anim frame used for top-left mode texture
202 u16 mode_teams_frame; // 0x02 - Anim frame used for top-left mode texture
203 int enter_sfx; // 0x04 - Announcer sfx when entering CSS
204};
205
211
239
240struct CSSIcon {
241 u8 ft_hudindex; // 0x00 - used for getting combo count @ 8025C0C4
242 u8 char_kind; // 0x01 - icons external ID
243 u8 state; // 0x02 - 0x0 Not Unlocked, 0x01 Unlocked, 0x02 Unlocked and disp
244 u8 anim_timer; // 0x03 - 0xC when char is chosen
245 u8 joint_id_vs; // 0x04 - Vs Icon Bg Jobj ID
246 u8 joint_id_1p; // 0x05 - Vs Icon Bg Jobj ID
247 int sfx; // 0x08
248 float bound_l; // 0x0C
249 float bound_r; // 0x10
250 float bound_u; // 0x14
251 float bound_d; // 0x18
252};
253
255 u8 gnw_name[0x1C]; // 0x0
257};
258
259struct CSSDoor {
260 u8 emblem_joint; // 0x00
261 u8 costume_joint; // 0x01
262 u8 team_joint; // 0x02
263 u8 door_joint; // 0x03
264 u8 bg_joint; // 0x04
265 u8 player_indicator_joint; // 0x05 - Nametag window joint id (to scroll and
266 // choose a name)
267 u8 slidername_joint; // 0x06 - Slider name joint
268 u8 cpuslider_joint; // 0x07 - Used when only CPU is showing
269 u8 cpuslider2_joint; // 0x08 - Used when handicap is also showing
270 u8 selected_since_load; // 0x09 - Determines when player selected since the
271 // CSS loaded
272
273 u8 team; // 0x0A
274 u8 p_kind; // 0x0B - PlayerKind, 0x0 = HMN, 0x1 = CPU, 0x3 = Closed
275 u8 p_kind_prev; // 0x0C
276 u8 costume; // 0x0D
277 u8 sel_icon; // 0x0E - Icon this player has selected
278 u8 sel_icon_prev; // 0x0F
279 u8 dooranim_timer; // 0x10
283
284 float togglebtn_left; // 0x14 - HMN button bound
285 float togglebtn_right; // 0x18 - HMN button bound
286 float teambtn_left; // 0x1C - Team button bound
287 float teambtn_right; // 0x20 - Team button bound
288};
289
293 float x8; // 0x08
294 float scroll_amt; // 0x0C
295 float scroll_force; // 0x10
296 int timer; // 0x14
297 u8 next_tag; // 0x18
298 u8 port; // 0x19
299 u8 state; // 0x1A
300 u8 use_tag; // 0x1B
301};
302
303struct CSSTag {
304 CSSTagData* data; // 0x00
305 u8 x4; // 0x04
306 u8 list_joint; // 0x05
307 u8 name_jointl; // 0x06
308 u8 x7; // 0x07
310 u8 x9; // 0x09
311 u8 xa; // 0x0A
312 u8 xb; // 0x0B
313};
314
315struct CSSKOStar {
317 float x4; // 0x04
318 u8 joint; // 0x08
319 int xc; // 0x0C
320 int x10; // 0x10
321 int x14; // 0x14
322 int x18; // 0x18
323 int x1c; // 0x1C
324};
325
327 CSSDoor doors[4]; // 0x00
328 CSSTag tags[4]; // 0x90
329 u8 xc0;
330 u8 xc1;
331 u8 xc2;
332 u8 xc3;
333 u8 xc4;
336 u8 xc7;
337 u8 xc8;
338 u8 xc9;
339 u8 xca;
340 u8 xcb;
341 u8 xcc;
342 u8 xcd;
343 u8 xce;
344 int xcf;
345 int xd3;
346 float xd7;
347 float xdb;
348 float xdf;
349 float xe3;
350 float xe7;
351 float xeb;
352};
353
355 u8 xf0[5];
356 float xf8;
357 float xfc;
358 float x100;
359 float x104;
360 float x108;
361 float x10c;
362 CSSKOStar ko_stars[4]; // 0x110
363};
364
366 char pad_0[0x96000];
367};
368STATIC_ASSERT(sizeof(struct mnGallery_804A0B90_t) == 0x96000);
369
370struct SSSData {
371 /* +00 */ u8 unk_stage;
372 /* +01 */ u8 x1;
373 /* +02 */ u8 no_lras;
374 /* +03 */ s8 force_stage_id;
375 /* +04 */ u8 start_game;
376 /* +08 */ VsModeData data;
377};
378
379#endif
HSD_Pad prev
Definition dbinit.c:23
CSSIconJointId
Definition types.h:212
@ ICONJOINT_DONKEY
Definition types.h:224
@ ICONJOINT_DRMARIO
Definition types.h:213
@ ICONJOINT_YOSHI
Definition types.h:223
@ ICONJOINT_PIKACHU
Definition types.h:233
@ ICONJOINT_PURIN
Definition types.h:234
@ ICONJOINT_PEACH
Definition types.h:222
@ ICONJOINT_FALCO
Definition types.h:214
@ ICONJOINT_LINK
Definition types.h:232
@ ICONJOINT_KIRBY
Definition types.h:229
@ ICONJOINT_PICHU
Definition types.h:217
@ ICONJOINT_CAPTAIN
Definition types.h:225
@ ICONJOINT_MEWTWO
Definition types.h:235
@ ICONJOINT_KOOPA
Definition types.h:221
@ ICONJOINT_MARIO
Definition types.h:219
@ ICONJOINT_GANON
Definition types.h:215
@ ICONJOINT_NESS
Definition types.h:227
@ ICONJOINT_MARS
Definition types.h:237
@ ICONJOINT_POPONANA
Definition types.h:228
@ ICONJOINT_GAMEWATCH
Definition types.h:236
@ ICONJOINT_ZELDA
Definition types.h:231
@ ICONJOINT_FOX
Definition types.h:226
@ ICONJOINT_CLINK
Definition types.h:216
@ ICONJOINT_SAMUS
Definition types.h:230
@ ICONJOINT_EMBLEM
Definition types.h:218
@ ICONJOINT_LUIGI
Definition types.h:220
CSSIconState
Definition types.h:206
@ ICONSTATE_LOCKED
Definition types.h:207
@ ICONSTATE_TEMP
Definition types.h:208
@ ICONSTATE_UNLOCKED
Definition types.h:209
#define STATIC_ASSERT(cond)
Definition platform.h:110
static unsigned long int next
Definition rand.c:3
Definition types.h:192
u8 pending_scene_change
Definition types.h:195
u8 match_type
Definition types.h:194
u8 * ko_star_counts
Definition types.h:196
VsModeData data
Definition types.h:197
u16 unk_0x0
1p port?
Definition types.h:193
Definition types.h:259
u8 cpuslider_joint
Definition types.h:268
u8 is_hold_cpu_slider
Definition types.h:281
u8 emblem_joint
Definition types.h:260
u8 team
Definition types.h:273
u8 p_kind_prev
Definition types.h:275
u8 team_joint
Definition types.h:262
float togglebtn_left
Definition types.h:284
u8 is_hold_handicap_slider
Definition types.h:282
u8 selected_since_load
Definition types.h:270
u8 costume_joint
Definition types.h:261
u8 door_joint
Definition types.h:263
u8 player_indicator_joint
Definition types.h:265
u8 p_kind
Definition types.h:274
u8 sel_icon
Definition types.h:277
float teambtn_right
Definition types.h:287
u8 slidername_joint
Definition types.h:267
float togglebtn_right
Definition types.h:285
u8 bg_joint
Definition types.h:264
u8 sel_icon_prev
Definition types.h:278
u8 dooranim_timer
Definition types.h:279
u8 cpuslider2_joint
Definition types.h:269
float teambtn_left
Definition types.h:286
u8 costume
Definition types.h:276
u8 slideranim_timer
Definition types.h:280
Definition types.h:354
float xfc
Definition types.h:357
float xf8
Definition types.h:356
float x108
Definition types.h:360
CSSKOStar ko_stars[4]
Definition types.h:362
u8 xf0[5]
Definition types.h:355
float x104
Definition types.h:359
float x10c
Definition types.h:361
float x100
Definition types.h:358
Definition types.h:326
u8 xc8
Definition types.h:337
u8 xce
Definition types.h:343
u8 name_list_joint
Definition types.h:334
CSSTag tags[4]
Definition types.h:328
int xcf
Definition types.h:344
u8 xc1
Definition types.h:330
float xdb
Definition types.h:347
u8 xc7
Definition types.h:336
float xd7
Definition types.h:346
float xe3
Definition types.h:349
float xdf
Definition types.h:348
u8 tag_box_joint
Definition types.h:335
u8 xc9
Definition types.h:338
int xd3
Definition types.h:345
u8 xc0
Definition types.h:329
u8 xcb
Definition types.h:340
u8 xc3
Definition types.h:332
u8 xcd
Definition types.h:342
float xe7
Definition types.h:350
u8 xc2
Definition types.h:331
float xeb
Definition types.h:351
u8 xc4
Definition types.h:333
u8 xca
Definition types.h:339
u8 xcc
Definition types.h:341
CSSDoor doors[4]
Definition types.h:327
Definition types.h:240
u8 char_kind
Definition types.h:242
int sfx
Definition types.h:247
float bound_u
Definition types.h:250
u8 anim_timer
Definition types.h:244
float bound_l
Definition types.h:248
float bound_r
Definition types.h:249
u8 state
Definition types.h:243
float bound_d
Definition types.h:251
u8 joint_id_vs
Definition types.h:245
u8 ft_hudindex
Definition types.h:241
u8 joint_id_1p
Definition types.h:246
Definition types.h:254
CSSModeInfo mode_info[24]
Definition types.h:256
u8 gnw_name[0x1C]
Definition types.h:255
Definition types.h:315
int x10
Definition types.h:320
int x18
Definition types.h:322
float x4
Definition types.h:317
int x1c
Definition types.h:323
int xc
Definition types.h:319
int x14
Definition types.h:321
u8 joint
Definition types.h:318
TextGlyphTexture * text
Definition types.h:316
Definition types.h:200
u16 mode_ffa_frame
Definition types.h:201
u16 mode_teams_frame
Definition types.h:202
int enter_sfx
Definition types.h:203
Definition types.h:290
TextGlyphTexture * name_ls
Definition types.h:292
u8 use_tag
Definition types.h:300
float scroll_force
Definition types.h:295
int timer
Definition types.h:296
u8 port
Definition types.h:298
TextGlyphTexture * text
Definition types.h:291
float x8
Definition types.h:293
u8 next_tag
Definition types.h:297
float scroll_amt
Definition types.h:294
u8 state
Definition types.h:299
Definition types.h:303
u8 list_joint
Definition types.h:306
u8 xb
Definition types.h:312
u8 kostar_text_joint
Definition types.h:309
u8 name_jointl
Definition types.h:307
u8 xa
Definition types.h:311
CSSTagData * data
Definition types.h:304
u8 x9
Definition types.h:310
u8 x4
Definition types.h:305
u8 x7
Definition types.h:308
Definition types.h:1078
Definition gobjproc.h:8
was using this to try and fix some matches, unsuccessfully
Definition gobj.h:26
Definition jobj.h:107
Definition sislib.h:37
Definition types.h:12
u8 unk1
Definition types.h:15
u8 unk2
Definition types.h:16
HSD_Text * text
Definition types.h:18
u8 cursor
Definition types.h:13
u8 unk3
Definition types.h:17
Definition types.h:48
s8 spawn_dir
Definition types.h:55
u8 xD_b3
Definition types.h:72
float x20
Definition types.h:84
s8 x5
Definition types.h:54
u8 xC_b1
Definition types.h:62
u8 xD_b1
Definition types.h:70
u16 x12
Definition types.h:80
u8 xB
Definition types.h:60
u16 x10
Definition types.h:79
u8 xD_b2
Definition types.h:71
float x1C
defense ratio
Definition types.h:83
s8 handicap
Definition types.h:57
u8 color
Definition types.h:52
u8 xD_b5
Definition types.h:74
u8 team
Definition types.h:58
u8 xC_b5
Definition types.h:66
u8 xD_b6
Definition types.h:75
u8 xC_b0
rumble enabled
Definition types.h:61
u8 xD_b0
Definition types.h:69
u8 xC_b3
Definition types.h:64
u8 xE
CPU type.
Definition types.h:77
u8 sub_color
Definition types.h:56
u8 xC_b7
Definition types.h:68
u8 cpu_level
Definition types.h:78
u8 xC_b4
invisible
Definition types.h:65
u8 xC_b2
Definition types.h:63
u8 slot
Definition types.h:53
u8 slot_type
uses Gm_PKind values
Definition types.h:50
u8 xC_b6
Definition types.h:67
u8 xD_b4
Definition types.h:73
u16 hp
hit points, for stamina mode
Definition types.h:81
s8 stocks
Definition types.h:51
u8 xD_b7
Definition types.h:76
s8 xA
Definition types.h:59
float x18
offense ratio
Definition types.h:82
s8 c_kind
uses CharacterKind (CKIND_*) values
Definition types.h:49
Definition types.h:370
s8 force_stage_id
Definition types.h:374
u8 start_game
Definition types.h:375
u8 unk_stage
Definition types.h:371
VsModeData data
Definition types.h:376
u8 no_lras
Definition types.h:373
u8 x1
Definition types.h:372
Definition types.h:175
PlayerInitData players[6]
Definition types.h:177
StartMeleeRules rules
Definition types.h:176
Definition types.h:87
u8 x9
Definition types.h:142
u32 x4_4
Definition types.h:125
u8 x10_b1
Definition types.h:169
void(* x44)(void)
Definition types.h:162
u32 x3_4
Definition types.h:116
int(* x40)(void)
Definition types.h:161
u8 x7
Definition types.h:140
u32 x5_2
Definition types.h:132
u32 x0_0
Definition types.h:88
u32 x0_7
timer counts up
Definition types.h:91
u32 x1_2
Definition types.h:95
u32 x4_2
Definition types.h:123
u32 x4_3
Definition types.h:124
u32 x0_3
Definition types.h:89
u32 x5_0
Definition types.h:130
int x58
Definition types.h:171
float x30
Definition types.h:157
u16 xE
Definition types.h:147
u32 timer_shows_hours
Definition types.h:99
u32 x2_6
Definition types.h:109
u8 pad_x0[0x10]
Definition types.h:167
u32 x1_4
Definition types.h:97
u32 x5_5
Definition types.h:135
u8 x14
Definition types.h:150
u32 x2_5
Definition types.h:108
void(* x4C)(void)
Definition types.h:164
u8 x6
Definition types.h:139
u32 x1C_pad[(0x20 - 0x1C)/4]
Definition types.h:152
u32 x5_6
Definition types.h:136
u8 pad_x5C[0x60 - 0x5C]
Definition types.h:172
u32 x4_5
Definition types.h:126
u32 x5_4
Definition types.h:134
u32 x3_1
Definition types.h:113
u32 x10
Definition types.h:149
u32 x2_4
Definition types.h:107
u64 x20
Definition types.h:154
void(* x50)(int)
Definition types.h:165
u8 xD
Definition types.h:146
u32 x1_7
friendly fire on
Definition types.h:101
u32 x5_1
Definition types.h:131
u32 x1_1
Definition types.h:94
u8 x10_b0
Definition types.h:168
void(* x3C)(int)
Definition types.h:160
void(* x48)(void)
Definition types.h:163
s8 xC
Definition types.h:145
u32 x3_0
Definition types.h:112
float x2C
Definition types.h:156
u32 x3_6
Definition types.h:118
u32 x4_7
Definition types.h:128
u32 x3_2
Definition types.h:114
u32 x3_7
Definition types.h:119
u8 x8
Definition types.h:141
u32 x2_3
single-button mode enabled
Definition types.h:106
u32 x0_6
Definition types.h:90
u32 x4_6
Definition types.h:127
int x28
Definition types.h:155
struct StartMeleeRules::@253 * x54
u32 x3_3
Definition types.h:115
void(* x38)(int)
Definition types.h:159
u32 x1_5
Definition types.h:98
u32 x5_7
Definition types.h:137
u32 x1_0
Definition types.h:93
u32 x2_2
Definition types.h:105
u32 x2_1
Definition types.h:104
u8 xA
Definition types.h:143
u32 x4_1
Definition types.h:122
u32 x4_0
Definition types.h:121
s8 xB
Definition types.h:144
float x34
Definition types.h:158
u32 x18
Definition types.h:151
u32 x5_3
Definition types.h:133
u32 x1_3
Definition types.h:96
u32 x2_0
Definition types.h:103
u32 x2_7
Definition types.h:110
u32 x3_5
Definition types.h:117
Definition sislib.h:16
Definition types.h:180
s8 ordered_stage_index
Definition types.h:182
u8 unk_0x4
Definition types.h:185
s8 winner
Definition types.h:183
u8 unk_0x5
Definition types.h:186
s8 loser
Definition types.h:181
u8 unk_0x3
Definition types.h:184
u8 unk_0x6
Definition types.h:187
u8 unk_0x7
Definition types.h:188
StartMeleeData data
Definition types.h:189
Definition types.h:365
char pad_0[0x96000]
Definition types.h:366