2014-02-08 23:32:11 +00:00
|
|
|
#ifndef id8C7FE975525B4329BFBEAF364D934EAD
|
|
|
|
#define id8C7FE975525B4329BFBEAF364D934EAD
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace cloonel {
|
|
|
|
class SDLMain;
|
|
|
|
class Texture;
|
|
|
|
|
|
|
|
class GameBase {
|
|
|
|
public:
|
2014-02-09 00:19:40 +00:00
|
|
|
float Exec ( void );
|
2014-02-09 20:15:43 +00:00
|
|
|
bool WantsToQuit ( void ) const;
|
2014-02-08 23:32:11 +00:00
|
|
|
|
|
|
|
protected:
|
2014-02-12 23:01:29 +00:00
|
|
|
explicit GameBase ( SDLMain* parSdlMain );
|
2014-02-08 23:32:11 +00:00
|
|
|
virtual ~GameBase ( void ) noexcept;
|
|
|
|
|
|
|
|
virtual void Prepare ( void ) = 0;
|
|
|
|
virtual void Destroy ( void ) noexcept = 0;
|
|
|
|
|
2014-02-21 20:51:56 +00:00
|
|
|
SDLMain* SDLObject ( void ) { return m_sdlmain; }
|
|
|
|
|
2014-02-08 23:32:11 +00:00
|
|
|
private:
|
|
|
|
virtual void OnRender ( void ) = 0;
|
2014-02-09 00:19:40 +00:00
|
|
|
virtual void OnUpdate ( float parDelta ) = 0;
|
2014-02-09 20:15:43 +00:00
|
|
|
virtual bool ShouldQuit ( void ) const;
|
2014-02-08 23:32:11 +00:00
|
|
|
|
|
|
|
SDLMain* const m_sdlmain;
|
2014-02-09 00:19:40 +00:00
|
|
|
unsigned int m_time0;
|
2014-02-09 20:15:43 +00:00
|
|
|
bool m_wantsToQuit;
|
2014-02-08 23:32:11 +00:00
|
|
|
};
|
|
|
|
} //namespace cloonel
|
|
|
|
|
|
|
|
#endif
|