diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-05-17 17:56:38 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-05-17 17:56:38 +0200 |
commit | f78606b6391b282426a73016fff9541320d4994b (patch) | |
tree | 769ecef93c22bd0381bfd704e4995b403cb96664 /application.h | |
parent | 8bd8089c1e7ca92401e829d28819a35c3061ebd9 (diff) |
Added Application-class.
Diffstat (limited to 'application.h')
-rw-r--r-- | application.h | 41 |
1 files changed, 41 insertions, 0 deletions
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 <SDL/SDL.h> +#include <FTGL/ftgl.h> +#include <vector> + +#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<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 |