2006-11-02 13:35:18 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header for joystick functions
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-04-03 17:36:27 +00:00
|
|
|
#ifndef _JOY_H
|
|
|
|
#define _JOY_H
|
|
|
|
|
2008-01-02 03:37:13 +00:00
|
|
|
#include "pstypes.h"
|
2006-04-03 17:36:27 +00:00
|
|
|
#include "fix.h"
|
|
|
|
|
2010-02-14 18:48:02 +00:00
|
|
|
#define MAX_JOYSTICKS 8
|
|
|
|
#define MAX_AXES_PER_JOYSTICK 128
|
|
|
|
#define MAX_BUTTONS_PER_JOYSTICK 128
|
|
|
|
#define MAX_HATS_PER_JOYSTICK 4
|
|
|
|
#define JOY_MAX_AXES (MAX_AXES_PER_JOYSTICK * MAX_JOYSTICKS)
|
|
|
|
#define JOY_MAX_BUTTONS (MAX_BUTTONS_PER_JOYSTICK * MAX_JOYSTICKS)
|
2006-11-02 13:35:18 +00:00
|
|
|
|
2010-02-14 18:48:02 +00:00
|
|
|
extern int joy_num_axes; // set to Joystick.n_axes. solve different?
|
|
|
|
extern void joy_init();
|
2006-04-03 17:36:27 +00:00
|
|
|
extern void joy_close();
|
2006-11-02 13:35:18 +00:00
|
|
|
extern fix joy_get_button_down_time(int btn);
|
2010-02-14 18:48:02 +00:00
|
|
|
extern int joy_get_button_down_cnt(int btn);
|
|
|
|
extern void joystick_read_raw_axis(int *axis);
|
2006-04-03 17:36:27 +00:00
|
|
|
extern void joy_flush();
|
2006-11-02 13:35:18 +00:00
|
|
|
extern int joy_get_button_state(int btn);
|
2010-12-28 18:11:06 +00:00
|
|
|
extern int joy_get_scaled_reading(int raw);
|
2006-10-06 11:23:43 +00:00
|
|
|
|
2006-11-02 13:35:18 +00:00
|
|
|
#endif // _JOY_H
|