2014-02-08 23:32:11 +00:00
|
|
|
#ifndef id8C7FE975525B4329BFBEAF364D934EAD
|
|
|
|
#define id8C7FE975525B4329BFBEAF364D934EAD
|
|
|
|
|
2014-02-11 23:27:55 +00:00
|
|
|
#include "path.hpp"
|
2014-02-08 23:32:11 +00:00
|
|
|
#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-11 23:27:55 +00:00
|
|
|
GameBase ( SDLMain* parSdlMain, const char* parBasePath );
|
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-11 23:27:55 +00:00
|
|
|
const Path m_path;
|
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
|