orx  stable
Portable Game Engine
OrxJoystick

Macros

#define orxJOYSTICK_GET_AXIS_FOR_PLAYER(AXIS, PLAYER)    (((AXIS) % orxJOYSTICK_AXIS_SINGLE_NUMBER) + ((PLAYER - 1) * orxJOYSTICK_AXIS_SINGLE_NUMBER))
 
#define orxJOYSTICK_GET_BUTTON_FOR_PLAYER(BUTTON, PLAYER)   (((BUTTON) % orxJOYSTICK_BUTTON_SINGLE_NUMBER) + ((PLAYER - 1) * orxJOYSTICK_BUTTON_SINGLE_NUMBER))
 
#define orxJOYSTICK_GET_PLAYER_FROM_AXIS(AXIS)    (((AXIS) / orxJOYSTICK_AXIS_SINGLE_NUMBER) + 1)
 
#define orxJOYSTICK_GET_PLAYER_FROM_BUTTON(BUTTON)    (((BUTTON) / orxJOYSTICK_BUTTON_SINGLE_NUMBER) + 1)
 

Enumerations

enum  orxJOYSTICK_AXIS {
  orxJOYSTICK_AXIS_X_1 = 0, orxJOYSTICK_AXIS_Y_1, orxJOYSTICK_AXIS_Z_1, orxJOYSTICK_AXIS_R_1,
  orxJOYSTICK_AXIS_U_1, orxJOYSTICK_AXIS_V_1, orxJOYSTICK_AXIS_POV_1, orxJOYSTICK_AXIS_SINGLE_NUMBER,
  orxJOYSTICK_AXIS_X_2 = orxJOYSTICK_AXIS_SINGLE_NUMBER, orxJOYSTICK_AXIS_Y_2, orxJOYSTICK_AXIS_Z_2, orxJOYSTICK_AXIS_R_2,
  orxJOYSTICK_AXIS_U_2, orxJOYSTICK_AXIS_V_2, orxJOYSTICK_AXIS_POV_2, orxJOYSTICK_AXIS_X_3,
  orxJOYSTICK_AXIS_Y_3, orxJOYSTICK_AXIS_Z_3, orxJOYSTICK_AXIS_R_3, orxJOYSTICK_AXIS_U_3,
  orxJOYSTICK_AXIS_V_3, orxJOYSTICK_AXIS_POV_3, orxJOYSTICK_AXIS_X_4, orxJOYSTICK_AXIS_Y_4,
  orxJOYSTICK_AXIS_Z_4, orxJOYSTICK_AXIS_R_4, orxJOYSTICK_AXIS_U_4, orxJOYSTICK_AXIS_V_4,
  orxJOYSTICK_AXIS_POV_4, orxJOYSTICK_AXIS_NUMBER, orxJOYSTICK_AXIS_NONE = orxENUM_NONE
}
 
enum  orxJOYSTICK_BUTTON {
  orxJOYSTICK_BUTTON_1_1 = 0, orxJOYSTICK_BUTTON_2_1, orxJOYSTICK_BUTTON_3_1, orxJOYSTICK_BUTTON_4_1,
  orxJOYSTICK_BUTTON_5_1, orxJOYSTICK_BUTTON_6_1, orxJOYSTICK_BUTTON_7_1, orxJOYSTICK_BUTTON_8_1,
  orxJOYSTICK_BUTTON_9_1, orxJOYSTICK_BUTTON_10_1, orxJOYSTICK_BUTTON_11_1, orxJOYSTICK_BUTTON_12_1,
  orxJOYSTICK_BUTTON_13_1, orxJOYSTICK_BUTTON_14_1, orxJOYSTICK_BUTTON_15_1, orxJOYSTICK_BUTTON_16_1,
  orxJOYSTICK_BUTTON_SINGLE_NUMBER, orxJOYSTICK_BUTTON_1_2 = orxJOYSTICK_BUTTON_SINGLE_NUMBER, orxJOYSTICK_BUTTON_2_2, orxJOYSTICK_BUTTON_3_2,
  orxJOYSTICK_BUTTON_4_2, orxJOYSTICK_BUTTON_5_2, orxJOYSTICK_BUTTON_6_2, orxJOYSTICK_BUTTON_7_2,
  orxJOYSTICK_BUTTON_8_2, orxJOYSTICK_BUTTON_9_2, orxJOYSTICK_BUTTON_10_2, orxJOYSTICK_BUTTON_11_2,
  orxJOYSTICK_BUTTON_12_2, orxJOYSTICK_BUTTON_13_2, orxJOYSTICK_BUTTON_14_2, orxJOYSTICK_BUTTON_15_2,
  orxJOYSTICK_BUTTON_16_2, orxJOYSTICK_BUTTON_1_3, orxJOYSTICK_BUTTON_2_3, orxJOYSTICK_BUTTON_3_3,
  orxJOYSTICK_BUTTON_4_3, orxJOYSTICK_BUTTON_5_3, orxJOYSTICK_BUTTON_6_3, orxJOYSTICK_BUTTON_7_3,
  orxJOYSTICK_BUTTON_8_3, orxJOYSTICK_BUTTON_9_3, orxJOYSTICK_BUTTON_10_3, orxJOYSTICK_BUTTON_11_3,
  orxJOYSTICK_BUTTON_12_3, orxJOYSTICK_BUTTON_13_3, orxJOYSTICK_BUTTON_14_3, orxJOYSTICK_BUTTON_15_3,
  orxJOYSTICK_BUTTON_16_3, orxJOYSTICK_BUTTON_1_4, orxJOYSTICK_BUTTON_2_4, orxJOYSTICK_BUTTON_3_4,
  orxJOYSTICK_BUTTON_4_4, orxJOYSTICK_BUTTON_5_4, orxJOYSTICK_BUTTON_6_4, orxJOYSTICK_BUTTON_7_4,
  orxJOYSTICK_BUTTON_8_4, orxJOYSTICK_BUTTON_9_4, orxJOYSTICK_BUTTON_10_4, orxJOYSTICK_BUTTON_11_4,
  orxJOYSTICK_BUTTON_12_4, orxJOYSTICK_BUTTON_13_4, orxJOYSTICK_BUTTON_14_4, orxJOYSTICK_BUTTON_15_4,
  orxJOYSTICK_BUTTON_16_4, orxJOYSTICK_BUTTON_NUMBER, orxJOYSTICK_BUTTON_NONE = orxENUM_NONE
}
 

Functions

orxDLLAPI void orxFASTCALL orxJoystick_Exit ()
 
orxDLLAPI const orxSTRING orxFASTCALL orxJoystick_GetAxisName (orxJOYSTICK_AXIS _eAxis)
 
orxDLLAPI orxFLOAT orxFASTCALL orxJoystick_GetAxisValue (orxJOYSTICK_AXIS _eAxis)
 
orxDLLAPI const orxSTRING orxFASTCALL orxJoystick_GetButtonName (orxJOYSTICK_BUTTON _eButton)
 
orxDLLAPI orxSTATUS orxFASTCALL orxJoystick_Init ()
 
orxDLLAPI orxBOOL orxFASTCALL orxJoystick_IsButtonPressed (orxJOYSTICK_BUTTON _eButton)
 
orxDLLAPI void orxFASTCALL orxJoystick_Setup ()
 

Detailed Description

Joystick plugin module Plugin module that handles joystick-like peripherals

Macro Definition Documentation

#define orxJOYSTICK_GET_AXIS_FOR_PLAYER (   AXIS,
  PLAYER 
)    (((AXIS) % orxJOYSTICK_AXIS_SINGLE_NUMBER) + ((PLAYER - 1) * orxJOYSTICK_AXIS_SINGLE_NUMBER))

Helpers

Definition at line 52 of file orxJoystick.h.

#define orxJOYSTICK_GET_BUTTON_FOR_PLAYER (   BUTTON,
  PLAYER 
)    (((BUTTON) % orxJOYSTICK_BUTTON_SINGLE_NUMBER) + ((PLAYER - 1) * orxJOYSTICK_BUTTON_SINGLE_NUMBER))

Definition at line 53 of file orxJoystick.h.

#define orxJOYSTICK_GET_PLAYER_FROM_AXIS (   AXIS)    (((AXIS) / orxJOYSTICK_AXIS_SINGLE_NUMBER) + 1)

Definition at line 55 of file orxJoystick.h.

#define orxJOYSTICK_GET_PLAYER_FROM_BUTTON (   BUTTON)    (((BUTTON) / orxJOYSTICK_BUTTON_SINGLE_NUMBER) + 1)

Definition at line 56 of file orxJoystick.h.

Enumeration Type Documentation

Axis enum

Enumerator
orxJOYSTICK_AXIS_X_1 
orxJOYSTICK_AXIS_Y_1 
orxJOYSTICK_AXIS_Z_1 
orxJOYSTICK_AXIS_R_1 
orxJOYSTICK_AXIS_U_1 
orxJOYSTICK_AXIS_V_1 
orxJOYSTICK_AXIS_POV_1 
orxJOYSTICK_AXIS_SINGLE_NUMBER 
orxJOYSTICK_AXIS_X_2 
orxJOYSTICK_AXIS_Y_2 
orxJOYSTICK_AXIS_Z_2 
orxJOYSTICK_AXIS_R_2 
orxJOYSTICK_AXIS_U_2 
orxJOYSTICK_AXIS_V_2 
orxJOYSTICK_AXIS_POV_2 
orxJOYSTICK_AXIS_X_3 
orxJOYSTICK_AXIS_Y_3 
orxJOYSTICK_AXIS_Z_3 
orxJOYSTICK_AXIS_R_3 
orxJOYSTICK_AXIS_U_3 
orxJOYSTICK_AXIS_V_3 
orxJOYSTICK_AXIS_POV_3 
orxJOYSTICK_AXIS_X_4 
orxJOYSTICK_AXIS_Y_4 
orxJOYSTICK_AXIS_Z_4 
orxJOYSTICK_AXIS_R_4 
orxJOYSTICK_AXIS_U_4 
orxJOYSTICK_AXIS_V_4 
orxJOYSTICK_AXIS_POV_4 
orxJOYSTICK_AXIS_NUMBER 
orxJOYSTICK_AXIS_NONE 

Definition at line 142 of file orxJoystick.h.

Button enum

Enumerator
orxJOYSTICK_BUTTON_1_1 
orxJOYSTICK_BUTTON_2_1 
orxJOYSTICK_BUTTON_3_1 
orxJOYSTICK_BUTTON_4_1 
orxJOYSTICK_BUTTON_5_1 
orxJOYSTICK_BUTTON_6_1 
orxJOYSTICK_BUTTON_7_1 
orxJOYSTICK_BUTTON_8_1 
orxJOYSTICK_BUTTON_9_1 
orxJOYSTICK_BUTTON_10_1 
orxJOYSTICK_BUTTON_11_1 
orxJOYSTICK_BUTTON_12_1 
orxJOYSTICK_BUTTON_13_1 
orxJOYSTICK_BUTTON_14_1 
orxJOYSTICK_BUTTON_15_1 
orxJOYSTICK_BUTTON_16_1 
orxJOYSTICK_BUTTON_SINGLE_NUMBER 
orxJOYSTICK_BUTTON_1_2 
orxJOYSTICK_BUTTON_2_2 
orxJOYSTICK_BUTTON_3_2 
orxJOYSTICK_BUTTON_4_2 
orxJOYSTICK_BUTTON_5_2 
orxJOYSTICK_BUTTON_6_2 
orxJOYSTICK_BUTTON_7_2 
orxJOYSTICK_BUTTON_8_2 
orxJOYSTICK_BUTTON_9_2 
orxJOYSTICK_BUTTON_10_2 
orxJOYSTICK_BUTTON_11_2 
orxJOYSTICK_BUTTON_12_2 
orxJOYSTICK_BUTTON_13_2 
orxJOYSTICK_BUTTON_14_2 
orxJOYSTICK_BUTTON_15_2 
orxJOYSTICK_BUTTON_16_2 
orxJOYSTICK_BUTTON_1_3 
orxJOYSTICK_BUTTON_2_3 
orxJOYSTICK_BUTTON_3_3 
orxJOYSTICK_BUTTON_4_3 
orxJOYSTICK_BUTTON_5_3 
orxJOYSTICK_BUTTON_6_3 
orxJOYSTICK_BUTTON_7_3 
orxJOYSTICK_BUTTON_8_3 
orxJOYSTICK_BUTTON_9_3 
orxJOYSTICK_BUTTON_10_3 
orxJOYSTICK_BUTTON_11_3 
orxJOYSTICK_BUTTON_12_3 
orxJOYSTICK_BUTTON_13_3 
orxJOYSTICK_BUTTON_14_3 
orxJOYSTICK_BUTTON_15_3 
orxJOYSTICK_BUTTON_16_3 
orxJOYSTICK_BUTTON_1_4 
orxJOYSTICK_BUTTON_2_4 
orxJOYSTICK_BUTTON_3_4 
orxJOYSTICK_BUTTON_4_4 
orxJOYSTICK_BUTTON_5_4 
orxJOYSTICK_BUTTON_6_4 
orxJOYSTICK_BUTTON_7_4 
orxJOYSTICK_BUTTON_8_4 
orxJOYSTICK_BUTTON_9_4 
orxJOYSTICK_BUTTON_10_4 
orxJOYSTICK_BUTTON_11_4 
orxJOYSTICK_BUTTON_12_4 
orxJOYSTICK_BUTTON_13_4 
orxJOYSTICK_BUTTON_14_4 
orxJOYSTICK_BUTTON_15_4 
orxJOYSTICK_BUTTON_16_4 
orxJOYSTICK_BUTTON_NUMBER 
orxJOYSTICK_BUTTON_NONE 

Definition at line 61 of file orxJoystick.h.

Function Documentation

orxDLLAPI void orxFASTCALL orxJoystick_Exit ( )

Exits from the joystick module

orxDLLAPI const orxSTRING orxFASTCALL orxJoystick_GetAxisName ( orxJOYSTICK_AXIS  _eAxis)

Gets axis literal name

Parameters
[in]_eAxisConcerned axis
Returns
Axis's name
orxDLLAPI orxFLOAT orxFASTCALL orxJoystick_GetAxisValue ( orxJOYSTICK_AXIS  _eAxis)

Gets joystick axis value

Parameters
[in]_eAxisJoystick axis to check
Returns
Value of the axis
orxDLLAPI const orxSTRING orxFASTCALL orxJoystick_GetButtonName ( orxJOYSTICK_BUTTON  _eButton)

Gets button literal name

Parameters
[in]_eButtonConcerned button
Returns
Button's name
orxDLLAPI orxSTATUS orxFASTCALL orxJoystick_Init ( )

Inits the joystick module

Returns
Returns the status of the operation
orxDLLAPI orxBOOL orxFASTCALL orxJoystick_IsButtonPressed ( orxJOYSTICK_BUTTON  _eButton)

Is joystick button pressed?

Parameters
[in]_eButtonJoystick button to check
Returns
orxTRUE if presse / orxFALSE otherwise
orxDLLAPI void orxFASTCALL orxJoystick_Setup ( )

JOYSTICK module setup


Generated for orx by doxygen 1.5.6