Subversion Repositories shark

Rev

Rev 549 | Rev 1063 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*
 * Project: S.Ha.R.K.
 *
 * Coordinators:
 *   Giorgio Buttazzo    <giorgio@sssup.it>
 *   Paolo Gai           <pj@gandalf.sssup.it>
 *
 * Authors     :
 *   Mauro Marinoni      <mauro.marinoni@unipv.it>
 *
 *
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
 *
 * http://www.sssup.it
 * http://retis.sssup.it
 * http://shark.sssup.it
 */


/* Game Header Linux Input Driver*/

#ifndef __SHARK_JOY26_H__
#define __SHARK_JOY26_H__

/* Flag Codes */
#define BTN1_BIT        0x01
#define BTN2_BIT        0x02
#define BTN3_BIT        0x04
#define BTN4_BIT        0x08

#define isButton1Pressed(b)     (b & BTN1_BIT)
#define isButton2Pressed(b)     (b & BTN2_BIT)
#define isButton3Pressed(b)     (b & BTN3_BIT)
#define isButton4Pressed(b)     (b & BTN4_BIT)
#define isButtonPressed(b, n)   (b & (1<<n))

void joy_getstatus(int *axe0, int *axe1, int *axe2, int *axe3, int *button);
void joy_setstatus(int axe0, int axe1, int axe2, int axe3, int button);

void joy_enable(void);
void joy_disable(void);

int JOY26_installed(void);
int JOY26_init(void);
int JOY26_close(void);
#endif