Fixed all my pointers

This commit is contained in:
2022-10-19 19:44:47 -07:00
parent f0cbae4cf8
commit acc9d798cb
31 changed files with 289 additions and 141 deletions

View File

@ -15,22 +15,17 @@
namespace Dawn {
class DawnHost;
class DawnGame :
public std::enable_shared_from_this<DawnGame>
{
private:
std::shared_ptr<Scene> scene;
class DawnGame {
public:
std::weak_ptr<DawnHost> host;
std::shared_ptr<Scene> scene;
DawnHost &host;
RenderManager renderManager;
/**
* Construct a new instance of the DawnGame.
*
* @param host Weak pointer to the host that is running this game.
*/
DawnGame(std::weak_ptr<DawnHost> host);
DawnGame(DawnHost &host);
/**
* Initialize the game. This is performed by the host at a time that is
@ -38,6 +33,7 @@ namespace Dawn {
* return an initialize result, where DAWN_GAME_INIT_RESULT_SUCCESS is
* the only "successful" result, anything else is deemed a failure state.
*
* @param host Pointer to the host that is running this game.
* @return The game initialize result.
*/
int32_t init();