summaryrefslogtreecommitdiff
path: root/engine/application.h
blob: 3f58f871bff4d486f8328f51f2960b0fac315cdb (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 "stage.h"

#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 frames;
		unsigned int lastframes;
		float fps;
		
		FTFont* font;
		Texture* background;
		
	public:	
		Stage* stage;
		
		Application();
		~Application();
		void run();
		void quit();
	
	protected:
		virtual void event_keypress(SDLKey key);
		
		void main_loop(unsigned int tick);
};

#endif