SSBM Decomp
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef MELEE_CM_TYPES_H
2#define MELEE_CM_TYPES_H
3
4#include <melee/cm/forward.h> // IWYU pragma: export
6
8#include <dolphin/mtx.h>
9
17
24struct CmSubject {
25 /* +00 */ CmSubject* next;
26 /* +04 */ CmSubject* prev;
28
30 /* +0C:0 */ u8 on_ledge : 1;
31
36 /* +0C:1 */ u8 force_inactive : 1;
37
43 /* +0C:2 */ u8 was_framed : 1;
44
50 /* +0E */ s16 state_timer;
51
53 /* +10 */ Vec3 pos;
54
56 /* +1C */ Vec3 bone_pos;
57
58 /* +28 */ float facing_dir;
59
65
68
69 /* +54 */ Vec3 x54;
70 /* +60 */ Vec3 x60;
71};
72
74 /* +0 */ Vec3 interest;
76 /* +18 */ Vec3 position;
78 /* +30 */ float fov;
79 /* +34 */ float target_fov;
80};
81
83 float x_min;
84 float y_min;
85 float x_max;
86 float y_max;
88 float z_pos;
89};
90
92 /* +0x00 */ f32 y_max;
93 /* +0x04 */ f32 y_min;
94 /* +0x08 */ f32 x_min;
95 /* +0x0C */ f32 x_max;
96 /* +0x10 */ f32 z_max;
97 /* +0x14 */ f32 z_min;
98 /* +0x18 */ f32 angle_up;
99 /* +0x1C */ f32 angle_down;
100 /* +0x20 */ f32 angle_right;
101 /* +0x24 */ f32 angle_left;
102 /* +0x28 */ f32 unk28;
103 /* +0x2C */ f32 unk2C;
104 /* +0x30 */ void (*callback)(Camera_x2D0*);
105};
106
108 /* 0x0 */ Vec3 epicenter;
109 /* 0xC */ CmQuakeKind kind;
110};
111
125
126struct Camera {
127 /* 0x000 */ HSD_GObj* gobj;
128 /* 0x004 */ CameraType mode;
130 /* 0x00C */ f32 nearz;
131 /* 0x010 */ f32 farz;
133 /* 0x04C */ CameraTransformState
134 transform_copy; // this runs the same tween logic, but isnt used for
135 // anything?
136 /* 0x084 */ Vec2 translation;
138 /* 0x0A0 */ HSD_GObj* quake_gobj;
139 /* 0x0A4 */ Vec2
141 /* 0x0AC */ f32 quake_scale;
142 /* 0x0B0 */ struct CameraQuake quakes[2][16];
143 /* 0x2B0 */ float x2B0;
144 /* 0x2B4 */ float x2B4;
145 /* 0x2B8 */ s16 x2B8;
146 /* 0x2BA */ s16 x2BA;
147 /* 0x2BC */ f32 x2BC;
148 /* 0x2C0 */ f32 x2C0;
149 /* 0x2C4 */ s8 x2C4;
150 /* 0x2C5 */ s8 x2C5;
151 /* 0x2C6 */ char pad_2C6[0x2C8 - 0x2C6];
152 /* 0x2C8 */ float pitch_offset;
153 /* 0x2CC */ float yaw_offset;
154 /* 0x2D0 */ Camera_x2D0 x2D0;
155 /* 0x304 */ s8 x304;
156 /* 0x305 */ s8 x305;
157 /* 0x306 */ s8 x306;
158 /* 0x307 */ s8 x307;
159 /* 0x308 */ Vec3 x308;
160 /* 0x314 */ Vec3 x314;
161 /* 0x320 */ Vec3 pause_eye_offset; /* offset from focused player */
162 /* 0x32C */ f32 x32C;
163 /* 0x330 */ f32 pause_eye_distance; /* distance to focused player */
164 /* 0x334 */ Vec3 pause_up; /* up vector */
165 /* 0x340 */ u8 x340;
166 /* 0x341:0 */ u8 x341_b0 : 1;
167 /* 0x341:1 */ u8 x341_b1_b2 : 2;
168 /* 0x341:3 */ u8 x341_b3_b4 : 2;
169 /* 0x341:5 */ u8 x341_b5_b6 : 2;
170 /* 0x341:7 */ u8 x341_b7 : 1;
171 /* 0x342 */ char x342_pad[2];
172 /* 0x344 */ union {
175 s32 (*cb)(Vec3*);
177 /* 0x350 */ Vec3 x350;
178 /* 0x35C */ union {
179 Vec3 vec;
180 s32 (*cb)(Vec3*);
181 struct {
182 u8 b0 : 1;
183 u8 b1 : 1;
184 u8 b2 : 1;
189 /* 0x368 */ Vec3 x368;
190 /* 0x374 */ f32 x374;
191 /* 0x378 */ union {
193 s32 s32;
195 // /* 0x378 */ f32 x378;
196 /* 0x37C */ union {
197 s32 s32;
198 f32 f32;
200 /* 0x380 */ u8 x380[0x18];
201 /* 0x398:0 */ u8 x398_b0 : 1;
202 /* 0x398:1 */ u8 x398_b1 : 1;
203 /* 0x398:2 */ u8 x398_b2 : 1;
204 /* 0x398:3 */ u8 x398_b3 : 1;
205 /* 0x398:4 */ u8 x398_b4 : 1;
206 /* 0x398:5 */ u8 x398_b5 : 1;
207 /* 0x398:6 */ u8 x398_b6_b7 : 2;
208 /* 0x399:0 */ u8 x399_b0_b1 : 2;
209 /* 0x399:2 */ u8 x399_b2 : 1;
210 /* 0x399:3 */ u8 x399_b3 : 1;
211 /* 0x399:4 */ u8 x399_b4 : 1;
212 /* 0x399:5 */ u8 x399_b5 : 1;
213 /* 0x399:6 */ u8 x399_b6 : 1;
214 /* 0x399:7 */ u8 x399_b7 : 1;
215 /* 0x39A:0 */ u8 x39A_b0 : 1;
216 /* 0x39A:1 */ u8 x39A_b1 : 1;
217 /* 0x39A:2 */ u8 x39A_b2 : 1;
218 /* 0x39A:3 */ u8 x39A_b3 : 1;
219 /* 0x39A:4 */ u8 x39A_b4 : 1;
220 /* 0x39A:5 */ u8 x39A_b5 : 1;
221 /* 0x39A:6 */ u8 x39A_b6 : 1;
222 /* 0x39A:7 */ u8 x39A_b7 : 1;
223 /* 0x39B */ char pad_39B; /* maybe part of unk_39A[6]? */
224};
225ASSERT_SIZE(struct Camera, 0x39C);
226
228 /* +0 */ float x0;
229 /* +4 */ float x4;
230 /* +8 */ float x8;
231 /* +C */ float xC;
232 /* +10 */ float x10;
233 /* +14 */ float x14;
234 /* +18 */ float x18;
235 /* +1C */ float x1C;
236 /* +20 */ float x20;
237 /* +24 */ float x24;
238 /* +28 */ float x28;
239 /* +2C */ float x2C;
240 /* +30 */ float x30;
241 /* +34 */ float x34;
242 /* +38 */ float x38;
243 /* +3C */ float x3C;
244 /* +40 */ float x40;
245 /* +44 */ float x44;
246 /* +48 */ float x48;
247 /* +4C */ float x4C;
248 /* +50 */ float x50;
249 /* +54 */ float x54;
250 /* +58 */ float x58;
251 /* +5C */ float x5C;
252 /* +60 */ float x60;
253 /* +64 */ float x64;
254 /* +68 */ float x68;
255 /* +6C */ float x6C;
256 /* +70 */ float x70;
257 /* +74 */ float x74;
258 /* +78 */ float x78;
259 /* +7C */ float x7C;
260 /* +80 */ float x80;
261 /* +84 */ float x84;
262 /* +88 */ float x88;
263 /* +8C */ float x8C;
264 /* +90 */ float x90;
265 /* +94 */ float x94;
266 /* +98 */ float x98;
267 /* +9C */ float x9C;
268 /* +A0 */ float xA0;
269 /* +A4 */ float xA4;
270 /* +A8 */ float xA8;
271 /* +AC */ float xAC;
272 /* +B0 */ float xB0;
273 /* +B4 */ float xB4;
274 /* +B8 */ float xB8;
275 /* +BC */ float xBC;
276 /* +C0 */ float xC0;
277 /* +C4 */ float xC4;
278 /* +C8 */ float xC8;
279 /* +CC */ float xCC;
280 /* +D0 */ float xD0;
281 /* +D4 */ float xD4;
282 /* +D8 */ float xD8;
283 /* +DC */ float xDC;
284 /* +E0 */ float xE0;
285 /* +E4 */ float xE4;
286 /* +E8 */ float xE8;
287 /* +EC */ float xEC;
288};
289
291 void (*(callback[9]))(void*);
292};
293
295 /* +00 */ f32 stick_x;
296 /* +04 */ f32 stick_y;
297 /* +08 */ f32 substick_x;
298 /* +0C */ f32 substick_y;
301};
302
303#endif
struct Vec Vec3
signed char s8
Definition types.h:4
signed short int s16
Definition types.h:6
float f32
Definition types.h:13
unsigned long long int u64
Definition types.h:11
signed long s32
Definition types.h:8
unsigned char u8
Definition types.h:5
ClassicTeamEntry x37C[25]
Definition gm_1832.c:132
CmSubjectState
Definition forward.h:51
CmQuakeKind
Definition forward.h:59
@ QuakeKind_Count
Definition forward.h:65
CameraType
Definition forward.h:6
#define ASSERT_SIZE(expr, size)
Definition platform.h:161
Definition types.h:82
float z_pos
Definition types.h:88
float y_max
Definition types.h:86
int total_subjects
Definition types.h:87
float x_max
Definition types.h:85
float y_min
Definition types.h:84
float x_min
Definition types.h:83
Definition types.h:112
Vec3 follow_int_offset
Definition types.h:115
Vec3 free_eye_pos
Definition types.h:121
Vec3 follow_int_pos
Definition types.h:118
float free_fov
Definition types.h:122
Vec3 follow_eye_offset
Definition types.h:116
Vec3 follow_eye_pos
Definition types.h:117
u8 _58[4]
Definition types.h:123
Vec3 free_int_pos
Definition types.h:120
float follow_fov
Definition types.h:119
CameraType last_mode
Definition types.h:113
int ply_slot
Definition types.h:114
Definition types.h:294
f32 substick_x
Definition types.h:297
f32 stick_y
Definition types.h:296
u64 buttons_pressed
Definition types.h:299
f32 substick_y
Definition types.h:298
f32 stick_x
Definition types.h:295
u64 buttons_triggered
Definition types.h:300
Definition types.h:290
void callback(void *)
Definition types.h:107
Vec3 epicenter
Definition types.h:108
CmQuakeKind kind
Definition types.h:109
Definition types.h:73
Vec3 position
Definition types.h:76
float target_fov
Definition types.h:79
float fov
Definition types.h:78
Vec3 target_interest
Definition types.h:75
Vec3 target_position
Definition types.h:77
Vec3 interest
Definition types.h:74
Definition types.h:227
float xBC
Definition types.h:275
float xC
Definition types.h:231
float x80
Definition types.h:260
float xA8
Definition types.h:270
float x10
Definition types.h:232
float x8C
Definition types.h:263
float xDC
Definition types.h:283
float x64
Definition types.h:253
float x48
Definition types.h:246
float x0
Definition types.h:228
float x6C
Definition types.h:255
float xB4
Definition types.h:273
float x58
Definition types.h:250
float x34
Definition types.h:241
float x38
Definition types.h:242
float x4C
Definition types.h:247
float x4
Definition types.h:229
float xCC
Definition types.h:279
float x60
Definition types.h:252
float x2C
Definition types.h:239
float x20
Definition types.h:236
float x54
Definition types.h:249
float x18
Definition types.h:234
float x70
Definition types.h:256
float xE8
Definition types.h:286
float xC0
Definition types.h:276
float x8
Definition types.h:230
float x88
Definition types.h:262
float x78
Definition types.h:258
float xA0
Definition types.h:268
float x1C
Definition types.h:235
float x44
Definition types.h:245
float xB0
Definition types.h:272
float x28
Definition types.h:238
float xD0
Definition types.h:280
float x90
Definition types.h:264
float x24
Definition types.h:237
float x14
Definition types.h:233
float xEC
Definition types.h:287
float x74
Definition types.h:257
float xA4
Definition types.h:269
float xD4
Definition types.h:281
float x7C
Definition types.h:259
float x94
Definition types.h:265
float x30
Definition types.h:240
float xAC
Definition types.h:271
float xC8
Definition types.h:278
float x3C
Definition types.h:243
float xC4
Definition types.h:277
float x68
Definition types.h:254
float xE4
Definition types.h:285
float xB8
Definition types.h:274
float x98
Definition types.h:266
float xD8
Definition types.h:282
float xE0
Definition types.h:284
float x40
Definition types.h:244
float x5C
Definition types.h:251
float x50
Definition types.h:248
float x84
Definition types.h:261
float x9C
Definition types.h:267
Definition types.h:91
f32 x_max
Definition types.h:95
f32 angle_left
Definition types.h:101
f32 angle_down
Definition types.h:99
f32 z_max
Definition types.h:96
f32 y_min
Definition types.h:93
f32 angle_up
Definition types.h:98
f32 y_max
Definition types.h:92
f32 unk2C
Definition types.h:103
f32 unk28
Definition types.h:102
f32 x_min
Definition types.h:94
f32 angle_right
Definition types.h:100
f32 z_min
Definition types.h:97
void(* callback)(Camera_x2D0 *)
Definition types.h:104
Definition types.h:126
union Camera::@100114262273052230211117107371160036126050025334 x344
Vec3 pause_eye_offset
Definition types.h:161
u8 x399_b7
Definition types.h:214
f32 pause_eye_distance
Definition types.h:163
Vec3 x368
Definition types.h:189
HSD_GObj * quake_gobj
Definition types.h:138
u8 x399_b2
Definition types.h:209
s32(* cb)(Vec3 *)
Definition types.h:175
u8 x39A_b6
Definition types.h:221
s8 x2C5
pauser id
Definition types.h:150
f32 x2C0
Definition types.h:148
s16 x2
Definition types.h:186
u8 x398_b5
Definition types.h:206
u8 x341_b7
Definition types.h:170
Vec2 translation
Definition types.h:136
char pad_39B
Definition types.h:223
u8 x341_b3_b4
Definition types.h:168
s8 x305
Definition types.h:156
f32 quake_scale
Definition types.h:141
char pad_2C6[0x2C8 - 0x2C6]
Definition types.h:151
char x342_pad[2]
Definition types.h:171
s8 x306
Definition types.h:157
u8 b1
Definition types.h:183
u8 x39A_b2
Definition types.h:217
f32 x374
Definition types.h:190
HSD_GObj * gobj
Definition types.h:127
u8 x399_b6
Definition types.h:213
f32 x32C
Definition types.h:162
s8 x304
Definition types.h:155
u8 x39A_b7
Definition types.h:222
u8 x398_b4
Definition types.h:205
u8 b0
Definition types.h:182
Vec3 x308
Definition types.h:159
u8 x399_b5
Definition types.h:212
u8 x399_b3
Definition types.h:210
float x2B4
Definition types.h:144
u8 x341_b5_b6
Definition types.h:169
GXColor background_color
Definition types.h:129
Vec2 quake_offset
offset from the quake model, before scaling
Definition types.h:140
s32 quake_frames_left[QuakeKind_Count]
Definition types.h:137
union Camera::@065004235256021050236374066154373075257107066021 x35C
s32 s32
Definition types.h:173
float pitch_offset
Definition types.h:152
float x2B0
Definition types.h:143
u8 x399_b4
Definition types.h:211
CameraTransformState transform
Definition types.h:132
u8 x398_b1
Definition types.h:202
s16 x2B8
Definition types.h:145
u8 x341_b1_b2
Definition types.h:167
s8 x2C4
pauser slot
Definition types.h:149
u8 x39A_b5
Definition types.h:220
f32 farz
Definition types.h:131
f32 f32
Definition types.h:192
u8 pad
Definition types.h:185
u8 x380[0x18]
Definition types.h:200
u8 x398_b0
Definition types.h:201
Vec3 vec
Definition types.h:174
union Camera::@261015231146305215040236210343211254126026100040 x378
s16 x2BA
Definition types.h:146
u8 x340
Definition types.h:165
u8 x39A_b3
Definition types.h:218
Vec3 x350
Definition types.h:177
struct CameraQuake quakes[2][16]
Definition types.h:142
u8 x39A_b1
Definition types.h:216
u8 x398_b2
Definition types.h:203
Vec3 x314
Definition types.h:160
u8 x341_b0
Definition types.h:166
f32 x2BC
Definition types.h:147
CameraType mode
Definition types.h:128
u8 x398_b6_b7
Definition types.h:207
Vec3 pause_up
Definition types.h:164
u8 x39A_b4
Definition types.h:219
u8 x399_b0_b1
Definition types.h:208
Camera_x2D0 x2D0
Definition types.h:154
f32 nearz
Definition types.h:130
u8 x398_b3
Definition types.h:204
float yaw_offset
Definition types.h:153
struct Camera::@065004235256021050236374066154373075257107066021::@037002332172063236244174044156115057067317170354 bits
u8 b2
Definition types.h:184
u8 x39A_b0
Definition types.h:215
CameraTransformState transform_copy
Definition types.h:134
s8 x307
Definition types.h:158
Definition types.h:10
Vec2 h
Horizontal extents: .x left, .y right.
Definition types.h:11
Vec3 v
Vertical extents: .x up, .y down, .z forward (used by shadows).
Definition types.h:15
A point of interest ("camera box") that the match camera tries to keep in frame.
Definition types.h:24
u8 force_inactive
Excludes the subject from framing regardless of CmSubject::state.
Definition types.h:36
float facing_dir
Facing direction of the subject (±1).
Definition types.h:58
CmSubjectExtents target_ext
Target framing extents, set by the subject's owner.
Definition types.h:67
u8 on_ledge
Set while the owning fighter is in a Cliff motion state. Never read.
Definition types.h:30
u8 was_framed
Set while the subject is framed.
Definition types.h:43
CmSubjectExtents ext
Current framing extents, eased toward CmSubject::target_ext by 0.5 per frame in Camera_800293E0.
Definition types.h:64
CmSubject * prev
Definition types.h:26
CmSubjectState state
Definition types.h:27
Vec3 x54
Zeroed but unused.
Definition types.h:69
CmSubject * next
Definition types.h:25
Vec3 pos
Anchor point of the subject's framing box. Only x/y are read.
Definition types.h:53
s16 state_timer
CmSubjectState_Auto lockout.
Definition types.h:50
Vec3 bone_pos
Position of the owning fighter's camera bone (ftLib_800866DC).
Definition types.h:56
Vec3 x60
Zeroed but unused.
Definition types.h:70
Definition GXStruct.h:29
Definition gobj.h:13
Definition mtx.h:10