wwww
Revision | c9568e2ba705c5cf44d5403c114b3ef1a6df5b95 (tree) |
---|---|
Time | 2016-08-11 02:16:26 |
Author | sparky4 <sparky4@cock...> |
Commiter | sparky4 |
testing input oops ; i mean this output ok so i am abojut to ineject it soon
@@ -863,25 +863,25 @@ register KeyboardDef *def; | ||
863 | 863 | }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){ |
864 | 864 | if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])) |
865 | 865 | mx = motion_Left; |
866 | - if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1) | |
866 | + if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])) | |
867 | 867 | mx = motion_Right; |
868 | 868 | }else{ //2 keys pressed |
869 | 869 | switch (player[pn].pdir) |
870 | 870 | { |
871 | 871 | case 0: |
872 | 872 | case 4: |
873 | - if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])){ dir = DirTable[1]; mx = motion_Left; } | |
874 | - else if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])){ dir = DirTable[3]; mx = motion_Right; } | |
873 | + if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right])){ dir = DirTable[1]; }//mx = motion_Left; } | |
874 | + else if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left])){ dir = DirTable[3]; }//mx = motion_Right; } | |
875 | 875 | break; |
876 | 876 | case 1: |
877 | 877 | case 3: |
878 | - if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])){ dir = DirTable[0]; my = motion_Up; } | |
879 | - else if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])){ dir = DirTable[4]; my = motion_Down; } | |
878 | + if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down])){ dir = DirTable[0]; }//my = motion_Up; } | |
879 | + else if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up])){ dir = DirTable[4]; }//my = motion_Down; } | |
880 | 880 | break; |
881 | 881 | default: |
882 | 882 | break; |
883 | 883 | } |
884 | - if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); } | |
884 | + //if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c ", dirchar(player[pn].pdir)); } | |
885 | 885 | } |
886 | 886 | } |
887 | 887 | //input from player |
@@ -963,7 +963,7 @@ register KeyboardDef *def; | ||
963 | 963 | } |
964 | 964 | #endif |
965 | 965 | if(testcontrolnoisy > 0) |
966 | -if(player[pn].d /*(inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right])*/ || player[pn].q>1) | |
966 | +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) | |
967 | 967 | { |
968 | 968 | //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); |
969 | 969 | //printf("q=%d ", player[pn].q); |