]> 4ch.mooo.com Git - 16.git/commitdiff
input is funny wwww
authorsparky4 <sparky4@cock.li>
Sat, 27 Jun 2015 22:37:32 +0000 (17:37 -0500)
committersparky4 <sparky4@cock.li>
Sat, 27 Jun 2015 22:37:32 +0000 (17:37 -0500)
Signed-off-by: sparky4 <sparky4@cock.li>
16.LIB
inputest.exe
src/inputest.c
src/lib/16_in.c
src/lib/16_in.h

diff --git a/16.LIB b/16.LIB
index dd1d8950ab2c976f815062fd37d676ac27f8cdfd..a0c5426f61947cc04c79d84f4f0b4c6a68eaf9ed 100644 (file)
Binary files a/16.LIB and b/16.LIB differ
index ca2b4194f120a86cb85b5b957c5e9f7bfde1b230..4e470c4d57947440fb38a45c4e6601b4c2703a1c 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index 15a1b3a5eb30565f2b0d88a9ee332051f89e28f7..8d94fcd30070efda16a45a248b184622c5d4b456 100644 (file)
@@ -28,8 +28,14 @@ void
 main(int argc, char *argv[])\r
 {\r
        ControlInfo control;\r
+       extern boolean Keyboard[NumCodes];\r
        IN_Startup();\r
        IN_Default(0,ctrl_Keyboard);\r
-       IN_ReadControl(0,&control);\r
+       while(!IN_qb(sc_Escape))\r
+       {\r
+               IN_ReadControl(0,&control);\r
+//             printf("%u\n", Keyboard[sc_Escape]);\r
+\r
+       }\r
        IN_Shutdown();\r
 }\r
index 0b2da7d8467b404409692a7d8c0d2420be0f50bb..28d79e71fe41a70426f85cabfaa3834f0a2b4177 100644 (file)
@@ -38,7 +38,6 @@
 #include "src/lib/16_in.h"
 
 //     Internal routines
-
 ///////////////////////////////////////////////////////////////////////////
 //
 //     INL_KeyService() - Handles a keyboard interrupt (key up/down)
@@ -48,8 +47,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 +108,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 +1191,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;
+}
index b37a9d5bcf46b821a3b37bca0f1ab3bb5abb0a8d..b39e1a5ba7f9c06a9f2b0e6e389b6567307ee5b1 100644 (file)
@@ -33,7 +33,8 @@
 #define        __DEBUG_InputMgr__\r
 //++++#endif\r
 \r
-#define DOMO\r
+//#define DOMO\r
+#define TESTKEYIN\r
 \r
 #define        KeyInt  9       // The keyboard ISR number\r
 \r
@@ -326,5 +327,6 @@ extern      ScanCode        IN_WaitForKey(void);
 extern word            IN_GetJoyButtonsDB(word joy);\r
 \r
 \r
-//static void interrupt INL_KeyService(void);\r
+void interrupt INL_KeyService(void);\r
+boolean IN_qb(byte kee);\r
 #endif\r