From: sparky4 Date: Sat, 2 Apr 2016 21:28:46 +0000 (-0500) Subject: wwww inputest.exe wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=3c728ff6f9e56111cf019b4c241fc6d37c52adc0;p=16.git wwww inputest.exe wwww --- diff --git a/src/inputest.c b/src/inputest.c index 8913b086..f67562b4 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -32,6 +32,7 @@ main(int argc, char *argv[]) //extern struct inconfig inpu; testkeyin=0; testcontrolnoisy=1; + testctrltype=1; IN_Startup(); IN_Default(0,&player,ctrl_Joystick1); //while(!IN_KeyDown(sc_Escape)) diff --git a/src/lib/16_in.c b/src/lib/16_in.c index bfa3ba85..89e7beda 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -38,7 +38,7 @@ #include "src/lib/16_in.h" -byte testkeyin=0,testcontrolnoisy=0; +byte testkeyin=0,testcontrolnoisy=0,testctrltype=0; /* ============================================================================= @@ -51,7 +51,7 @@ struct inconfig { boolean MousePresent; boolean JoysPresent[MaxJoys]; - boolean JoyPadPresent[MaxPads]; +// boolean JoyPadPresent[MaxPads]; boolean Keyboard[NumCodes]; boolean Paused; char LastASCII; @@ -59,7 +59,7 @@ struct inconfig KeyboardDef KbdDefs[MaxKbds]; JoystickDef JoyDefs[MaxJoys]; - JoypadDef JoypadDefs[MaxPads]; +// JoypadDef JoypadDefs[MaxPads]; } inpu; //extern inconfig inpu; @@ -671,16 +671,16 @@ void IN_Default(boolean gotit,player_t *player,ControlType nt) { int i; - if + /*if ( (!gotit) || ((nt == ctrl_Joystick1) && !inpu.JoysPresent[0]) || ((nt == ctrl_Joystick2) && !inpu.JoysPresent[1]) || ((nt == ctrl_Mouse) && !inpu.MousePresent) - || ((nt == ctrl_Joypad1) && !inpu.JoyPadPresent[0]) - || ((nt == ctrl_Joypad2) && !inpu.JoyPadPresent[1]) +// || ((nt == ctrl_Joypad1) && !inpu.JoyPadPresent[0]) +// || ((nt == ctrl_Joypad2) && !inpu.JoyPadPresent[1]) ) - nt = ctrl_Keyboard1; + nt = ctrl_Keyboard1;*/ inpu.KbdDefs[0].button0 = 0x1c; inpu.KbdDefs[0].button1 = 0x38; //in.KbdDefs[0].upleft = 0x47; @@ -842,6 +842,7 @@ register KeyboardDef *def; else { #endif + //if(testctrltype>0) printf("player[pn].Controls=%c\n", player[pn].Controls); switch (type = player[pn].Controls) { case ctrl_Keyboard1: @@ -896,8 +897,8 @@ register KeyboardDef *def; buttons += 1 << 1; realdelta = false; break; - case ctrl_Joypad1: - case ctrl_Joypad2: +// case ctrl_Joypad1: +// case ctrl_Joypad2: case ctrl_Joystick1: case ctrl_Joystick2: INL_GetJoyDelta(type - ctrl_Joystick,&dx,&dy,false); diff --git a/src/lib/16_in.h b/src/lib/16_in.h index bf0755e7..9b270585 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -42,7 +42,7 @@ //#define TESTCONTROLNOISY #endif -extern byte testkeyin,testcontrolnoisy; +extern byte testkeyin,testcontrolnoisy,testctrltype; //if else for gfxtesting and direction //player[pn].d == 2 || @@ -169,8 +169,8 @@ typedef enum { ctrl_Joystick, ctrl_Joystick1 = ctrl_Joystick,ctrl_Joystick2, ctrl_Mouse, - ctrl_Joypad, - ctrl_Joypad1 = ctrl_Joypad,ctrl_Joypad2 +// ctrl_Joypad, +// ctrl_Joypad1 = ctrl_Joypad,ctrl_Joypad2 } ControlType; typedef enum { motion_Left = -1,motion_Up = -1, @@ -211,10 +211,10 @@ typedef struct { joyMultXL,joyMultYL, joyMultXH,joyMultYH; } JoystickDef; -typedef struct -{ - boolean w; -} JoypadDef; +// typedef struct +// { +// boolean w; +// } JoypadDef; typedef struct { diff --git a/src/lib/doslib b/src/lib/doslib index 8769e1e0..8b416710 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 8769e1e077daded1a3d9b4a5a05363747381a6ec +Subproject commit 8b4167100563ce243bb334dfa58da6314756cca2 diff --git a/src/lib/jsmn b/src/lib/jsmn index b77d84ba..bbc6755f 160000 --- a/src/lib/jsmn +++ b/src/lib/jsmn @@ -1 +1 @@ -Subproject commit b77d84ba48e057aa464b6c6b6f6209e632918cb3 +Subproject commit bbc6755fce14c713f9bb4ba47c688d15efc1394b