SSBM Decomp
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#ifndef MELEE_TY_TYPES_H
2#define MELEE_TY_TYPES_H
3
4#include "platform.h"
5
6#include <placeholder.h>
7
8#include "ty/forward.h" // IWYU pragma: export
9#include <baselib/forward.h>
10
11#include <dolphin/mtx.h>
12
13typedef struct TyModeState {
20 u16 x6;
21 u16 x8;
22 u16 xA;
24
25/* Located at un_804A26B8 + 0x3F0, size 0x14 */
26typedef struct ToyAnimState {
27 /* 0x00 */ struct HSD_GObj* gobj;
28 /* 0x04 */ struct HSD_JObj* jobj[2];
29 /* 0x0C */ s16 xC;
30 /* 0x0E */ s8 x0E;
31 /* 0x0F */ s8 x0F;
32 /* 0x10 */ s8 x10;
33 /* 0x11 */ s8 x11;
34 /* 0x12 */ u8 pad_12[2];
36
37/* Used by un_803109A0 for table lookup */
38typedef struct ToyEntry {
40 union {
43 };
44} ToyEntry;
45
46/* Trophy metadata entry. Size: 0x24 bytes. */
47typedef struct TrophyData {
50 f32 x08;
51 f32 x0C;
52 f32 x10;
53 f32 x14;
54 f32 x18;
55 f32 x1C;
61
62/* Trophy list entry. Size: 0x34 bytes. */
63typedef struct TyListArg {
64 /* 0x00 */ struct TyListArg* links[3];
65 /* 0x0C */ struct HSD_JObj* jobjs[3];
66 /* 0x18 */ struct HSD_Text* texts[3];
67 /* 0x24 */ s8 x24;
68 /* 0x25 */ u8 x25;
69 /* 0x26 */ s16 idx;
70 /* 0x28 */ s8 x28;
71 /* 0x29 */ u8 pad_29[0x2C - 0x29];
72 /* 0x2C */ float x2C;
73 /* 0x30 */ float x30;
74} TyListArg;
75
76/* Trophy list UI state. Size: 0x2D8 bytes. */
77typedef struct TyListState {
78 /* 0x000 */ TyListArg entries[12]; /* 12 * 0x34 = 0x270 */
79 /* 0x270 */ struct TyListArg* x270;
80 /* 0x274 */ struct TyListArg* x274;
81 /* 0x278 */ struct TyListArg* x278;
82 /* 0x27C */ struct HSD_GObj* gobj;
83 /* 0x280 */ u8 pad_280[0x8];
84 /* 0x288 */ struct HSD_JObj* x288;
85 /* 0x28C */ struct HSD_JObj* jobj;
86 /* 0x290 */ struct HSD_Text* x290;
87 /* 0x294 */ u8 pad_294[4];
88 /* 0x298 */ s16 selectedIdx;
89 /* 0x29A */ s8 entryCount;
90 /* 0x29B */ u8 x29B;
91 /* 0x29C */ u8 x29C;
92 /* 0x29D */ u8 pad_29D;
93 /* 0x29E */ u8 x29E;
94 /* 0x29F */ u8 x29F;
95 /* 0x2A0 */ u8 pad_2A0;
96 /* 0x2A1 */ s8 x2A1;
97 /* 0x2A2 */ u8 pad_2A2[2];
98 /* 0x2A4 */ float x2A4;
99 /* 0x2A8 */ float x2A8;
100 /* 0x2AC */ struct HSD_GObj* gobj_2AC;
101 /* 0x2B0 */ struct HSD_GObj* gobj_2B0;
102 /* 0x2B4 */ u8 pad_2B4[4];
103 /* 0x2B8 */ u8 x2B8;
104 /* 0x2B9 */ u8 pad_2B9[9];
105 /* 0x2C2 */ s8 x2C2;
106 /* 0x2C3 */ u8 pad_2C3;
107 /* 0x2C4 */ struct HSD_GObj* gobj_2C4;
108 /* 0x2C8 */ u8 pad_2C8[0x10];
110
111struct Toy {
112 /* +0 */ char pad_0[0x4];
113 /* +4 */ int x4;
114 /* +8 */ int x8;
115 /* +C */ char pad_C[0x40 - 0xC];
116 /* +40 */ Vec3 translate;
117 /* +4C */ Vec3 offset;
118 /* +58 */ char pad_58[0x194 - 0x58];
119 /* +194 */ s32 x194;
120 /* +198 */ char pad_198[0x19A - 0x198];
121 /* +19A */ u16 x19A;
122 /* +19C */ u16 x19C;
123 /* +19E */ u16 trophyTable[0x125];
124 /* +3E8 */ char pad_3E8[0x3EC - 0x3E8];
125 /* +3EC */ s16 trophyCount;
126};
127// TODO: This struct should only be 0x58
128// STATIC_ASSERT(sizeof(struct Toy) == 0x58);
129
130typedef struct TyDspEntry {
131 /* 0x00 */ s32 x00;
132 /* 0x04 */ u8 x04;
133 /* 0x05 */ u8 x05;
134 /* 0x06 */ u8 pad_06[2];
135 /* 0x08 */ f32 x08;
136 /* 0x0C */ f32 x0C;
137} TyDspEntry;
138STATIC_ASSERT(sizeof(struct TyDspEntry) == 0x10);
139
140typedef struct ToySubStructS_ {
141 u8 pad0[0x10];
142 s16 x10;
144
145typedef struct ToyGlobalsS_ {
151 u8 pad14[0x1C];
152 void* x30;
153 u8 pad34[0x1C];
154 void* x50;
155 void* x54;
157 u8 pad0[0x140 - 0x5C];
159 void* x144;
160 void* x148;
161 void* x14C;
162 void* x150;
163 s16 x154;
165#endif
signed char s8
Definition hsd_3B2B.h:3
signed long s32
Definition hsd_3B2B.h:1
unsigned char u8
Definition hsd_3B2B.h:2
#define STATIC_ASSERT(cond)
Definition platform.h:110
was using this to try and fix some matches, unsuccessfully
Definition gobj.h:26
Definition jobj.h:107
Definition sislib.h:47
Definition types.h:26
s8 x0F
Definition types.h:31
s8 x10
Definition types.h:32
s16 xC
Definition types.h:29
u8 pad_12[2]
Definition types.h:34
struct HSD_GObj * gobj
Definition types.h:27
s8 x0E
Definition types.h:30
s8 x11
Definition types.h:33
struct HSD_JObj * jobj[2]
Definition types.h:28
Definition types.h:38
s32 value
Definition types.h:41
s32 id
Definition types.h:39
s8 value_byte
Definition types.h:42
Definition types.h:145
s32 x10
Definition types.h:150
void * x148
Definition types.h:160
ToySubStructS_ * x140
Definition types.h:158
u8 x4
Definition types.h:147
HSD_GObj * x0
Definition types.h:146
void * x54
Definition types.h:155
void * x150
Definition types.h:162
void * x30
Definition types.h:152
s32 x58
Definition types.h:156
void * x50
Definition types.h:154
void * x14C
Definition types.h:161
u8 pad14[0x1C]
Definition types.h:151
HSD_GObj * xC
Definition types.h:149
void * x144
Definition types.h:159
s16 x154
Definition types.h:163
HSD_GObj * x8
Definition types.h:148
u8 pad34[0x1C]
Definition types.h:153
u8 pad0[0x140 - 0x5C]
Definition types.h:157
Definition types.h:140
u8 pad0[0x10]
Definition types.h:141
s16 x10
Definition types.h:142
Definition types.h:111
Vec3 translate
Definition types.h:116
s16 trophyCount
Definition types.h:125
int x4
Definition types.h:113
char pad_58[0x194 - 0x58]
Definition types.h:118
char pad_0[0x4]
Definition types.h:112
int x8
Definition types.h:114
s32 x194
Definition types.h:119
u16 trophyTable[0x125]
Definition types.h:123
u16 x19C
Definition types.h:122
u16 x19A
Definition types.h:121
char pad_198[0x19A - 0x198]
Definition types.h:120
char pad_3E8[0x3EC - 0x3E8]
Definition types.h:124
char pad_C[0x40 - 0xC]
Definition types.h:115
Vec3 offset
Definition types.h:117
Definition types.h:47
f32 x18
Definition types.h:54
f32 x14
Definition types.h:53
s8 x21
Definition types.h:57
f32 x1C
Definition types.h:55
f32 x10
Definition types.h:52
s32 x04
Definition types.h:49
s8 x20
Definition types.h:56
s32 id
Definition types.h:48
s8 x23
Definition types.h:59
s8 x22
Definition types.h:58
f32 x08
Definition types.h:50
f32 x0C
Definition types.h:51
Definition types.h:130
s32 x00
Definition types.h:131
u8 x05
Definition types.h:133
u8 pad_06[2]
Definition types.h:134
f32 x0C
Definition types.h:136
u8 x04
Definition types.h:132
f32 x08
Definition types.h:135
Definition types.h:63
float x2C
Definition types.h:72
s16 idx
Definition types.h:69
struct TyListArg * links[3]
Definition types.h:64
struct HSD_JObj * jobjs[3]
Definition types.h:65
s8 x24
Definition types.h:67
float x30
Definition types.h:73
u8 pad_29[0x2C - 0x29]
Definition types.h:71
u8 x25
Definition types.h:68
s8 x28
Definition types.h:70
struct HSD_Text * texts[3]
Definition types.h:66
Definition types.h:77
struct HSD_GObj * gobj_2C4
Definition types.h:107
struct TyListArg * x278
Definition types.h:81
float x2A8
Definition types.h:99
u8 pad_2C8[0x10]
Definition types.h:108
struct HSD_GObj * gobj_2B0
Definition types.h:101
u8 pad_2B9[9]
Definition types.h:104
u8 pad_2B4[4]
Definition types.h:102
s8 x2C2
Definition types.h:105
u8 pad_2A2[2]
Definition types.h:97
u8 x29F
Definition types.h:94
u8 pad_294[4]
Definition types.h:87
u8 x29B
Definition types.h:90
struct HSD_JObj * jobj
Definition types.h:85
struct TyListArg * x270
Definition types.h:79
struct HSD_JObj * x288
Definition types.h:84
struct TyListArg * x274
Definition types.h:80
TyListArg entries[12]
Definition types.h:78
s8 x2A1
Definition types.h:96
struct HSD_Text * x290
Definition types.h:86
u8 pad_280[0x8]
Definition types.h:83
u8 pad_29D
Definition types.h:92
struct HSD_GObj * gobj
Definition types.h:82
u8 x2B8
Definition types.h:103
u8 pad_2C3
Definition types.h:106
s8 entryCount
Definition types.h:89
s16 selectedIdx
Definition types.h:88
u8 pad_2A0
Definition types.h:95
u8 x29C
Definition types.h:91
struct HSD_GObj * gobj_2AC
Definition types.h:100
u8 x29E
Definition types.h:93
float x2A4
Definition types.h:98
Definition types.h:13
u8 x3
Definition types.h:17
u8 x5
Definition types.h:19
u16 x8
Definition types.h:21
u8 x1
Definition types.h:15
s8 x0
Definition types.h:14
u8 x2
Definition types.h:16
s8 x4
Definition types.h:18
u16 xA
Definition types.h:22
u16 x6
Definition types.h:20