summaryrefslogtreecommitdiff
path: root/application.h
blob: e40af07bfd1cfe727ea462da4f500097a915a4ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#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 lasttick;
		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