|
|
1.1 root 1: /*
1.1.1.3 root 2: Hatari - joy.h
3:
1.1.1.9 ! root 4: This file is distributed under the GNU General Public License, version 2
! 5: or at your option any later version. Read the file gpl.txt for details.
1.1 root 6: */
7:
1.1.1.3 root 8: #ifndef HATARI_JOY_H
9: #define HATARI_JOY_H
10:
11: enum
12: {
13: JOYSTICK_SPACE_NULL, /* Not up/down */
14: JOYSTICK_SPACE_DOWN,
15: JOYSTICK_SPACE_UP
1.1 root 16: };
17:
1.1.1.3 root 18: enum
19: {
20: JOYID_JOYSTICK0,
21: JOYID_JOYSTICK1,
22: JOYID_STEPADA,
23: JOYID_STEPADB,
24: JOYID_PARPORT1,
1.1.1.9 ! root 25: JOYID_PARPORT2
1.1.1.3 root 26: };
1.1 root 27:
1.1.1.2 root 28: #define JOYRANGE_UP_VALUE -16384 /* Joystick ranges in XY */
29: #define JOYRANGE_DOWN_VALUE 16383
30: #define JOYRANGE_LEFT_VALUE -16384
31: #define JOYRANGE_RIGHT_VALUE 16383
1.1 root 32:
1.1.1.6 root 33: #define ATARIJOY_BITMASK_UP 0x01
34: #define ATARIJOY_BITMASK_DOWN 0x02
35: #define ATARIJOY_BITMASK_LEFT 0x04
36: #define ATARIJOY_BITMASK_RIGHT 0x08
37: #define ATARIJOY_BITMASK_FIRE 0x80
38:
1.1 root 39: extern int JoystickSpaceBar;
40:
41: extern void Joy_Init(void);
1.1.1.4 root 42: extern void Joy_UnInit(void);
1.1.1.3 root 43: extern Uint8 Joy_GetStickData(int nStJoyId);
1.1.1.5 root 44: extern bool Joy_SetCursorEmulation(int port);
1.1 root 45: extern void Joy_ToggleCursorEmulation(void);
1.1.1.5 root 46: extern bool Joy_KeyDown(int symkey, int modkey);
47: extern bool Joy_KeyUp(int symkey, int modkey);
1.1.1.3 root 48: extern void Joy_StePadButtons_ReadWord(void);
49: extern void Joy_StePadMulti_ReadWord(void);
50: extern void Joy_StePadMulti_WriteWord(void);
51:
52: #endif /* ifndef HATARI_JOY_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.