diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-28 10:13:11 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-28 10:13:11 +0100 |
commit | 6fd7cec7d4bbf5aeb361b3f1337671bb0f9af61b (patch) | |
tree | 01f6977c66a1e07e07aae42358a7e1a4e55ef53c /src/crepe/system | |
parent | d1eed940b8119e95a14f1d08bf26184c7f0a0d8f (diff) |
manager mediator refactor
Diffstat (limited to 'src/crepe/system')
-rw-r--r-- | src/crepe/system/AnimatorSystem.cpp | 6 | ||||
-rw-r--r-- | src/crepe/system/ParticleSystem.cpp | 6 | ||||
-rw-r--r-- | src/crepe/system/PhysicsSystem.cpp | 2 | ||||
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 3 | ||||
-rw-r--r-- | src/crepe/system/ScriptSystem.cpp | 2 | ||||
-rw-r--r-- | src/crepe/system/System.cpp | 2 | ||||
-rw-r--r-- | src/crepe/system/System.h | 4 |
7 files changed, 13 insertions, 12 deletions
diff --git a/src/crepe/system/AnimatorSystem.cpp b/src/crepe/system/AnimatorSystem.cpp index 676e485..cdeac57 100644 --- a/src/crepe/system/AnimatorSystem.cpp +++ b/src/crepe/system/AnimatorSystem.cpp @@ -1,10 +1,10 @@ #include <cstdint> -#include "api/Animator.h" -#include "facade/SDLContext.h" +#include "../api/Animator.h" +#include "../facade/SDLContext.h" +#include "../manager/ComponentManager.h" #include "AnimatorSystem.h" -#include "ComponentManager.h" using namespace crepe; diff --git a/src/crepe/system/ParticleSystem.cpp b/src/crepe/system/ParticleSystem.cpp index 0e62a57..ebae56b 100644 --- a/src/crepe/system/ParticleSystem.cpp +++ b/src/crepe/system/ParticleSystem.cpp @@ -2,10 +2,10 @@ #include <cstdlib> #include <ctime> -#include "api/ParticleEmitter.h" -#include "api/Transform.h" +#include "../api/ParticleEmitter.h" +#include "../api/Transform.h" +#include "../manager/ComponentManager.h" -#include "ComponentManager.h" #include "ParticleSystem.h" using namespace crepe; diff --git a/src/crepe/system/PhysicsSystem.cpp b/src/crepe/system/PhysicsSystem.cpp index 514a4b3..071ca21 100644 --- a/src/crepe/system/PhysicsSystem.cpp +++ b/src/crepe/system/PhysicsSystem.cpp @@ -1,6 +1,6 @@ #include <cmath> -#include "../ComponentManager.h" +#include "../manager/ComponentManager.h" #include "../api/Config.h" #include "../api/Rigidbody.h" #include "../api/Transform.h" diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index ad510f5..6c65e10 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -2,11 +2,10 @@ #include <cassert> #include <cmath> #include <functional> -#include <iostream> #include <stdexcept> #include <vector> -#include "../ComponentManager.h" +#include "../manager/ComponentManager.h" #include "../api/ParticleEmitter.h" #include "../api/Sprite.h" #include "../api/Transform.h" diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp index 20a83f7..7ecbe78 100644 --- a/src/crepe/system/ScriptSystem.cpp +++ b/src/crepe/system/ScriptSystem.cpp @@ -1,4 +1,4 @@ -#include "../ComponentManager.h" +#include "../manager/ComponentManager.h" #include "../api/BehaviorScript.h" #include "../api/Script.h" diff --git a/src/crepe/system/System.cpp b/src/crepe/system/System.cpp index 937a423..392d920 100644 --- a/src/crepe/system/System.cpp +++ b/src/crepe/system/System.cpp @@ -4,4 +4,4 @@ using namespace crepe; -System::System(ComponentManager & mgr) : component_manager(mgr) { dbg_trace(); } +System::System(const Mediator & mediator) : component_manager(mediator.component_manager) { dbg_trace(); } diff --git a/src/crepe/system/System.h b/src/crepe/system/System.h index 28ea20e..92bfd50 100644 --- a/src/crepe/system/System.h +++ b/src/crepe/system/System.h @@ -1,5 +1,7 @@ #pragma once +#include "../manager/Mediator.h" + namespace crepe { class ComponentManager; @@ -19,7 +21,7 @@ public: virtual void update() = 0; public: - System(ComponentManager &); + System(const Mediator & m); virtual ~System() = default; protected: |