From 396ebe0094d8a99de67a95c99695c2277ceed9fe Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sat, 12 Mar 2016 22:24:28 -0600 Subject: [PATCH] pdir --- src/lib/16_in.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 52a76774..546d3dbd 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -854,21 +854,18 @@ register KeyboardDef *def; mx = motion_Left,my = motion_Down; else if (Keyboard[def->downright]) mx = motion_Right,my = motion_Down;*/ - if(DIRECTIONIFELSEGFXTEST) - { - if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){// && (inpu.Keyboard[def->up] || inpu.Keyboard[def->down])){ -// if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);} - if(inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])// || player[pn].info.pdir == 0) - my = motion_Up; - if(inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])// || player[pn].info.pdir == 4) - my = motion_Down; - }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){// && (inpu.Keyboard[def->left] || inpu.Keyboard[def->right])){ -// if(testcontrolnoisy > 0){ printf("lr "); printf("%u ", inpu.Keyboard[def->left]); printf("%u ", inpu.Keyboard[def->right]); } - if(inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])// || player[pn].info.pdir == 1) - mx = motion_Left; - if(inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])// || player[pn].info.pdir == 3) - mx = motion_Right; - } + if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){ +// if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);} + if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]) || player[pn].pdir == 0) + my = motion_Up; + if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]) || player[pn].pdir == 4) + my = motion_Down; + }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){ +// if(testcontrolnoisy > 0){ printf("lr "); printf("%u ", inpu.Keyboard[def->left]); printf("%u ", inpu.Keyboard[def->right]); } + if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]) || player[pn].pdir == 1) + mx = motion_Left; + if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]) || player[pn].pdir == 3) + mx = motion_Right; } //input from player if (inpu.Keyboard[def->button0]) -- 2.39.5