/******************************************************************************
    Joy.h : Definition of structures and Macros
    PC Version
    Author : M. TRABUCATO
    Last update : 28.04.98
******************************************************************************/
 
#ifndef _JOY_H_
#define _JOY_H_
 
/**************************************/
#ifndef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
#endif
/**************************************/
 
#if defined(__cplusplus)
 
extern "C"
{
 
 
/*
  This function must be called one time when the game is launched. The
  parameter HistorySize is the number of previous status conserve.
*/
CPA_EXPORT short INO_fn_wInitGamePort(short wHistorySize);
 
 
/******************************************************************************
  This section defines the query functions.
******************************************************************************/
 
/*
  This function must be called at regular interval, for example each VBL.
  Update the informations about active joysticks.
  wReadMode indicates if you wanted to read all allocated joystick (C_wJoyReadAll)
  ,(useful to test if joystick are plugged, unplugged.
  or only plugged joystick (C_wJoyReadConnected).
*/
CPA_EXPORT short INO_fn_wReadJoystick(short wReadMode);
 
/******************************************************************************
******************************************************************************/
 
/*
  Return the current position of the joystick along the specified axis
  The return value is a double contained between -1.0 to 1.0
*/
CPA_EXPORT short INO_fn_wGetJoystickCurrentPosition(short wJoystickNum, short wAxis, double *pdfPosition);
 
/*
  Return the position of the joystick in a previous state along the specified axis
  The return value is a double contained between -1.0 to 1.0
*/
CPA_EXPORT short INO_fn_wGetJoystickPreviousPosition(short wJoystickNum, short wAxis, short wHistoryNum, double *pdfPosition);
 
 
}
 
 
#else       /* Prototype C */
 
extern CPA_EXPORT short INO_fn_wInitGamePort(short wHistorySize);
extern CPA_EXPORT short INO_fn_wReadJoystick(short wReadMode);
extern CPA_EXPORT short INO_fn_wGetJoystickCurrentPosition(short wJoystickNum, short wAxis, double *pdfPosition);
extern CPA_EXPORT short INO_fn_wGetJoystickPreviousPosition(short wJoystickNum, short wAxis, short wHistoryNum, double *pdfPosition);
 
#endif /* __cpluspluc */
 
/**************************************/
#endif /* _JOY_H_ */
