aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gameplay.cpp7
-rw-r--r--src/ui.cpp4
-rw-r--r--src/world.cpp6
3 files changed, 7 insertions, 10 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 9e0cc99..964794f 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -35,12 +35,7 @@ void initEverything(void){
*/
World *test=new World();
- test->generate(SCREEN_WIDTH);
-
- /*
- * Add two layers, a platform, and a hole to the world.
- */
-
+ test->generate(SCREEN_WIDTH * 2);
test->addLayer(400);
test->addPlatform(150,100,100,10);
diff --git a/src/ui.cpp b/src/ui.cpp
index 5d6c2ab..91da2e9 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -19,6 +19,7 @@ static char *dialogBoxText;
namespace ui {
vec2 mouse;
bool debug=false;
+ bool posFlag=false;
bool dialogBoxExists=false;
unsigned int fontSize;
@@ -264,10 +265,11 @@ namespace ui {
if(SDL_KEY==SDLK_c){
dialogBox("","You pressed `c`, but nothing happened.");
}
- if(SDL_KEY==SDLK_LSHIFT)player->speed = 3; // Sprint
+ if(SDL_KEY==SDLK_LSHIFT)player->speed = debug?4:3; // Sprint
if(SDL_KEY==SDLK_LCTRL)player->speed = .5;
}
if(SDL_KEY==SDLK_F3)debug^=true;
+ if(SDL_KEY==SDLK_b & SDL_KEY==SDLK_F3)posFlag^=true;
break;
/*
KEYUP
diff --git a/src/world.cpp b/src/world.cpp
index 599b1ef..641dbf9 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -222,7 +222,7 @@ LOOP2:
* Invert shading if desired.
*/
- //shade*=-1;
+ shade*=-1;
/*
* Draw structures in the current layer if we're on the one we started at. We draw
@@ -369,7 +369,7 @@ LOOP2:
* Restore the inverted shading if it was inverted above.
*/
- //shade*=-1;
+ shade*=-1;
/*
* Draw platforms...
@@ -602,7 +602,7 @@ void World::addHole(unsigned int start,unsigned int end){
}
int World::getTheWidth(void){
- return x_start*2;
+ return -x_start*2;
}
IndoorWorld::IndoorWorld(void){