Game interface changes

This commit is contained in:
Dynamitos
2024-01-05 21:16:36 +01:00
parent 1ff3ddf9a3
commit f17f05433f
6 changed files with 6 additions and 31 deletions
@@ -17,7 +17,7 @@ Game* GameInterface::getGame()
return game;
}
void GameInterface::reload(AssetRegistry* registry)
void GameInterface::reload()
{
if(lib != NULL)
{
@@ -27,5 +27,5 @@ void GameInterface::reload(AssetRegistry* registry)
lib = LoadLibraryA(dllPath.c_str());
createInstance = (decltype(createInstance))GetProcAddress(lib, "createInstance");
destroyInstance = (decltype(destroyInstance))GetProcAddress(lib, "destroyInstance");
game = createInstance(registry);
game = createInstance();
}
+2 -2
View File
@@ -10,12 +10,12 @@ public:
GameInterface(std::string dllPath);
~GameInterface();
Game* getGame();
void reload(AssetRegistry* registry);
void reload();
private:
HMODULE lib = NULL;
std::string dllPath;
Game* game;
Game* (*createInstance)(AssetRegistry*) = nullptr;
Game* (*createInstance)() = nullptr;
void (*destroyInstance)(Game*) = nullptr;
};
} // namespace Seele