vegastrike  0.5.1.r1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
in_joystick.h File Reference
#include "config.h"
#include "in_kb_data.h"
#include "vegastrike.h"
#include "in_kb.h"

Go to the source code of this file.

Classes

class  JoyStick
 

Macros

#define NUMJBUTTONS   32
 
#define MAX_AXES   32
 

Typedefs

typedef void(* JoyHandler )(KBSTATE, float x, float y, int mod)
 

Enumerations

enum  {
  VS_HAT_CENTERED =0, VS_HAT_LEFT, VS_HAT_RIGHT, VS_HAT_DOWN,
  VS_HAT_UP, VS_HAT_RIGHTUP, VS_HAT_RIGHTDOWN, VS_HAT_LEFTUP,
  VS_HAT_LEFTDOWN
}
 

Functions

void ProcessJoystick (int whichjoystick)
 
void InitJoystick ()
 
void DeInitJoystick ()
 
void BindJoyKey (int key, int joystick, KBHandler handler, const KBData &data)
 
void UnbindJoyKey (int joystick, int key)
 
void UnbindHatswitchKey (int hatswitch, int val_index)
 
void BindHatswitchKey (int hatswitch, int val_index, KBHandler handler, const KBData &data)
 
void BindDigitalHatswitchKey (int joystick, int hatswitch, int dir_index, KBHandler handler, const KBData &data)
 
void UnbindDigitalHatswitchKey (int joystick, int hatswitch, int dir_index)
 

Variables

const int MAX_JOYSTICKS = 16
 
const int MOUSE_JOYSTICK = MAX_JOYSTICKS-1
 
const int MAX_BUTTONS = 48
 
const int MAX_DIGITAL_HATSWITCHES = 4
 
const int MAX_DIGITAL_VALUES = 9
 
JoyStickjoystick [MAX_JOYSTICKS]
 

Macro Definition Documentation

#define MAX_AXES   32

Definition at line 84 of file in_joystick.h.

#define NUMJBUTTONS   32

Definition at line 38 of file in_joystick.h.

Typedef Documentation

typedef void(* JoyHandler)(KBSTATE, float x, float y, int mod)

Definition at line 106 of file in_joystick.h.

Enumeration Type Documentation

anonymous enum
Enumerator
VS_HAT_CENTERED 
VS_HAT_LEFT 
VS_HAT_RIGHT 
VS_HAT_DOWN 
VS_HAT_UP 
VS_HAT_RIGHTUP 
VS_HAT_RIGHTDOWN 
VS_HAT_LEFTUP 
VS_HAT_LEFTDOWN 

Definition at line 54 of file in_joystick.h.

Function Documentation

void BindDigitalHatswitchKey ( int  joystick,
int  hatswitch,
int  dir_index,
KBHandler  handler,
const KBData data 
)

Definition at line 82 of file in_sdl.cpp.

void BindHatswitchKey ( int  hatswitch,
int  val_index,
KBHandler  handler,
const KBData data 
)

Definition at line 72 of file in_sdl.cpp.

void BindJoyKey ( int  key,
int  joystick,
KBHandler  handler,
const KBData data 
)

Definition at line 62 of file in_sdl.cpp.

void DeInitJoystick ( )

Definition at line 172 of file in_joystick.cpp.

void InitJoystick ( )

Definition at line 129 of file in_joystick.cpp.

void ProcessJoystick ( int  whichjoystick)

Definition at line 87 of file in_sdl.cpp.

void UnbindDigitalHatswitchKey ( int  joystick,
int  hatswitch,
int  dir_index 
)

Definition at line 77 of file in_sdl.cpp.

void UnbindHatswitchKey ( int  hatswitch,
int  val_index 
)

Definition at line 67 of file in_sdl.cpp.

void UnbindJoyKey ( int  joystick,
int  key 
)

Definition at line 57 of file in_sdl.cpp.

Variable Documentation

JoyStick* joystick[MAX_JOYSTICKS]

Definition at line 105 of file in_joystick.h.

const int MAX_BUTTONS = 48

Definition at line 50 of file in_joystick.h.

const int MAX_DIGITAL_HATSWITCHES = 4

Definition at line 51 of file in_joystick.h.

const int MAX_DIGITAL_VALUES = 9

Definition at line 52 of file in_joystick.h.

const int MAX_JOYSTICKS = 16

Definition at line 48 of file in_joystick.h.

const int MOUSE_JOYSTICK = MAX_JOYSTICKS-1

Definition at line 49 of file in_joystick.h.