From 465a28bde642141b8221a5217373e5f7c844e6c6 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sat, 12 Mar 2016 22:52:10 -0600 Subject: [PATCH] pdir --- src/inputest.c | 1 - src/lib/16_in.c | 7 ++++--- src/lib/16_in.h | 7 ++++--- src/scroll.c | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/inputest.c b/src/inputest.c index f490ab28..5e9297bc 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -31,7 +31,6 @@ main(int argc, char *argv[]) //extern struct inconfig inpu; testkeyin=0; testcontrolnoisy=1; - gfxtest=0; IN_Startup(); IN_Default(0,&player,ctrl_Joystick); //while(!IN_KeyDown(sc_Escape)) diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 546d3dbd..5e03e2f2 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -38,7 +38,7 @@ #include "src/lib/16_in.h" -byte testkeyin=0,testcontrolnoisy=0,gfxtest=0; +byte testkeyin=0,testcontrolnoisy=0; /* ============================================================================= @@ -854,6 +854,7 @@ register KeyboardDef *def; mx = motion_Left,my = motion_Down; else if (Keyboard[def->downright]) mx = motion_Right,my = motion_Down;*/ + if(DIRECTIONIFELSEGFXTEST) if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){ // if(testcontrolnoisy > 0){ printf("ud "); printf("%u ", inpu.Keyboard[def->up]); printf("%u ", inpu.Keyboard[def->down]);} if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]) || player[pn].pdir == 0) @@ -918,7 +919,7 @@ register KeyboardDef *def; player[pn].info.dir = DirTable[conpee]; //TODO: overwriting direction must be added - if(DIRECTIONIFELSEGFXTEST && player[pn].d != player[pn].info.dir) player[pn].pdir=DirTable[conpee]; + if(player[pn].d==2) player[pn].pdir=DirTable[conpee]; if(player[pn].q==1 && (mx!=motion_None || my!=motion_None)) { player[pn].d = player[pn].info.dir; @@ -951,7 +952,7 @@ register KeyboardDef *def; #endif //#ifdef TESTCONTROLNOISY if(testcontrolnoisy > 0) -if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right]) && NDIRECTIONIFELSEGFXTEST) +//if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right]) && NDIRECTIONIFELSEGFXTEST) { printf("q=%d ", player[pn].q); printf("cpee=%d ", conpee); diff --git a/src/lib/16_in.h b/src/lib/16_in.h index ad625ed1..9f900aa5 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -42,11 +42,12 @@ //#define TESTCONTROLNOISY #endif -extern byte testkeyin,testcontrolnoisy,gfxtest; +extern byte testkeyin,testcontrolnoisy; //if else for gfxtesting and direction -#define DIRECTIONIFELSEGFXTEST (player[pn].d == 2 || player[pn].info.dir == 2) -#define NDIRECTIONIFELSEGFXTEST (player[pn].d != 2 || player[pn].info.dir != 2) +//player[pn].d == 2 || +#define DIRECTIONIFELSEGFXTEST (player[pn].info.dir == 2) +//#define NDIRECTIONIFELSEGFXTEST (player[pn].d != 2 || player[pn].info.dir != 2) #define KeyInt 9 // The keyboard ISR number diff --git a/src/scroll.c b/src/scroll.c index 6fdee8a6..162ce8e3 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -64,7 +64,7 @@ void main(int argc, char *argv[]) if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; - testcontrolnoisy=1; + testcontrolnoisy=0; player[0].persist_aniframe=0; player[0].speed=4; -- 2.39.2