]> 4ch.mooo.com Git - 16.git/commitdiff
pdir printf(%c%d %c%d %c%d %c%dn, dirchar(0), inpu.Keyboard[def->up], dirchar(4)...
authorsparky4 <sparky4@cock.li>
Sun, 13 Mar 2016 05:42:26 +0000 (23:42 -0600)
committersparky4 <sparky4@cock.li>
Sun, 13 Mar 2016 05:42:26 +0000 (23:42 -0600)
src/lib/16_in.c

index 7d4b32d909026780879b554102d8765ad6795b91..407058558ecfab1b87df1fa28d7e0016b036d386 100755 (executable)
@@ -855,18 +855,19 @@ register  KeyboardDef     *def;
                        else if (Keyboard[def->downright])\r
                                mx = motion_Right,my = motion_Down;*/\r
                        if(DIRECTIONIFELSEGFXTEST)\r
-                       if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
+                       {\r
+//                     if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
 //                             if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);}\r
-                       if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]) || player[pn].pdir == 0)\r
-                               my = motion_Up;\r
-                       if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]) || player[pn].pdir == 4)\r
-                               my = motion_Down;\r
-                       }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
+                               if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]))// || player[pn].pdir != 4)\r
+                                       my = motion_Up;\r
+                               if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))// || player[pn].pdir != 0)\r
+                                       my = motion_Down;\r
+//                     }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
 //                             if(testcontrolnoisy > 0){ printf("lr "); printf("%u ", inpu.Keyboard[def->left]); printf("%u ", inpu.Keyboard[def->right]); }\r
-                       if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]) || player[pn].pdir == 1)\r
-                               mx = motion_Left;\r
-                       if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]) || player[pn].pdir == 3)\r
-                               mx = motion_Right;\r
+                               if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]))// || player[pn].pdir != 3)\r
+                                       mx = motion_Left;\r
+                               if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1)\r
+                                       mx = motion_Right;\r
                        }\r
                        //input from player\r
                        if (inpu.Keyboard[def->button0])\r
@@ -919,7 +920,7 @@ register    KeyboardDef     *def;
        player[pn].info.dir = DirTable[conpee];\r
 \r
        //TODO: overwriting direction must be added\r
-       if(player[pn].d==2) player[pn].pdir=DirTable[conpee];\r
+       if(DirTable[conpee]!=2) player[pn].pdir=DirTable[conpee];\r
        if(player[pn].q==1 && (mx!=motion_None || my!=motion_None))\r
        {\r
                player[pn].d = player[pn].info.dir;\r
@@ -958,7 +959,7 @@ if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->lef
        printf("cpee=%c ", dirchar(conpee));\r
        //printf("(mx)=%d       ", mx);\r
        //printf("(my)=%d       ", my);\r
-       printf("pdir=%c d=%c dir=%c", dirchar(player[pn].pdir), dirchar(player[pn].d), dirchar(player[pn].info.dir));\r
+       printf("pdir=%c d=%c dir=%c ", dirchar(player[pn].pdir), dirchar(player[pn].d), dirchar(player[pn].info.dir));\r
        printf("%c%d %c%d %c%d %c%d\n", dirchar(0), inpu.Keyboard[def->up], dirchar(4), inpu.Keyboard[def->down], dirchar(1), inpu.Keyboard[def->left], dirchar(3), inpu.Keyboard[def->right]);\r
 }\r
 //#endif\r