From a2b67f879e2073c5b094c9a480bf637c98703001 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 11 Dec 2024 18:42:38 +0100 Subject: example working again --- src/crepe/api/LoopManager.h | 5 ++++- src/crepe/manager/Mediator.h | 2 ++ src/crepe/manager/ReplayManager.cpp | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) (limited to 'src/crepe') diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index 28aa423..f34a5a0 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -2,13 +2,14 @@ #include "../facade/SDLContext.h" #include "../manager/ComponentManager.h" +#include "../manager/ReplayManager.h" +#include "../manager/ResourceManager.h" #include "../manager/ResourceManager.h" #include "../manager/SaveManager.h" #include "../manager/SceneManager.h" #include "../system/System.h" #include "LoopTimer.h" -#include "manager/ResourceManager.h" namespace crepe { @@ -76,6 +77,8 @@ private: SDLContext sdl_context{mediator}; //! LoopTimer instance LoopTimer loop_timer{mediator}; + //! ReplayManager instance + ReplayManager replay_manager{mediator}; private: /** diff --git a/src/crepe/manager/Mediator.h b/src/crepe/manager/Mediator.h index 628154a..eef4432 100644 --- a/src/crepe/manager/Mediator.h +++ b/src/crepe/manager/Mediator.h @@ -13,6 +13,7 @@ class SaveManager; class ResourceManager; class SDLContext; class LoopTimer; +class ReplayManager; /** * Struct to pass references to classes that would otherwise need to be singletons down to @@ -34,6 +35,7 @@ struct Mediator { OptionalRef event_manager = EventManager::get_instance(); OptionalRef resource_manager; OptionalRef timer; + OptionalRef replay_manager; }; } // namespace crepe diff --git a/src/crepe/manager/ReplayManager.cpp b/src/crepe/manager/ReplayManager.cpp index 3643a8e..40d34a4 100644 --- a/src/crepe/manager/ReplayManager.cpp +++ b/src/crepe/manager/ReplayManager.cpp @@ -4,5 +4,22 @@ using namespace crepe; ReplayManager::ReplayManager(Mediator & mediator) : Manager(mediator) { + mediator.replay_manager = *this; +} + +void ReplayManager::record_start() { + +} + +recording_t ReplayManager::record_end() { + return 0; +} + +void ReplayManager::play(recording_t handle) { + +} + +void ReplayManager::release(recording_t handle) { + } -- cgit v1.2.3