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 <placeholder.h>
5
6#include "cm/forward.h" // IWYU pragma: export
7#include <baselib/forward.h>
8
9#include <dolphin/mtx/types.h>
10
11struct CameraBox {
14 bool x8;
15 /* +C:0 */ u8 xC_b0 : 1;
16 u8 xD_fill[0x10 - 0xD];
17 Vec3 x10; // might be Vec2?
19 float x28;
26};
27
29 /* +0 */ Vec3 interest;
31 /* +18 */ Vec3 position;
33 /* +30 */ float fov;
34 /* +34 */ float target_fov;
35};
36
38 float x_min;
39 float y_min;
40 float x_max;
41 float y_max;
43 float z_pos;
44};
45
47 /* 0x0 */ s32 x0;
48 /* 0x4 */ s32 x4;
49 /* 0x8 */ s32 x8;
50 /* 0xC */ s32 xC;
51};
52
53typedef struct Camera {
54 /* 0x000 */ HSD_GObj* gobj;
55 /* 0x004 */ u32 mode;
56 /* 0x008 */ u8 background_r;
57 /* 0x009 */ u8 background_g;
58 /* 0x00A */ u8 background_b;
59 /* 0x00B */ s8 pad_B;
60 /* 0x00C */ f32 nearz;
61 /* 0x010 */ f32 farz;
64 /* 0x084 */ Vec2 translation;
65 /* 0x08C */ s32 unk_8C[5]; /* maybe part of translation[4]? */
66 /* 0x0A0 */ HSD_GObj* unk_A0;
67 /* 0x0A4 */ f32 unk_A4;
68 /* 0x0A8 */ f32 unk_A8;
69 /* 0x0AC */ f32 unk_AC; /* inferred */
70 /* 0x0B0 */ struct UnkInternalCameraStruct unk_B0[2][8];
71 /* 0x1B0 */ struct UnkInternalCameraStruct unk_1B0[2][8];
72 /* 0x2B0 */ u8 pad_2B0[0x2BC - 0x2B0];
73 /* 0x2BC */ f32 unk_2bc;
74 /* 0x2C0 */ f32 unk_2c0;
75 /* 0x2C4 */ char pad_2C4[0x7D]; /* maybe part of unk_2c0[0x20]? */
76 /* 0x341:0 */ u8 unk_341_b0 : 1;
77 /* 0x341:1 */ u8 unk_341_b1 : 1;
78 /* 0x341:2 */ u8 unk_341_b2 : 1;
79 /* 0x341:3 */ u8 unk_341_b3 : 1;
80 /* 0x341:4 */ u8 unk_341_b4 : 1;
81 /* 0x341:5 */ u8 unk_341_b5 : 1;
82 /* 0x341:6 */ u8 unk_341_b6 : 1;
83 /* 0x341:7 */ u8 unk_341_b7 : 1;
84 /* 0x342 */ char pad_342[0x56]; /* maybe part of unk_341[0x57]? */
85 /* 0x398:0 */ u8 unk_398_b0 : 1;
86 /* 0x398:1 */ u8 unk_398_b1 : 1;
87 /* 0x398:2 */ u8 unk_398_b2 : 1;
88 /* 0x398:3 */ u8 unk_398_b3 : 1;
89 /* 0x398:4 */ u8 unk_398_b4 : 1;
90 /* 0x398:5 */ u8 unk_398_b5 : 1;
91 /* 0x398:6 */ u8 unk_398_b6_b7 : 2;
92 /* 0x399:0 */ u8 unk_399_b0_b1 : 2;
93 /* 0x399:2 */ u8 unk_399_b2 : 1;
94 /* 0x399:3 */ u8 unk_399_b3 : 1;
95 /* 0x399:4 */ u8 unk_399_b4 : 1;
96 /* 0x399:5 */ u8 unk_399_b5 : 1;
97 /* 0x399:6 */ u8 unk_399_b6 : 1;
98 /* 0x399:7 */ u8 unk_399_b7 : 1;
99 /* 0x39A:0 */ u8 unk_39A_b0 : 1;
100 /* 0x39A:1 */ u8 unk_39A_b1 : 1;
101 /* 0x39A:2 */ u8 unk_39A_b2 : 1;
102 /* 0x39A:3 */ u8 unk_39A_b3 : 1;
103 /* 0x39A:4 */ u8 unk_39A_b4 : 1;
104 /* 0x39A:5 */ u8 unk_39A_b5 : 1;
105 /* 0x39A:6 */ u8 unk_39A_b6 : 1;
106 /* 0x39A:7 */ u8 unk_39A_b7 : 1;
107 /* 0x39B */ char pad_39B[5]; /* maybe part of unk_39A[6]? */
108 /* 0x3A0 */ u32 last_mode;
109} Camera; /* size = 0x3A4 */
110
112STATIC_ASSERT(sizeof(struct Camera) == 0x3A4);
113
115 /* +0 */ float _0[11];
116 /* +2C */ float x2C;
117 /* +30 */ float x30;
118 /* +34 */ float x34;
119 /* +38 */ float x38;
120 /* +3C */ float x3C;
121 /* +40 */ float x40;
122 /* +44 */ float _44[43];
123};
124
125#endif
signed char s8
A signed 8-bit integer.
Definition platform.h:8
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 long s32
A signed 32-bit integer.
Definition platform.h:14
unsigned char u8
An unsigned 8-bit integer.
Definition platform.h:20
Definition types.h:37
float z_pos
Definition types.h:43
int subjects
Definition types.h:42
float y_max
Definition types.h:41
float x_max
Definition types.h:40
float y_min
Definition types.h:39
float x_min
Definition types.h:38
Definition types.h:11
CameraBox * prev
Definition types.h:13
Vec3 x1C
Definition types.h:18
u8 xD_fill[0x10 - 0xD]
Definition types.h:16
Vec3 x60
Definition types.h:25
Vec3 x10
Definition types.h:17
bool x8
Definition types.h:14
CameraBox * next
Definition types.h:12
Vec3 x54
Definition types.h:24
Vec2 x40
Definition types.h:22
Vec3 x34
Definition types.h:21
u8 xC_b0
Definition types.h:15
Vec2 x2C
Definition types.h:20
Vec3 x48
Definition types.h:23
float x28
Definition types.h:19
Definition types.h:28
float fov
Definition types.h:33
float target_fov
Definition types.h:34
Vec3 target_interest
Definition types.h:30
Vec3 target_position
Definition types.h:32
Vec3 position
Definition types.h:31
Vec3 interest
Definition types.h:29
Definition types.h:114
float x34
Definition types.h:118
float x38
Definition types.h:119
float x2C
Definition types.h:116
float _44[43]
Definition types.h:122
float x30
Definition types.h:117
float x3C
Definition types.h:120
float _0[11]
Definition types.h:115
float x40
Definition types.h:121
Definition types.h:53
u8 unk_39A_b3
Definition types.h:102
u8 unk_39A_b2
Definition types.h:101
CameraMovement movement
Definition types.h:62
u8 unk_39A_b4
Definition types.h:103
u8 unk_341_b6
Definition types.h:82
u8 unk_341_b3
Definition types.h:79
struct UnkInternalCameraStruct unk_B0[2][8]
Definition types.h:70
CameraMovement movement_lerp
Definition types.h:63
u8 unk_398_b2
Definition types.h:87
u32 mode
Definition types.h:55
u8 unk_399_b7
Definition types.h:98
u8 unk_341_b0
Definition types.h:76
Vec2 translation
Definition types.h:64
char pad_342[0x56]
Definition types.h:84
u8 unk_398_b4
Definition types.h:89
char pad_39B[5]
Definition types.h:107
u8 unk_341_b2
Definition types.h:78
u8 background_g
Definition types.h:57
u8 unk_341_b1
Definition types.h:77
u8 unk_39A_b6
Definition types.h:105
u8 background_r
Definition types.h:56
struct UnkInternalCameraStruct unk_1B0[2][8]
Definition types.h:71
HSD_GObj * gobj
Definition types.h:54
HSD_GObj * unk_A0
Definition types.h:66
u8 unk_39A_b5
Definition types.h:104
s32 unk_8C[5]
Definition types.h:65
char pad_2C4[0x7D]
Definition types.h:75
f32 unk_2c0
Definition types.h:74
u8 pad_2B0[0x2BC - 0x2B0]
Definition types.h:72
u8 unk_398_b3
Definition types.h:88
u8 unk_399_b5
Definition types.h:96
f32 unk_A8
Definition types.h:68
f32 unk_A4
Definition types.h:67
u8 unk_398_b0
Definition types.h:85
u8 unk_341_b5
Definition types.h:81
u8 background_b
Definition types.h:58
f32 farz
Definition types.h:61
s8 pad_B
Definition types.h:59
u8 unk_341_b7
Definition types.h:83
u8 unk_39A_b0
Definition types.h:99
u8 unk_399_b0_b1
Definition types.h:92
u32 last_mode
Definition types.h:108
u8 unk_341_b4
Definition types.h:80
f32 unk_2bc
Definition types.h:73
u8 unk_398_b1
Definition types.h:86
f32 unk_AC
Definition types.h:69
u8 unk_39A_b7
Definition types.h:106
u8 unk_39A_b1
Definition types.h:100
u8 unk_398_b6_b7
Definition types.h:91
u8 unk_399_b2
Definition types.h:93
u8 unk_399_b4
Definition types.h:95
u8 unk_398_b5
Definition types.h:90
f32 nearz
Definition types.h:60
u8 unk_399_b6
Definition types.h:97
u8 unk_399_b3
Definition types.h:94
Definition gobj.h:25
Definition types.h:46
s32 xC
Definition types.h:50
s32 x0
Definition types.h:47
s32 x4
Definition types.h:48
s32 x8
Definition types.h:49
Definition types.h:9
Definition types.h:13