diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-05-21 19:24:51 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-05-21 19:24:51 +0200 |
commit | 267bebfc227c94f543a39e2aa75fb101bc06932e (patch) | |
tree | 40ad8057634ba80aa19c61f57884982fd59f6b56 /engine/application.h | |
parent | 88b1e9e505dad78fd2c3ff927495d322b11491ca (diff) |
Moved engine-sources to seperate subdirectory.
Diffstat (limited to 'engine/application.h')
-rw-r--r-- | engine/application.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/engine/application.h b/engine/application.h new file mode 100644 index 0000000..4bf9251 --- /dev/null +++ b/engine/application.h @@ -0,0 +1,45 @@ +#ifndef APPLICATION_H +#define APPLICATION_H + +#include <SDL/SDL.h> +#include <FTGL/ftgl.h> +#include <vector> + +#include "bulletpattern.h" +#include "shader.h" +#include "texture.h" +#include "player.h" + +class Application { + private: + SDL_Surface *surface; + bool please_quit; + + bool paused; + unsigned int lasttick; + unsigned int elapsed; + unsigned int frames; + unsigned int lastframes; + float fps; + + FTFont* font; + Texture* background; + Texture* texture; + GLShaderProgram* shader; + Player *player; + + std::vector<BulletPattern*> patterns; + + public: + Application(); + ~Application(); + void run(); + void quit(); + + protected: + virtual void event_keypress(SDLKey key); + + void main_loop(unsigned int tick, unsigned int step); +}; + +#endif |