summaryrefslogtreecommitdiff
path: root/application.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2010-05-17 17:56:38 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2010-05-17 17:56:38 +0200
commitf78606b6391b282426a73016fff9541320d4994b (patch)
tree769ecef93c22bd0381bfd704e4995b403cb96664 /application.h
parent8bd8089c1e7ca92401e829d28819a35c3061ebd9 (diff)
Added Application-class.
Diffstat (limited to 'application.h')
-rw-r--r--application.h41
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