]> 4ch.mooo.com Git - 16.git/commitdiff
updated copyright www
authorsparky4 <sparky4@cock.li>
Tue, 22 Mar 2016 20:20:59 +0000 (15:20 -0500)
committersparky4 <sparky4@cock.li>
Tue, 22 Mar 2016 20:20:59 +0000 (15:20 -0500)
src/lib/16_in.c

index c9c70a69d4c810d8ce69d557ec16dfeadf238b52..801759ad4757d3fceec5db029144c655b1d42147 100755 (executable)
@@ -857,18 +857,18 @@ register  KeyboardDef     *def;
                                mx = motion_Right,my = motion_Down;*/\r
                        if(DIRECTIONIFELSE)\r
                        {\r
-                       //if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
+                       if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){\r
                                if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]))\r
                                        my = motion_Up;\r
                                if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))\r
                                        my = motion_Down;\r
-                       //}else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
+                       }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){\r
                                if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]))\r
                                        mx = motion_Left;\r
                                if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1)\r
                                        mx = motion_Right;\r
-                       //}else\r
-                               if(mx+my>1<mx+my && mx+my>-1<mx+my)\r
+                       }else\r
+                               //if(mx+my!=1 && mx+my!=-1 && mx!=my!=0)\r
                                {       //2 keys pressed\r
                                        switch (player[pn].pdir)\r
                                        {\r
@@ -886,7 +886,7 @@ register    KeyboardDef     *def;
                                                break;\r
                                        }\r
                                        if(testcontrolnoisy > 0){ printf("dir=%c ", dirchar(dir)); printf("pdir=%c      ", dirchar(player[pn].pdir)); }\r
-                               }\r
+                               }//else printf("                                ");\r
                        }\r
                        //input from player\r
                        if (inpu.Keyboard[def->button0])\r
@@ -979,6 +979,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("[%d]  ", mx+my);\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