From a407f8b9edbc7a6e865b2daf65b2a6cd10edd2d7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 15 Dec 2009 22:42:49 +0100 Subject: Added movement controls --- src/Game.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/Game.h') 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); + } + void run(int delta); void render(); @@ -44,7 +56,11 @@ class Game { boost::shared_ptr level; std::vector triangles; - float angle; + vmml::vec3f playerPos; + vmml::mat4f playerRot; + + Input input; + int lightPos; }; -- cgit v1.2.3