From: sparky4 Date: Wed, 28 Sep 2016 18:28:12 +0000 (-0500) Subject: ====XMS MOSTLY translated but crashes EXMMTEST.EXE ==== X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=c893d4ba14f47b7bbf91139cc4c701b6b80ca973;p=16.git ====XMS MOSTLY translated but crashes EXMMTEST.EXE ==== --- diff --git a/MMDUMP.16B b/MMDUMP.16B index a2763a15..9d3a83c8 100755 Binary files a/MMDUMP.16B and b/MMDUMP.16B differ diff --git a/bcexmm.exe b/bcexmm.exe index ba460567..a116796f 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 4b0799a7..5ffed8b2 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/src/inputest.c b/src/inputest.c index 62e2d817..be6ac4a2 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -30,8 +30,8 @@ main(int argc, char *argv[]) global_game_variables_t gvar; player_t player[MaxPlayers]; //extern struct inconfig inpu; - testkeyin=0; - testcontrolnoisy=1; + dbg_testkeyin=0; + dbg_testcontrolnoisy=1; IN_Startup(); IN_Default(0,&player,ctrl_Joystick1); IN_SetControlType(0,&player,ctrl_Joystick1); @@ -105,6 +105,6 @@ main(int argc, char *argv[]) //printf("%u\n", in.Keyboard[sc_Escape]); printf("inputest.exe "); printf("version %s\n", VERSION); - printf("testkeyin=%u\n", testkeyin); - printf("testcontrolnoisy=%u\n", testcontrolnoisy); + printf("testkeyin=%u\n", dbg_testkeyin); + printf("testcontrolnoisy=%u\n", dbg_testcontrolnoisy); } diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 85153939..8c0dbc69 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -38,7 +38,9 @@ #include "src/lib/16_in.h" -boolean testkeyin=0,testcontrolnoisy=0; +#ifdef __DEBUG_InputMgr__ +boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0; +#endif /* ============================================================================= @@ -234,9 +236,9 @@ static boolean special; if (INL_KeyHook && !special) INL_KeyHook(); -//#ifdef TESTKEYIN - if(testkeyin > 0) printf("%c %u [0x%x %u] %u\n", c, c, k, k, inpu.Keyboard[k]); -//endif +#ifdef __DEBUG_InputMgr__ + if(dbg_testkeyin > 0) printf("%c %u [0x%x %u] %u\n", c, c, k, k, inpu.Keyboard[k]); +#endif outp(0x20,0x20); } @@ -881,7 +883,9 @@ register KeyboardDef *def; default: break; } - //if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); } +#ifdef __DEBUG_InputMgr__ + //if(dbg_testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); } +#endif } } //input from player @@ -962,7 +966,8 @@ register KeyboardDef *def; } } #endif -if(testcontrolnoisy > 0) +#ifdef __DEBUG_InputMgr__ +if(dbg_testcontrolnoisy > 0) if(player[pn].info.dir!=2/*(inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right])*/ || player[pn].q>1) { //printf("b1=%u b2=%u b3=%u b4=%u ", player[pn].info.button0, player[pn].info.button1, player[pn].info.button2, player[pn].info.button3); @@ -973,6 +978,7 @@ if(player[pn].info.dir!=2/*(inpu.Keyboard[def->up] || inpu.Keyboard[def->down] | //else if(!realdelta) printf("%c%d %c%d %c%d %c%d", dirchar(0), inpu.Keyboard[def->up], dirchar(4), inpu.Keyboard[def->down], dirchar(1), inpu.Keyboard[def->left], dirchar(3), inpu.Keyboard[def->right]); printf("\n"); } +#endif } /////////////////////////////////////////////////////////////////////////// @@ -1239,9 +1245,9 @@ void IN_ClearKey(byte code) boolean IN_qb(byte kee) { -//#ifdef TESTKEYIN -// if(testkeyin > 0) printf("%u\n", inpu.Keyboard[kee]); -//#endif +#ifdef __DEBUG_InputMgr__ +// if(dbg_testkeyin > 0) printf("%u\n", inpu.Keyboard[kee]); +#endif if(inpu.Keyboard[kee]==true) return 1; else return 0; } diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 16b9b0ae..d25c19c3 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -36,16 +36,10 @@ #include "src/lib/bitmap.h" //old format #endif #ifdef __DEBUG__ -//#define __DEBUG_InputMgr__ +#define __DEBUG_InputMgr__ +extern boolean dbg_testkeyin,dbg_testcontrolnoisy; #endif -#ifdef __DEBUG_InputMgr__ -//#define TESTKEYIN -//#define TESTCONTROLNOISY -#endif - -extern boolean testkeyin,testcontrolnoisy; - //if else for gfxtesting and direction //player[pn].d == 2 || //player[pn].d != 2 ||