clooneljump/src/gamebase.hpp

36 lines
738 B
C++
Raw Normal View History

#ifndef id8C7FE975525B4329BFBEAF364D934EAD
#define id8C7FE975525B4329BFBEAF364D934EAD
#include <memory>
namespace cloonel {
class SDLMain;
class Texture;
class GameBase {
public:
float Exec ( void );
bool WantsToQuit ( void ) const;
protected:
explicit GameBase ( SDLMain* parSdlMain );
virtual ~GameBase ( void ) noexcept;
virtual void Prepare ( void ) = 0;
virtual void Destroy ( void ) noexcept = 0;
std::unique_ptr<Texture> LoadTexture ( const char* parPath );
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