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 Camera_x344 {
175 s32 (*cb)(Vec3*);
177 /* 0x350 */ Vec3 x350;
199 /* 0x374 */ f32 x374;
200 /* 0x378 */ union Camera_x378 {
204 // /* 0x378 */ f32 x378;
205 /* 0x37C */ union Camera_x37C {
209 /* 0x380 */ u8 x380[0x18];
210 /* 0x398:0 */ u8 x398_b0 : 1;
211 /* 0x398:1 */ u8 x398_b1 : 1;
212 /* 0x398:2 */ u8 x398_b2 : 1;
213 /* 0x398:3 */ u8 x398_b3 : 1;
214 /* 0x398:4 */ u8 x398_b4 : 1;
215 /* 0x398:5 */ u8 x398_b5 : 1;
216 /* 0x398:6 */ u8 x398_b6_b7 : 2;
217 /* 0x399:0 */ u8 x399_b0_b1 : 2;
218 /* 0x399:2 */ u8 x399_b2 : 1;
219 /* 0x399:3 */ u8 x399_b3 : 1;
220 /* 0x399:4 */ u8 x399_b4 : 1;
221 /* 0x399:5 */ u8 x399_b5 : 1;
222 /* 0x399:6 */ u8 x399_b6 : 1;
223 /* 0x399:7 */ u8 x399_b7 : 1;
224 /* 0x39A:0 */ u8 x39A_b0 : 1;
225 /* 0x39A:1 */ u8 x39A_b1 : 1;
226 /* 0x39A:2 */ u8 x39A_b2 : 1;
227 /* 0x39A:3 */ u8 x39A_b3 : 1;
228 /* 0x39A:4 */ u8 x39A_b4 : 1;
229 /* 0x39A:5 */ u8 x39A_b5 : 1;
230 /* 0x39A:6 */ u8 x39A_b6 : 1;
231 /* 0x39A:7 */ u8 x39A_b7 : 1;
232 /* 0x39B */ char pad_39B; /* maybe part of unk_39A[6]? */
233};
234ASSERT_SIZE(struct Camera, 0x39C);
235
237 /* +0 */ float x0;
238 /* +4 */ float x4;
239 /* +8 */ float x8;
240 /* +C */ float xC;
241 /* +10 */ float x10;
242 /* +14 */ float x14;
243 /* +18 */ float x18;
244 /* +1C */ float x1C;
245 /* +20 */ float x20;
246 /* +24 */ float x24;
247 /* +28 */ float x28;
248 /* +2C */ float x2C;
249 /* +30 */ float x30;
250 /* +34 */ float x34;
251 /* +38 */ float x38;
252 /* +3C */ float x3C;
253 /* +40 */ float x40;
254 /* +44 */ float x44;
255 /* +48 */ float x48;
256 /* +4C */ float x4C;
257 /* +50 */ float x50;
258 /* +54 */ float x54;
259 /* +58 */ float x58;
260 /* +5C */ float x5C;
261 /* +60 */ float x60;
262 /* +64 */ float x64;
263 /* +68 */ float x68;
264 /* +6C */ float x6C;
265 /* +70 */ float x70;
266 /* +74 */ float x74;
267 /* +78 */ float x78;
268 /* +7C */ float x7C;
269 /* +80 */ float x80;
270 /* +84 */ float x84;
271 /* +88 */ float x88;
272 /* +8C */ float x8C;
273 /* +90 */ float x90;
274 /* +94 */ float x94;
275 /* +98 */ float x98;
276 /* +9C */ float x9C;
277 /* +A0 */ float xA0;
278 /* +A4 */ float xA4;
279 /* +A8 */ float xA8;
280 /* +AC */ float xAC;
281 /* +B0 */ float xB0;
282 /* +B4 */ float xB4;
283 /* +B8 */ float xB8;
284 /* +BC */ float xBC;
285 /* +C0 */ float xC0;
286 /* +C4 */ float xC4;
287 /* +C8 */ float xC8;
288 /* +CC */ float xCC;
289 /* +D0 */ float xD0;
290 /* +D4 */ float xD4;
291 /* +D8 */ float xD8;
292 /* +DC */ float xDC;
293 /* +E0 */ float xE0;
294 /* +E4 */ float xE4;
295 /* +E8 */ float xE8;
296 /* +EC */ float xEC;
297};
298
300 void (*(callback[9]))(void*);
301};
302
304 /* +00 */ f32 stick_x;
305 /* +04 */ f32 stick_y;
306 /* +08 */ f32 substick_x;
307 /* +0C */ f32 substick_y;
310};
311
312#endif
struct Vec Vec3
signed int s32
Definition types.h:12
signed char s8
Definition types.h:4
signed short int s16
Definition types.h:6
float f32
Definition types.h:18
unsigned long long int u64
Definition types.h:16
unsigned char u8
Definition types.h:5
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:127
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:303
f32 substick_x
Definition types.h:306
f32 stick_y
Definition types.h:305
u64 buttons_pressed
Definition types.h:308
f32 substick_y
Definition types.h:307
f32 stick_x
Definition types.h:304
u64 buttons_triggered
Definition types.h:309
Definition types.h:299
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:236
float xBC
Definition types.h:284
float xC
Definition types.h:240
float x80
Definition types.h:269
float xA8
Definition types.h:279
float x10
Definition types.h:241
float x8C
Definition types.h:272
float xDC
Definition types.h:292
float x64
Definition types.h:262
float x48
Definition types.h:255
float x0
Definition types.h:237
float x6C
Definition types.h:264
float xB4
Definition types.h:282
float x58
Definition types.h:259
float x34
Definition types.h:250
float x38
Definition types.h:251
float x4C
Definition types.h:256
float x4
Definition types.h:238
float xCC
Definition types.h:288
float x60
Definition types.h:261
float x2C
Definition types.h:248
float x20
Definition types.h:245
float x54
Definition types.h:258
float x18
Definition types.h:243
float x70
Definition types.h:265
float xE8
Definition types.h:295
float xC0
Definition types.h:285
float x8
Definition types.h:239
float x88
Definition types.h:271
float x78
Definition types.h:267
float xA0
Definition types.h:277
float x1C
Definition types.h:244
float x44
Definition types.h:254
float xB0
Definition types.h:281
float x28
Definition types.h:247
float xD0
Definition types.h:289
float x90
Definition types.h:273
float x24
Definition types.h:246
float x14
Definition types.h:242
float xEC
Definition types.h:296
float x74
Definition types.h:266
float xA4
Definition types.h:278
float xD4
Definition types.h:290
float x7C
Definition types.h:268
float x94
Definition types.h:274
float x30
Definition types.h:249
float xAC
Definition types.h:280
float xC8
Definition types.h:287
float x3C
Definition types.h:252
float xC4
Definition types.h:286
float x68
Definition types.h:263
float xE4
Definition types.h:294
float xB8
Definition types.h:283
float x98
Definition types.h:275
float xD8
Definition types.h:291
float xE0
Definition types.h:293
float x40
Definition types.h:253
float x5C
Definition types.h:260
float x50
Definition types.h:257
float x84
Definition types.h:270
float x9C
Definition types.h:276
f32 yaw
Definition types.h:188
f32 pitch
Definition types.h:187
s16 distance
Definition types.h:186
f32 yaw
Definition types.h:196
f32 pitch
Definition types.h:195
s16 distance
Definition types.h:194
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
Vec3 pause_eye_offset
Definition types.h:161
u8 x399_b7
Definition types.h:223
f32 pause_eye_distance
Definition types.h:163
HSD_GObj * quake_gobj
Definition types.h:138
u8 x399_b2
Definition types.h:218
u8 x39A_b6
Definition types.h:230
s8 x2C5
pauser id
Definition types.h:150
f32 x2C0
Definition types.h:148
u8 x398_b5
Definition types.h:215
u8 x341_b7
Definition types.h:170
Vec2 translation
Definition types.h:136
char pad_39B
Definition types.h:232
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 x39A_b2
Definition types.h:226
f32 x374
Definition types.h:199
HSD_GObj * gobj
Definition types.h:127
u8 x399_b6
Definition types.h:222
union Camera::Camera_x368 x368
f32 x32C
Definition types.h:162
s8 x304
Definition types.h:155
u8 x39A_b7
Definition types.h:231
u8 x398_b4
Definition types.h:214
Vec3 x308
Definition types.h:159
union Camera::Camera_x35C x35C
u8 x399_b5
Definition types.h:221
u8 x399_b3
Definition types.h:219
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
float pitch_offset
Definition types.h:152
float x2B0
Definition types.h:143
u8 x399_b4
Definition types.h:220
CameraTransformState transform
Definition types.h:132
u8 x398_b1
Definition types.h:211
s16 x2B8
Definition types.h:145
union Camera::Camera_x344 x344
u8 x341_b1_b2
Definition types.h:167
s8 x2C4
pauser slot
Definition types.h:149
u8 x39A_b5
Definition types.h:229
f32 farz
Definition types.h:131
u8 x380[0x18]
Definition types.h:209
u8 x398_b0
Definition types.h:210
s16 x2BA
Definition types.h:146
u8 x340
Definition types.h:165
union Camera::Camera_x37C x37C
u8 x39A_b3
Definition types.h:227
Vec3 x350
Definition types.h:177
struct CameraQuake quakes[2][16]
Definition types.h:142
u8 x39A_b1
Definition types.h:225
u8 x398_b2
Definition types.h:212
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:216
Vec3 pause_up
Definition types.h:164
u8 x39A_b4
Definition types.h:228
u8 x399_b0_b1
Definition types.h:217
Camera_x2D0 x2D0
Definition types.h:154
f32 nearz
Definition types.h:130
u8 x398_b3
Definition types.h:213
float yaw_offset
Definition types.h:153
union Camera::Camera_x378 x378
u8 x39A_b0
Definition types.h:224
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_GetCameraBonePos).
Definition types.h:56
Vec3 x60
Zeroed but unused.
Definition types.h:70
Definition GXStruct.h:27
Definition gobj.h:16
Definition mtx.h:10
Definition types.h:172
s32(* cb)(Vec3 *)
Definition types.h:175
Vec3 vec
Definition types.h:174
s32 slot
Definition types.h:173
Definition types.h:178
s32(* cb)(Vec3 *)
Definition types.h:180
struct Camera::Camera_x35C::Camera_x35C_orbit orbit
Vec3 vec
Definition types.h:179
Definition types.h:191
struct Camera::Camera_x368::Camera_x368_orbit orbit
Vec3 vec
Definition types.h:192
Definition types.h:200
s32 s32_v
Definition types.h:202
f32 f32_v
Definition types.h:201
Definition types.h:205
f32 f32_v
Definition types.h:207
s32 s32_v
Definition types.h:206