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
8#include <dolphin/gx.h>
9#include <dolphin/mtx.h>
10
11// Most of these should be moved to independent headers once they are created
12
13// SOUND EFFECTS
14
15#define SFX_VOLUME_MAX 0x7FU
16#define SFX_PAN_MID 0x40U
17
18// HSD_PAD
20typedef u32 HSD_Pad;
21
22#define HSD_PAD_DPADLEFT (1 << 0)
23#define HSD_PAD_DPADRIGHT (1 << 1)
24#define HSD_PAD_DPADDOWN (1 << 2)
25#define HSD_PAD_DPADUP (1 << 3)
26#define HSD_PAD_Z (1 << 4)
27#define HSD_PAD_R (1 << 5)
28#define HSD_PAD_L (1 << 6)
29#define HSD_PAD_7 (1 << 7)
30
32#define HSD_PAD_A (1 << 8)
33
34#define HSD_PAD_B (1 << 9)
35#define HSD_PAD_X (1 << 10)
36#define HSD_PAD_Y (1 << 11)
37#define HSD_PAD_START (1 << 12)
38
40#define HSD_PAD_LR (1 << 31)
41
42#define HSD_PAD_AB (HSD_PAD_A | HSD_PAD_B)
43#define HSD_PAD_XY (HSD_PAD_X | HSD_PAD_Y)
44
45// COLLISION FLAGS
46
47// From Ness's Yo-Yo collision check
48
50#define Collide_LeftWallPush 0x1
51#define Collide_LeftWallHug 0x20
52#define Collide_LeftWallMask 0x3F
53#define Collide_RightWallPush 0x40
54#define Collide_RightWallHug 0x800
55#define Collide_RightWallMask 0xFC0
56#define Collide_WallMask (Collide_LeftWallMask | Collide_RightWallMask)
57
58#define Collide_CeilingPush 0x2000
59#define Collide_CeilingHug 0x4000
60#define Collide_CeilingMask (Collide_CeilingPush | Collide_CeilingHug)
61
62#define Collide_FloorPush 0x8000
63#define Collide_FloorHug 0x10000
64#define Collide_FloorMask (Collide_FloorPush | Collide_FloorHug)
65
66#define Collide_LeftEdge 0x100000
67#define Collide_RightEdge 0x200000
68#define Collide_Edge 0x800000
69#define Collide_LeftLedgeGrab 0x1000000
70#define Collide_RightLedgeGrab 0x2000000
71#define Collide_LedgeGrabMask (Collide_LeftLedgeGrab | Collide_RightLedgeGrab)
72#define Collide_LeftLedgeSlip 0x10000000
73#define Collide_RightLedgeSlip 0x20000000
74
75typedef union UnkFlagStruct {
77 struct {
78 u8 b0 : 1;
79 u8 b1 : 1;
80 u8 b2 : 1;
81 u8 b3 : 1;
82 u8 b4 : 1;
83 u8 b5 : 1;
84 u8 b6 : 1;
85 u8 b7 : 1;
86 };
88
93
94#endif
GroundOrAir
Definition common_structs.h:89
@ GA_Ground
Definition common_structs.h:90
@ GA_Air
Definition common_structs.h:91
u32 HSD_Pad
Definition common_structs.h:20
Definition common_structs.h:75
u8 b3
Definition common_structs.h:81
u8 b4
Definition common_structs.h:82
u8 b6
Definition common_structs.h:84
u8 b5
Definition common_structs.h:83
u8 b2
Definition common_structs.h:80
u8 b7
Definition common_structs.h:85
u8 b0
Definition common_structs.h:78
u8 u8
Definition common_structs.h:76
u8 b1
Definition common_structs.h:79