From: Jonathan Campbell Date: Sat, 2 Apr 2016 21:18:38 +0000 (-0700) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=58b13c9c330902a6171c65ce2b2af6bd48ba475d;hp=4df04665672df77e5f3101db8dda37725a219655;p=16.git Merge remote-tracking branch 'upstream/master' --- diff --git a/16/doslib b/16/doslib new file mode 160000 index 00000000..97569044 --- /dev/null +++ b/16/doslib @@ -0,0 +1 @@ +Subproject commit 975690444b74e8f28ad288412c0b0c754fab2342 diff --git a/BAKA PEEEEEEEEEEEEEEEE.jpg b/BAKA PEEEEEEEEEEEEEEEE.jpg new file mode 100755 index 00000000..65246941 Binary files /dev/null and b/BAKA PEEEEEEEEEEEEEEEE.jpg differ diff --git a/joytest.exe b/joytest.exe new file mode 100755 index 00000000..b8072513 Binary files /dev/null and b/joytest.exe differ diff --git a/makefile b/makefile index c156f741..d77bf7c0 100755 --- a/makefile +++ b/makefile @@ -87,7 +87,7 @@ TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe #testemm.exe testemm0.exe fonttes0.exe miditest.exe sega.exe sountest.exe EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe -all: $(EXEC) +all: $(EXEC) joytest.exe #$(16LIBOBJS) => 16.lib bug.... # @@ -293,6 +293,8 @@ $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos$(DIRSEP)dos86h$(DIRSEP)dos.lib: cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)dos && .$(DIRSEP)make.sh $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga$(DIRSEP)dos86h$(DIRSEP)vga.lib: cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)vga && .$(DIRSEP)make.sh +joytest.exe: + cd $(DOSLIBDIR)$(DIRSEP)hw$(DIRSEP)joystick && .$(DIRSEP)make.sh && $(COPYCOMMAND) dos86h$(DIRSEP)test.exe $(PDIR)$(PDIR)$(PDIR)$(PDIR)$(PDIR)joytest.exe #$(DOSLIBLIBS): .symbolic # @cd $(DOSLIB) # @.$(DIRSEP)buildall.sh diff --git a/src/inputest.c b/src/inputest.c index f5a9e852..edd86d62 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -32,8 +32,9 @@ main(int argc, char *argv[]) //extern struct inconfig inpu; testkeyin=0; testcontrolnoisy=1; + testctrltype=1; IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); + IN_Default(0,&player,ctrl_Joystick1); //while(!IN_KeyDown(sc_Escape)) player[0].q=1; player[0].d=2; @@ -106,4 +107,5 @@ main(int argc, char *argv[]) printf("version %s\n", VERSION); printf("testkeyin=%u\n", testkeyin); printf("testcontrolnoisy=%u\n", testcontrolnoisy); + printf("testctrltype=%u\n", testctrltype); } diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 801759ad..925eaeeb 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; @@ -659,6 +659,7 @@ IN_Startup() inpu.JoysPresent[i] = checkjoys? INL_StartJoy(i) : false; inst.IN_Started = true; + } /////////////////////////////////////////////////////////////////////////// @@ -670,14 +671,15 @@ void IN_Default(boolean gotit,player_t *player,ControlType nt) { int i; + if(testctrltype==0) 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; inpu.KbdDefs[0].button0 = 0x1c; @@ -841,6 +843,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: @@ -895,6 +898,8 @@ register KeyboardDef *def; buttons += 1 << 1; realdelta = false; break; +// case ctrl_Joypad1: +// case ctrl_Joypad2: case ctrl_Joystick1: case ctrl_Joystick2: INL_GetJoyDelta(type - ctrl_Joystick,&dx,&dy,false); @@ -906,10 +911,6 @@ register KeyboardDef *def; buttons = INL_GetMouseButtons(); realdelta = true; break; - case ctrl_Joypad1: - case ctrl_Joypad2: - printf("wwww"); - break; } #ifdef DEMO0 } 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 be9c7f3c..8b416710 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit be9c7f3c9abb00385d07fa9baac9d5ead2f6ce04 +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