SSBM Decomp
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
25
30
34
35struct 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};
46ASSERT_SIZE(struct mpIsland, 0x2C);
47
48struct 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
59struct CollLine {
60 /* +0 */ MapLine* inner;
61 /* +4 */ u32 flags;
62};
63
64struct CollVtx {
65 /* 0x00 */ Vec2 base_pos;
66 /* 0x08 */ Vec2 pos;
67 /* 0x10 */ Vec2 prev_pos;
68}; /* size = 0x18 */
69ASSERT_SIZE(struct CollVtx, 0x18);
70
79
84
85struct MapJoint {
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
95struct 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;
106 /* 0x28 */ Ground* cb_data_0;
108 /* 0x30 */ Ground* cb_data_1;
109}; /* size = 0x34 */
110ASSERT_SIZE(struct CollJoint, 0x34);
111
114 /* +4 */ int vert_count;
115 /* +8 */ MapLine* lines DAT_COUNT(line_count);
116 /* +C */ int line_count;
118 /* +24 */ MapJoint* joints DAT_COUNT(joint_count);
119 /* +28 */ int joint_count;
120 /* +2C */ int x2C; /* inferred */
121};
122
124 float top;
125 float bottom;
126 float left;
127 float right;
128};
129
130#endif
static f32 verts[20][3]
Definition GXDraw.c:341
Annotations describing how archive data is laid out, for the parts a C declaration cannot express: ho...
struct Vec Vec3
unsigned int u32
Definition types.h:13
signed short int s16
Definition types.h:6
unsigned short int u16
Definition types.h:7
unsigned char u8
Definition types.h:5
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
Definition forward.h:18
#define ASSERT_SIZE(expr, size)
Definition platform.h:127
MapLineGroup
Definition types.h:71
@ MapLineGroup_Ceiling
Definition types.h:73
@ MapLineGroup_Floor
Definition types.h:72
@ MapLineGroup_Dynamic
Definition types.h:76
@ MapLineGroup_Count
Definition types.h:77
@ MapLineGroup_LeftWall
Definition types.h:75
@ MapLineGroup_RightWall
Definition types.h:74
Definition types.h:95
CollJoint * next
Definition types.h:96
Vec2 bounding_min
Definition types.h:101
s16 xC
Definition types.h:99
Vec2 bounding_max
Definition types.h:102
HSD_JObj * jobj
Definition types.h:103
mpLib_JointCollisionCallback cb_0
Definition types.h:105
mpLib_JointCollisionCallback cb_1
Definition types.h:107
Ground * cb_data_0
Definition types.h:106
u8 xE
Definition types.h:100
u32 flags
Definition types.h:98
MapJoint * inner
Definition types.h:97
Ground * cb_data_1
Definition types.h:108
Definition types.h:59
MapLine * inner
Definition types.h:60
u32 flags
Definition types.h:61
Definition types.h:64
Vec2 pos
Definition types.h:66
Vec2 prev_pos
Definition types.h:67
Vec2 base_pos
Definition types.h:65
Definition GXStruct.h:27
Definition types.h:1798
Definition jobj.h:106
Definition types.h:112
int vert_count
Definition types.h:114
Vec2 *verts DAT_COUNT(vert_count)
MapJoint *joints DAT_COUNT(joint_count)
int line_count
Definition types.h:116
MapLine *lines DAT_COUNT(line_count)
struct MapLineRange ranges[MapLineGroup_Count]
Definition types.h:117
int joint_count
Definition types.h:119
int x2C
Definition types.h:120
Definition types.h:85
float bottom_bound
Definition types.h:88
s16 vtx_start
Definition types.h:91
float left_bound
Definition types.h:87
float top_bound
Definition types.h:90
float right_bound
Definition types.h:89
s16 vtx_count
Definition types.h:92
struct MapLineRange ranges[MapLineGroup_Count]
Definition types.h:86
Definition types.h:80
s16 start
Definition types.h:81
s16 count
Definition types.h:82
Definition types.h:48
u16 hi_flags
Definition types.h:55
s16 next_id1
Definition types.h:54
u16 v0_idx
Definition types.h:49
s16 next_id0
Definition types.h:52
s16 prev_id1
Definition types.h:53
s16 prev_id0
Definition types.h:51
u16 v1_idx
Definition types.h:50
u16 lo_flags
Definition types.h:56
Definition mtx.h:10
Definition types.h:123
float left
Definition types.h:126
float right
Definition types.h:127
float bottom
Definition types.h:125
float top
Definition types.h:124
Definition types.h:14
mpIsland * b1_floors
Definition types.h:21
mpIsland * non_dynamic_ceilings_tail
Definition types.h:18
mpIsland * dynamic_floors
Definition types.h:19
mpIsland * b1_ceilings
Definition types.h:22
mpIsland * dynamic_ceilings
Definition types.h:20
mpIsland * non_dynamic_floors_tail
Definition types.h:17
mpIsland * free_list
Definition types.h:23
mpIsland * floors
Definition types.h:15
mpIsland * ceilings
Definition types.h:16
Definition types.h:26
mp_Terrain kind
Definition types.h:27
GXColor color
Definition types.h:28
Definition types.h:31
mpIsland_PaletteEntry entries[20]
Definition types.h:32
Definition types.h:35
int flags
Definition types.h:41
mpIsland * next
Definition types.h:36
s16 line1
Definition types.h:43
Vec3 pos1
Definition types.h:40
Vec3 pos0
Definition types.h:39
s16 line0
Definition types.h:42
u16 vtx1
Definition types.h:38
u16 vtx0
Definition types.h:37
s16 joint_id
Definition types.h:44