--- hatari/src/includes/joy.h 2019/04/09 08:49:30 1.1.1.7 +++ hatari/src/includes/joy.h 2019/04/09 08:59:24 1.1.1.12 @@ -1,20 +1,13 @@ /* Hatari - joy.h - This file is distributed under the GNU Public License, version 2 or at - your option any later version. Read the file gpl.txt for details. + This file is distributed under the GNU General Public License, version 2 + or at your option any later version. Read the file gpl.txt for details. */ #ifndef HATARI_JOY_H #define HATARI_JOY_H -typedef struct -{ - int XPos,YPos; /* the actually read axis values in range of -32768...0...32767 */ - int XAxisID,YAxisID; /* the IDs of the physical PC jyostick's axis to be used to gain ST joystick axis input */ - int Buttons; /* JOY_BUTTON1 */ -} JOYREADING; - enum { JOYSTICK_SPACE_NULL, /* Not up/down */ @@ -22,16 +15,6 @@ enum JOYSTICK_SPACE_UP }; -enum -{ - JOYID_JOYSTICK0, - JOYID_JOYSTICK1, - JOYID_STEPADA, - JOYID_STEPADB, - JOYID_PARPORT1, - JOYID_PARPORT2, -}; - #define JOYRANGE_UP_VALUE -16384 /* Joystick ranges in XY */ #define JOYRANGE_DOWN_VALUE 16383 #define JOYRANGE_LEFT_VALUE -16384 @@ -47,13 +30,19 @@ extern int JoystickSpaceBar; extern void Joy_Init(void); extern void Joy_UnInit(void); +extern const char *Joy_GetName(int id); +extern int Joy_GetMaxId(void); +extern bool Joy_ValidateJoyId(int i); extern Uint8 Joy_GetStickData(int nStJoyId); extern bool Joy_SetCursorEmulation(int port); extern void Joy_ToggleCursorEmulation(void); +extern bool Joy_SwitchMode(int port); extern bool Joy_KeyDown(int symkey, int modkey); extern bool Joy_KeyUp(int symkey, int modkey); -extern void Joy_StePadButtons_ReadWord(void); +extern void Joy_StePadButtons_ReadByte(void); extern void Joy_StePadMulti_ReadWord(void); extern void Joy_StePadMulti_WriteWord(void); +void Joy_SteLightpenX_ReadWord(void); +void Joy_SteLightpenY_ReadWord(void); #endif /* ifndef HATARI_JOY_H */