User can quit manually.

The program doesn't run for a fixed time anymore.
Instead it listens to events and user can quit by closing the window.
This commit is contained in:
King_DuckZ 2014-02-09 21:15:43 +01:00
parent fb92097419
commit 93a7796c5a
3 changed files with 37 additions and 2 deletions

View file

@ -10,6 +10,7 @@ namespace cloonel {
class GameBase {
public:
float Exec ( void );
bool WantsToQuit ( void ) const;
protected:
explicit GameBase ( SDLMain* parSdlMain );
@ -23,9 +24,11 @@ namespace cloonel {
private:
virtual void OnRender ( void ) = 0;
virtual void OnUpdate ( float parDelta ) = 0;
virtual bool ShouldQuit ( void ) const;
SDLMain* const m_sdlmain;
unsigned int m_time0;
bool m_wantsToQuit;
};
} //namespace cloonel