/* JOYSTICK.H -- by Gary Neal, Jr. (garyneal@geocities.com)
 *
 * Header file for our functions that provide joystick support.
 */

#ifndef __JOYSTICK_H   /* Prevent multiple inclusions */
#define __JOYSTICK_H

#include        /* Needed for int86 functionality */
#include      /* Needed for inp and outp functions */

/* Useful Joystick constants */
#define JsA_Xaxis 0
#define JsA_Yaxis 1
#define JsB_Xaxis 2
#define JsB_Yaxis 3

#define JsAbutton1 0x10
#define JsAbutton2 0x20
#define JsBbutton1 0x40
#define JsBbutton2 0x80

#define JsAllButtons 0xF0

/* Joystick potentiometer values */
extern unsigned short joyPotVal[4];

/* Flags if using BIOS or direct access for joystick interface */
extern char joystickDirectAccess;

#ifdef __cplusplus       /* Must be compiled C style */
extern "C" {
#endif

void Joyin(int joyTest);

int JoystickButtonPressed(int buttonMask);

#ifdef __cplusplus
}
#endif

#endif    /* __JOYSTICK_H */

    Source: geocities.com/garyneal_71/GameLib/download

               ( geocities.com/garyneal_71/GameLib)                   ( geocities.com/garyneal_71)