aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-01-13 07:31:16 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-01-13 07:31:16 -0500
commit23a4b0cc3ab09d58127a73b12c43aff37e5056ef (patch)
tree0e7d2f923311804c6a9e4270812174de45f2f7d2 /src/ui.cpp
parent1574754cdaca14d68459cc520b63b6b3c449ecbd (diff)
Fire Pit
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index 0d01033..4212307 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -825,6 +825,25 @@ DONE:
case SDLK_g:
currentWorld->addStructure(LAMP_POST, player->loc.x, player->loc.y, currentWorld);
break;
+ case SDLK_h:
+ currentWorld->addStructure(TOWN_HALL, player->loc.x, player->loc.y, currentWorld);
+ break;
+ case SDLK_j:
+ currentWorld->addStructure(FOUNTAIN, player->loc.x, player->loc.y, currentWorld);
+ break;
+ case SDLK_v:
+ currentWorld->addVillage(player->loc.x, player->loc.y, 5, 10, 100, currentWorld);
+ break;
+ case SDLK_b:
+ currentWorld->addStructure(FIRE_PIT, player->loc.x, player->loc.y, currentWorld);
+ break;
+ case SDLK_F12:
+ std::cout << "Took screenshot" << std::endl;
+ // Make the BYTE array, factor of 3 because it's RBG.
+ static GLubyte* pixels = new GLubyte[ 3 * SCREEN_WIDTH * SCREEN_HEIGHT];
+ glReadPixels(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, pixels);
+
+ break;
default:
break;
}