aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/Mediator.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-08 14:29:25 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-08 14:29:25 +0100
commit63bcd54e0e0ea64cfef5950568b4253d5dae5c1e (patch)
tree24f1f251259ca46566a4694b765dc4e99ee264ab /src/crepe/manager/Mediator.h
parent5c3ce63558f2d5dec06a124773f910d783bb22aa (diff)
removed singleton from SDLContext, problem now is cannot call functionalities in the constructor sprite and animator and texture because it can only be filled at rendersystem call
Diffstat (limited to 'src/crepe/manager/Mediator.h')
-rw-r--r--src/crepe/manager/Mediator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/manager/Mediator.h b/src/crepe/manager/Mediator.h
index ba0b41f..6a9e113 100644
--- a/src/crepe/manager/Mediator.h
+++ b/src/crepe/manager/Mediator.h
@@ -3,7 +3,6 @@
#include "../util/OptionalRef.h"
// TODO: remove these singletons:
-#include "../facade/SDLContext.h"
#include "EventManager.h"
#include "SaveManager.h"
#include "api/LoopTimer.h"
@@ -13,6 +12,7 @@ namespace crepe {
class ComponentManager;
class SceneManager;
class ResourceManager;
+class SDLContext;
/**
* Struct to pass references to classes that would otherwise need to be singletons down to
@@ -27,12 +27,12 @@ class ResourceManager;
* \warning This class should never be directly accessible from the API
*/
struct Mediator {
+ OptionalRef<SDLContext> sdl_context;
OptionalRef<ComponentManager> component_manager;
OptionalRef<SceneManager> scene_manager;
OptionalRef<SaveManager> save_manager = SaveManager::get_instance();
OptionalRef<EventManager> event_manager = EventManager::get_instance();
OptionalRef<ResourceManager> resource_manager;
- OptionalRef<SDLContext> sdl_context = SDLContext::get_instance();
OptionalRef<LoopTimer> timer = LoopTimer::get_instance();
};