diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-10-05 08:17:13 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-10-05 08:17:13 -0400 |
commit | e5f462d5aad10cead4fee310792d8d893d1cd918 (patch) | |
tree | 01771259ce20b88f448e7d5978f9ec8ff575b938 /src/ui.cpp | |
parent | 9c7af916fce7252ee0608be8c918b0378249c832 (diff) |
ROTATIONZ
Diffstat (limited to 'src/ui.cpp')
-rw-r--r-- | src/ui.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -12,12 +12,12 @@ static FT_Library ftl; // Variables for the FreeType library and stuff static FT_Face ftf; static GLuint ftex; -static bool dialogBoxExists=false; static char *dialogBoxText; namespace ui { vec2 mouse; bool debug=false; + bool dialogBoxExists=false; unsigned int fontSize; /* * initFonts(), setFontFace(), and setFontSize() are pretty self-explanatory @@ -184,6 +184,7 @@ namespace ui { */ case SDL_KEYDOWN: if(SDL_KEY==SDLK_ESCAPE)gameRunning=false; // Exit the game with ESC + if(!dialogBoxExists){ if(SDL_KEY==SDLK_a){ // Move left left=true; player->vel.x=-.15; @@ -212,8 +213,9 @@ namespace ui { } if(SDL_KEY==SDLK_i)currentWorld=currentWorld->goWorldBack(player); // Go back a layer if possible if(SDL_KEY==SDLK_k)currentWorld=currentWorld->goWorldFront(player); // Go forward a layer if possible + if(SDL_KEY==SDLK_LSHIFT)player->speed = 3; // Sprint + } if(SDL_KEY==SDLK_F3)debug^=true; - if(SDL_KEY==SDLK_LSHIFT)player->speed = 3; break; /* KEYUP |