orx  1.10
Portable Game Engine
OrxJoystick

Macros

#define orxJOYSTICK_DECLARE_AXIS_ENUM(ID)
 
#define orxJOYSTICK_DECLARE_BUTTON_ENUM(ID)
 
#define orxJOYSTICK_GET_AXIS(AXIS, ID)    ((((orxU32)AXIS) % orxJOYSTICK_AXIS_SINGLE_NUMBER) + ((ID - 1) * orxJOYSTICK_AXIS_SINGLE_NUMBER))
 
#define orxJOYSTICK_GET_BUTTON(BUTTON, ID)    ((((orxU32)BUTTON) % orxJOYSTICK_BUTTON_SINGLE_NUMBER) + ((ID - 1) * orxJOYSTICK_BUTTON_SINGLE_NUMBER))
 
#define orxJOYSTICK_GET_ID_FROM_AXIS(AXIS)    ((((orxU32)AXIS) / orxJOYSTICK_AXIS_SINGLE_NUMBER) + 1)
 
#define orxJOYSTICK_GET_ID_FROM_BUTTON(BUTTON)   ((((orxU32)BUTTON) / orxJOYSTICK_BUTTON_SINGLE_NUMBER) + 1)
 

Enumerations

enum  orxJOYSTICK_AXIS {
  orxJOYSTICK_AXIS_LX_1 = 0, orxJOYSTICK_AXIS_LY_1, orxJOYSTICK_AXIS_RX_1, orxJOYSTICK_AXIS_RY_1,
  orxJOYSTICK_AXIS_LTRIGGER_1, orxJOYSTICK_AXIS_RTRIGGER_1, orxJOYSTICK_AXIS_SINGLE_NUMBER, orxJOYSTICK_AXIS_LX_2 = orxJOYSTICK_AXIS_SINGLE_NUMBER,
  orxJOYSTICK_AXIS_LY_2, orxJOYSTICK_AXIS_RX_2, orxJOYSTICK_AXIS_RY_2, orxJOYSTICK_AXIS_LTRIGGER_2,
  orxJOYSTICK_AXIS_RTRIGGER_2, orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3),
  orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3),
  orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3),
  orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_DECLARE_AXIS_ENUM =(3), orxJOYSTICK_AXIS_NUMBER,
  orxJOYSTICK_AXIS_NONE = orxENUM_NONE
}
 
enum  orxJOYSTICK_BUTTON {
  orxJOYSTICK_BUTTON_A_1 = 0, orxJOYSTICK_BUTTON_B_1, orxJOYSTICK_BUTTON_X_1, orxJOYSTICK_BUTTON_Y_1,
  orxJOYSTICK_BUTTON_LBUMPER_1, orxJOYSTICK_BUTTON_RBUMPER_1, orxJOYSTICK_BUTTON_BACK_1, orxJOYSTICK_BUTTON_START_1,
  orxJOYSTICK_BUTTON_GUIDE_1, orxJOYSTICK_BUTTON_LTHUMB_1, orxJOYSTICK_BUTTON_RTHUMB_1, orxJOYSTICK_BUTTON_UP_1,
  orxJOYSTICK_BUTTON_RIGHT_1, orxJOYSTICK_BUTTON_DOWN_1, orxJOYSTICK_BUTTON_LEFT_1, 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_A_2 = orxJOYSTICK_BUTTON_SINGLE_NUMBER, orxJOYSTICK_BUTTON_B_2, orxJOYSTICK_BUTTON_X_2, orxJOYSTICK_BUTTON_Y_2,
  orxJOYSTICK_BUTTON_LBUMPER_2, orxJOYSTICK_BUTTON_RBUMPER_2, orxJOYSTICK_BUTTON_BACK_2, orxJOYSTICK_BUTTON_START_2,
  orxJOYSTICK_BUTTON_GUIDE_2, orxJOYSTICK_BUTTON_LTHUMB_2, orxJOYSTICK_BUTTON_RTHUMB_2, orxJOYSTICK_BUTTON_UP_2,
  orxJOYSTICK_BUTTON_RIGHT_2, orxJOYSTICK_BUTTON_DOWN_2, orxJOYSTICK_BUTTON_LEFT_2, 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_DECLARE_BUTTON_ENUM =(3),
  orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3),
  orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3),
  orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), orxJOYSTICK_DECLARE_BUTTON_ENUM =(3),
  orxJOYSTICK_DECLARE_BUTTON_ENUM =(3), 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 orxBOOL orxFASTCALL orxJoystick_IsConnected (orxU32 _u32ID)
 
orxDLLAPI void orxFASTCALL orxJoystick_Setup ()
 

Detailed Description

Joystick plugin module Plugin module that handles joystick-like peripherals

Macro Definition Documentation

#define orxJOYSTICK_DECLARE_AXIS_ENUM (   ID)
Value:
orxJOYSTICK_AXIS_LX_##ID, \
orxJOYSTICK_AXIS_LY_##ID, \
orxJOYSTICK_AXIS_RX_##ID, \
orxJOYSTICK_AXIS_RY_##ID, \
orxJOYSTICK_AXIS_LTRIGGER_##ID, \
orxJOYSTICK_AXIS_RTRIGGER_##ID

Definition at line 91 of file orxJoystick.h.

#define orxJOYSTICK_DECLARE_BUTTON_ENUM (   ID)

Definition at line 58 of file orxJoystick.h.

#define orxJOYSTICK_GET_AXIS (   AXIS,
  ID 
)    ((((orxU32)AXIS) % orxJOYSTICK_AXIS_SINGLE_NUMBER) + ((ID - 1) * orxJOYSTICK_AXIS_SINGLE_NUMBER))

Helpers

Definition at line 52 of file orxJoystick.h.

#define orxJOYSTICK_GET_BUTTON (   BUTTON,
  ID 
)    ((((orxU32)BUTTON) % orxJOYSTICK_BUTTON_SINGLE_NUMBER) + ((ID - 1) * orxJOYSTICK_BUTTON_SINGLE_NUMBER))

Definition at line 53 of file orxJoystick.h.

#define orxJOYSTICK_GET_ID_FROM_AXIS (   AXIS)    ((((orxU32)AXIS) / orxJOYSTICK_AXIS_SINGLE_NUMBER) + 1)

Definition at line 55 of file orxJoystick.h.

#define orxJOYSTICK_GET_ID_FROM_BUTTON (   BUTTON)    ((((orxU32)BUTTON) / orxJOYSTICK_BUTTON_SINGLE_NUMBER) + 1)

Definition at line 56 of file orxJoystick.h.

Enumeration Type Documentation

Axis enum

Enumerator
orxJOYSTICK_AXIS_LX_1 
orxJOYSTICK_AXIS_LY_1 
orxJOYSTICK_AXIS_RX_1 
orxJOYSTICK_AXIS_RY_1 
orxJOYSTICK_AXIS_LTRIGGER_1 
orxJOYSTICK_AXIS_RTRIGGER_1 
orxJOYSTICK_AXIS_SINGLE_NUMBER 
orxJOYSTICK_AXIS_LX_2 
orxJOYSTICK_AXIS_LY_2 
orxJOYSTICK_AXIS_RX_2 
orxJOYSTICK_AXIS_RY_2 
orxJOYSTICK_AXIS_LTRIGGER_2 
orxJOYSTICK_AXIS_RTRIGGER_2 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_DECLARE_AXIS_ENUM 
orxJOYSTICK_AXIS_NUMBER 
orxJOYSTICK_AXIS_NONE 

Definition at line 192 of file orxJoystick.h.

Button enum

Enumerator
orxJOYSTICK_BUTTON_A_1 
orxJOYSTICK_BUTTON_B_1 
orxJOYSTICK_BUTTON_X_1 
orxJOYSTICK_BUTTON_Y_1 
orxJOYSTICK_BUTTON_LBUMPER_1 
orxJOYSTICK_BUTTON_RBUMPER_1 
orxJOYSTICK_BUTTON_BACK_1 
orxJOYSTICK_BUTTON_START_1 
orxJOYSTICK_BUTTON_GUIDE_1 
orxJOYSTICK_BUTTON_LTHUMB_1 
orxJOYSTICK_BUTTON_RTHUMB_1 
orxJOYSTICK_BUTTON_UP_1 
orxJOYSTICK_BUTTON_RIGHT_1 
orxJOYSTICK_BUTTON_DOWN_1 
orxJOYSTICK_BUTTON_LEFT_1 
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_A_2 
orxJOYSTICK_BUTTON_B_2 
orxJOYSTICK_BUTTON_X_2 
orxJOYSTICK_BUTTON_Y_2 
orxJOYSTICK_BUTTON_LBUMPER_2 
orxJOYSTICK_BUTTON_RBUMPER_2 
orxJOYSTICK_BUTTON_BACK_2 
orxJOYSTICK_BUTTON_START_2 
orxJOYSTICK_BUTTON_GUIDE_2 
orxJOYSTICK_BUTTON_LTHUMB_2 
orxJOYSTICK_BUTTON_RTHUMB_2 
orxJOYSTICK_BUTTON_UP_2 
orxJOYSTICK_BUTTON_RIGHT_2 
orxJOYSTICK_BUTTON_DOWN_2 
orxJOYSTICK_BUTTON_LEFT_2 
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_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_DECLARE_BUTTON_ENUM 
orxJOYSTICK_BUTTON_NUMBER 
orxJOYSTICK_BUTTON_NONE 

Definition at line 101 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 pressed / orxFALSE otherwise
orxDLLAPI orxBOOL orxFASTCALL orxJoystick_IsConnected ( orxU32  _u32ID)

Is joystick connected?

Parameters
[in]_u32IDID of the joystick, 1-based index
Returns
orxTRUE if connected / orxFALSE otherwise
orxDLLAPI void orxFASTCALL orxJoystick_Setup ( )

JOYSTICK module setup


Generated for orx by doxygen 1.8.11