blob: ea8d899dddf7c3f05e2cca11942aad631b2c6f3c (
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
|
#ifndef APPLICATION_H
#define APPLICATION_H
#include <SDL/SDL.h>
class Application {
private:
SDL_Surface *surface;
bool please_quit;
protected:
void init_window(unsigned int w, unsigned int h, bool fs = false);
virtual void event(const SDL_Event& e);
virtual void event_keypress(SDLKey key);
virtual void update() = 0;
public:
Application();
virtual ~Application();
void run();
void quit();
};
#endif
|