SSBM Decomp
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef MELEE_GR_TYPES_H
2#define MELEE_GR_TYPES_H
3
4#include <platform.h>
5#include <placeholder.h>
6
7#include "gr/forward.h" // IWYU pragma: export
8#include "it/forward.h"
9#include "lb/forward.h"
10#include "sc/forward.h"
11#include <dolphin/gx/forward.h>
12#include <baselib/forward.h>
13
14#include <dolphin/gx/types.h>
15#include <dolphin/mtx/types.h>
16
17typedef struct StageBlastZone {
18 f32 left; // 0x74
19 f32 right; // 0x78
20 f32 top; // 0x7C
21 f32 bottom; // 0x80
23
53
54struct StageInfo {
55 StageCameraInfo cam_info; // 0x00 - 0x70
56 StageBlastZone blast_zone; // 0x74 - 0x80
57
58 u32 x84; // 0x84
59
61
62 struct {
63 u8 b0 : 1;
64 u8 b1 : 1;
65 u8 b2 : 1;
66 u8 b3 : 1;
67 u8 b4 : 1;
68 u8 b5 : 1;
69 u8 b6 : 1;
70 u8 b7 : 1;
76 u8 xA0[4];
77 u8 xA4_pad[0x12C - 0xA4];
80 DynamicsDesc* (*x178)(int);
81 bool (*x17C)(Vec3*, int, HSD_JObj*);
83 u8 x190_pad[0x280 - 0x190];
85 void* x694[4];
86 void* x6A4;
87 /* +6A8 */ struct {
91 /* +6AC */ void* coll_data;
92 /* +6B0 */ UnkStage6B0* param;
93 /* +6B4 */ UNK_T** ald_yaku_all;
94 /* +6B8 */ void* map_ptcl;
95 /* +6BC */ void* map_texg;
96 /* +6C0 */ void* yakumono_param;
97 /* +6C4 */ void* map_plit;
98 /* +6C8 */ void* x6C8;
108 int x6E4[2];
109 u8 x6EC_pad[0x708 - 0x6EC];
123 u8 x744_pad[0x748 - 0x744];
124};
125
126typedef struct StageCallbacks {
127 /* +0 */ void (*callback0)(HSD_GObj*);
128 /* +4 */ bool (*callback1)(HSD_GObj*);
129 /* +8 */ void (*callback2)(HSD_GObj*);
130 /* +C */ void (*callback3)(HSD_GObj*);
131 /* +10 */ union {
132 /* +10 */ u32 flags;
133 struct {
134 /* +10:0 */ u8 flags_b0 : 1;
135 /* +10:1 */ u8 flags_b1 : 1;
136 /* +10:2 */ u8 flags_b2 : 1;
137 /* +10:3 */ u8 flags_b3 : 1;
138 /* +10:4 */ u8 flags_b4 : 1;
139 /* +10:5 */ u8 flags_b5 : 1;
140 /* +10:6 */ u8 flags_b6 : 1;
141 /* +10:7 */ u8 flags_b7 : 1;
142 };
143 };
145
146typedef struct StageData {
149 char* data1;
150 void (*callback0)(void);
151 void (*callback1)(int);
152 void (*callback2)(void);
153 void (*callback3)(void);
154 bool (*callback4)(void);
155 DynamicsDesc* (*callback5)(enum_t);
159 size_t x30; // size of x2C array
160} StageData;
161
166
168 int xC4;
169 int xC8;
170 int xCC;
171 int xD0;
172 int xD4;
173 int xD8;
174 float xDC;
175 u8 xE0_pad[0x218 - 0xE0];
176};
177
188
192 int xCC;
193 int xD0;
194 int xD4;
195 int xD8;
196 float xDC;
197 u8 xE0_pad[0x218 - 0xE0];
198};
199
201 short xC4;
202 short xC6;
203 short xC8;
204 short xCA;
206 float xD0;
207 float xD4;
208 float xD8;
209 float xDC;
210 u8 xE0_pad[0x218 - 0xE0];
211};
212
225
235
243
245 /* gp+C4 */ f32 xC4;
246 /* gp+C8 */ f32 xC8;
247 /* gp+CC */ f32 xCC;
248 /* gp+D0 */ union {
249 struct {
250 void* keep;
252 } u;
253 /* gp+D4 */ f32 xD4;
254 /* gp+D8 */ f32 xD8;
255 /* gp+DC */ HSD_JObj* xDC;
256 /* gp+E0 */ HSD_JObj* xE0;
257 /* gp+E4 */ s16 xE4;
258 /* gp+E6 */ s16 xE6;
259 /* gp+E8 */ f32 xE8;
260 u8 xEC_pad[0x218 - 0xEC];
261};
262
277
278// @todo: Investigate if these extra structs could be
279// shared among stages/other things as more are decompiled.
281 /* gp+C4 */ s16 xC4;
282 /* gp+C6 */ s16 xC6;
283 /* gp+C8 */ s16 xC8;
284 /* gp+CA */ s16 xCA;
293 u8 xE0_pad[0x218 - 0xE0];
294};
295
297 /* +0 gp+C4 */ char pad_0[0x68];
298 /* +68 gp+12C */ HSD_JObj* x68;
299};
300
302 /* +0 gp+C4 */ char pad_0[0x14];
303 /* +0 gp+D8 */ s16 xD8;
304};
305
306struct Ground {
307 int x0; // 0x0
308 HSD_GObj* gobj; // 0x4
311 struct {
312 u8 b0 : 1;
313 u8 b1 : 1;
314 u8 b2 : 1;
315 u8 b3 : 1;
316 u8 b4 : 1;
317 u8 b5 : 1;
318 u8 b6 : 1;
319 u8 b7 : 1;
321 struct {
322 u8 b012 : 3;
323 u8 b3 : 1;
324 u8 b4 : 1;
325 u8 b5 : 1;
326 u8 b6 : 1;
327 u8 b7 : 1;
329
331 HSD_GObj* x18; // 0x18
333 int x20[8];
334 char pad_40[0xC4 - 0x40];
349};
350
351// Appears to be related to stage audio
363
364// TODO: what is this struct?
398
401 u32 unk4; // flags
402};
403
405 /* +0 */ struct HSD_Joint* unk0;
406 /* +4 */ u8 _4[0x10 - 0x4];
408 /* +14 */ UNK_T x14;
409 /* +18 */ UNK_T x18;
410 /* +1C */ HSD_FogDesc* x1C;
411 /* +20 */ S16Vec3* unk20;
412 /* +24 */ s32 unk24; // size of unk20 array
413 /* +28 */ UNK_T x28;
414 /* +2C */ s16* x2C;
415 /* +30 */ int x30;
416};
417
436STATIC_ASSERT(sizeof(struct UnkStageDat_x8_t) == 0x34);
437
443
444#endif
InternalStageId
Definition forward.h:42
#define UNK_T
unsigned long u32
An unsigned 32-bit integer.
Definition platform.h:26
#define STATIC_ASSERT(cond)
Definition platform.h:161
float f32
A 32-bit floating-point number.
Definition platform.h:62
signed short s16
A signed 16-bit integer.
Definition platform.h:11
int enum_t
The underlying type of an enum, used as a placeholder.
Definition platform.h:74
signed long s32
A signed 32-bit integer.
Definition platform.h:14
unsigned char u8
An unsigned 8-bit integer.
Definition platform.h:20
int bool
A signed integer used to contain boolean values.
Definition stdbool.h:8
Definition types.h:183
Model with multiple animations.
Definition types.h:16
Definition types.dox:1
Definition types.h:236
s32 xD0
Definition types.h:240
grDynamicAttr_UnkStruct * xCC
Definition types.h:239
s32 xD4
Definition types.h:241
f32 xC8
Definition types.h:238
s32 xC4
Definition types.h:237
Definition types.h:213
u8 xC7
Definition types.h:217
s16 xC8
Definition types.h:218
s32 xD4
Definition types.h:223
u8 xC6
Definition types.h:216
s16 xCE
Definition types.h:221
s32 xD0
Definition types.h:222
u8 xC5
Definition types.h:215
u8 xC4
Definition types.h:214
s16 xCC
Definition types.h:220
s16 xCA
Definition types.h:219
Definition types.h:189
int xD0
Definition types.h:193
HSD_JObj * xC4
Definition types.h:190
HSD_JObj * xC8
Definition types.h:191
int xD4
Definition types.h:194
int xCC
Definition types.h:192
float xDC
Definition types.h:196
int xD8
Definition types.h:195
u8 xE0_pad[0x218 - 0xE0]
Definition types.h:197
Definition types.h:200
short xC6
Definition types.h:202
short xC4
Definition types.h:201
float xD4
Definition types.h:207
short xC8
Definition types.h:203
float xD8
Definition types.h:208
float xD0
Definition types.h:206
HSD_JObj * xCC
Definition types.h:205
short xCA
Definition types.h:204
u8 xE0_pad[0x218 - 0xE0]
Definition types.h:210
float xDC
Definition types.h:209
Definition types.h:178
int xD8
Definition types.h:184
HSD_GObj * xC8
Definition types.h:180
HSD_GObj * xCC
Definition types.h:181
HSD_JObj * xD0
Definition types.h:182
float xDC
Definition types.h:185
HSD_TObj * xC4
Definition types.h:179
u8 xE0_pad[0x218 - 0xE0]
Definition types.h:186
HSD_JObj * xD4
Definition types.h:183
Definition types.h:167
int xC8
Definition types.h:169
float xDC
Definition types.h:174
int xC4
Definition types.h:168
int xD4
Definition types.h:172
u8 xE0_pad[0x218 - 0xE0]
Definition types.h:175
int xD0
Definition types.h:171
int xD8
Definition types.h:173
int xCC
Definition types.h:170
Definition types.h:306
int x20[8]
Definition types.h:333
u8 b0
Definition types.h:312
struct Ground::@171 x10_flags
HSD_GObjEvent xC_callback
Definition types.h:310
int x0
Definition types.h:307
HSD_GObjEvent x8_callback
Definition types.h:309
u8 b1
Definition types.h:313
u8 b6
Definition types.h:318
char pad_40[0xC4 - 0x40]
Definition types.h:334
union Ground::GroundVars gv
HSD_GObj * gobj
Definition types.h:308
u8 b7
Definition types.h:319
struct Ground::@172 x11_flags
u8 b012
Definition types.h:322
HSD_GObj * x18
Definition types.h:331
HSD_GObjEvent x1C_callback
Definition types.h:332
InternalStageId map_id
Definition types.h:330
u8 b5
Definition types.h:317
u8 b4
Definition types.h:316
u8 b3
Definition types.h:315
u8 b2
Definition types.h:314
Definition archive.h:34
Definition cobj.h:110
Definition fog.h:46
Definition gobj.h:25
Definition jobj.h:108
Definition jobj.h:130
Definition spline.h:10
Definition tobj.h:133
Definition types.h:29
Definition types.h:17
f32 right
Definition types.h:19
f32 top
Definition types.h:20
f32 left
Definition types.h:18
f32 bottom
Definition types.h:21
Definition types.h:126
u8 flags_b5
Definition types.h:139
u8 flags_b1
Definition types.h:135
u8 flags_b3
Definition types.h:137
bool(* callback1)(HSD_GObj *)
Definition types.h:128
u8 flags_b2
Definition types.h:136
u8 flags_b6
Definition types.h:140
void(* callback0)(HSD_GObj *)
Definition types.h:127
void(* callback3)(HSD_GObj *)
Definition types.h:130
u8 flags_b0
Definition types.h:134
void(* callback2)(HSD_GObj *)
Definition types.h:129
u8 flags_b4
Definition types.h:138
u32 flags
Definition types.h:132
u8 flags_b7
Definition types.h:141
Definition types.h:27
f32 pausecam_zpos_max
Definition types.h:43
f32 pausecam_zpos_min
Definition types.h:41
f32 cam_vertical_tilt
Definition types.h:31
f32 x3C
Definition types.h:40
Vec3 fixed_cam_pos
Definition types.h:48
f32 cam_zoom_rate
Definition types.h:38
f32 fixed_cam_fov
Definition types.h:49
StageBlastZone cam_bounds
Definition types.h:28
f32 x24
Definition types.h:34
f32 cam_pan_degrees
Definition types.h:32
f32 cam_angle_right
Definition types.h:47
f32 pausecam_zpos_init
Definition types.h:42
f32 cam_angle_up
Definition types.h:44
f32 cam_track_smooth
Definition types.h:37
f32 cam_x_offset
Definition types.h:29
f32 cam_max_depth
Definition types.h:39
f32 x20
Definition types.h:33
f32 cam_track_ratio
Definition types.h:35
f32 cam_y_offset
Definition types.h:30
f32 cam_angle_down
Definition types.h:45
f32 fixed_cam_horz_angle
Definition types.h:51
f32 cam_fixed_zoom
Definition types.h:36
f32 cam_angle_left
Definition types.h:46
f32 fixed_cam_vert_angle
Definition types.h:50
Definition types.h:146
bool(* callback4)(void)
Definition types.h:154
u32 flags2
Definition types.h:157
u32 flags1
Definition types.h:147
size_t x30
Definition types.h:159
bool(* callback6)(Vec3 *, int, HSD_JObj *)
Definition types.h:156
void(* callback2)(void)
Definition types.h:152
void(* callback0)(void)
Definition types.h:150
void(* callback1)(int)
Definition types.h:151
S16Vec3 * x2C
Definition types.h:158
char * data1
Definition types.h:149
StageCallbacks * callbacks
Definition types.h:148
void(* callback3)(void)
Definition types.h:153
Definition types.h:54
u8 b5
Definition types.h:68
void * x694[4]
Definition types.h:85
u8 b6
Definition types.h:69
struct StageInfo::@164 ** itemdata
u8 b3
Definition types.h:66
u8 b1
Definition types.h:64
int x6E4[2]
Definition types.h:108
Vec3 x730
Definition types.h:120
Article * unk4
Definition types.h:89
void * map_ptcl
Definition types.h:94
s16 x6DE
Definition types.h:106
void * x6A4
Definition types.h:86
s32 x94
Definition types.h:73
s32 x90
Definition types.h:72
u8 x190_pad[0x280 - 0x190]
Definition types.h:83
f32 x728
Definition types.h:118
HSD_JObj * x280[261]
Definition types.h:84
s32 x714
Definition types.h:113
Vec3 x13C
Definition types.h:79
u8 b2
Definition types.h:65
f32 x70C
Definition types.h:111
s16 x6D4
Definition types.h:102
void * yakumono_param
Definition types.h:96
void * map_plit
Definition types.h:97
Vec3 x130
Definition types.h:79
void * x6C8
Definition types.h:98
InternalStageId internal_stage_id
Definition types.h:60
UnkStage6B0 * param
Definition types.h:92
u8 b0
Definition types.h:63
s32 x9C
Definition types.h:75
HSD_GObj * x12C
Definition types.h:78
u32 x84
Definition types.h:58
Vec3 x16C
Definition types.h:79
f32 x710
Definition types.h:112
u8 x744_pad[0x748 - 0x744]
Definition types.h:123
s16 x6D0
Definition types.h:100
f32 x71C
Definition types.h:115
s16 x6D6
Definition types.h:103
f32 x6E0
Definition types.h:107
s16 x6D2
Definition types.h:101
u8 b4
Definition types.h:67
u8 x6EC_pad[0x708 - 0x6EC]
Definition types.h:109
s32 x98
Definition types.h:74
struct StageInfo::@163 unk8C
f32 x718
Definition types.h:114
u8 b7
Definition types.h:70
bool(* x17C)(Vec3 *, int, HSD_JObj *)
Definition types.h:81
DynamicModelDesc * quake_model_set
Definition types.h:99
u8 xA0[4]
Definition types.h:76
void * coll_data
Definition types.h:91
s32 unk0
Definition types.h:88
s16 x708
Definition types.h:110
StageBlastZone blast_zone
Definition types.h:56
UNK_T ** ald_yaku_all
Definition types.h:93
u8 xA4_pad[0x12C - 0xA4]
Definition types.h:77
HSD_GObj * x72C
Definition types.h:119
HSD_GObj * x180[4]
Definition types.h:82
s32 x720
Definition types.h:116
f32 x73C
Definition types.h:121
StageCameraInfo cam_info
Definition types.h:55
Vec3 x148
Definition types.h:79
void * map_texg
Definition types.h:95
s32 x740
Definition types.h:122
Vec3 x160
Definition types.h:79
Vec3 x154
Definition types.h:79
s32 x6D8
Definition types.h:104
f32 x724
Definition types.h:117
s16 x6DC
Definition types.h:105
Definition types.h:162
s32 stage_id
Definition types.h:163
s32 list_idx
Definition types.h:164
Definition types.h:438
UnkStageDat * unk4
Definition types.h:440
HSD_Archive * unk0
Definition types.h:439
s32 unk8
Definition types.h:441
Definition types.h:352
s16 x14
Definition types.h:358
u32 xC
Definition types.h:356
s16 x16
Definition types.h:359
u32 x10
Definition types.h:357
s16 x18
Definition types.h:360
u8 pad[0x64 - 0x1A]
Definition types.h:361
s32 x8
Definition types.h:355
s32 x4
Definition types.h:354
s32 x0
Definition types.h:353
Definition types.h:365
s16 x4
Definition types.h:367
f32 x24
Definition types.h:375
s32 x38
Definition types.h:380
s32 xD4
Definition types.h:395
s32 x34
Definition types.h:379
UnkBgmStruct * xB0
Definition types.h:386
s32 x14
Definition types.h:373
s32 xCC
Definition types.h:393
f32 x54
Definition types.h:383
s32 xB4
Definition types.h:387
s32 x10
Definition types.h:372
f32 x5C
Definition types.h:383
s32 xC8
Definition types.h:392
f32 x18
Definition types.h:374
f32 x50
Definition types.h:383
s32 x30
Definition types.h:378
f32 x64
Definition types.h:383
s32 xD0
Definition types.h:394
u8 x2C_pad[0x2E - 0x2C]
Definition types.h:376
s32 xC0
Definition types.h:390
f32 x44
Definition types.h:381
f32 x20
Definition types.h:375
f32 x48
Definition types.h:381
f32 x40
Definition types.h:381
s32 xC4
Definition types.h:391
u8 x6C_pad[0xB0 - 0x6A]
Definition types.h:385
f32 x3C
Definition types.h:381
s32 xC
Definition types.h:371
s32 xD8
Definition types.h:396
s16 x2E
Definition types.h:377
f32 x60
Definition types.h:383
s32 xBC
Definition types.h:389
s16 x68
Definition types.h:384
s16 x8
Definition types.h:369
s32 xB8
Definition types.h:388
s16 xA
Definition types.h:370
f32 x28
Definition types.h:375
bool x4C_fixed_cam
Definition types.h:382
f32 x0
Definition types.h:366
f32 x58
Definition types.h:383
u8 x6_pad[2]
Definition types.h:368
f32 x1C
Definition types.h:375
Definition types.h:399
u32 unk4
Definition types.h:401
u8 x0_fill[0x4]
Definition types.h:400
Definition types.h:404
u8 _4[0x10 - 0x4]
Definition types.h:406
HSD_FogDesc * x1C
Definition types.h:410
s16 * x2C
Definition types.h:414
UNK_T x18
Definition types.h:409
struct HSD_Joint * unk0
Definition types.h:405
HSD_CameraDescPerspective * x10
Definition types.h:407
UNK_T x28
Definition types.h:413
UNK_T x14
Definition types.h:408
int x30
Definition types.h:415
S16Vec3 * unk20
Definition types.h:411
s32 unk24
Definition types.h:412
Definition types.h:418
void * unk0
Definition types.h:419
s32 unk4
Definition types.h:420
s32 unk2C
Definition types.h:434
struct UnkStageDat_x8_t * unk8
Definition types.h:422
s32 unk24
Definition types.h:431
HSD_Spline ** unk10
Definition types.h:425
s32 unk14
Definition types.h:426
void * unk20
Definition types.h:430
u8 x18_fill[0x20 - 0x18]
Definition types.h:428
UnkStageDatInternal ** unk28
Definition types.h:433
s32 unkC
Definition types.h:423
Definition types.h:13
Definition types.h:296
HSD_JObj * x68
Definition types.h:298
char pad_0[0x68]
Definition types.h:297
Definition types.h:226
grDynamicAttr_UnkStruct * next
Definition types.h:227
f32 unk18
Definition types.h:231
s32 unk14
Definition types.h:230
u8 x0_fill[0x24 - 0x20]
Definition types.h:233
Vec3 unk8
Definition types.h:229
s32 unk1C
Definition types.h:232
s32 unk4
Definition types.h:228
Definition types.h:301
char pad_0[0x14]
Definition types.h:302
s16 xD8
Definition types.h:303
Definition types.h:263
f32 xE0
Definition types.h:272
HSD_Spline * xC4
Definition types.h:264
f32 xD8
Definition types.h:270
s16 xCE
Definition types.h:267
f32 xDC
Definition types.h:271
f32 xE8
Definition types.h:274
u8 xE0_pad[0x218 - 0xE0]
Definition types.h:275
f32 xD0
Definition types.h:268
f32 xC8
Definition types.h:265
f32 xD4
Definition types.h:269
s16 xCC
Definition types.h:266
f32 xE4
Definition types.h:273
Definition types.h:280
f32 xE8
Definition types.h:292
f32 xD8
Definition types.h:288
f32 xE0
Definition types.h:290
HSD_JObj * xCC
Definition types.h:285
s16 xC4
Definition types.h:281
f32 xE4
Definition types.h:291
HSD_JObj * xD0
Definition types.h:286
f32 xD4
Definition types.h:287
s16 xCA
Definition types.h:284
u8 xE0_pad[0x218 - 0xE0]
Definition types.h:293
f32 xDC
Definition types.h:289
s16 xC6
Definition types.h:282
s16 xC8
Definition types.h:283
Definition types.h:244
f32 xC8
Definition types.h:246
u8 xEC_pad[0x218 - 0xEC]
Definition types.h:260
f32 xE8
Definition types.h:259
s16 xE4
Definition types.h:257
f32 xC4
Definition types.h:245
HSD_JObj * xE0
Definition types.h:256
HSD_JObj * xDC
Definition types.h:255
f32 xD4
Definition types.h:253
void * keep
Definition types.h:250
f32 xD8
Definition types.h:254
s16 xE6
Definition types.h:258
struct grKongo_GroundVars::@169::@170 taru
f32 xCC
Definition types.h:247
union grKongo_GroundVars::@169 u
Definition lbcollision.c:66
void(* HSD_GObjEvent)(HSD_GObj *gobj)
Definition forward.h:101
Definition types.h:335
struct grKongo_GroundVars3 kongo3
Definition types.h:345
struct GroundVars_izumi izumi
Definition types.h:340
struct GroundVars_flatzone2 flatzone2
Definition types.h:339
struct grKongo_GroundVars2 kongo2
Definition types.h:344
struct GroundVars_flatzone flatzone
Definition types.h:338
char pad_0[0x218 - 0xC4]
Definition types.h:336
struct grCorneria_GroundVars corneria
Definition types.h:346
struct GroundVars_izumi2 izumi2
Definition types.h:341
struct GroundVars_izumi3 izumi3
Definition types.h:342
struct grIceMt_GroundVars icemt
Definition types.h:347
struct grKongo_GroundVars kongo
Definition types.h:343