summaryrefslogtreecommitdiff
path: root/engine/application.h
blob: b7fc36abd33abab641bf803e3780f19d9eb14f91 (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 <wriggle/shader.h>
#include <wriggle/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