Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Jo Engine Gamepad functions. More...
Go to the source code of this file.
Macros | |
#define | JO_INPUT_MAX_DEVICE |
#define | PER_ID_NightsPad |
#define | __JO_KEY_PRESSED(PORT, KEY) |
Enumerations | |
enum | jo_gamepad_keys { JO_KEY_RIGHT, JO_KEY_LEFT, JO_KEY_DOWN, JO_KEY_UP, JO_KEY_START, JO_KEY_A, JO_KEY_B, JO_KEY_C, JO_KEY_X, JO_KEY_Y, JO_KEY_Z, JO_KEY_L, JO_KEY_R, JO_MOUSE_START_BUTTON, JO_MOUSE_LEFT_BUTTON, JO_MOUSE_MIDDLE_BUTTON, JO_MOUSE_RIGHT_BUTTON } |
Input keys. More... | |
enum | jo_gamepad_type { JoNotConnectedGamepad, JoUnsupportedGamepad, JoRegularGamepad, JoRegularMouse, JoShuttleMouse, JoRegularKeyboard, JoNightsPad } |
Input type. More... | |
enum | jo_input_axis { JoAxis1, JoAxis2, JoAxis3, JoAxis4, JoAxis5, JoAxis6 } |
Input axis type. More... | |
Functions | |
jo_gamepad_type | jo_get_input_type (const int port) |
Get input type for the given port. More... | |
static __jo_force_inline bool | jo_is_input_analog (const int port) |
Check if connected input is analog. More... | |
static __jo_force_inline bool | jo_is_input_available (const int port) |
Check if the input is available for the given port. More... | |
int | jo_get_input_count (void) |
Get the number of input available. More... | |
unsigned char | jo_get_input_axis (const int port, const jo_input_axis axis) |
Get analog axis value. More... | |
static __jo_force_inline bool | jo_is_input_key_pressed (const int port, const jo_gamepad_keys key) |
Check if the key is pressed for the given port. More... | |
static __jo_force_inline jo_8_directions | jo_get_input_direction_pressed (const int port) |
Get the direction pressed for the given port. More... | |
static __jo_force_inline unsigned short | jo_get_raw_input_key_pressed (const int port) |
Get raw input data for the given port. More... | |
static __jo_force_inline bool | jo_is_input_key_down (const int port, const jo_gamepad_keys key) |
Check if the key is down for the given port. More... | |
static __jo_force_inline int | jo_get_mouse_pos_x (const int port) |
Get mouse X position. More... | |
static __jo_force_inline int | jo_get_mouse_pos_y (const int port) |
Get mouse Y position. More... | |
static __jo_force_inline bool | jo_is_pad1_available (void) |
Check if the first gamepad is plugged. More... | |
static __jo_force_inline bool | jo_is_pad2_available (void) |
Check if the second gamepad is plugged. More... | |
static __jo_force_inline bool | jo_is_pad1_key_pressed (jo_gamepad_keys key) |
Check if the key is pressed on the first gamepad. More... | |
static __jo_force_inline bool | jo_is_pad1_key_down (jo_gamepad_keys key) |
Check if the key is down on the first gamepad. More... | |
static __jo_force_inline bool | jo_is_pad2_key_pressed (jo_gamepad_keys key) |
Check if the key is pressed on the second gamepad. More... | |
static __jo_force_inline bool | jo_is_pad2_key_down (jo_gamepad_keys key) |
Check if the key is down on the second gamepad. More... | |
Variables | |
PerDigital | jo_inputs [(12)] |
#define __JO_KEY_PRESSED | ( | PORT, | |
KEY | |||
) |
#define JO_INPUT_MAX_DEVICE |
#define PER_ID_NightsPad |
enum jo_gamepad_keys |
enum jo_gamepad_type |
enum jo_input_axis |
unsigned char jo_get_input_axis | ( | const int | port, |
const jo_input_axis | axis | ||
) |
Get analog axis value.
port | Gamepad port |
axis | Analog axis |
int jo_get_input_count | ( | void | ) |
Get the number of input available.
|
static |
Get the direction pressed for the given port.
port | Gamepad port |
jo_gamepad_type jo_get_input_type | ( | const int | port | ) |
Get input type for the given port.
port | Gamepad port |
|
static |
Get mouse X position.
port | Gamepad port |
|
static |
Get mouse Y position.
port | Gamepad port |
|
static |
Get raw input data for the given port.
port | Gamepad port |
|
static |
Check if connected input is analog.
port | input port |
|
static |
Check if the input is available for the given port.
port | Gamepad port |
|
static |
Check if the key is down for the given port.
port | Gamepad port |
key | Key value |
|
static |
Check if the key is pressed for the given port.
port | Gamepad port |
key | Key value |
|
static |
Check if the first gamepad is plugged.
|
static |
Check if the key is down on the first gamepad.
key | Key value |
|
static |
Check if the key is pressed on the first gamepad.
key | Key value |
|
static |
Check if the second gamepad is plugged.
|
static |
Check if the key is down on the second gamepad.
key | Key value |
|
static |
Check if the key is pressed on the second gamepad.
key | Key value |
PerDigital jo_inputs[(12)] |