|
|
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.2 root 18: #define JOYRANGE_UP_VALUE -16384 /* Joystick ranges in XY */
19: #define JOYRANGE_DOWN_VALUE 16383
20: #define JOYRANGE_LEFT_VALUE -16384
21: #define JOYRANGE_RIGHT_VALUE 16383
1.1 root 22:
1.1.1.6 root 23: #define ATARIJOY_BITMASK_UP 0x01
24: #define ATARIJOY_BITMASK_DOWN 0x02
25: #define ATARIJOY_BITMASK_LEFT 0x04
26: #define ATARIJOY_BITMASK_RIGHT 0x08
27: #define ATARIJOY_BITMASK_FIRE 0x80
28:
1.1 root 29: extern int JoystickSpaceBar;
30:
31: extern void Joy_Init(void);
1.1.1.4 root 32: extern void Joy_UnInit(void);
1.1.1.10 root 33: extern const char *Joy_GetName(int id);
34: extern int Joy_GetMaxId(void);
35: extern bool Joy_ValidateJoyId(int i);
1.1.1.3 root 36: extern Uint8 Joy_GetStickData(int nStJoyId);
1.1.1.5 root 37: extern bool Joy_SetCursorEmulation(int port);
1.1 root 38: extern void Joy_ToggleCursorEmulation(void);
1.1.1.10 root 39: extern bool Joy_SwitchMode(int port);
1.1.1.5 root 40: extern bool Joy_KeyDown(int symkey, int modkey);
41: extern bool Joy_KeyUp(int symkey, int modkey);
1.1.1.11! root 42: extern void Joy_StePadButtons_ReadByte(void);
1.1.1.3 root 43: extern void Joy_StePadMulti_ReadWord(void);
44: extern void Joy_StePadMulti_WriteWord(void);
45:
46: #endif /* ifndef HATARI_JOY_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.