From: sparky4 Date: Sun, 28 Jun 2015 06:06:00 +0000 (-0500) Subject: wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=54b9e15f1e29c85e1174e103dc43ca6aaa59fbab;p=16.git wwww modified: 16.LIB modified: inputest.exe modified: src/inputest.c modified: src/lib/16_in.c modified: src/lib/16_in.h --- diff --git a/16.LIB b/16.LIB index 0cafbb62..3544d58f 100644 Binary files a/16.LIB and b/16.LIB differ diff --git a/inputest.exe b/inputest.exe index bc272097..db576b84 100644 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/src/inputest.c b/src/inputest.c index 8d94fcd3..76265e73 100644 --- a/src/inputest.c +++ b/src/inputest.c @@ -30,7 +30,7 @@ main(int argc, char *argv[]) ControlInfo control; extern boolean Keyboard[NumCodes]; IN_Startup(); - IN_Default(0,ctrl_Keyboard); + IN_Default(0,ctrl_Joystick); while(!IN_qb(sc_Escape)) { IN_ReadControl(0,&control); diff --git a/src/lib/16_in.c b/src/lib/16_in.c index e3832dcf..c8fd6266 100644 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -19,8 +19,9 @@ // // ID Engine // ID_IN.c - Input Manager -// v1.0d1 +// v1.0d1w // By Jason Blochowiak +// Open Watcom port by sparky4 // // @@ -463,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; @@ -534,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; @@ -618,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)); } /////////////////////////////////////////////////////////////////////////// diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 7cc14372..542f6e29 100644 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -19,13 +19,15 @@ // // ID Engine // ID_IN.h - Header file for Input Manager -// v1.0d1 -// By Jason Blochowiak +// v1.0d1w +// By Jason Blochowiak +// Open Watcom port by sparky4 // #ifndef __16_IN__ #define __16_IN__ - + +#include #include "src/lib/lib_head.h" //#include "src/lib/16_us.h" @@ -291,7 +293,7 @@ static Direction DirTable[] = // Quick lookup for total direction static void (*INL_KeyHook)(void); static void interrupt (*OldKeyVect)(void); -static char *ParmStrings[] = {"nojoys","nomouse",nil}; +static char *ParmStringsIN[] = {"nojoys","nomouse",nil}; // Function prototypes #define IN_KeyDown(code) (Keyboard[(code)])