SSBM Decomp
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef MELEE_LB_TYPES_H
2#define MELEE_LB_TYPES_H
3
4#include <platform.h>
5#include <placeholder.h>
6
7#include "lb/forward.h" // IWYU pragma: export
8#include <baselib/forward.h>
9
10#include <dolphin/mtx.h>
11#include <dolphin/card.h>
12
14 /* +0 */ HSD_JObj* jobj;
15 /* +4 */ u8 _4[0x90 - 0x4];
16 /* +90 */ struct DynamicsData* next;
17};
18
19struct DynamicsDesc {
20 /* +0 */ struct DynamicsData* data;
21 /* +4 */ unsigned int count;
22 /* +8 */ Vec3 pos;
23};
24
29
30struct HitResult {
32
35
36 Vec3 pos;
37 Vec3 offset;
38 float size;
39};
40
41struct HitVictim {
43 u32 x4;
44};
45
46struct HitCapsule {
48 /* +4 */ u32 x4;
49 /* +8 */ u32 unk_count;
50 /* +C */ float damage;
51 /* +10 */ Vec3 b_offset;
52 /* +1C */ float scale;
53 /* +20 */ int kb_angle;
54 /* +24 */ u32 x24;
55 /* +28 */ u32 x28;
56 /* +2C */ u32 x2C;
57 /* +30 */ u32 element;
58 /* +34 */ int x34;
59 /* +38 */ int sfx_severity;
60 /* +3C */ enum_t sfx_kind;
61 /* +40 */ u16 x40_b0 : 1;
62 /* +40 */ u16 x40_b1 : 1;
63 /* +40 */ u16 x40_b2 : 1;
64 /* +40 */ u16 x40_b3 : 1;
65 /* +40 */ u16 x40_b4 : 8;
66 /* +41:4 */ u16 x41_b4 : 1;
67 /* +41:5 */ u16 x41_b5 : 1;
68 /* +41:6 */ u16 x41_b6 : 1;
69 /* +41:7 */ u16 x41_b7 : 1;
70 /* +42:0 */ u8 x42_b0 : 1;
71 /* +42:1 */ u8 x42_b1 : 1;
72 /* +42:2 */ u8 x42_b2 : 1;
73 /* +42:3 */ u8 x42_b3 : 1;
74 /* +42:4 */ u8 x42_b4 : 1;
75 /* +42:5 */ u8 x42_b5 : 1;
76 /* +42:6 */ u8 x42_b6 : 1;
77 /* +42:7 */ u8 x42_b7 : 1;
78 /* +43 */ union {
79 /* +43 */ u8 x43;
80 struct {
81 /* +43:0 */ u8 x43_b0 : 1;
82 /* +43:1 */ u8 x43_b1 : 1;
83 /* +43:2 */ u8 x43_b2 : 1;
84 /* +43:3 */ u8 x43_b3 : 1;
85 /* +43:4 */ u8 x43_b4 : 1;
86 /* +43:5 */ u8 x43_b5 : 1;
87 /* +43:6 */ u8 x43_b6 : 1;
88 /* +43:7 */ u8 x43_b7 : 1;
89 };
90 };
91 /* +44 */ u8 x44; // victims_1 count
92 /* +45 */ u8 x45; // victims_2 count
93 /* +46 */ u8 x46[0x48 - 0x46];
94 /* +48 */ HSD_JObj* jobj;
95 /* +4C */ Vec3 x4C;
96 /* +58 */ Vec3 x58;
97 /* +64 */ Vec3 hurt_coll_pos;
98 /* +70 */ float coll_distance;
99 /* +74 */ HitVictim victims_1[12];
100 /* +D4 */ HitVictim victims_2[12];
101 /* +134 */ union {
104 };
105};
106
107STATIC_ASSERT(sizeof(HitCapsule) == 0x138);
108
113 float scale;
114 HSD_JObj* bone; // 0x20
116 u8 x24_b1 : 1; // 0x24 0x40
117 u8 x24_b2 : 1; // 0x24 0x20
118 u8 x24_b3 : 1; // 0x24 0x10
119 u8 x24_b4 : 1; // 0x24 0x08
120 u8 x24_b5 : 1; // 0x24 0x04
121 u8 x24_b6 : 1; // 0x24 0x02
122 u8 x24_b7 : 1; // 0x24 0x01
123 Vec3 a_pos;
124 Vec3 b_pos;
125 int bone_idx; // 0x40
126 enum_t kind; // 0x44. 0 = low, 1 = mid, 2 = high
127 bool is_grabbable; // 0x48
128};
129
130STATIC_ASSERT(sizeof(HurtCapsule) == 0x4C);
131
144
146 /* +0 */ int x0_bone_id;
147 /* +4 */ Vec3 x4_offset;
148 /* +10 */ float x10_size;
149};
150
152 int bone;
153 Vec3 pos;
154 float radius;
155 float dmg_mul;
156 float vel_mul;
157 u8 flags : 8;
158};
159
161 s32 unk0; // x00
162 s32 unk1; // x04
163 s32 unk2; // x08
164 s32 unk3; // x08
165 s32 unk4; // x10
166 s32 unk5; // x14
167 void* callback0; // x1C
168 void* callback1; // x20
169};
170
171typedef struct _ECBFlagStruct {
172 union {
173 struct {
174 u8 b0 : 1;
175 u8 b1234 : 4;
176 u8 b5 : 1;
177 u8 b6 : 1;
178 u8 b7 : 1;
179 };
180 u8 raw;
181 };
183
184typedef struct SurfaceData {
185 int index;
186 u32 unk;
187 Vec3 normal;
189
190typedef struct _ftECB {
191 Vec2 top;
192 Vec2 bottom;
193 Vec2 right;
194 Vec2 left;
195} ftECB;
196
197struct CollData {
198 /* fp+6F0 */ HSD_GObj* x0_gobj;
199 /* fp+6F4 */ Vec3 cur_topn;
200 /* fp+700 */ Vec3 cur_topn_correct;
201 /* fp+70C */ Vec3 prev_topn;
202 /* fp+718 */ Vec3 x28_vec;
205 /* fp+726 */ s16 x36;
206 /* fp+728 */ s32 x38;
207 /* fp+72C */ s32 x3C;
208 /* fp+730 */ int ledge_id_unk0;
209 /* fp+734 */ int ledge_id_unk1;
210 /* fp+738 */ u32 x48;
211 /* fp+73C */ u32 x4C;
212 /* fp+740 */ float x50;
213 /* fp+744 */ float x54;
214 /* fp+748 */ float x58;
215 /* fp+74C */ float x5C;
216 /* fp+750 */ s32 x60;
217 /* fp+754 */ ftECB x64_ecb;
218 /* fp+774 */ ftECB x84_ecb;
220 /* fp+7B4 */ ftECB xC4_ecb;
221 /* fp+7D4 */ ftECB xE4_ecb;
223 /* fp+7F4 */ s32 x104;
224 /* fp+7F8 */ union {
225 /* fp+7F8 */ struct {
226 /* fp+7F8 */ HSD_JObj* x108_joint;
227 /* fp+7FC */ HSD_JObj* x10C_joint[6];
228 };
229 /* fp+7F8 */ struct {
230 /* fp+7F8 */ float x108_f32;
231 /* fp+7FC */ float x10C_f32;
232 /* fp+800 */ float x110_f32;
233 /* fp+804 */ float x114_f32;
234 /* fp+808 */ float x118_f32;
235 /* fp+80C */ float x11C_f32;
236 /* fp+810 */ float x120_f32;
237 };
238 };
239 /* fp+814 */ float x124;
240 /* fp+818 */ float x128;
241 /* fp+81C */ float x12C;
242 /* fp+820 */ u32 x130_flags;
243 /* fp+824 */ s32 env_flags;
244 /* fp+828 */ s32 prev_env_flags;
245 /* fp+82C */ s32 x13C;
246 /* fp+830 */ Vec3 x140;
247 /* fp+83C */ SurfaceData floor;
249 /* fp+864 */ SurfaceData left_wall;
250 /* fp+878 */ SurfaceData ceiling;
251};
252
255 u32* addr;
256 size_t size;
257};
258
263
280
281// TODO: this struct might need to be smaller,
282// based on the number of iters in the struct-copy code
283// emitted by e.g. lbDvd_80018CF4
294
304
306 /* +0 */ char pad_0[0x11];
307 /* +11 */ s8 x11;
308 /* +12 */ s8 x12;
309 /* +13 */ char pad_13[0x18 - 0x13];
310 /* +18 */ int x18;
311};
312
314 /* 0x0 */ s32 unk_0;
315 /* 0x4 */ s32 unk_4;
316};
317STATIC_ASSERT(sizeof(struct lb_80432A68_38_t) == 0x8);
318
320 /* 0x000 */ UNK_T work_area;
321 /* 0x004 */ UNK_T lib_area;
322 /* 0x008 */ int chan;
323 /* 0x00C */ UNK_T unk_C;
324 /* 0x010 */ const char* unk_10;
325 /* 0x014 */ const char* unk_14;
326 /* 0x018 */ s32 unk_18;
327 /* 0x01C */ s32 unk_1C;
328 /* 0x020 */ UNK_T unk_20;
329 /* 0x024 */ int* unk_24;
330 /* 0x028 */ int* unk_28;
331 /* 0x02C */ char x2C[2];
332 /* 0x02C */ char x2E;
333 /* 0x02C */ char x2F[4];
334 /* 0x034 */ s32 unk_34;
335 /* 0x038 */ struct lb_80432A68_38_t unk_38[9];
336 /* 0x080 */ s32 unk_80;
337 /* 0x084 */ s32 memsize;
338 /* 0x088 */ s32 sectorsize;
339 /* 0x08C */ s32 unused_bytes;
340 /* 0x090 */ s32 unused_files;
341 /* 0x094 */ CARDFileInfo file_info;
342 /* 0x0A8 */ s32 unk_A8;
343 /* 0x098 */ u8 pad_AC[0xD0 - 0xAC]; /* maybe part of unk_80[0x123]? */
344 /* 0x0A8 */ int xD0[9];
345 /* 0x0A8 */ volatile int xF4[9];
346 /* 0x098 */ u8 pad_500[0x50C - 0xF4 - 9*4]; /* maybe part of unk_80[0x123]? */
347 /* 0x50C */ void (*x50C)(int);
348 /* 0x510 */ struct CardTask {
349 int x0;
350 int x4;
352 char* xC;
353 char x10[0x20];
354 u8 x18;
355 char x19[7];
356 u8 unk20[0x1C];
358 /* 0x8AC */ int x8AC;
359}; /* size = 0x8B0 */
360STATIC_ASSERT(sizeof(struct lb_80432A68_t) == 0x8B0);
361
362#endif
HurtCapsuleState
Definition forward.h:25
HitCapsuleState
Definition forward.h:62
#define UNK_T
Definition placeholder.h:32
#define STATIC_ASSERT(cond)
Definition platform.h:110
int enum_t
The underlying type of an enum, used as a placeholder.
Definition platform.h:9
Definition types.h:145
int x0_bone_id
Definition types.h:146
float x10_size
Definition types.h:148
Vec3 x4_offset
Definition types.h:147
Definition types.h:25
DynamicsDesc dyn_desc
Definition types.h:27
enum_t bone_id
Definition types.h:26
Definition types.h:197
u32 x48
Definition types.h:210
s32 x38
Definition types.h:206
float x10C_f32
Definition types.h:231
float x124
Definition types.h:239
ftECB x64_ecb
Definition types.h:217
Vec3 cur_topn
Definition types.h:199
Vec3 prev_topn
Definition types.h:201
SurfaceData right_wall
Definition types.h:248
HSD_JObj * x10C_joint[6]
Definition types.h:227
float x5C
Definition types.h:215
Vec3 cur_topn_correct
Definition types.h:200
float x128
Definition types.h:240
HSD_JObj * x108_joint
Definition types.h:226
float x11C_f32
Definition types.h:235
ftECB xA4_ecbCurrCorrect
Definition types.h:219
HSD_GObj * x0_gobj
Definition types.h:198
ftECB xE4_ecb
Definition types.h:221
int ledge_id_unk0
Definition types.h:208
ftECB x84_ecb
Definition types.h:218
float x108_f32
Definition types.h:230
s32 x3C
Definition types.h:207
int ledge_id_unk1
Definition types.h:209
Vec3 x140
Definition types.h:246
float x58
Definition types.h:214
u32 x130_flags
Definition types.h:242
SurfaceData ceiling
Definition types.h:250
float x12C
Definition types.h:241
SurfaceData left_wall
Definition types.h:249
float x118_f32
Definition types.h:234
s32 x104
Definition types.h:223
s32 prev_env_flags
Definition types.h:244
Vec3 x28_vec
Definition types.h:202
s32 env_flags
Definition types.h:243
float x120_f32
Definition types.h:236
s16 x36
Definition types.h:205
u32 x4C
Definition types.h:211
float x114_f32
Definition types.h:233
float x110_f32
Definition types.h:232
float x54
Definition types.h:213
ECBFlagStruct x35_flags
Definition types.h:204
SurfaceData floor
Definition types.h:247
s32 x13C
Definition types.h:245
float x50
Definition types.h:212
ECBFlagStruct x34_flags
Definition types.h:203
ftECB xC4_ecb
Definition types.h:220
s32 x60
Definition types.h:216
Definition types.h:13
struct DynamicsData * next
Definition types.h:16
u8 _4[0x90 - 0x4]
Definition types.h:15
HSD_JObj * jobj
Definition types.h:14
Definition types.dox:1
Vec3 pos
Definition types.dox:5
struct DynamicsData * data
Definition types.h:20
unsigned int count
Definition types.h:21
Definition types.h:171
u8 b7
Definition types.h:178
u8 b6
Definition types.h:177
u8 b5
Definition types.h:176
u8 b0
Definition types.h:174
u8 b1234
Definition types.h:175
u8 raw
Definition types.h:180
Definition types.h:253
size_t size
Definition types.h:256
struct HSD_AllocEntry * next
Definition types.h:254
u32 * addr
Definition types.h:255
Definition gobj.h:26
Definition jobj.h:106
Definition types.h:46
float coll_distance
Definition types.h:98
u8 x42_b7
Definition types.h:77
u16 x41_b5
Definition types.h:67
u16 x40_b1
Definition types.h:62
int sfx_severity
Definition types.h:59
u8 x42_b5
Definition types.h:75
u8 x44
Definition types.h:91
u8 x43_b3
Definition types.h:84
u8 x42_b4
Definition types.h:74
HitVictim victims_1[12]
Definition types.h:99
u8 x45
Definition types.h:92
u16 x40_b2
Definition types.h:63
u8 x42_b6
Definition types.h:76
u32 unk_count
Definition types.h:49
u8 x42_b0
Definition types.h:70
u16 x40_b0
Definition types.h:61
u8 x43_b0
Definition types.h:81
float damage
Definition types.h:50
u16 x40_b4
Definition types.h:65
u32 x24
Definition types.h:54
u32 x28
Definition types.h:55
u32 x4
Definition types.h:48
enum_t sfx_kind
Definition types.h:60
u16 x41_b4
Definition types.h:66
u8 x42_b2
Definition types.h:72
Vec3 x4C
Definition types.h:95
int kb_angle
Definition types.h:53
u8 x43_b2
Definition types.h:83
u32 element
Definition types.h:57
u32 x2C
Definition types.h:56
int x34
Definition types.h:58
u8 x43
Definition types.h:79
u8 hit_grabbed_victim_only
Definition types.h:103
u16 x41_b6
Definition types.h:68
u8 x42_b3
Definition types.h:73
u8 x43_b7
Definition types.h:88
Vec3 x58
Definition types.h:96
Vec3 hurt_coll_pos
Definition types.h:97
Vec3 b_offset
Definition types.h:51
u16 x41_b7
Definition types.h:69
u8 x43_b6
Definition types.h:87
u8 x43_b1
Definition types.h:82
u16 x40_b3
Definition types.h:64
HitCapsuleState state
Definition types.h:47
u8 x46[0x48 - 0x46]
Definition types.h:93
HSD_GObj * owner
Definition types.h:102
float scale
Definition types.h:52
u8 x43_b5
Definition types.h:86
u8 x42_b1
Definition types.h:71
u8 x43_b4
Definition types.h:85
HSD_JObj * jobj
Definition types.h:94
HitVictim victims_2[12]
Definition types.h:100
Definition types.h:30
Vec3 offset
Definition types.h:37
Vec3 pos
Definition types.h:36
u8 skip_update_pos
Follows attach bone position if toggled OFF.
Definition types.h:34
float size
Definition types.h:38
HSD_JObj * bone
Definition types.h:31
Definition types.h:41
UNK_T victim
Definition types.h:42
u32 x4
Definition types.h:43
Definition types.h:109
Vec3 b_offset
Definition types.h:112
Vec3 b_pos
Definition types.h:124
bool is_grabbable
Definition types.h:127
u8 x24_b6
Definition types.h:121
Vec3 a_offset
Definition types.h:111
int bone_idx
Definition types.h:125
u8 x24_b4
Definition types.h:119
u8 x24_b1
Definition types.h:116
float scale
Definition types.h:113
HurtCapsuleState state
Definition types.h:110
HSD_JObj * bone
Definition types.h:114
Vec3 a_pos
Definition types.h:123
u8 x24_b5
Definition types.h:120
u8 x24_b3
Definition types.h:118
u8 skip_update_pos
Definition types.h:115
u8 x24_b7
Definition types.h:122
enum_t kind
Definition types.h:126
u8 x24_b2
Definition types.h:117
Definition types.h:259
struct PreloadCache * field1_0x4
Definition types.h:261
struct PreloadCache * field0_0x0
Definition types.h:260
Definition types.h:284
u8 field4_0xb
Definition types.h:289
u8 major_id
Definition types.h:286
u8 field3_0xa
Definition types.h:288
u32 is_heap_persistent[2]
Definition types.h:285
s32 major_scene_changes
Definition types.h:292
u8 field2_0x9
Definition types.h:287
PreloadCacheSceneEntry entries[8]
Definition types.h:291
u32 stage_id
Definition types.h:290
Definition types.h:295
PreloadCacheScene scene
Definition types.h:297
PreloadCacheScene new_scene
Definition types.h:298
UNK_T x974
Definition types.h:302
PreloadEntry entries[80]
Definition types.h:299
int preloaded
Definition types.h:301
s32 persistent_heaps
Definition types.h:296
s32 persistent_heap
Definition types.h:300
Definition types.h:264
s8 load_state
Definition types.h:268
s32 effect_index
Definition types.h:278
HSD_AllocEntry * archive
Definition types.h:277
u8 field9_0xb
Definition types.h:274
s16 load_score
Definition types.h:272
u8 unknown004
Definition types.h:269
s16 entry_num
Definition types.h:271
u8 field5_0x5
Definition types.h:270
u32 size
Definition types.h:275
s8 state
Definition types.h:265
HSD_AllocEntry * raw_data
Definition types.h:276
s8 type
Definition types.h:266
s8 heap
Definition types.h:267
u8 field8_0xa
Definition types.h:273
Definition types.h:132
u8 x20_behavior
Definition types.h:142
u32 x0_bone_id
Definition types.h:133
Vec3 x8_offset
Definition types.h:135
float x14_size
Definition types.h:136
float x1C_speed_mul
Definition types.h:138
float x18_damage_mul
Definition types.h:137
s32 x4_max_damage
Definition types.h:134
Definition types.h:151
Vec3 pos
Definition types.h:153
u8 flags
Definition types.h:157
int bone
Definition types.h:152
float dmg_mul
Definition types.h:155
float vel_mul
Definition types.h:156
float radius
Definition types.h:154
Definition types.h:184
Vec3 normal
Definition types.h:187
u32 unk
Definition types.h:186
int index
Definition types.h:185
Definition types.h:190
Vec2 top
Definition types.h:191
Vec2 right
Definition types.h:193
Vec2 left
Definition types.h:194
Vec2 bottom
Definition types.h:192
Definition types.h:160
s32 unk5
Definition types.h:166
void * callback1
Definition types.h:168
s32 unk4
Definition types.h:165
s32 unk1
Definition types.h:162
s32 unk3
Definition types.h:164
s32 unk2
Definition types.h:163
void * callback0
Definition types.h:167
s32 unk0
Definition types.h:161
Definition types.h:305
char pad_0[0x11]
Definition types.h:306
int x18
Definition types.h:310
s8 x11
Definition types.h:307
s8 x12
Definition types.h:308
char pad_13[0x18 - 0x13]
Definition types.h:309
Definition types.h:313
s32 unk_0
Definition types.h:314
s32 unk_4
Definition types.h:315
Definition types.h:348
char x19[7]
Definition types.h:355
char * xC
Definition types.h:352
char x10[0x20]
Definition types.h:353
u8 unk20[0x1C]
Definition types.h:356
int x0
Definition types.h:349
int x4
Definition types.h:350
u8 x18
Definition types.h:354
UNK_T x8
Definition types.h:351
Definition types.h:319
UNK_T work_area
Definition types.h:320
s32 memsize
Definition types.h:337
const char * unk_14
Definition types.h:325
int * unk_24
Definition types.h:329
s32 unk_34
Definition types.h:334
UNK_T lib_area
Definition types.h:321
s32 unk_18
Definition types.h:326
char x2F[4]
Definition types.h:333
int chan
Definition types.h:322
s32 unk_80
Definition types.h:336
struct lb_80432A68_t::CardTask task_array[11]
s32 unk_1C
Definition types.h:327
volatile int xF4[9]
Definition types.h:345
struct lb_80432A68_38_t unk_38[9]
Definition types.h:335
u8 pad_AC[0xD0 - 0xAC]
Definition types.h:343
UNK_T unk_C
Definition types.h:323
char x2E
Definition types.h:332
s32 unused_files
Definition types.h:340
int x8AC
Definition types.h:358
int * unk_28
Definition types.h:330
void(* x50C)(int)
Definition types.h:347
const char * unk_10
Definition types.h:324
u8 pad_500[0x50C - 0xF4 - 9 *4]
Definition types.h:346
s32 unused_bytes
Definition types.h:339
s32 sectorsize
Definition types.h:338
s32 unk_A8
Definition types.h:342
char x2C[2]
Definition types.h:331
UNK_T unk_20
Definition types.h:328
CARDFileInfo file_info
Definition types.h:341
int xD0[9]
Definition types.h:344