From 267bebfc227c94f543a39e2aa75fb101bc06932e Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Fri, 21 May 2010 19:24:51 +0200 Subject: Moved engine-sources to seperate subdirectory. --- engine/application.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 engine/application.h (limited to 'engine/application.h') 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 +#include +#include + +#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 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 -- cgit v1.2.3