Skip to content

Commit

Permalink
==== Ib CONTROL DONE./w.sh ./w.sh ==== \(^o^)/
Browse files Browse the repository at this point in the history
  • Loading branch information
sparky4 committed Mar 13, 2016
1 parent d56dca9 commit 8560c76
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/lib/16_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,41 +859,31 @@ register KeyboardDef *def;
{
if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){
if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]))
{
my = motion_Up;
}
if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))
{
my = motion_Down;
}
}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)
{
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];
else if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])) dir = DirTable[3];
if(testcontrolnoisy > 0) printf("dir=%c ", dirchar(dir));
break;
case 1:
case 3:
if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])) dir = DirTable[0];
else if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])) dir = DirTable[4];
if(testcontrolnoisy > 0) printf("dir=%c ", dirchar(dir));
break;
default:
break;
}
if(testcontrolnoisy > 0) 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
Expand Down

0 comments on commit 8560c76

Please sign in to comment.