From: sparky4 Date: Wed, 10 Aug 2016 17:16:26 +0000 (-0500) Subject: testing input oops ^^; i mean this output ok so i am abojut to ineject it soon X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=c9568e2ba705c5cf44d5403c114b3ef1a6df5b95;p=16.git testing input oops ^^; i mean this output ok so i am abojut to ineject it soon --- diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 8b07fb54..5d60d6d6 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -863,25 +863,25 @@ register KeyboardDef *def; }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){ if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])) mx = motion_Left; - if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1) + if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])) mx = motion_Right; }else{ //2 keys pressed switch (player[pn].pdir) { case 0: case 4: - if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])){ dir = DirTable[1]; mx = motion_Left; } - else if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])){ dir = DirTable[3]; mx = motion_Right; } + if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])){ dir = DirTable[1]; }//mx = motion_Left; } + else if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])){ dir = DirTable[3]; }//mx = motion_Right; } break; case 1: case 3: - if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])){ dir = DirTable[0]; my = motion_Up; } - else if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])){ dir = DirTable[4]; my = motion_Down; } + if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])){ dir = DirTable[0]; }//my = motion_Up; } + else if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])){ dir = DirTable[4]; }//my = motion_Down; } break; default: break; } - if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); } + //if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); } } } //input from player @@ -963,7 +963,7 @@ register KeyboardDef *def; } #endif if(testcontrolnoisy > 0) -if(player[pn].d /*(inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right])*/ || player[pn].q>1) +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); //printf("q=%d ", player[pn].q);