summaryrefslogtreecommitdiff
path: root/application.h
blob: 1378be6770be4b6743b1784f5307df5ef3e8b7c0 (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
43
#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* background;
		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