Function: | gamepad_left |
---|---|
Prototype: | int gamepad_left() |
Description: | Obtains the state of the left direction in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_right |
---|---|
Prototype: | int gamepad_right() |
Description: | Obtains the state of the right direction in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_up |
---|---|
Prototype: | int gamepad_up() |
Description: | Obtains the state of the up direction in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_down |
---|---|
Prototype: | int gamepad_down() |
Description: | Obtains the state of the down direction in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_direction |
---|---|
Prototype: | void gamepad_direction( int* delta_x, int* delta_y ) |
Description: | Obtains the pressed D-Pad direction in the currently selected gamepad. The result is stored in a pair of variables that form a 2D vector (X and Y) |
Arguments: | |
int* delta_x | Direction along X axis. Either -1 (left), 0 (center) or 1 (right) |
int* delta_y | Direction along Y axis. Either -1 (up), 0 (center) or 1 (down) |
Function: | gamepad_direction_normalized |
---|---|
Prototype: | void gamepad_direction_normalized( float* delta_x, float* delta_y ) |
Description: | Similar to gamepad_direction, but when a diagonal is pressed the result vector is normalized to have length of 1 |
Arguments: | |
float* delta_x | Direction along X axis. It is in range -1 (left) to 1 (right) |
float* delta_y | Direction along Y axis. It is in range -1 (up) to 1 (down) |
Function: | gamepad_button_a |
---|---|
Prototype: | int gamepad_button_a() |
Description: | Obtains the state of the button A in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_button_b |
---|---|
Prototype: | int gamepad_button_b() |
Description: | Obtains the state of the button B in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_button_x |
---|---|
Prototype: | int gamepad_button_x() |
Description: | Obtains the state of the button X in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_button_y |
---|---|
Prototype: | int gamepad_button_y() |
Description: | Obtains the state of the button Y in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_button_l |
---|---|
Prototype: | int gamepad_button_l() |
Description: | Obtains the state of the button L in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_button_r |
---|---|
Prototype: | int gamepad_button_r() |
Description: | Obtains the state of the button R in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |
Function: | gamepad_button_start |
---|---|
Prototype: | int gamepad_button_start() |
Description: | Obtains the state of the button Start in the currently selected gamepad |
Returns: | |
int | An integer value guaranteed to never be 0. Its sign indicates: positive = pressed, negative = not pressed. Its value is the number of frames it has been in that state |