From f78606b6391b282426a73016fff9541320d4994b Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 17 May 2010 17:56:38 +0200 Subject: Added Application-class. --- application.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 application.h (limited to 'application.h') diff --git a/application.h b/application.h new file mode 100644 index 0000000..c9867b8 --- /dev/null +++ b/application.h @@ -0,0 +1,41 @@ +#ifndef APPLICATION_H +#define APPLICATION_H + +#include +#include +#include + +#include "bulletpattern.h" +#include "shader.h" +#include "texture.h" + +class Application { + private: + SDL_Surface *surface; + bool please_quit; + + bool paused; + unsigned int elapsed; + unsigned int frames; + unsigned int lastframes; + float fps; + + FTFont* font; + Texture* texture; + GLShaderProgram* shader; + + 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