Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "in_joystick.h"
#include "vs_globals.h"
#include "config_xml.h"
#include "in_kb_data.h"
#include <assert.h>
Go to the source code of this file.
Classes | |
struct | JSHandlerCall |
Macros | |
#define | MAXOR(A, B) ( ( (A) < (B) ) ? (B) : (A) ) |
Enumerations | |
enum | JSSwitches { JOYSTICK_SWITCH, HATSWITCH, DIGHATSWITCH, NUMSWITCHES } |
Functions | |
void | DefaultJoyHandler (const KBData &, KBSTATE newState) |
needed for assert() calls. More... | |
static void | GenUnbindJoyKey (JSSwitches whichswitch, int joystick, int key) |
static void | GenBindJoyKey (JSSwitches whichswitch, int joystick, int key, KBHandler handler, const KBData &data) |
void | UnbindJoyKey (int joystick, int key) |
void | BindJoyKey (int joystick, int key, KBHandler handler, const KBData &data) |
void | UnbindHatswitchKey (int joystick, int key) |
void | BindHatswitchKey (int joystick, int key, KBHandler handler, const KBData &data) |
void | UnbindDigitalHatswitchKey (int joystick, int key, int dir) |
void | BindDigitalHatswitchKey (int joystick, int key, int dir, KBHandler handler, const KBData &data) |
void | ProcessJoystick (int whichplayer) |
#define MAXOR | ( | A, | |
B | |||
) | ( ( (A) < (B) ) ? (B) : (A) ) |
Definition at line 31 of file in_sdl.cpp.
Referenced by GenUnbindJoyKey().
enum JSSwitches |
Enumerator | |
---|---|
JOYSTICK_SWITCH | |
HATSWITCH | |
DIGHATSWITCH | |
NUMSWITCHES |
Definition at line 24 of file in_sdl.cpp.
void BindDigitalHatswitchKey | ( | int | joystick, |
int | key, | ||
int | dir, | ||
KBHandler | handler, | ||
const KBData & | data | ||
) |
Definition at line 82 of file in_sdl.cpp.
References DIGHATSWITCH, GenBindJoyKey(), and MAX_DIGITAL_VALUES.
Definition at line 72 of file in_sdl.cpp.
References GenBindJoyKey(), and HATSWITCH.
Definition at line 62 of file in_sdl.cpp.
References GenBindJoyKey(), and JOYSTICK_SWITCH.
needed for assert() calls.
Definition at line 6 of file in_sdl.cpp.
Referenced by JSHandlerCall::JSHandlerCall().
|
static |
Definition at line 50 of file in_sdl.cpp.
References joystick, MAX_JOYSTICKS, NUMJBUTTONS, and RESET.
Referenced by BindDigitalHatswitchKey(), BindHatswitchKey(), and BindJoyKey().
|
static |
Definition at line 40 of file in_sdl.cpp.
References joystick, MAX_DIGITAL_HATSWITCHES, MAX_DIGITAL_VALUES, MAX_HATSWITCHES, MAX_JOYSTICKS, MAX_VALUES, MAXOR, NUMJBUTTONS, and UP.
Referenced by UnbindDigitalHatswitchKey(), UnbindHatswitchKey(), and UnbindJoyKey().
void ProcessJoystick | ( | int | whichplayer) |
Definition at line 87 of file in_sdl.cpp.
References JSHandlerCall::data, DIGHATSWITCH, JoyStick::digital_hat, DOWN, JSHandlerCall::function, JoyStick::GetJoyStick(), h, HATSWITCH, VegaConfig::hatswitch, VegaConfig::hatswitch_axis, VegaConfig::hatswitch_joystick, VegaConfig::hatswitch_margin, i, j, JoyStick::joy_axis, joystick, JOYSTICK_SWITCH, MAX_DIGITAL_VALUES, MAX_HATSWITCHES, MAX_JOYSTICKS, MAX_VALUES, JoyStick::nr_of_hats, NUMJBUTTONS, PRESS, RELEASE, UP, v, vs_config, VS_HAT_CENTERED, VS_HAT_DOWN, VS_HAT_LEFT, VS_HAT_LEFTDOWN, VS_HAT_LEFTUP, VS_HAT_RIGHT, VS_HAT_RIGHTDOWN, VS_HAT_RIGHTUP, VS_HAT_UP, x, y, and z.
Referenced by ProcessInput().
Definition at line 77 of file in_sdl.cpp.
References DIGHATSWITCH, GenUnbindJoyKey(), and MAX_DIGITAL_VALUES.
Referenced by InitJoystick().
Definition at line 67 of file in_sdl.cpp.
References GenUnbindJoyKey(), and HATSWITCH.
Referenced by InitJoystick().
Definition at line 57 of file in_sdl.cpp.
References GenUnbindJoyKey(), and JOYSTICK_SWITCH.
Referenced by InitJoystick().
JSHandlerCall JoystickBindings[NUMSWITCHES][MAXOR(MAX_HATSWITCHES, MAX_JOYSTICKS)][MAXOR(NUMJBUTTONS,MAXOR(MAX_VALUES,MAX_DIGITAL_HATSWITCHES *MAX_DIGITAL_VALUES))] |
Definition at line 35 of file in_sdl.cpp.
KBSTATE JoystickState[NUMSWITCHES][MAXOR(MAX_HATSWITCHES, MAX_JOYSTICKS)][MAXOR(MAX_VALUES,MAXOR(NUMJBUTTONS, MAX_DIGITAL_HATSWITCHES *MAX_DIGITAL_VALUES))] |
Definition at line 38 of file in_sdl.cpp.