Melee Modding Library  2.0.0
A C library for modding Super Smash Bros Melee
input_queue.h
Go to the documentation of this file.
1 
6 #ifndef MML_INPUT_QUEUE_H
7 #define MML_INPUT_QUEUE_H
8 
9 #include "moves.h"
10 #include "controller.h"
11 #include "gctypes.h"
12 
17 typedef struct __attribute__((packed))
18 {
24 
26 typedef struct
27 {
29  size_t size;
30  size_t capacity;
31  unsigned port;
34 } InputQueue;
35 
37 #define INIT_INPUT_QUEUE(port) {NULL, 0, 0, port, DEFAULT_CONTROLLER}
38 
47 void addInputToQueue(InputQueue* queue, const RawInput input);
48 
57 void addMoveToQueue(InputQueue* queue, const Move* move);
58 
65 void processInputQueue(InputQueue* queue);
66 
67 #endif
Manages a list of inputs.
Definition: input_queue.h:26
Data types for the gamecube.
A single controller input made by the queue.
Definition: input_queue.h:17
u16 resetStickCount
Definition: input_queue.h:21
u16 state
Definition: input_queue.h:20
Common input sequences.
void addMoveToQueue(InputQueue *queue, const Move *move)
Add entire move to queue.
Definition: input_queue.c:61
u32 frame
Definition: input_queue.h:19
Represents the state of a controller.
Definition: controller.h:45
ControllerInput * queue
Definition: input_queue.h:28
Controller controller
Definition: input_queue.h:32
Represents a single move (string of timed inputs)
Definition: moves.h:23
void processInputQueue(InputQueue *queue)
Check if any inputs need to be written.
Definition: input_queue.c:70
uint16_t u16
Definition: gctypes.h:15
unsigned port
Definition: input_queue.h:31
Emulate a player's controller.
represent an input in its minimal form
Definition: moves.h:14
uint32_t u32
Definition: gctypes.h:16
size_t size
Definition: input_queue.h:29
size_t capacity
Definition: input_queue.h:30
void addInputToQueue(InputQueue *queue, const RawInput input)
Add single input to queue.
Definition: input_queue.c:33