summaryrefslogtreecommitdiffstats
path: root/src/Game.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-12-15 22:42:49 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-12-15 22:42:49 +0100
commita407f8b9edbc7a6e865b2daf65b2a6cd10edd2d7 (patch)
treec8b206f234b6a8f9070fc9b2a149aa5b9745883c /src/Game.h
parentd9f44af7aee41a111a3d7427d8735bc821f1824f (diff)
downloadzoom++-a407f8b9edbc7a6e865b2daf65b2a6cd10edd2d7.tar
zoom++-a407f8b9edbc7a6e865b2daf65b2a6cd10edd2d7.zip
Added movement controls
Diffstat (limited to 'src/Game.h')
-rw-r--r--src/Game.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/Game.h b/src/Game.h
index 0fe7233..a81c7f5 100644
--- a/src/Game.h
+++ b/src/Game.h
@@ -31,10 +31,22 @@ class Triangle;
class Game {
public:
+ enum Input {
+ NONE = 0,
+ FORWARD = (1 << 0),
+ BACKWARD = (1 << 1),
+ LEFT = (1 << 2),
+ RIGHT = (1 << 3)
+ };
+
Game(bool multisample);
bool loadLevel(const std::string &name);
+ void setInput(unsigned input) {
+ this->input = static_cast<Input>(input);
+ }
+
void run(int delta);
void render();
@@ -44,7 +56,11 @@ class Game {
boost::shared_ptr<Level> level;
std::vector<BSPTree::TriangleRecord> triangles;
- float angle;
+ vmml::vec3f playerPos;
+ vmml::mat4f playerRot;
+
+ Input input;
+
int lightPos;
};