6 #ifndef MML_CONTROLLER_H     7 #define MML_CONTROLLER_H    13 #define BUTTON_BITS 0x000F    14 #define RADIUS_BITS 0x00F0    15 #define ANGLE_BITS  0xFF00    20 #define NO_BUTTON     0x00    26 #define START_BUTTON  0x06    28 #define DPAD_DOWN     0x08    29 #define DPAD_LEFT     0x09    30 #define DPAD_RIGHT    0x0a    31 #define CSTICK_UP     0x0b    32 #define CSTICK_DOWN   0x0c    33 #define CSTICK_LEFT   0x0d    34 #define CSTICK_RIGHT  0x0e    36 #define TILT_STICK    0x10    37 #define FULL_STICK    0x20    41 #define TILT_RADIUS 0.3    58 #define DEFAULT_CONTROLLER ((Controller) {0, 0.f, 0.f, 0.f, 0.f}) f32 CstickY
Definition: controller.h:53
 
Data types for the gamecube. 
 
Represents the state of a controller. 
Definition: controller.h:45
 
void setController(Controller *controller, u16 state)
Set the state of the controller. 
Definition: controller.c:16
 
float f32
Definition: gctypes.h:30
 
uint16_t u16
Definition: gctypes.h:15
 
f32 stickY
Definition: controller.h:50
 
f32 stickX
Definition: controller.h:49
 
uint32_t u32
Definition: gctypes.h:16
 
f32 CstickX
Definition: controller.h:52
 
u32 buttons
Definition: controller.h:47
 
void writeController(Controller *controller, u32 port, bool pData)
Write the state of controller to the memory addresses read by the game. 
Definition: controller.c:75