12 #define DR_MARIO (1 << 0) 13 #define MARIO (1 << 1) 14 #define LUIGI (1 << 2) 15 #define BOWSER (1 << 3) 16 #define PEACH (1 << 4) 17 #define YOSHI (1 << 5) 19 #define FALCON (1 << 7) 20 #define GANON (1 << 8) 21 #define FALCO (1 << 9) 23 #define NESS (1 << 11) 24 #define ICE_CLIMBERS (1 << 12) 25 #define KIRBY (1 << 13) 26 #define SAMUS (1 << 14) 27 #define ZELDA (1 << 15) 28 #define LINK (1 << 16) 29 #define YOUNG_LINK (1 << 17) 30 #define PICHU (1 << 18) 31 #define PIKACHU (1 << 19) 32 #define PUFF (1 << 20) 33 #define MEWTWO (1 << 21) 34 #define MR_GNW (1 << 22) 35 #define MARTH (1 << 23) 61 #define INIT_AI(port_val, characters_val) \ 63 .inputQueue = INIT_INPUT_QUEUE(port_val), \ 67 .characters = characters_val, \ Controller controller
Definition: ai.h:48
bool needLogic(const AI *ai)
Check if AI has no logic or inputs queued.
Definition: ai.c:56
void clearAI(AI *ai)
Clear all logic and inputs from AI (reset controller)
Definition: ai.c:61
Data types for the gamecube.
void updateAI(AI *ai)
Check logic rules and queued inputs.
Definition: ai.c:76
Represents the state of a controller.
Definition: controller.h:45
u32 characters
Definition: ai.h:53
Holds all information about an AI.
Definition: ai.h:46
Represents a single move (string of timed inputs)
Definition: moves.h:23
size_t logicCapacity
Definition: ai.h:52
bool active
Definition: ai.h:56
void addMove(AI *ai, const Move *move)
Tell AI to execute a move.
Definition: ai.c:51
InputQueue inputQueue
Definition: ai.h:49
u32 port
Definition: ai.h:54
Logic * logicQueue
Definition: ai.h:50
Emulate a player's controller.
Defines structs for AI logic.
uint32_t u32
Definition: gctypes.h:16
void addLogic(AI *ai, const Logic *logic)
Add single logic rule to AI.
Definition: ai.c:34
size_t logicSize
Definition: ai.h:51
Describes simple if-then logic.
Definition: logic.h:56
u32 opponent
Definition: ai.h:55