]> 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:46:59 +0000 (23:46 -0600)
committersparky4 <sparky4@cock.li>
Sun, 13 Mar 2016 05:46:59 +0000 (23:46 -0600)
src/inputest.c
src/lib/16_in.c
src/lib/16_in.h

index 5e9297bc2708d0bb063502f49d568fb8aa17481a..c1a72ab2e16241e924331bd36d613f6ce0c1824b 100755 (executable)
@@ -38,6 +38,8 @@ main(int argc, char *argv[])
        player[0].d=2;\r
        player[0].persist_aniframe=0;\r
        player[0].speed=4;\r
+       player[0].kd[0]=2;\r
+       player[0].kd[1]=2;\r
        while(!IN_KeyDown(sc_Escape))\r
        {\r
                #define INC_PER_FRAME if(player[0].q&1) player[0].persist_aniframe++; if(player[0].persist_aniframe>4) player[0].persist_aniframe = 1;\r
index 407058558ecfab1b87df1fa28d7e0016b036d386..6415a29c72bef6fb6e5f73d0aa91d937bfc57f96 100755 (executable)
@@ -857,17 +857,23 @@ register  KeyboardDef     *def;
                        if(DIRECTIONIFELSEGFXTEST)\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 != 4)\r
+                               if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]))\r
+                               {\r
                                        my = motion_Up;\r
-                               if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))// || player[pn].pdir != 0)\r
+                               }\r
+                               if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up]))\r
+                               {\r
                                        my = motion_Down;\r
+                               }\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 != 3)\r
+                               if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]))\r
+                               {\r
                                        mx = motion_Left;\r
+                               }\r
                                if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left]))// || player[pn].pdir != 1)\r
+                               {\r
                                        mx = motion_Right;\r
+                               }\r
                        }\r
                        //input from player\r
                        if (inpu.Keyboard[def->button0])\r
index 760b5bb26bb5300b857023973655f11046e483cc..183dbb245855b6569ceb8c282abfd49c04d72719 100755 (executable)
@@ -229,6 +229,7 @@ typedef     struct
        byte d;         //direction to render sprite!! wwww\r
        byte q;         //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www\r
        byte near pdir; //previous direction~\r
+       //byte near kd[2];      //array of arrow key pressed\r
        word speed;             //player speed!\r
 //0000 planar_buf_t huge *data; //supposively the sprite sheet data\r
 //     planar_buf_t data; //supposively the sprite sheet data\r