Open source remastering of the Freespace 2 engine
joy.h File Reference

Go to the source code of this file.


struct  Joy_info


#define JOY_NUM_BUTTONS   32
#define JOY_NUM_HAT_POS   4
#define JOY_NUM_AXES   6
#define JOY_AXIS_UNDEFINED   -10000


typedef struct Joy_info Joy_info


int joy_init ()
void joy_flush ()
int joy_get_pos (int *x, int *y, int *z, int *r)
int joy_down_count (int btn, int reset_count=1)
int joy_down (int btn)
int joy_up_count (int btn)
float joy_down_time (int btn)
void joy_get_cal_vals (int *axis_min, int *axis_center, int *axis_max)
void joy_set_cal_vals (int *axis_min, int *axis_center, int *axis_max)
void joy_set_ul ()
void joy_set_lr ()
void joy_set_cen ()
void joy_cheap_cal ()
int joystick_read_raw_axis (int num_axes, int *axis)
void joy_get_delta (int *dx, int *dy)
int joy_get_scaled_reading (int raw, int axn)
int joy_get_unscaled_reading (int raw, int axn)
void joy_close ()


int Joy_sensitivity
int Dead_zone_size

Macro Definition Documentation

#define JOY_AXIS_UNDEFINED   -10000

Definition at line 25 of file joy.h.


Definition at line 20 of file joy.h.


Definition at line 21 of file joy.h.


Definition at line 22 of file joy.h.


Definition at line 23 of file joy.h.

#define JOY_NUM_AXES   6

Definition at line 18 of file joy.h.

#define JOY_NUM_BUTTONS   32

Definition at line 15 of file joy.h.

#define JOY_NUM_HAT_POS   4

Definition at line 16 of file joy.h.


Definition at line 17 of file joy.h.

Typedef Documentation

typedef struct Joy_info Joy_info

Function Documentation

void joy_cheap_cal ( )
void joy_close ( )

Definition at line 53 of file joy-unix.cpp.

int joy_down ( int  btn)

Definition at line 93 of file joy-unix.cpp.

int joy_down_count ( int  btn,
int  reset_count = 1 

Definition at line 105 of file joy-unix.cpp.

float joy_down_time ( int  btn)

Definition at line 120 of file joy-unix.cpp.

void joy_flush ( )

Definition at line 152 of file joy-unix.cpp.

void joy_get_cal_vals ( int axis_min,
int axis_center,
int axis_max 
void joy_get_delta ( int dx,
int dy 
int joy_get_pos ( int x,
int y,
int z,
int r 

Definition at line 267 of file joy-unix.cpp.

int joy_get_scaled_reading ( int  raw,
int  axn 

Definition at line 204 of file joy-unix.cpp.

int joy_get_unscaled_reading ( int  raw,
int  axn 

Definition at line 171 of file joy-unix.cpp.

int joy_init ( )

Definition at line 466 of file joy-unix.cpp.

void joy_set_cal_vals ( int axis_min,
int axis_center,
int axis_max 
void joy_set_cen ( )

Definition at line 544 of file joy-unix.cpp.

void joy_set_lr ( )
void joy_set_ul ( )
int joy_up_count ( int  btn)
int joystick_read_raw_axis ( int  num_axes,
int axis 

Definition at line 549 of file joy-unix.cpp.

Variable Documentation

int Dead_zone_size

Definition at line 27 of file joy-unix.cpp.

int Joy_sensitivity

Definition at line 29 of file joy-unix.cpp.