aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-09-12 16:05:15 -0400
committerClyne Sullivan <tullivan99@gmail.com>2015-09-12 16:05:15 -0400
commitd68b30ee201579e06f050a9448e4dcf883860064 (patch)
tree1243a177a7667debd186ca9b44da979a439ce4d4 /src
parentec1a918b845457b4d578f4d31257b989b5de3d42 (diff)
fexid
Diffstat (limited to 'src')
-rw-r--r--src/UIClass.cpp4
-rw-r--r--src/main.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/UIClass.cpp b/src/UIClass.cpp
index 319db5c..318ba00 100644
--- a/src/UIClass.cpp
+++ b/src/UIClass.cpp
@@ -17,6 +17,8 @@ void UIClass::handleEvents(){
if(e.key.keysym.sym == SDLK_d) player.right = true;
if(e.key.keysym.sym == SDLK_a) player.left = true;
if(e.key.keysym.sym == SDLK_SPACE) player.loc.y += 10;
+ if(e.key.keysym.sym == SDLK_i)if(currentWorld->behind) currentWorld=currentWorld->behind;
+ if(e.key.keysym.sym == SDLK_k)if(currentWorld->infront)currentWorld=currentWorld->infront;
break;
case SDL_KEYUP:
if(e.key.keysym.sym == SDLK_d) player.right = false;
@@ -25,4 +27,4 @@ void UIClass::handleEvents(){
break;
}
}
-} \ No newline at end of file
+}
diff --git a/src/main.cpp b/src/main.cpp
index 674acea..3e8d04f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -132,7 +132,7 @@ int main(int argc,char **argv){
prevTime = SDL_GetTicks();
}
- player.loc.x += player.vel.x * (deltaTime / 2); //update the player's x based on
+ player.loc.x += player.vel.x*deltaTime; //update the player's x based on
gw=currentWorld->getWidth();
if(player.loc.x+player.width>-1+gw){