SSBM Decomp
Loading...
Searching...
No Matches
common_structs.h
Go to the documentation of this file.
1
3#ifndef _common_structs_h_
4#define _common_structs_h_
5
6#include <platform.h>
7
9
10#include <dolphin/gx/types.h>
11#include <dolphin/mtx/types.h>
12
13// Most of these should be moved to independent headers once they are created
14
15// SOUND EFFECTS
16
17#define SFX_VOLUME_MAX 0x7FU
18#define SFX_PAN_MID 0x40U
19
20// HSD_PAD
22typedef u32 HSD_Pad;
23
24#define HSD_PAD_DPADLEFT (1 << 0)
25#define HSD_PAD_DPADRIGHT (1 << 1)
26#define HSD_PAD_DPADDOWN (1 << 2)
27#define HSD_PAD_DPADUP (1 << 3)
28#define HSD_PAD_Z (1 << 4)
29#define HSD_PAD_R (1 << 5)
30#define HSD_PAD_L (1 << 6)
31#define HSD_PAD_7 (1 << 7)
32
34#define HSD_PAD_A (1 << 8)
35
36#define HSD_PAD_B (1 << 9)
37#define HSD_PAD_X (1 << 10)
38#define HSD_PAD_Y (1 << 11)
39#define HSD_PAD_START (1 << 12)
40
42#define HSD_PAD_LR (1 << 31)
43
44#define HSD_PAD_AB (HSD_PAD_A | HSD_PAD_B)
45#define HSD_PAD_XY (HSD_PAD_X | HSD_PAD_Y)
46
47// COLLISION FLAGS
48
49// From Ness's Yo-Yo collision check
50
52#define MPCOLL_RIGHTWALL 0x3F
53#define MPCOLL_FLAGS_B05 (1 << 5)
54#define MPCOLL_LEFTWALL 0xFC0
55#define MPCOLL_WALL (MPCOLL_RIGHTWALL | MPCOLL_LEFTWALL)
56#define MPCOLL_FLAGS_B11 (1 << 11)
57#define MPCOLL_CEIL 0x6000
58#define MPCOLL_FLAGS_B14 (1 << 14)
59#define MPCOLL_UNK 0x18000 // Floor??
60#define MPCOLL_GRPUSH (1 << 15)
61#define MPCOLL_FLAGS_B16 (1 << 16)
62#define MPCOLL_FLAGS_B20 (1 << 20) // 0x100000
63#define MPCOLL_FLAGS_B21 (1 << 21) // 0x200000
64#define MPCOLL_FLAGS_B23 (1 << 23)
65#define MPCOLL_FLAGS_B24 (1 << 24)
66#define MPCOLL_FLAGS_B25 (1 << 25)
67
68typedef union UnkFlagStruct {
70 struct {
71 u8 b0 : 1;
72 u8 b1 : 1;
73 u8 b2 : 1;
74 u8 b3 : 1;
75 u8 b4 : 1;
76 u8 b5 : 1;
77 u8 b6 : 1;
78 u8 b7 : 1;
79 };
81
82typedef struct ColorOverlay {
83 s32 x0_timer; // 0x0
84 s32 x4_pri; // 0x4 this colanims priority, lower = will persist
85 s32* x8_ptr1; // 0x8
86 s32 xC_loop; // 0xc
87 s32* x10_ptr2; // 0x10
88 s32 x14; // 0x14
89 s32* x18_alloc; // 0x18
90 s32 x1c; // 0x1c
91 s32 x20; // 0x20
92 s32 x24; // 0x24
93 s32 x28_colanim; // 0x28, id for the color animation in effect
114 u8 x7C_color_enable : 1; // 0x7c, 0x80
115 u8 x7C_flag2 : 1; // 0x7c, 0x40
116 u8 x7C_light_enable : 1; // 0x7c, 0x20
117 u8 x7C_flag4 : 1; // 0x7c, 0x10
118 u8 x7C_flag5 : 1; // 0x7c, 0x08
119 u8 x7C_flag6 : 1; // 0x7c, 0x04
120 u8 x7C_flag7 : 1; // 0x7c, 0x02
121 u8 x7C_flag8 : 1; // 0x7c, 0x01
123
131
136
137#endif
GroundOrAir
Definition common_structs.h:132
@ GA_Ground
Definition common_structs.h:133
@ GA_Air
Definition common_structs.h:134
u32 HSD_Pad
Definition common_structs.h:22
unsigned long u32
An unsigned 32-bit integer.
Definition platform.h:26
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 common_structs.h:82
f32 x6C_lightblend_blue
Definition common_structs.h:110
s32 x24
Definition common_structs.h:92
s32 * x10_ptr2
Definition common_structs.h:87
f32 x74_light_angle
Definition common_structs.h:112
f32 x60_light_alpha
Definition common_structs.h:107
u8 x7C_flag7
Definition common_structs.h:120
f32 x48_colorblend_blue
Definition common_structs.h:101
f32 x5C_light_blue
Definition common_structs.h:106
u8 x7C_flag8
Definition common_structs.h:121
s32 x0_timer
Definition common_structs.h:83
f32 x58_light_green
Definition common_structs.h:105
GXColor x2C_hex
Definition common_structs.h:94
s32 x20
Definition common_structs.h:91
f32 x70_lightblend_alpha
Definition common_structs.h:111
f32 x68_lightblend_green
Definition common_structs.h:109
f32 x38_color_blue
Definition common_structs.h:97
u8 x7C_flag5
Definition common_structs.h:118
f32 x54_light_red
Definition common_structs.h:104
GXColor x50_light_color
Definition common_structs.h:103
u8 x7C_flag2
Definition common_structs.h:115
u8 x7C_color_enable
Definition common_structs.h:114
u8 x7C_light_enable
Definition common_structs.h:116
s32 * x8_ptr1
Definition common_structs.h:85
f32 x34_color_green
Definition common_structs.h:96
f32 x64_lightblend_red
Definition common_structs.h:108
f32 x4C_colorblend_alpha
Definition common_structs.h:102
s32 * x18_alloc
Definition common_structs.h:89
s32 x4_pri
Definition common_structs.h:84
s32 x28_colanim
Definition common_structs.h:93
s32 x14
Definition common_structs.h:88
s32 xC_loop
Definition common_structs.h:86
f32 x3C_color_alpha
Definition common_structs.h:98
u8 x7C_flag6
Definition common_structs.h:119
f32 x30_color_red
Definition common_structs.h:95
u8 x7C_flag4
Definition common_structs.h:117
s32 x1c
Definition common_structs.h:90
f32 x44_colorblend_green
Definition common_structs.h:100
f32 x78_light_unk
Definition common_structs.h:113
f32 x40_colorblend_red
Definition common_structs.h:99
Definition types.h:30
Definition common_structs.h:124
u32 x0_unk
Definition common_structs.h:125
u8 x5_unk
Definition common_structs.h:127
u8 x4_unk
Definition common_structs.h:126
u8 x7_unk
Definition common_structs.h:129
u8 x6_unk
Definition common_structs.h:128
Definition common_structs.h:68
u8 b3
Definition common_structs.h:74
u8 b4
Definition common_structs.h:75
u8 b6
Definition common_structs.h:77
u8 b5
Definition common_structs.h:76
u8 b2
Definition common_structs.h:73
u8 b7
Definition common_structs.h:78
u8 b0
Definition common_structs.h:71
u8 u8
Definition common_structs.h:69
u8 b1
Definition common_structs.h:72