aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/AudioSystem.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-29 12:21:26 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-29 12:21:26 +0100
commitc2ef6a36532c8c078fd7836325d6be277b946cbf (patch)
treebcac24106220ad626aca5dfcd3576e7d60ac3af2 /src/crepe/system/AudioSystem.cpp
parent74bffd3e466c342ca80811146a536716fb6437cb (diff)
parent7a07c56d572a6f30d0aa611bd566197bc04c3b33 (diff)
merge `loek/scripts`
Diffstat (limited to 'src/crepe/system/AudioSystem.cpp')
-rw-r--r--src/crepe/system/AudioSystem.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp
index f90132a..97cf966 100644
--- a/src/crepe/system/AudioSystem.cpp
+++ b/src/crepe/system/AudioSystem.cpp
@@ -1,20 +1,23 @@
#include "AudioSystem.h"
-#include "ComponentManager.h"
#include "../api/AudioSource.h"
+#include "../manager/ComponentManager.h"
+#include "../manager/ResourceManager.h"
+#include "../types.h"
using namespace crepe;
using namespace std;
void AudioSystem::update() {
- ComponentManager & mgr = this->component_manager;
- vector<reference_wrapper<AudioSource>> components = mgr.get_components_by_type<AudioSource>();
+ ComponentManager & component_manager = this->mediator.component_manager;
+ ResourceManager & resource_manager = this->mediator.resource_manager;
+ RefVector<AudioSource> components = component_manager.get_components_by_type<AudioSource>();
for (auto component_ref : components) {
AudioSource & component = component_ref.get();
if (!component.active) continue;
- Sound & sound = this->resource_manager.get<Sound>(component.source);
+ Sound & sound = resource_manager.get<Sound>(component.source);
// TODO: lots of state diffing
}
}