Melee Modding Library  2.0.0
A C library for modding Super Smash Bros Melee
moves.h
Go to the documentation of this file.
1 
7 #ifndef MML_MOVES_H
8 #define MML_MOVES_H
9 
10 #include "gctypes.h"
11 #include "controller.h"
12 
14 typedef struct __attribute__((packed))
15 {
20 } RawInput;
21 
23 typedef struct
24 {
28 } Move;
29 
31 
32 #define NO_FLAGS 0
33 #define JUMPSQUAT (1 << 0)
34 #define SH_LENGTH (1 << 1)
35 #define LEDGEDASH (1 << 2)
36 #define RESET_STICK_COUNTER (1 << 3)
37 
38 
40 
41 #define RELEASE 0x0000
42 #define OVERWRITE 0
43 #define STICK_ANGLE(x) ((((u8) (((x) / 360.f) * 255.f)) << 8) & 0xFF00)
44 
45 
47 extern RawInput _raw_shNeutralB[4];
48 extern RawInput _raw_shortHop[2];
49 extern RawInput _raw_tech[2];
50 extern RawInput _raw_spotDodge[3];
51 extern RawInput _raw_aPress[2];
52 extern RawInput _raw_hitDI[2];
53 extern RawInput _raw_holdDirection[1];
54 extern RawInput _raw_upB[2];
55 extern RawInput _raw_sideB[1];
56 extern RawInput _raw_doubleJump[1];
57 extern RawInput _raw_downB[2];
58 extern RawInput _raw_ledgeDash[4];
59 extern RawInput _raw_wavedash[3];
62 extern Move _mv_shNeutralB;
63 extern Move _mv_shortHop;
64 extern Move _mv_tech;
65 extern Move _mv_spotDodge;
66 extern Move _mv_getUpAttack;
67 extern Move _mv_jab;
68 extern Move _mv_hitDI;
69 extern Move _mv_throwDI;
70 extern Move _mv_upB;
71 extern Move _mv_sideB;
72 extern Move _mv_downB;
73 extern Move _mv_wavedash;
74 extern Move _mv_doubleJump;
75 extern Move _mv_holdDirection;
76 extern Move _mv_ledgeDash;
79 #define SET_TECH_DIR(x) _raw_tech[0].controller = \
80  L_BUTTON | FULL_STICK | STICK_ANGLE(x)
81 
83 #define SET_HIT_DI_DIR(x) _raw_hitDI[0].controller = \
84  FULL_STICK | STICK_ANGLE((x))
85 
87 #define SET_THROW_DI_DIR(x) _raw_holdDirection[0].controller = \
88  FULL_STICK | STICK_ANGLE((x))
89 
91 #define SET_UP_B_DIR(x) _raw_upB[1].controller = \
92  FULL_STICK | STICK_ANGLE((x))
93 
95 #define SET_SIDE_B_DIR(x) _raw_sideB[0].controller = \
96  B_BUTTON | FULL_STICK | STICK_ANGLE((x))
97 
99 #define SET_DJ_DIR(x) _raw_doubleJump[0].controller = \
100  X_BUTTON | FULL_STICK | STICK_ANGLE((x))
101 
103 #define SET_LEDGEDASH_ANGLE(x) _raw_ledgeDash[2].controller = \
104  L_BUTTON | FULL_STICK | STICK_ANGLE((x))
105 
107 #define SET_HOLD_DIR(x) _raw_holdDirection[0].controller = \
108  FULL_STICK | STICK_ANGLE((x))
109 
111 #define SET_WAVEDASH_DIR(x) _raw_wavedash[1].controller = \
112  L_BUTTON | FULL_STICK | STICK_ANGLE(x)
113 
114 #endif
115 
uint8_t u8
Definition: gctypes.h:14
u32 size
Definition: moves.h:26
Data types for the gamecube.
Move _mv_spotDodge
Definition: moves.c:32
Move _mv_jab
Definition: moves.c:40
Move _mv_shortHop
Definition: moves.c:17
Move _mv_doubleJump
Definition: moves.c:67
Move _mv_throwDI
Definition: moves.c:54
Move _mv_getUpAttack
Definition: moves.c:39
Move _mv_sideB
Definition: moves.c:82
Represents a single move (string of timed inputs)
Definition: moves.h:23
s8 frameOffset
Definition: moves.h:17
Move _mv_tech
Definition: moves.c:24
Move _mv_shNeutralB
Definition: moves.c:10
uint16_t u16
Definition: gctypes.h:15
Move _mv_wavedash
Definition: moves.c:97
Emulate a player&#39;s controller.
Move _mv_hitDI
Definition: moves.c:47
RawInput * inputs
Definition: moves.h:25
represent an input in its minimal form
Definition: moves.h:14
u8 flags
Definition: moves.h:18
u16 controller
Definition: moves.h:16
uint32_t u32
Definition: gctypes.h:16
Move _mv_upB
Definition: moves.c:61
int8_t s8
Definition: gctypes.h:18
Move _mv_downB
Definition: moves.c:89
Move _mv_ledgeDash
Definition: moves.c:76
Move _mv_holdDirection
Definition: moves.c:53