]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_in.c
wwww
[16.git] / src / lib / 16_in.c
index 0b2da7d8467b404409692a7d8c0d2420be0f50bb..e3832dcf6ccda8737d197d64aa3fe9dd43bf40f8 100644 (file)
 
 #include "src/lib/16_in.h"
 
-//     Internal routines
+/*\r
+=============================================================================\r
+\r
+                                       GLOBAL VARIABLES\r
+\r
+=============================================================================\r
+*/\r
+//     Global variables
+               boolean JoystickCalibrated=false;               // MDM (GAMERS EDGE) - added\r
+               ControlType ControlTypeUsed;                            // MDM (GAMERS EDGE) - added\r
+               boolean         Keyboard[NumCodes];\r
+               boolean         Paused;\r
+               char            LastASCII;\r
+               ScanCode        LastScan;\r
+\r
+               //KeyboardDef   KbdDefs = {0x1d,0x38,0x47,0x48,0x49,0x4b,0x4d,0x4f,0x50,0x51};\r
+               JoystickDef     JoyDefs[MaxJoys];\r
+               ControlType     Controls[MaxPlayers];\r
+\r
+               dword   MouseDownCount;
 
+//     Internal routines
 ///////////////////////////////////////////////////////////////////////////
 //
 //     INL_KeyService() - Handles a keyboard interrupt (key up/down)
@@ -48,8 +68,8 @@ void interrupt
 INL_KeyService(void)
 {
 static boolean special;
-               byte    k,c,
-                               temp;
+               byte    k,c;
+               register byte temp;
 
        k = inp(0x60);  // Get the scan code
 
@@ -109,6 +129,9 @@ static      boolean special;
 
        if (INL_KeyHook && !special)
                INL_KeyHook();
+       #ifdef TESTKEYIN
+       printf("%c %x %u\n", c, k, Keyboard[k]);
+       #endif
        outp(0x20,0x20);
 }
 
@@ -1189,3 +1212,9 @@ IN_UserInput(dword delay,boolean clear)
        } while (TimeCount - lasttime < delay);
        return(false);
 }
+
+boolean IN_qb(byte kee)
+{
+       if(Keyboard[kee]==true) return 1;
+       else return 0;
+}