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
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
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