diff options
Diffstat (limited to 'src/crepe/manager')
-rw-r--r-- | src/crepe/manager/ComponentManager.cpp | 1 | ||||
-rw-r--r-- | src/crepe/manager/ReplayManager.cpp | 10 | ||||
-rw-r--r-- | src/crepe/manager/ReplayManager.h | 5 | ||||
-rw-r--r-- | src/crepe/manager/SystemManager.cpp | 5 | ||||
-rw-r--r-- | src/crepe/manager/SystemManager.h | 2 | ||||
-rw-r--r-- | src/crepe/manager/SystemManager.hpp | 7 |
6 files changed, 13 insertions, 17 deletions
diff --git a/src/crepe/manager/ComponentManager.cpp b/src/crepe/manager/ComponentManager.cpp index bc104d3..745ddae 100644 --- a/src/crepe/manager/ComponentManager.cpp +++ b/src/crepe/manager/ComponentManager.cpp @@ -97,4 +97,3 @@ void ComponentManager::restore(const Snapshot & snapshot) { this->components[info.type][info.id][info.index]->restore(*info.component); } } - diff --git a/src/crepe/manager/ReplayManager.cpp b/src/crepe/manager/ReplayManager.cpp index db6acb0..090a94e 100644 --- a/src/crepe/manager/ReplayManager.cpp +++ b/src/crepe/manager/ReplayManager.cpp @@ -1,7 +1,7 @@ #include <format> -#include "ReplayManager.h" #include "Manager.h" +#include "ReplayManager.h" using namespace crepe; using namespace std; @@ -32,8 +32,7 @@ void ReplayManager::play(recording_t handle) { } void ReplayManager::release(recording_t handle) { - if (!this->memory.contains(handle)) - return; + if (!this->memory.contains(handle)) return; this->memory.erase(handle); } @@ -68,7 +67,4 @@ bool ReplayManager::frame_step() { return true; } -ReplayManager::State ReplayManager::get_state() const { - return this->state; -} - +ReplayManager::State ReplayManager::get_state() const { return this->state; } diff --git a/src/crepe/manager/ReplayManager.h b/src/crepe/manager/ReplayManager.h index d3af879..ab15b27 100644 --- a/src/crepe/manager/ReplayManager.h +++ b/src/crepe/manager/ReplayManager.h @@ -2,8 +2,8 @@ #include <unordered_map> -#include "Manager.h" #include "ComponentManager.h" +#include "Manager.h" #include "util/OptionalRef.h" namespace crepe { @@ -19,6 +19,7 @@ typedef size_t recording_t; */ class ReplayManager : public Manager { // TODO: Delete recordings at end of scene + public: ReplayManager(Mediator & mediator); @@ -40,7 +41,7 @@ public: * \param handle Handle to recording (as returned by \c record_end()) */ void release(recording_t handle); - + public: //! Internal state enum State { diff --git a/src/crepe/manager/SystemManager.cpp b/src/crepe/manager/SystemManager.cpp index f67e786..5ada30f 100644 --- a/src/crepe/manager/SystemManager.cpp +++ b/src/crepe/manager/SystemManager.cpp @@ -2,13 +2,13 @@ #include "../system/AnimatorSystem.h" #include "../system/AudioSystem.h" #include "../system/CollisionSystem.h" +#include "../system/EventSystem.h" #include "../system/InputSystem.h" #include "../system/ParticleSystem.h" #include "../system/PhysicsSystem.h" #include "../system/RenderSystem.h" -#include "../system/ScriptSystem.h" -#include "../system/EventSystem.h" #include "../system/ReplaySystem.h" +#include "../system/ScriptSystem.h" #include "SystemManager.h" @@ -64,4 +64,3 @@ void SystemManager::disable_all() { system->active = false; } } - diff --git a/src/crepe/manager/SystemManager.h b/src/crepe/manager/SystemManager.h index a47961b..50acf77 100644 --- a/src/crepe/manager/SystemManager.h +++ b/src/crepe/manager/SystemManager.h @@ -1,8 +1,8 @@ #pragma once +#include <memory> #include <typeindex> #include <unordered_map> -#include <memory> #include "../system/System.h" diff --git a/src/crepe/manager/SystemManager.hpp b/src/crepe/manager/SystemManager.hpp index 46ada5f..3d26e4c 100644 --- a/src/crepe/manager/SystemManager.hpp +++ b/src/crepe/manager/SystemManager.hpp @@ -1,8 +1,8 @@ #pragma once -#include <memory> #include <cassert> #include <format> +#include <memory> #include "SystemManager.h" @@ -11,7 +11,8 @@ namespace crepe { template <class T> T & SystemManager::get_system() { using namespace std; - static_assert(is_base_of<System, T>::value, "get_system must recieve a derivative class of System"); + static_assert(is_base_of<System, T>::value, + "get_system must recieve a derivative class of System"); const type_info & type = typeid(T); if (!this->systems.contains(type)) @@ -28,7 +29,7 @@ template <class T> void SystemManager::load_system() { using namespace std; static_assert(is_base_of<System, T>::value, - "load_system must recieve a derivative class of System"); + "load_system must recieve a derivative class of System"); const type_info & type = typeid(T); if (this->systems.contains(type)) |