From: sparky4 Date: Sun, 13 Mar 2016 03:07:43 +0000 (-0600) Subject: inputest manipulates d and q like scroll.exe X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=0004dc99fabef783aacb99f55e315d2df0d44e9d;p=16.git inputest manipulates d and q like scroll.exe --- diff --git a/src/inputest.c b/src/inputest.c index c0c3792e..f490ab28 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2015 sparky4 & 0gwen & andrius4669 * * This file is part of Project 16. * @@ -35,9 +35,52 @@ main(int argc, char *argv[]) IN_Startup(); IN_Default(0,&player,ctrl_Joystick); //while(!IN_KeyDown(sc_Escape)) + player[0].q=1; + player[0].d=2; + player[0].persist_aniframe=0; + player[0].speed=4; while(!IN_KeyDown(sc_Escape)) { + #define INC_PER_FRAME if(player[0].q&1) player[0].persist_aniframe++; if(player[0].persist_aniframe>4) player[0].persist_aniframe = 1; IN_ReadControl(0,&player); + switch(player[0].d) + { + //right movement + case 3: + if(player[0].q<=(TILEWH/(player[0].speed))) + { + INC_PER_FRAME; + player[0].q++; + } else { player[0].q = 1; player[0].d = 2; } + break; + + //left movement + case 1: + if(player[0].q<=(TILEWH/(player[0].speed))) + { + INC_PER_FRAME; + player[0].q++; + } else { player[0].q = 1; player[0].d = 2; } + break; + + //down movement + case 4: + if(player[0].q<=(TILEWH/(player[0].speed))) + { + INC_PER_FRAME; + player[0].q++; + } else { player[0].q = 1; player[0].d = 2; } + break; + + //up movement + case 0: + if(player[0].q<=(TILEWH/(player[0].speed))) + { + INC_PER_FRAME; + player[0].q++; + } else { player[0].q = 1; player[0].d = 2; } + break; + } //printf("%u\n", IN_KeyDown(sc_Escape)); //if( IN_qb(sc_9);//>0) printf("IN_qb(sc_9)=%u\n", IN_qb(sc_9)); diff --git a/src/scroll.c b/src/scroll.c index 4b9e9ba5..6fdee8a6 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -65,7 +65,6 @@ void main(int argc, char *argv[]) else bakapee = 1; testcontrolnoisy=1; - gfxtest=1; player[0].persist_aniframe=0; player[0].speed=4;