3 // ID_IN.h - Header file for Input Manager
\r
5 // By Jason Blochowiak
\r
6 // Open Watcom port by sparky4
\r
11 #include "src/lib/16_head.h"
\r
14 #define __DEBUG_InputMgr__
\r
17 #define MaxPlayers 4
\r
20 #define NumCodes 128
\r
22 typedef byte ScanCode;
\r
25 #define sc_Return 0x1c
\r
26 #define sc_Enter sc_Return
\r
27 #define sc_Escape 0x01
\r
28 #define sc_Space 0x39
\r
29 #define sc_BackSpace 0x0e
\r
32 #define sc_Control 0x1d
\r
33 #define sc_CapsLock 0x3a
\r
34 #define sc_LShift 0x2a
\r
35 #define sc_RShift 0x36
\r
36 #define sc_UpArrow 0x48
\r
37 #define sc_DownArrow 0x50
\r
38 #define sc_LeftArrow 0x4b
\r
39 #define sc_RightArrow 0x4d
\r
40 #define sc_Insert 0x52
\r
41 #define sc_Delete 0x53
\r
42 #define sc_Home 0x47
\r
44 #define sc_PgUp 0x49
\r
45 #define sc_PgDn 0x51
\r
98 #define key_Return 0x0d
\r
99 #define key_Enter key_Return
\r
100 #define key_Escape 0x1b
\r
101 #define key_Space 0x20
\r
102 #define key_BackSpace 0x08
\r
103 #define key_Tab 0x09
\r
104 #define key_Delete 0x7f
\r
106 // Stuff for the mouse
\r
111 #define MouseInt 0x33
\r
112 #define Mouse(x) _AX = x,geninterrupt(MouseInt)
\r
116 demo_Off,demo_Record,demo_Playback,demo_PlayDone
\r
119 //moved to 16_tdef.h
\r
121 //ctrl_None, // MDM (GAMERS EDGE) - added
\r
123 ctrl_Keyboard1 = ctrl_Keyboard,ctrl_Keyboard2,
\r
125 ctrl_Joystick1 = ctrl_Joystick,ctrl_Joystick2,
\r
129 motion_Left = -1,motion_Up = -1,
\r
131 motion_Right = 1,motion_Down = 1
\r
134 dir_North,//dir_NorthEast,
\r
135 dir_West,//dir_Nortinest,
\r
137 dir_East,//,dir_SouthEast,
\r
138 dir_South,//dir_Soutinest,
\r
141 boolean near button0,button1,button2,button3;
\r
143 Motion near xaxis,yaxis;
\r
144 Direction near dir;
\r
148 ScanCode near button0,button1,
\r
160 word near joyMinX,joyMinY,
\r
161 threshMinX,threshMinY,
\r
162 threshMaxX,threshMaxY,
\r
164 joyMultXL,joyMultYL,
\r
165 joyMultXH,joyMultYH;
\r
169 =============================================================================
\r
173 =============================================================================
\r
176 static Demo DemoMode = demo_Off;
\r
177 static byte /*_seg*/ *DemoBuffer;
\r
178 static word DemoOffset,DemoSize;
\r
181 // Function prototypes
\r
182 #define IN_KeyDown(code) (Keyboard[(code)])
\r
183 #define IN_ClearKey(code) {Keyboard[code] = false;\
\r
184 if (code == LastScan) LastScan = sc_None;}
\r
186 // DEBUG - put names in prototypes
\r
187 extern void IN_Startup(void),IN_Shutdown(void),
\r
188 IN_Default(boolean gotit,ControlType in),
\r
189 IN_SetKeyHook(void (*)()),
\r
190 IN_ClearKeysDown(void),
\r
191 IN_ReadCursor(CursorInfo *),
\r
192 IN_ReadControl(int,CursorInfo *),
\r
193 IN_SetControlType(int,ControlType),
\r
194 IN_GetJoyAbs(word joy,word *xp,word *yp),
\r
195 IN_SetupJoy(word joy,word minx,word maxx,
\r
196 word miny,word maxy),
\r
197 IN_StopDemo(void),IN_FreeDemoBuffer(void),
\r
198 IN_Ack(void),IN_AckBack(void);
\r
199 extern boolean IN_UserInput(dword delay);
\r
200 extern char IN_WaitForASCII(void);
\r
201 extern ScanCode IN_WaitForKey(void);
\r
202 extern word IN_GetJoyButtonsDB(word joy);
\r
203 extern byte *IN_GetScanName(ScanCode);
\r
206 byte IN_MouseButtons (void);
\r
207 byte IN_JoyButtons (void);
\r
209 void INL_GetJoyDelta(word joy,int *dx,int *dy);
\r
210 void IN_StartAck(void);
\r
211 boolean IN_CheckAck (void);
\r