Game interface changes
This commit is contained in:
@@ -33,8 +33,6 @@ struct Camera
|
||||
private:
|
||||
float yaw;
|
||||
float pitch;
|
||||
// Spring arm transform
|
||||
Math::Transform relativeTransform;
|
||||
Matrix4 viewMatrix;
|
||||
Vector cameraPos;
|
||||
bool bNeedsViewBuild;
|
||||
|
||||
+1
-2
@@ -1,14 +1,13 @@
|
||||
#pragma once
|
||||
#include "Scene/Scene.h"
|
||||
#include "System/SystemGraph.h"
|
||||
#include "Asset/AssetRegistry.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
class Game
|
||||
{
|
||||
public:
|
||||
Game(AssetRegistry*) {}
|
||||
Game() {}
|
||||
virtual ~Game() {}
|
||||
virtual void setupScene(PScene scene, PSystemGraph graph) = 0;
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user