summaryrefslogtreecommitdiff
path: root/engine/application.h
diff options
context:
space:
mode:
Diffstat (limited to 'engine/application.h')
-rw-r--r--engine/application.h45
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