/******************************************************************************
    Joystick.h : Definition of structures and Macros
    Author : JENTEY F.
    Last update : 06/03/97
******************************************************************************/
 
#ifndef	  _INO_JOYSTICK_H
#define   _INO_JOYSTICK_H
 
#ifndef	  u_short
#define   u_short unsigned short
#endif
 
#ifndef	  u_long
#define   u_long  unsigned long
#endif
 
 
 
 
/**************************************/
#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
/**************************************/
 
 
 
 
/**************************************************************************
  All functions return a short value that should be compared with the
  following ones.
***************************************************************************/
#define     C_wJoyError             32767
#define     C_wJoyTrue              32766
#define     C_wJoyFalse             32765
 
 
/**************************************************************************
   Define the joystick type.
***************************************************************************/
#define     C_wJoyNone				1
#define     C_wJoyTypeJoystick	    2
#define     C_wJoyTypePad			3
#define     C_wJoyTypeVolant		4
 
 
/**************************************************************************
   Define the executing mode of the device.
***************************************************************************/
#define     C_wJoyNormalMode        0
#define     C_wJoyDemoRecordingMode 1
#define     C_wJoyDemoPlayingMode   2
 
 
/**************************************************************************
   Define the fn_wJoyReadJoystick mode.
***************************************************************************/
#define     C_wJoyReadAll	        0
#define     C_wJoyReadConnected		1
 
 
/**************************************************************************
   These constants can be used with the wJoystickNum parameter of functions.
***************************************************************************/
#define     C_wJoystick1            0
#define     C_wJoystick2            1
#define     C_wJoystick3            2
#define     C_wJoystick4            3
#define     C_wJoystick5            4
#define     C_wJoystick6            5
#define     C_wJoystick7            6
#define     C_wJoystick8            7
#define     C_wJoystick9            8
#define     C_wJoystick10           9
#define     C_wJoystick11           10
#define     C_wJoystick12           11
#define     C_wJoystick13           12
#define     C_wJoystick14           13
#define     C_wJoystick15           14
#define     C_wJoystick16           15
 
 
/**************************************************************************
 These constants can be used with the ulButtonFlag parameter of functions
***************************************************************************/
#define     C_ulButtonFlag1         1
#define     C_ulButtonFlag2         1 << 1
#define     C_ulButtonFlag3         1 << 2
#define     C_ulButtonFlag4         1 << 3
#define     C_ulButtonFlag5         1 << 4
#define     C_ulButtonFlag6         1 << 5
#define     C_ulButtonFlag7         1 << 6
#define     C_ulButtonFlag8         1 << 7
#define     C_ulButtonFlag9         1 << 8
#define     C_ulButtonFlag10        1 << 9
#define     C_ulButtonFlag11        1 << 10
#define     C_ulButtonFlag12        1 << 11
#define     C_ulButtonFlag13        1 << 12
#define     C_ulButtonFlag14        1 << 13
#define     C_ulButtonFlag15        1 << 14
#define     C_ulButtonFlag16        1 << 15
#define     C_ulButtonFlag17        1 << 16
#define     C_ulButtonFlag18        1 << 17
#define     C_ulButtonFlag19        1 << 18
#define     C_ulButtonFlag20        1 << 19
#define     C_ulButtonFlag21        1 << 20
#define     C_ulButtonFlag22        1 << 21
#define     C_ulButtonFlag23        1 << 22
#define     C_ulButtonFlag24        1 << 23
#define     C_ulButtonFlag25        1 << 24
#define     C_ulButtonFlag26        1 << 25
#define     C_ulButtonFlag27        1 << 26
#define     C_ulButtonFlag28        1 << 27
#define     C_ulButtonFlag29        1 << 28
#define     C_ulButtonFlag30        1 << 29
#define     C_ulButtonFlag31        1 << 30
#define     C_ulButtonFlag32        1 << 31
#define     C_ulButtonAll           0xFFFFFFFF
 
 
/**************************************************************************
  Joystick capabilities flags
***************************************************************************/
#define     C_ulJoyX                1
#define     C_ulJoyY                1 << 1
#define     C_ulJoyZ                1 << 2
#define     C_ulJoyR                1 << 3
#define     C_ulJoyU                1 << 4
#define     C_ulJoyV                1 << 5
#define     C_ulJoyDiscretPOV       1 << 6
#define     C_ulJoyContinuousPOV    1 << 7
 
 
/**************************************************************************
 Joystick directions flags
***************************************************************************/
#define     C_ulJoyLeft             1
#define     C_ulJoyRight            1 << 1
#define     C_ulJoyUp               1 << 2
#define     C_ulJoyDown             1 << 3
#define     C_ulJoyZUp              1 << 4
#define     C_ulJoyZDown            1 << 5
#define     C_ulJoyPOVCentered      1 << 6
#define     C_ulJoyPOVLeft          1 << 7
#define     C_ulJoyPOVRight         1 << 8
#define     C_ulJoyPOVForward       1 << 9
#define     C_ulJoyPOVBackward      1 << 10
 
 
/**************************************************************************
 Joystick error code
***************************************************************************/
#define     C_FirstErrorJoystick            0x1000
#define     C_ErrNoJoystickDriver           ( C_FirstErrorJoystick + 0 )
#define     C_ErrDriverNotInitialized       ( C_FirstErrorJoystick + 1 )
#define     C_ErrJoystickNotActive          ( C_FirstErrorJoystick + 2 )
#define     C_ErrFeatureNotAvailable        ( C_FirstErrorJoystick + 3 )
#define     C_ErrBadButtonFlag              ( C_FirstErrorJoystick + 4 )
#define     C_ErrBadJoystick                ( C_FirstErrorJoystick + 5 )
#define     C_ErrNotInJoyRecordingMode      ( C_FirstErrorJoystick + 6 )
#define     C_ErrNotInJoyNormalMode         ( C_FirstErrorJoystick + 7 )
#define     C_ErrNotInJoyPlayingMode        ( C_FirstErrorJoystick + 7 )
#define     C_ErrJoyBadFileFormat           ( C_FirstErrorJoystick + 9 )
#define     C_ErrJoyDemoFileError           ( C_FirstErrorJoystick + 10 )
#define     C_ErrJoyHistoricOverflow        ( C_FirstErrorJoystick + 11 )
#define     C_ErrJoystickNotAllocated       ( C_FirstErrorJoystick + 12 )
#define     C_ErrJoystickNotConfigured      ( C_FirstErrorJoystick + 13 )
#define     C_ErrNoJoystickAvailable        ( C_FirstErrorJoystick + 14 )
#define     C_ErrAlreadyAllocated           ( C_FirstErrorJoystick + 15 )
#define     C_ErrMemoryError                ( C_FirstErrorJoystick + 16 )
 
 
 
/******************************************************************************
  All functions return a short type value that must be compared with the
  C_wJoyError to check if the function success. You can then read the error
  code with the error management functions.
******************************************************************************/
 
#if defined(__cplusplus)
 
extern "C"
{
 
/******************************************************************************
  Joystick configuration functions.
******************************************************************************/
 
/*
  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);*/
 
/*
  Reinitialization of the joysticks. The history is clear and it check if
  configuration has changed (new joysticks are connected).
*/
CPA_EXPORT short INO_fn_wResetGamePort(void);
 
/*
  This function free memory and release joystick ressource.
*/
CPA_EXPORT short INO_fn_wFreeGamePort(void);
 
/*
  Check if there is a gameport driver.
  Return C_wJoyTrue or C_wJoyFalse
*/
CPA_EXPORT short INO_fn_wUpdateGamePort(void);
 
/*
  Try to allocate a joystick.
  If ok return a handle to the joystick
*/
CPA_EXPORT short INO_fn_wAllocJoystick(short wJoystickNum);
 
/*
  Returns the id ( C_wJoystick'n' ) of  the first connected joystick.
*/
CPA_EXPORT short INO_fn_wAllocFirstJoystickAvailable(void);
 
/*
  fn_wJoyFreeJoystick.
*/
CPA_EXPORT short INO_fn_wFreeJoystick(short wJoystickNum);
 
/*
  Update the specified joystick capabilities and state.
*/
CPA_EXPORT short INO_fn_wUpdateJoystick(short wJoystickNum);
 
/*
  This function return the maximum joystick number supported by the driver.
*/
CPA_EXPORT short INO_fn_wGetMaximumJoystickNumber(void);
 
/*
  This function checks if the specified joystick is connected.
  The result can be C_wJoyTrue, C_wJoyFalse or C_wJoyError.
*/
CPA_EXPORT short  INO_fn_wIsJoystickConnected(short wJoystickNum);
 
/*
  fn_wJoyIsAllocated
*/
CPA_EXPORT short INO_fn_wIsJoystickAllocated(short wJoystickNum);
 
/*
  Set the type of joystick
*/
CPA_EXPORT short INO_fn_wSetJoystickType(short wJoystickNum, short wType);
 
/*
  Get the type of joystick
*/
CPA_EXPORT short INO_fn_wGetJoystickType(short wJoystickNum);
 
/*
  This function returns the number of buttons of the specified joystick.
*/
CPA_EXPORT short INO_fn_wGetJoystickButtonNumber(short wJoystickNum);
 
/*
  Number of direction axis of the specified joystick.
*/
CPA_EXPORT short INO_fn_wGetJoystickAxisNumber(short wJoystickNum);
 
/*
  This function filled the ulFlagInfo parameter with the capabilities flags
  (defined in this file) of the specified joystick.
*/
CPA_EXPORT short INO_fn_wGetJoystickMovmentCaps(short wJoystickNum, u_long *p_ulFlagInfo);
 
/*
  This function sets the joystick extra features (like z-axis) the fn_JoyReadJoystick
  muist update. The ulFlagInfo parameter is a combinaisson of the capabilities flags.
*/
CPA_EXPORT short INO_fn_wSetJoystickActiveCaps(u_long ulCapsFlag);
 
 
 
/*****************************************************************
  Demo mode function support
*****************************************************************/
 
/*
  With this function, you can define the exit demo button for the
  specified joystick. You can select several button by a combinaison
  the C_ulButtonFlag'n' value, or all button with C_ulButtonAll.
  Default is none.
  For the joystick you are recording, you shouldn't specified a
  button that is used in the game.
*/
CPA_EXPORT short INO_fn_wSetStopRecordingJoystickButton(short wJoystickNum, u_long ulButtonFlag);
 
/*
  This function define the joystick to record. Default is
  C_wJoystick1.
*/
CPA_EXPORT short INO_fn_wSetJoystickToRecord(short wJoystickNum);
 
/*
  This function start the demo recording mode.
*/
CPA_EXPORT short INO_fn_wStartRecordingJoystick(char *p_szFileName, short wDemoSize);
 
/*
  This function quit the demo recording mode.
*/
CPA_EXPORT short INO_fn_wStopRecordingJoystick(void);
 
/*
  This function return the number of frame of the demo sequence.
*/
CPA_EXPORT u_long INO_fn_ulGetJoystickDemoFrameCount(void);
 
/*
  This function start the demo playing mode with the given file sequence.
*/
CPA_EXPORT short INO_fn_wStartJoystickDemo(char *p_szFileName);
 
/*
  This function quit the demo playing mode.
  You quit the demo playing mode automatically when you push a joystick button.
  But you also can associate this function to a key stroke for example.
*/
CPA_EXPORT short INO_fn_wStopJoystickDemo(void);
 
/*
  This function return the current joystick mode.(normal,demo
  recording or demo playing).
*/
CPA_EXPORT short INO_fn_wGetJoystickCurrentMode(void);
 
 
 
/******************************************************************************
  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);
 
/*
  Set a connected joystick as Active. By default, only the first joystick is
  active.
*/
CPA_EXPORT short INO_fn_wAddActiveJoystick(short wJoystickNum);
 
/*
  Remove a joystick from the active joystick list.
*/
CPA_EXPORT short INO_fn_wRemoveActiveJoystick(short wJoystickNum);
 
/*
  The 10 following functions check the current directions for the
  specified joystick. The result must be check with C_wJoyTrue, C_wJoyFlase
  or C_wJoyError.
*/
CPA_EXPORT short INO_fn_wIsJoystickLeft(short wJoystickNum);
CPA_EXPORT short INO_fn_wIsJoystickRight(short wJoystickNum);
CPA_EXPORT short INO_fn_wIsJoystickUp(short wJoystickNum);
CPA_EXPORT short INO_fn_wIsJoystickDown(short wJoystickNum);
CPA_EXPORT short INO_fn_wIsJoystickZUp(short wJoystickNum);
CPA_EXPORT short INO_fn_wIsJoystickZDown(short wJoystickNum);
 
CPA_EXPORT short INO_fn_wJoystickJustLeft(short wJoystickNum);
CPA_EXPORT short INO_fn_wJoystickJustRight(short wJoystickNum);
CPA_EXPORT short INO_fn_wJoystickJustUp(short wJoystickNum);
CPA_EXPORT short INO_fn_wJoystickJustDown(short wJoystickNum);
 
/*
  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);
 
/*
  This function test the buttons of th specified joystick. If several
  buttons are specified, the result is true if all selected buttons
  are pressed.
*/
CPA_EXPORT short INO_fn_wIsJoystickButtonPressed(short wJoystickNum, u_long ulButtonFlag);
CPA_EXPORT short INO_fn_wJoystickButtonJustPressed(short wJoystickNum, u_long ulButtonFlag);
CPA_EXPORT short INO_fn_wJoystickButtonJustReleased(short wJoystickNum, u_long ulButtonFlag);
CPA_EXPORT short INO_fn_wGetJoystickCurrentButton(short wJoystickNum, u_long *p_ulButtonFlag);
 
/*
  The next 2 functions fill the second parameter with the current direction
  flags or current pressed button flags of the selected joystick.
*/
CPA_EXPORT short INO_fn_wGetJoystickCurrentDirection(short wJoystickNum, u_long *p_ulDirectionFlag);
CPA_EXPORT short INO_fn_wJoystickDirectionJustReleased(short wJoystickNum, u_long ulDirectionFlag);
 
/*
  The following functions check a previous direction or button status for the
  specified joystick. The result must be check with C_wJoyTrue, C_wJoyFlase
  or C_wJoyError.
*/
CPA_EXPORT short INO_fn_wWasJoystickLeft(short wJoystickNum, short wHistoryNum);
CPA_EXPORT short INO_fn_wWasJoystickRight(short wJoystickNum, short wHistoryNum);
CPA_EXPORT short INO_fn_wWasJoystickUp(short wJoystickNum, short wHistoryNum);
CPA_EXPORT short INO_fn_wWasJoystickDown(short wJoystickNum, short wHistoryNum);
CPA_EXPORT short INO_fn_wWasJoystickZUp(short wJoystickNum, short wHistoryNum);
CPA_EXPORT short INO_fn_wWasJoystickZDown(short wJoystickNum, short wHistoryNum);
 
/*
  This function test the buttons of the specified joystick. If several
  buttons are specified, the result is true if all selected buttons
  were pressed.
*/
CPA_EXPORT short INO_fn_wWasJoystickButtonPressed(short wJoystickNum, u_long ulButtonFlag, short wHistoryNum);
 
/*
  The next 2 functions fill the third parameter with the current direction
  flags or current pressed button flags of the selected joystick.
*/
CPA_EXPORT short INO_fn_wGetJoystickPreviousDirection(short wJoystickNum, short wHistoryNum, u_long *p_ulDirectionFlag);
CPA_EXPORT short INO_fn_wGetJoystickPreviousButton(short wJoystickNum, short wHistoryNum, u_long *p_ulButtonFlag);
 
/*
  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);
 
/*
  If not C_wJoyError, the result is the elapsed time of inactivity
  of the selected joystick.
*/
/*
CPA_EXPORT short fn_wJoyInactivityTime(short wJoystickNum , u_long *p_ulLaps);
*/
 
/*
  Return the time between the specified prevoius state of the joystick and
  the actual state.
*/
/*
CPA_EXPORT short fn_wJoyElapsedTime (short wJoystickNum , short wHistoryNum , u_long *p_ulLaps );
*/
 
/*
  This function returns a pointer to the last error message string.
*/
CPA_EXPORT short INO_fn_wGetJoystickErrorString( char **pp_szErrorString);
 
/*
  This function returns the last error code.
*/
CPA_EXPORT u_long INO_fn_wJGetLastJoystickErrorCode(void);
 
}
 
 
#else		/* Prototype C */
 
extern CPA_EXPORT short INO_fn_wInitGamePort(short wHistorySize);
extern CPA_EXPORT short INO_fn_wResetGamePort(void);
extern CPA_EXPORT short INO_fn_wUpdateGamePort(void);
extern CPA_EXPORT short INO_fn_wFreeGamePort(void);
extern CPA_EXPORT short INO_fn_wAllocJoystick(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wFreeJoystick(short wJoyHandle);
extern CPA_EXPORT short INO_fn_wAllocFirstJoystickAvailable();
extern CPA_EXPORT short INO_fn_wUpdateJoystick(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wGetMaximumJoystickNumber(void);
extern CPA_EXPORT short INO_fn_wIsJoystickConnected(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wIsJoystickAllocated(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wSetJoystickType(short wJoystickNum, short wType);
extern CPA_EXPORT short INO_fn_wGetJoystickType(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wGetJoystickButtonNumber(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wGetJoystickAxisNumber(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wGetJoystickMovmentCaps(short wJoystickNum, u_long *p_ulFlagInfo);
extern CPA_EXPORT short INO_fn_wSetJoystickActiveCaps(u_long ulCapsFlag);
 
extern CPA_EXPORT short INO_fn_wSetStopRecordingJoystickButton(short wJoystickNum, u_long ulButtonFlag);
extern CPA_EXPORT short INO_fn_wSetJoystickToRecord(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wStartRecordingJoystick(char *p_szFileName, short wDemoSize);
extern CPA_EXPORT short INO_fn_wStopRecordingJoystick(void);
extern CPA_EXPORT short INO_fn_wStartJoystickDemo(char *p_szFileName);
extern CPA_EXPORT short INO_fn_wStopJoystickDemo(void);
extern CPA_EXPORT short INO_fn_wGetJoystickCurrentMode(void);
extern CPA_EXPORT u_long INO_fn_ulGetJoystickDemoFrameCount(void);
 
extern CPA_EXPORT short INO_fn_wReadJoystick(short wReadMode);
extern CPA_EXPORT short INO_fn_wAddActiveJoystick(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wRemoveActiveJoystick(short wJoystickNum);
 
extern CPA_EXPORT short INO_fn_wIsJoystickLeft(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wIsJoystickRight(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wIsJoystickUp(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wIsJoystickDown(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wIsJoystickZUp(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wIsJoystickZDown(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wJoystickJustLeft(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wJoystickJustRight(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wJoystickJustUp(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wJoystickJustDown(short wJoystickNum);
extern CPA_EXPORT short INO_fn_wGetJoystickCurrentPosition(short wJoystickNum, short wAxis, double *pdfPosition);
extern CPA_EXPORT short INO_fn_wIsJoystickButtonPressed(short wJoystickNum, u_long ulButtonFlag);
extern CPA_EXPORT short INO_fn_wJoystickButtonJustPressed(short wJoystickNum, u_long ulButtonFlag);
extern CPA_EXPORT short INO_fn_wJoystickButtonJustReleased(short wJoystickNum, u_long ulButtonFlag);
extern CPA_EXPORT short INO_fn_wGetJoystickCurrentDirection(short wJoystickNum, u_long *p_ulDirectionFlag);
extern CPA_EXPORT short INO_fn_wJoystickDirectionJustReleased(short wJoystickNum, u_long ulDirectionFlag);
extern CPA_EXPORT short INO_fn_wGetJoystickCurrentButton(short wJoystickNum, u_long *p_ulButtonFlag);
 
extern CPA_EXPORT short INO_fn_wWasJoystickLeft(short wJoystickNum, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wWasJoystickRight(short wJoystickNum, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wWasJoystickUp(short wJoystickNum, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wWasJoystickDown(short wJoystickNum, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wWasJoystickZUp(short wJoystickNum, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wWasJoystickZDown(short wJoystickNum, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wWasJoystickButtonPressed(short wJoystickNum, u_long ulButtonFlag, short wHistoryNum);
extern CPA_EXPORT short INO_fn_wGetJoystickPreviousDirection(short wJoystickNum, short wHistoryNum, u_long *p_ulDirectionFlag);
extern CPA_EXPORT short INO_fn_wGetJoystickPreviousButton(short wJoystickNum, short wHistoryNum, u_long *p_ulButtonFlag);
extern CPA_EXPORT short INO_fn_wGetJoystickPreviousPosition(short wJoystickNum, short wAxis, short wHistoryNum, double *pdfPosition);
/*fn_wJoyInactivityTime(short wJoystickNum , u_long *p_ulLaps);*/
/*fn_wJoyElapsedTime (short wJoystickNum , short wHistoryNum , u_long *p_ulLaps );*/
extern CPA_EXPORT short INO_fn_wGetJoystickErrorString(char **pp_szErrorString);
extern CPA_EXPORT u_long INO_fn_wJGetLastJoystickErrorCode(void);
 
#endif
 
 
/* Old prototype compatibility */
 
#define fn_wJoyInitGamePort(A)                   INO_fn_wInitGamePort(A)
#define fn_wJoyResetGamePort()                   INO_fn_wResetGamePort()
#define fn_wJoyUpdateGamePort()                  INO_fn_wUpdateGamePort()
#define fn_wJoyFreeGamePort()                    INO_fn_wFreeGamePort()
#define fn_wJoyAllocJoystick(A)                  INO_fn_wAllocJoystick(A)
#define fn_wJoyAllocFirstJoystickAvailable()     INO_fn_wAllocFirstJoystickAvailable()
#define fn_wJoyUpdateJoystick(A)                 INO_fn_wUpdateJoystick(A)
#define fn_wJoyFreeJoystick(A)                   INO_fn_wFreeJoystick(A)
#define fn_wJoyMaximumJoystickNumber()           INO_fn_wGetMaximumJoystickNumber()
#define fn_wJoyIsConnected(A)                    INO_fn_wIsJoystickConnected(A)
#define fn_wJoyIsAllocated(A)                    INO_fn_wIsJoystickAllocated(A)
#define fn_wJoySetJoystickType(A, B)             INO_fn_wSetJoystickType(A, B)
#define fn_wJoyGetJoystickType(A)                INO_fn_wGetJoystickType(A)
#define fn_wJoyButtonNumber(A)                   INO_fn_wGetJoystickButtonNumber(A)
#define fn_wJoyAxisNumber(A)                     INO_fn_wGetJoystickAxisNumber(A)
#define fn_wJoyMovmentCaps(A, B)                 INO_fn_wGetJoystickMovmentCaps(A, B)
#define fn_wJoySetActiveCaps(A)                  INO_fn_wSetJoystickActiveCaps(A)
#define fn_wJoySetDemoRecordExitButton(A, B)     INO_fn_wSetStopRecordingJoystickButton(A, B)
#define fn_wJoySetRecordJoystick(A)              INO_fn_wSetJoystickToRecord(A)
#define fn_wJoyStartDemoRecording(A, B)          INO_fn_wStartRecordingJoystick(A, B)
#define fn_wJoyExitDemoRecording()               INO_fn_wStopRecordingJoystick()
#define fn_wJoyStartDemoPlaying(A)               INO_fn_wStartJoystickDemo(A)
#define fn_wJoyExitDemoPlaying()                 INO_fn_wStopJoystickDemo()
#define fn_wJoyGetCurrentMode()                  INO_fn_wGetJoystickCurrentMode()
#define fn_ulJoyGetDemoFrameCount()              INO_fn_ulGetJoystickDemoFrameCount()
#define fn_wJoyReadJoystick(A)                   INO_fn_wReadJoystick(A)
#define fn_wJoyAddActiveJoystick(A)              INO_fn_wAddActiveJoystick(A)
#define fn_wJoyRemoveActiveJoystick(A)           INO_fn_wRemoveActiveJoystick(A)
#define fn_wJoyIsLeft(A)                         INO_fn_wIsJoystickLeft(A)
#define fn_wJoyIsRight(A)                        INO_fn_wIsJoystickRight(A)
#define fn_wJoyIsUp(A)                           INO_fn_wIsJoystickUp(A)
#define fn_wJoyIsDown(A)                         INO_fn_wIsJoystickDown(A)
#define fn_wJoyIsZUp(A)                          INO_fn_wIsJoystickZUp(A)
#define fn_wJoyIsZDown(A)                        INO_fn_wIsJoystickZDown(A)
#define fn_wJoyJustLeft(A)                       INO_fn_wJoystickJustLeft(A)
#define fn_wJoyJustRight(A)                      INO_fn_wJoystickJustRight(A)
#define fn_wJoyJustUp(A)                         INO_fn_wJoystickJustUp(A)
#define fn_wJoyJustDown(A)                       INO_fn_wJoystickJustDown(A)
#define fn_wJoyGetCurrentPosition(A, B, C)       INO_fn_wGetJoystickCurrentPosition(A, B, C)
#define fn_wJoyIsButtonPressed(A, B)             INO_fn_wIsJoystickButtonPressed(A, B)
#define fn_wJoyCurrentDirection(A, B)            INO_fn_wGetJoystickCurrentDirection(A, B)
#define fn_wJoyCurrentButton(A, B)               INO_fn_wGetJoystickCurrentButton(A, B)
#define fn_wJoyWasLeft(A, B)                     INO_fn_wWasJoystickLeft(A, B)
#define fn_wJoyWasRight(A, B)                    INO_fn_wWasJoystickRight(A, B)
#define fn_wJoyWasUp(A, B)                       INO_fn_wWasJoystickUp(A, B)
#define fn_wJoyWasDown(A, B)                     INO_fn_wWasJoystickDown(A, B)
#define fn_wJoyWasZUp(A, B)                      INO_fn_wWasJoystickZUp(A, B)
#define fn_wJoyWasZDown(A, B)                    INO_fn_wWasJoystickZDown(A, B)
#define fn_wJoyWasPressed(A, B, C)               INO_fn_wWasJoystickButtonPressed(A, B, C)
#define fn_wJoyPreviousDirection(A, B, C)        INO_fn_wGetJoystickPreviousDirection(A, B, C)
#define fn_wJoyPreviousButton(A, B, C)           INO_fn_wGetJoystickPreviousButton(A, B, C)
#define fn_wJoyGetPreviousPosition(A, B, C, D)   INO_fn_wGetJoystickPreviousPosition(A, B, C, D)
#define fn_wJoyGetErrorString(A)                 INO_fn_wGetJoystickErrorString(A)
#define fn_wJoyGetLastErrorCode()                INO_fn_wJGetLastJoystickErrorCode()
 
 
#endif /* _INO_JOYSTICK_H_ */
