diff --git a/src/gamestate.hpp b/src/gamestate.hpp index cbee036..ec9e118 100755 --- a/src/gamestate.hpp +++ b/src/gamestate.hpp @@ -39,4 +39,6 @@ private: double average = 0; }; +inline std::unique_ptr g_pEngine; + #endif diff --git a/src/main.cpp b/src/main.cpp index a26a74d..cdf6822 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,9 @@ -#include "gamestate.hpp" - -int main(void) -{ - GameEngine game; - game.Start(); - return 0; -} +#include "gamestate.hpp" +#include + +int main(void) +{ + g_pEngine = std::make_unique(); + g_pEngine->Start(); + return 0; +}