clooneljump/src/gamebase.hpp

37 lines
731 B
C++
Raw Normal View History

#ifndef id8C7FE975525B4329BFBEAF364D934EAD
#define id8C7FE975525B4329BFBEAF364D934EAD
#include "path.hpp"
#include <memory>
namespace cloonel {
class SDLMain;
class Texture;
class GameBase {
public:
float Exec ( void );
bool WantsToQuit ( void ) const;
protected:
GameBase ( SDLMain* parSdlMain, const char* parBasePath );
virtual ~GameBase ( void ) noexcept;
virtual void Prepare ( void ) = 0;
virtual void Destroy ( void ) noexcept = 0;
const Path m_path;
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
#endif