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* x0;
65 /* 0x04 */ struct TyListArg* x4;
66 /* 0x08 */ void* x8;
67 /* 0x0C */ struct HSD_JObj* xC;
68 /* 0x10 */ struct HSD_JObj* x10;
69 /* 0x14 */ struct HSD_JObj* x14;
70 /* 0x18 */ u8 pad_18[0x26 - 0x18];
71 /* 0x26 */ s16 idx;
72 /* 0x28 */ u8 pad_28[0x2C - 0x28];
73 /* 0x2C */ float x2C;
74 /* 0x30 */ float x30;
75} TyListArg;
76
77/* Trophy list UI state. Size: 0x2D8 bytes. */
78typedef struct TyListState {
79 /* 0x000 */ TyListArg entries[12]; /* 12 * 0x34 = 0x270 */
80 /* 0x270 */ u8 pad_270[0xC];
81 /* 0x27C */ struct HSD_GObj* gobj;
82 /* 0x280 */ u8 pad_280[0xC];
83 /* 0x28C */ struct HSD_JObj* jobj;
84 /* 0x290 */ u8 pad_290[8];
85 /* 0x298 */ s16 selectedIdx;
86 /* 0x29A */ s8 entryCount;
87 /* 0x29B */ u8 x29B;
88 /* 0x29C */ u8 x29C;
89 /* 0x29D */ u8 pad_29D;
90 /* 0x29E */ u8 x29E;
91 /* 0x29F */ u8 x29F;
92 /* 0x2A0 */ u8 pad_2A0;
93 /* 0x2A1 */ s8 x2A1;
94 /* 0x2A2 */ u8 pad_2A2[2];
95 /* 0x2A4 */ float x2A4;
96 /* 0x2A8 */ float x2A8;
97 /* 0x2AC */ struct HSD_GObj* gobj_2AC;
98 /* 0x2B0 */ struct HSD_GObj* gobj_2B0;
99 /* 0x2B4 */ u8 pad_2B4[4];
100 /* 0x2B8 */ u8 x2B8;
101 /* 0x2B9 */ u8 pad_2B9[0xB];
102 /* 0x2C4 */ struct HSD_GObj* gobj_2C4;
103 /* 0x2C8 */ u8 pad_2C8[0x10];
105
106struct Toy {
107 /* +0 */ char pad_0[0x4];
108 /* +4 */ int x4;
109 /* +8 */ int x8;
110 /* +C */ char pad_C[0x40 - 0xC];
111 /* +40 */ Vec3 translate;
112 /* +4C */ Vec3 offset;
113 /* +58 */ char pad_58[0x194 - 0x58];
114 /* +194 */ s32 x194;
115 /* +198 */ char pad_198[0x19A - 0x198];
116 /* +19A */ u16 x19A;
117 /* +19C */ u16 x19C;
118 /* +19E */ u16 trophyTable[0x125];
119 /* +3E8 */ char pad_3E8[0x3EC - 0x3E8];
120 /* +3EC */ s16 trophyCount;
121};
122// TODO: This struct should only be 0x58
123// STATIC_ASSERT(sizeof(struct Toy) == 0x58);
124
125typedef struct TyDspEntry {
126 /* 0x00 */ s32 x00;
127 /* 0x04 */ u8 x04;
128 /* 0x05 */ u8 x05;
129 /* 0x06 */ u8 pad_06[2];
130 /* 0x08 */ f32 x08;
131 /* 0x0C */ f32 x0C;
132} TyDspEntry;
133STATIC_ASSERT(sizeof(struct TyDspEntry) == 0x10);
134#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 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:106
Vec3 translate
Definition types.h:111
s16 trophyCount
Definition types.h:120
int x4
Definition types.h:108
char pad_58[0x194 - 0x58]
Definition types.h:113
char pad_0[0x4]
Definition types.h:107
int x8
Definition types.h:109
s32 x194
Definition types.h:114
u16 trophyTable[0x125]
Definition types.h:118
u16 x19C
Definition types.h:117
u16 x19A
Definition types.h:116
char pad_198[0x19A - 0x198]
Definition types.h:115
char pad_3E8[0x3EC - 0x3E8]
Definition types.h:119
char pad_C[0x40 - 0xC]
Definition types.h:110
Vec3 offset
Definition types.h:112
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:125
s32 x00
Definition types.h:126
u8 x05
Definition types.h:128
u8 pad_06[2]
Definition types.h:129
f32 x0C
Definition types.h:131
u8 x04
Definition types.h:127
f32 x08
Definition types.h:130
Definition types.h:63
u8 pad_28[0x2C - 0x28]
Definition types.h:72
float x2C
Definition types.h:73
s16 idx
Definition types.h:71
struct TyListArg * x4
Definition types.h:65
struct HSD_JObj * x10
Definition types.h:68
struct HSD_JObj * x14
Definition types.h:69
struct TyListArg * x0
Definition types.h:64
float x30
Definition types.h:74
void * x8
Definition types.h:66
u8 pad_18[0x26 - 0x18]
Definition types.h:70
struct HSD_JObj * xC
Definition types.h:67
Definition types.h:78
struct HSD_GObj * gobj_2C4
Definition types.h:102
float x2A8
Definition types.h:96
u8 pad_270[0xC]
Definition types.h:80
u8 pad_2C8[0x10]
Definition types.h:103
struct HSD_GObj * gobj_2B0
Definition types.h:98
u8 pad_2B4[4]
Definition types.h:99
u8 pad_2A2[2]
Definition types.h:94
u8 x29F
Definition types.h:91
u8 x29B
Definition types.h:87
struct HSD_JObj * jobj
Definition types.h:83
u8 pad_280[0xC]
Definition types.h:82
TyListArg entries[12]
Definition types.h:79
s8 x2A1
Definition types.h:93
u8 pad_290[8]
Definition types.h:84
u8 pad_2B9[0xB]
Definition types.h:101
u8 pad_29D
Definition types.h:89
struct HSD_GObj * gobj
Definition types.h:81
u8 x2B8
Definition types.h:100
s8 entryCount
Definition types.h:86
s16 selectedIdx
Definition types.h:85
u8 pad_2A0
Definition types.h:92
u8 x29C
Definition types.h:88
struct HSD_GObj * gobj_2AC
Definition types.h:97
u8 x29E
Definition types.h:90
float x2A4
Definition types.h:95
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