\r
#include "src/lib/16_in.h"\r
\r
+word testkeyin=1,testcontrolnoisy=0;\r
+\r
/*\r
=============================================================================\r
\r
\r
if (INL_KeyHook && !special)\r
INL_KeyHook();\r
- #ifdef TESTKEYIN\r
- printf("%c %x %u\n", c, k, inpu.Keyboard[k]);\r
- #endif\r
+//#ifdef TESTKEYIN\r
+ if(testkeyin > 0) printf("%c [0x%x %u] %u\n", c, k, k, inpu.Keyboard[k]);\r
+//endif\r
outp(0x20,0x20);\r
}\r
\r
INL_GetJoyDelta(word joy,int *dx,int *dy,boolean adaptive)\r
{\r
word x,y;\r
- dword time;\r
- dword TimeCount = *clockdw;\r
+ word time;\r
+ word TimeCount = *clockw;\r
JoystickDef *def;\r
-static dword lasttime;\r
+static word lasttime;\r
\r
IN_GetJoyAbs(joy,&x,&y);\r
def = inpu.JoyDefs + joy;\r
word\r
IN_GetJoyButtonsDB(word joy)\r
{\r
- dword TimeCount = *clockdw;\r
- dword lasttime;\r
+ word TimeCount = *clockw;\r
+ word lasttime;\r
word result1,result2;\r
\r
do\r
if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left] && player[playnum].d == 2))// || player[playnum].info.dir == 3)\r
mx = motion_Right;\r
}\r
+ //input from player\r
if (inpu.Keyboard[def->button0])\r
buttons += 1 << 0;\r
if (inpu.Keyboard[def->button1])\r
}\r
}\r
#endif\r
-#ifdef TESTCONTROLNOISY\r
+//#ifdef TESTCONTROLNOISY\r
+if(testcontrolnoisy > 0)\r
if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right])&& player[playnum].info.dir!=2)\r
{\r
printf("(mx)=%d ", mx);\r
printf("(my)=%d ", my);\r
printf("dir=%d\n", player[playnum].info.dir);\r
}\r
-#endif\r
+//#endif\r
}\r
\r
///////////////////////////////////////////////////////////////////////////\r
boolean\r
IN_UserInput(dword delay,boolean clear)\r
{\r
- dword TimeCount = *clockdw;\r
- dword lasttime;\r
+ word TimeCount = *clockw;\r
+ word lasttime;\r
\r
lasttime = TimeCount;\r
do\r
\r
boolean IN_qb(byte kee)\r
{\r
- #ifdef TESTKEYIN\r
- printf("%u\n", inpu.Keyboard[kee]);\r
- #endif\r
+//#ifdef TESTKEYIN\r
+// if(testkeyin > 0) printf("%u\n", inpu.Keyboard[kee]);\r
+//#endif\r
if(inpu.Keyboard[kee]==true) return 1;\r
else return 0;\r
}\r