SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
#ifndef MELEE_MP_TYPES_H
2
#define MELEE_MP_TYPES_H
3
4
#include <
Runtime/platform.h
>
5
6
#include <
melee/gr/forward.h
>
7
#include <
melee/mp/forward.h
>
// IWYU pragma: export
8
9
#include <
dat_macros.h
>
10
11
#include <
dolphin/gx/GXStruct.h
>
12
#include <
dolphin/mtx.h
>
13
14
struct
mpIsland_80458E88_t
{
15
/* +0 */
mpIsland
*
floors
;
16
/* +4 */
mpIsland
*
ceilings
;
17
/* +8 */
mpIsland
*
non_dynamic_floors_tail
;
18
/* +C */
mpIsland
*
non_dynamic_ceilings_tail
;
19
/* +10 */
mpIsland
*
dynamic_floors
;
20
/* +14 */
mpIsland
*
dynamic_ceilings
;
21
/* +18 */
mpIsland
*
b1_floors
;
22
/* +1C */
mpIsland
*
b1_ceilings
;
23
/* +20 */
mpIsland
*
free_list
;
24
};
25
26
struct
mpIsland_PaletteEntry
{
27
mp_Terrain
kind
;
28
GXColor
color
;
29
};
30
31
struct
mpIsland_Palette
{
32
mpIsland_PaletteEntry
entries
[20];
33
};
34
35
struct
mpIsland
{
36
/* +0 */
mpIsland
*
next
;
37
/* +4 */
u16
vtx0
;
38
/* +6 */
u16
vtx1
;
39
/* +8 */
Vec3
pos0
;
40
/* +14 */
Vec3
pos1
;
41
/* +20 */
int
flags
;
42
/* +24 */
s16
line0
;
43
/* +26 */
s16
line1
;
44
/* +28 */
s16
joint_id
;
45
};
46
ASSERT_SIZE
(
struct
mpIsland
, 0x2C);
47
48
struct
MapLine
{
49
/* +0 */
u16
v0_idx
;
50
/* +2 */
u16
v1_idx
;
51
/* +4 */
s16
prev_id0
;
52
/* +6 */
s16
next_id0
;
53
/* +8 */
s16
prev_id1
;
54
/* +A */
s16
next_id1
;
55
/* +C */
u16
hi_flags
;
56
/* +E */
u16
lo_flags
;
57
};
58
59
struct
CollLine
{
60
/* +0 */
MapLine
*
inner
;
61
/* +4 */
u32
flags
;
62
};
63
64
struct
CollVtx
{
65
/* 0x00 */
Vec2
base_pos
;
66
/* 0x08 */
Vec2
pos
;
67
/* 0x10 */
Vec2
prev_pos
;
68
};
/* size = 0x18 */
69
ASSERT_SIZE
(
struct
CollVtx
, 0x18);
70
71
enum
MapLineGroup
{
72
MapLineGroup_Floor
,
73
MapLineGroup_Ceiling
,
74
MapLineGroup_RightWall
,
75
MapLineGroup_LeftWall
,
76
MapLineGroup_Dynamic
,
77
MapLineGroup_Count
,
78
};
79
80
struct
MapLineRange
{
81
s16
start
;
82
s16
count
;
83
};
84
85
struct
MapJoint
{
86
/* +0 */
struct
MapLineRange
ranges
[
MapLineGroup_Count
];
87
/* +14 */
float
left_bound
;
88
/* +18 */
float
bottom_bound
;
89
/* +1C */
float
right_bound
;
90
/* +20 */
float
top_bound
;
91
/* +24 */
s16
vtx_start
;
92
/* +26 */
s16
vtx_count
;
93
};
94
95
struct
CollJoint
{
96
/* 0x00 */
CollJoint
*
next
;
97
/* 0x04 */
MapJoint
*
inner
;
98
/* 0x08 */
u32
flags
;
99
/* 0x0C */
s16
xC
;
100
/* 0x0E */
u8
xE
: 1;
101
/* 0x10 */
Vec2
bounding_min
;
102
/* 0x18 */
Vec2
bounding_max
;
103
/* 0x20 */
HSD_JObj
*
jobj
;
104
/* 0x24 */
mpLib_JointCollisionCallback
105
cb_0
;
106
/* 0x28 */
Ground
*
cb_data_0
;
107
/* 0x2C */
mpLib_JointCollisionCallback
cb_1
;
108
/* 0x30 */
Ground
*
cb_data_1
;
109
};
/* size = 0x34 */
110
ASSERT_SIZE
(
struct
CollJoint
, 0x34);
111
112
struct
MapCollData
{
113
/* +0 */
Vec2
*
verts
DAT_COUNT
(
vert_count
);
114
/* +4 */
int
vert_count
;
115
/* +8 */
MapLine
* lines
DAT_COUNT
(
line_count
);
116
/* +C */
int
line_count
;
117
/* +10 */
struct
MapLineRange
ranges
[
MapLineGroup_Count
];
118
/* +24 */
MapJoint
* joints
DAT_COUNT
(
joint_count
);
119
/* +28 */
int
joint_count
;
120
/* +2C */
int
x2C
;
/* inferred */
121
};
122
123
struct
mpCollisionBox
{
124
float
top
;
125
float
bottom
;
126
float
left
;
127
float
right
;
128
};
129
130
#endif
verts
static f32 verts[20][3]
Definition
GXDraw.c:341
GXStruct.h
dat_macros.h
Annotations describing how archive data is laid out, for the parts a C declaration cannot express: ho...
mtx.h
Vec3
struct Vec Vec3
u32
unsigned int u32
Definition
types.h:13
s16
signed short int s16
Definition
types.h:6
u16
unsigned short int u16
Definition
types.h:7
u8
unsigned char u8
Definition
types.h:5
forward.h
forward.h
mpLib_JointCollisionCallback
void(* mpLib_JointCollisionCallback)(void *user_data, int joint_id, CollData *coll, int coll_x50, mpLib_GroundEnum ground_kind, float delta_y)
Joint collision callback for ground surfaces.
Definition
forward.h:55
mp_Terrain
mp_Terrain
Definition
forward.h:18
platform.h
ASSERT_SIZE
#define ASSERT_SIZE(expr, size)
Definition
platform.h:127
MapLineGroup
MapLineGroup
Definition
types.h:71
MapLineGroup_Ceiling
@ MapLineGroup_Ceiling
Definition
types.h:73
MapLineGroup_Floor
@ MapLineGroup_Floor
Definition
types.h:72
MapLineGroup_Dynamic
@ MapLineGroup_Dynamic
Definition
types.h:76
MapLineGroup_Count
@ MapLineGroup_Count
Definition
types.h:77
MapLineGroup_LeftWall
@ MapLineGroup_LeftWall
Definition
types.h:75
MapLineGroup_RightWall
@ MapLineGroup_RightWall
Definition
types.h:74
CollJoint
Definition
types.h:95
CollJoint::next
CollJoint * next
Definition
types.h:96
CollJoint::bounding_min
Vec2 bounding_min
Definition
types.h:101
CollJoint::xC
s16 xC
Definition
types.h:99
CollJoint::bounding_max
Vec2 bounding_max
Definition
types.h:102
CollJoint::jobj
HSD_JObj * jobj
Definition
types.h:103
CollJoint::cb_0
mpLib_JointCollisionCallback cb_0
Definition
types.h:105
CollJoint::cb_1
mpLib_JointCollisionCallback cb_1
Definition
types.h:107
CollJoint::cb_data_0
Ground * cb_data_0
Definition
types.h:106
CollJoint::xE
u8 xE
Definition
types.h:100
CollJoint::flags
u32 flags
Definition
types.h:98
CollJoint::inner
MapJoint * inner
Definition
types.h:97
CollJoint::cb_data_1
Ground * cb_data_1
Definition
types.h:108
CollLine
Definition
types.h:59
CollLine::inner
MapLine * inner
Definition
types.h:60
CollLine::flags
u32 flags
Definition
types.h:61
CollVtx
Definition
types.h:64
CollVtx::pos
Vec2 pos
Definition
types.h:66
CollVtx::prev_pos
Vec2 prev_pos
Definition
types.h:67
CollVtx::base_pos
Vec2 base_pos
Definition
types.h:65
GXColor
Definition
GXStruct.h:27
Ground
Definition
types.h:1798
HSD_JObj
Definition
jobj.h:106
MapCollData
Definition
types.h:112
MapCollData::vert_count
int vert_count
Definition
types.h:114
MapCollData::DAT_COUNT
Vec2 *verts DAT_COUNT(vert_count)
MapCollData::DAT_COUNT
MapJoint *joints DAT_COUNT(joint_count)
MapCollData::line_count
int line_count
Definition
types.h:116
MapCollData::DAT_COUNT
MapLine *lines DAT_COUNT(line_count)
MapCollData::ranges
struct MapLineRange ranges[MapLineGroup_Count]
Definition
types.h:117
MapCollData::joint_count
int joint_count
Definition
types.h:119
MapCollData::x2C
int x2C
Definition
types.h:120
MapJoint
Definition
types.h:85
MapJoint::bottom_bound
float bottom_bound
Definition
types.h:88
MapJoint::vtx_start
s16 vtx_start
Definition
types.h:91
MapJoint::left_bound
float left_bound
Definition
types.h:87
MapJoint::top_bound
float top_bound
Definition
types.h:90
MapJoint::right_bound
float right_bound
Definition
types.h:89
MapJoint::vtx_count
s16 vtx_count
Definition
types.h:92
MapJoint::ranges
struct MapLineRange ranges[MapLineGroup_Count]
Definition
types.h:86
MapLineRange
Definition
types.h:80
MapLineRange::start
s16 start
Definition
types.h:81
MapLineRange::count
s16 count
Definition
types.h:82
MapLine
Definition
types.h:48
MapLine::hi_flags
u16 hi_flags
Definition
types.h:55
MapLine::next_id1
s16 next_id1
Definition
types.h:54
MapLine::v0_idx
u16 v0_idx
Definition
types.h:49
MapLine::next_id0
s16 next_id0
Definition
types.h:52
MapLine::prev_id1
s16 prev_id1
Definition
types.h:53
MapLine::prev_id0
s16 prev_id0
Definition
types.h:51
MapLine::v1_idx
u16 v1_idx
Definition
types.h:50
MapLine::lo_flags
u16 lo_flags
Definition
types.h:56
Vec2
Definition
mtx.h:10
mpCollisionBox
Definition
types.h:123
mpCollisionBox::left
float left
Definition
types.h:126
mpCollisionBox::right
float right
Definition
types.h:127
mpCollisionBox::bottom
float bottom
Definition
types.h:125
mpCollisionBox::top
float top
Definition
types.h:124
mpIsland_80458E88_t
Definition
types.h:14
mpIsland_80458E88_t::b1_floors
mpIsland * b1_floors
Definition
types.h:21
mpIsland_80458E88_t::non_dynamic_ceilings_tail
mpIsland * non_dynamic_ceilings_tail
Definition
types.h:18
mpIsland_80458E88_t::dynamic_floors
mpIsland * dynamic_floors
Definition
types.h:19
mpIsland_80458E88_t::b1_ceilings
mpIsland * b1_ceilings
Definition
types.h:22
mpIsland_80458E88_t::dynamic_ceilings
mpIsland * dynamic_ceilings
Definition
types.h:20
mpIsland_80458E88_t::non_dynamic_floors_tail
mpIsland * non_dynamic_floors_tail
Definition
types.h:17
mpIsland_80458E88_t::free_list
mpIsland * free_list
Definition
types.h:23
mpIsland_80458E88_t::floors
mpIsland * floors
Definition
types.h:15
mpIsland_80458E88_t::ceilings
mpIsland * ceilings
Definition
types.h:16
mpIsland_PaletteEntry
Definition
types.h:26
mpIsland_PaletteEntry::kind
mp_Terrain kind
Definition
types.h:27
mpIsland_PaletteEntry::color
GXColor color
Definition
types.h:28
mpIsland_Palette
Definition
types.h:31
mpIsland_Palette::entries
mpIsland_PaletteEntry entries[20]
Definition
types.h:32
mpIsland
Definition
types.h:35
mpIsland::flags
int flags
Definition
types.h:41
mpIsland::next
mpIsland * next
Definition
types.h:36
mpIsland::line1
s16 line1
Definition
types.h:43
mpIsland::pos1
Vec3 pos1
Definition
types.h:40
mpIsland::pos0
Vec3 pos0
Definition
types.h:39
mpIsland::line0
s16 line0
Definition
types.h:42
mpIsland::vtx1
u16 vtx1
Definition
types.h:38
mpIsland::vtx0
u16 vtx0
Definition
types.h:37
mpIsland::joint_id
s16 joint_id
Definition
types.h:44
src
melee
mp
types.h
Generated by
1.17.0