Initial commit. Not even a game yet :P
[cToan.git] / tests / eventquit / main.cpp
blob2746c977d4b07347962e0dca0de6bb5859527521
1 #include "SDLWrap_SDLEngine.hpp"
2 #include "SDLWrap_Display.hpp"
3 #include "SDLWrap_EventHandler.hpp"
5 using namespace SDLWrap;
7 class Singleton : public EventHandler
9 public:
10 SDLEngine *engine;
11 Display *screen;
12 Singleton() {
13 engine = new SDLEngine(SDLEngine::EVERYTHING);
14 screen = new Display(640, 480, 0, Display::HWSURFACE | Display::DOUBLEBUF);
16 void OnQuit() { delete engine; delete screen; Running = false;}
17 bool Running;
20 int
21 main()
23 Singleton app;
24 app.Running = true;
26 while (app.Running) {
27 while (app.PollEvent()) {
28 app.HandleEvent();