Melee Modding Library  2.0.0
A C library for modding Super Smash Bros Melee
Data Structures | Macros | Functions
input_queue.h File Reference

Queue inputs for a specific port. More...

#include "moves.h"
#include "controller.h"
#include "gctypes.h"

Go to the source code of this file.

Data Structures

struct  ControllerInput
 A single controller input made by the queue. More...
 
struct  InputQueue
 Manages a list of inputs. More...
 

Macros

#define INIT_INPUT_QUEUE(port)   {NULL, 0, 0, port, DEFAULT_CONTROLLER}
 

Functions

void addInputToQueue (InputQueue *queue, const RawInput input)
 Add single input to queue. More...
 
void addMoveToQueue (InputQueue *queue, const Move *move)
 Add entire move to queue. More...
 
void processInputQueue (InputQueue *queue)
 Check if any inputs need to be written. More...
 

Detailed Description

Queue inputs for a specific port.


Data Structure Documentation

struct ControllerInput

A single controller input made by the queue.

Note
size = 8 bytes
Data Fields
u32 frame

Frame on which to execute input

u16 state

State of controller

u16 resetStickCount

Reset control stick active frames

struct InputQueue

Manages a list of inputs.

Data Fields
ControllerInput * queue

Array of inputs to execute

size_t size

Number of inputs in queue

size_t capacity

Capacity of queue

unsigned port

Port that this input queue belongs to

Controller controller

Controller this queue uses

Macro Definition Documentation

#define INIT_INPUT_QUEUE (   port)    {NULL, 0, 0, port, DEFAULT_CONTROLLER}

Default InputQueue struct

Function Documentation

void processInputQueue ( InputQueue queue)

Check if any inputs need to be written.

Parameters
queue- Pointer to InputQueue struct
Returns
none