2023-11-06 14:47:21 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "Game.h"
|
|
|
|
|
#include "dlfcn.h"
|
|
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
namespace Seele {
|
|
|
|
|
class GameInterface {
|
|
|
|
|
public:
|
2023-11-06 14:47:21 +01:00
|
|
|
GameInterface(std::string soPath);
|
|
|
|
|
~GameInterface();
|
|
|
|
|
Game* getGame();
|
2024-01-16 19:24:49 +01:00
|
|
|
void reload();
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-11-06 14:47:21 +01:00
|
|
|
void* lib;
|
|
|
|
|
std::string soPath;
|
|
|
|
|
Game* game;
|
2024-01-16 19:24:49 +01:00
|
|
|
Game* (*createInstance)() = nullptr;
|
2023-11-06 14:47:21 +01:00
|
|
|
void (*destroyInstance)(Game*) = nullptr;
|
|
|
|
|
};
|
|
|
|
|
} // namespace Seele
|