]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_in.c
fixed an issue with EMS_INT becuase i learned there is 2 wwww
[16.git] / src / lib / 16_in.c
index 8c0dbc695bd54210d249c3e8850c0b54a1c298d2..619affd827f5c5fee717577f934a40796e337df7 100755 (executable)
@@ -166,6 +166,7 @@ static      Direction       DirTable[] =            // Quick lookup for total direction
 #endif\r
 \r
 //     Internal routines\r
+\r
 ///////////////////////////////////////////////////////////////////////////\r
 //\r
 //     INL_KeyService() - Handles a keyboard interrupt (key up/down)\r
@@ -245,9 +246,13 @@ static     boolean special;
 void\r
 Mouse(int x)\r
 {\r
-       union REGS CPURegs;\r
-       x = CPURegs.x.ax;\r
-       int86(MouseInt,&CPURegs,&CPURegs);\r
+       //union REGS CPURegs;\r
+       //x = CPURegs.x.ax;\r
+       __asm {\r
+               mov     ax,x\r
+               int     MouseInt\r
+       }\r
+       //int86(MouseInt,&CPURegs,&CPURegs);\r
 }\r
 \r
 ///////////////////////////////////////////////////////////////////////////\r
@@ -301,8 +306,7 @@ IN_GetJoyAbs(word joy,word *xp,word *yp)
        yb = 1 << ys;\r
 \r
 // Read the absolute joystick values\r
-       __asm\r
-       {\r
+       __asm {\r
                pushf                           // Save some registers\r
                push    si\r
                push    di\r
@@ -322,8 +326,13 @@ IN_GetJoyAbs(word joy,word *xp,word *yp)
 \r
                push    bp                      // Don't mess up stack frame\r
                mov             bp,MaxJoyValue\r
-\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
 loo:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
                in              al,dx           // Get bits indicating whether all are finished\r
 \r
                dec             bp                      // Check bounding register\r
@@ -340,8 +349,13 @@ loo:
 \r
                add             cl,bl\r
                jnz             loo             // If both bits were 0, drop out\r
-\r
+#ifdef __BORLANDC__\r
+       }\r
+#endif\r
 done:\r
+#ifdef __BORLANDC__\r
+       __asm {\r
+#endif\r
                pop             bp\r
 \r
                mov             cl,[xs]         // Get the number of bits to shift\r
@@ -639,9 +653,23 @@ IN_Startup()
 \r
        checkjoys = true;\r
        checkmouse = true;\r
-       for (i = 1;i < __argc;i++)\r
+       for (i = 1;i <\r
+#ifdef __WATCOMC__\r
+       __argc\r
+#endif\r
+#ifdef __BORLANDC__\r
+       _argc\r
+#endif\r
+       ;i++)\r
        {\r
-               switch (US_CheckParm(__argv[i],ParmStringsIN))\r
+               switch (US_CheckParm(\r
+#ifdef __WATCOMC__\r
+       __argv[i]\r
+#endif\r
+#ifdef __BORLANDC__\r
+       _argv[i]\r
+#endif\r
+               ,ParmStringsIN))\r
                {\r
                case 0:\r
                        checkjoys = false;\r