-/* Catacomb Apocalypse Source Code\r
- * Copyright (C) 1993-2014 Flat Rock Software\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License along\r
- * with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
- */\r
-\r
//\r
// ID Engine\r
// ID_IN.h - Header file for Input Manager\r
#include "src/lib/16_dbg.h"\r
#include "src/lib/16_spri.h"\r
#include "src/lib/16_enti.h"\r
-//#include "src/lib/bitmap.h" //old format\r
#endif\r
\r
-//if else for gfxtesting and direction\r
-//player[pn].d == 2 ||\r
-//player[pn].d != 2 ||\r
-#define DIRECTIONIFELSE (player[pn].info.dir == 2)\r
-//#define NDIRECTIONIFELSE (player[pn].info.dir != 2)\r
-\r
#define KeyInt 9 // The keyboard ISR number\r
\r
// Stuff for the joystick\r
//#define MaxPlayers 2//future plans for multiple playable charaters and being able to alternate\r
#define MaxKbds 2\r
#define MaxJoys 2\r
-#define MaxPads 2\r
#define NumCodes 128\r
\r
//typedef byte ScanCode;\r
#endif\r
\r
// Internal routines\r
-void interrupt INL_KeyService();\r
-void Mouse(int x);\r
-//static void INL_GetMouseDelta(int *x,int *y);\r
-//static word INL_GetMouseButtons(void);\r
-void IN_GetJoyAbs(word joy,word *xp,word *yp);\r
-//static void INL_GetJoyDelta(word joy,int *dx,int *dy,boolean adaptive);\r
-//static word INL_GetJoyButtons(word joy);\r
-word IN_GetJoyButtonsDB(word joy);\r
-//static void INL_StartKbd(void);\r
-//static void INL_ShutKbd(void);\r
-//static boolean INL_StartMouse(void);\r
-//static void INL_ShutMouse(void);\r
-//static void INL_SetJoyScale(word joy);\r
-void IN_SetupJoy(word joy,word minx,word maxx,word miny,word maxy);\r
-//static boolean INL_StartJoy(word joy);\r
-//static void INL_ShutJoy(word joy);\r
-void IN_Startup();\r
-void IN_Default(boolean gotit,player_t *player,ControlType nt);\r
-void IN_Shutdown();\r
-void IN_SetKeyHook(void (*hook)());\r
-void IN_ClearKeysDown();\r
-//static void INL_AdjustCursor(CursorInfo *info,word buttons,int dx,int dy);\r
-void IN_ReadCursor(CursorInfo *info);\r
-void near IN_ReadControl(word pn, player_t *player);\r
-void IN_SetControlType(word pn,player_t *player,ControlType type);\r
+extern void IN_Startup(void),IN_Shutdown(void),\r
+ IN_Default(boolean gotit,player_t *player,ControlType nt),\r
+ IN_SetKeyHook(void (*)()),\r
+ IN_ClearKeysDown(void),\r
+ IN_ReadCursor(CursorInfo *),\r
+ IN_ReadControl(player_t *player),\r
+ IN_SetControlType(player_t *player,ControlType type),\r
+ IN_GetJoyAbs(word joy,word *xp,word *yp),\r
+ IN_SetupJoy(word joy,word minx,word maxx,\r
+ word miny,word maxy),\r
+#if DEMO0\r
+ IN_StopDemo(void),IN_FreeDemoBuffer(void),\r
+#endif\r
+ IN_Ack(void),IN_AckBack(void);\r
+extern boolean IN_UserInput(word delay);\r
+extern char IN_WaitForASCII(void);\r
+extern ScanCode IN_WaitForKey(void);\r
+extern word IN_GetJoyButtonsDB(word joy);\r
+extern byte *IN_GetScanName(ScanCode);\r
+\r
+\r
+byte IN_MouseButtons (void);\r
+byte IN_JoyButtons (void);\r
+\r
+void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/);\r
+void IN_StartAck(void);\r
+boolean IN_CheckAck (void);\r
+boolean IN_IsUserInput();\r
+#define Mouse(x) INL_Mouse(x)\r
+//void IN_SetKeyHook(void (*hook)());\r
#if DEMO0\r
boolean IN_StartDemoRecord(word bufsize);\r
-void IN_StartDemoPlayback(byte /*__segment*/ *buffer,word bufsize);\r
+void IN_StartDemoPlayback(byte *buffer,word bufsize);\r
void IN_StopDemo(void);\r
void IN_FreeDemoBuffer(void);\r
#endif\r
-byte *IN_GetScanName(ScanCode scan);\r
-ScanCode IN_WaitForKey();\r
-char IN_WaitForASCII();\r
-void IN_AckBack();\r
-void IN_Ack();\r
-boolean IN_IsUserInput();\r
-boolean IN_UserInput(dword delay,boolean clear);\r
-boolean IN_KeyDown(byte code);\r
-void IN_ClearKey(byte code);\r
-boolean IN_qb(byte kee);\r
-ScanCode IN_GetLastScan();\r
-ScanCode IN_GetCurCode();\r
+\r
+boolean IN_KeyDown(byte code),\r
+ IN_qb(byte kee);\r
+void IN_ClearKey(byte code),\r
+ IN_KbdLED();\r
+ScanCode IN_GetLastScan(),\r
+ IN_GetCurCode();\r
\r
#endif\r