XenevaOS
Loading...
Searching...
No Matches
Macros | Functions
i_joystick.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NUM_VIRTUAL_BUTTONS   10
 
#define BUTTON_AXIS   0x10000
 
#define IS_BUTTON_AXIS(axis)   ((axis) >= 0 && ((axis) & BUTTON_AXIS) != 0)
 
#define BUTTON_AXIS_NEG(axis)   ((axis) & 0xff)
 
#define BUTTON_AXIS_POS(axis)   (((axis) >> 8) & 0xff)
 
#define CREATE_BUTTON_AXIS(neg, pos)   (BUTTON_AXIS | (neg) | ((pos) << 8))
 
#define HAT_AXIS   0x20000
 
#define IS_HAT_AXIS(axis)   ((axis) >= 0 && ((axis) & HAT_AXIS) != 0)
 
#define HAT_AXIS_HAT(axis)   ((axis) & 0xff)
 
#define HAT_AXIS_DIRECTION(axis)   (((axis) >> 8) & 0xff)
 
#define CREATE_HAT_AXIS(hat, direction)    (HAT_AXIS | (hat) | ((direction) << 8))
 
#define HAT_AXIS_HORIZONTAL   1
 
#define HAT_AXIS_VERTICAL   2
 

Functions

void I_InitJoystick (void)
 
void I_ShutdownJoystick (void)
 
void I_UpdateJoystick (void)
 
void I_BindJoystickVariables (void)
 

Macro Definition Documentation

◆ BUTTON_AXIS

#define BUTTON_AXIS   0x10000

◆ BUTTON_AXIS_NEG

#define BUTTON_AXIS_NEG (   axis)    ((axis) & 0xff)

◆ BUTTON_AXIS_POS

#define BUTTON_AXIS_POS (   axis)    (((axis) >> 8) & 0xff)

◆ CREATE_BUTTON_AXIS

#define CREATE_BUTTON_AXIS (   neg,
  pos 
)    (BUTTON_AXIS | (neg) | ((pos) << 8))

◆ CREATE_HAT_AXIS

#define CREATE_HAT_AXIS (   hat,
  direction 
)     (HAT_AXIS | (hat) | ((direction) << 8))

◆ HAT_AXIS

#define HAT_AXIS   0x20000

◆ HAT_AXIS_DIRECTION

#define HAT_AXIS_DIRECTION (   axis)    (((axis) >> 8) & 0xff)

◆ HAT_AXIS_HAT

#define HAT_AXIS_HAT (   axis)    ((axis) & 0xff)

◆ HAT_AXIS_HORIZONTAL

#define HAT_AXIS_HORIZONTAL   1

◆ HAT_AXIS_VERTICAL

#define HAT_AXIS_VERTICAL   2

◆ IS_BUTTON_AXIS

#define IS_BUTTON_AXIS (   axis)    ((axis) >= 0 && ((axis) & BUTTON_AXIS) != 0)

◆ IS_HAT_AXIS

#define IS_HAT_AXIS (   axis)    ((axis) >= 0 && ((axis) & HAT_AXIS) != 0)

◆ NUM_VIRTUAL_BUTTONS

#define NUM_VIRTUAL_BUTTONS   10

Function Documentation

◆ I_BindJoystickVariables()

void I_BindJoystickVariables ( void  )

◆ I_InitJoystick()

void I_InitJoystick ( void  )

◆ I_ShutdownJoystick()

void I_ShutdownJoystick ( void  )

◆ I_UpdateJoystick()

void I_UpdateJoystick ( void  )