]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_in.c
changine library~
[16.git] / src / lib / 16_in.c
index 28d79e71fe41a70426f85cabfaa3834f0a2b4177..2657e2680ffa46395e1bf133f76168f5708d471f 100644 (file)
@@ -19,8 +19,9 @@
 //
 //     ID Engine
 //     ID_IN.c - Input Manager
-//     v1.0d1
+//     v1.0d1w
 //     By Jason Blochowiak
+// Open Watcom port by sparky4
 //
 
 //
 
 #include "src/lib/16_in.h"
 
+/*\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
 ///////////////////////////////////////////////////////////////////////////
 //
@@ -442,14 +464,14 @@ IN_SetupJoy(word joy,word minx,word maxx,word miny,word maxy)
        def->joyMinX = minx;
        def->joyMaxX = maxx;
        r = maxx - minx;
-       d = r / 5;
+       d = r / 3;
        def->threshMinX = ((r / 2) - d) + minx;
        def->threshMaxX = ((r / 2) + d) + minx;
 
        def->joyMinY = miny;
        def->joyMaxY = maxy;
        r = maxy - miny;
-       d = r / 5;
+       d = r / 3;
        def->threshMinY = ((r / 2) - d) + miny;
        def->threshMaxY = ((r / 2) + d) + miny;
 
@@ -513,7 +535,7 @@ IN_Startup(void)
        checkmouse = true;
        for (i = 1;i < __argc;i++)
        {
-               switch (US_CheckParm(__argv[i],ParmStrings))
+               switch (US_CheckParm(__argv[i],ParmStringsIN))
                {
                case 0:
                        checkjoys = false;
@@ -597,8 +619,7 @@ IN_ClearKeysDown(void)
 
        LastScan = sc_None;
        LastASCII = key_None;
-       for (i = 0;i < NumCodes;i++)
-               Keyboard[i] = false;
+       memset (Keyboard,0,sizeof(Keyboard));
 }
 
 ///////////////////////////////////////////////////////////////////////////
@@ -654,7 +675,7 @@ IN_ReadCursor(CursorInfo *info)
        }
 }
 
-#ifndef DOMO
+#ifndef DUMU
 ///////////////////////////////////////////////////////////////////////////
 //
 //     IN_ReadControl() - Reads the device associated with the specified
@@ -696,8 +717,8 @@ register    KeyboardDef     *def;
        else if (DemoMode == demo_PlayDone)
                Quit("Demo playback exceeded");
        else
-#endif
        {
+#endif
                                                                                                                        // MDM begin (GAMERS EDGE) - added this block
                ControlTypeUsed = ctrl_None;
 
@@ -848,8 +869,8 @@ register    KeyboardDef     *def;
        else if (DemoMode == demo_PlayDone)
                Quit("Demo playback exceeded");
        else
-#endif
        {
+#endif
                switch (type = Controls[player])
                {
                case ctrl_Keyboard1:
@@ -1019,7 +1040,6 @@ IN_FreeDemoBuffer(void)
 #endif
 
 
-#if 0
 ///////////////////////////////////////////////////////////////////////////
 //
 //     IN_GetScanName() - Returns a string containing the name of the
@@ -1038,8 +1058,6 @@ IN_GetScanName(ScanCode scan)
 
        return(ScanNames[scan]);
 }
-#endif
-
 
 ///////////////////////////////////////////////////////////////////////////
 //