aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-08 19:49:41 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-08 19:49:41 +0100
commit519cc5d16e65ff501d330c03eeb35d2d095ead29 (patch)
tree3c7c3a64c922ec248f4136d1282530a6ec6647ac /src/crepe/system
parent63bcd54e0e0ea64cfef5950568b4253d5dae5c1e (diff)
made sdlcontext not a singleton anymore
Diffstat (limited to 'src/crepe/system')
-rw-r--r--src/crepe/system/InputSystem.cpp1
-rw-r--r--src/crepe/system/RenderSystem.cpp5
-rw-r--r--src/crepe/system/ScriptSystem.cpp2
3 files changed, 2 insertions, 6 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index b36ec09..a710ae2 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -9,7 +9,6 @@
using namespace crepe;
void InputSystem::update() {
- dbg_trace();
ComponentManager & mgr = this->mediator.component_manager;
EventManager & event_mgr = this->mediator.event_manager;
SDLContext & context = this->mediator.sdl_context;
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index d81d8dd..daf71c5 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -13,8 +13,6 @@
#include "../manager/ComponentManager.h"
#include "api/Texture.h"
#include "manager/ResourceManager.h"
-#include "util/Log.h"
-
#include "RenderSystem.h"
using namespace crepe;
@@ -65,7 +63,6 @@ RefVector<Sprite> RenderSystem::sort(RefVector<Sprite> & objs) const {
}
void RenderSystem::update() {
- dbg_trace();
this->clear_screen();
this->render();
this->present_screen();
@@ -108,7 +105,7 @@ void RenderSystem::render_normal(const Sprite & sprite, const SDLContext::Camera
const Transform & tm) {
SDLContext & ctx = this->mediator.sdl_context;
ResourceManager & resource_manager = this->mediator.resource_manager;
- Texture & res = resource_manager.get<Texture>(sprite.source);
+ const Texture & res = resource_manager.get<Texture>(sprite.source);
ctx.draw(SDLContext::RenderContext{
.sprite = sprite,
diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp
index d6b2ca1..df358e6 100644
--- a/src/crepe/system/ScriptSystem.cpp
+++ b/src/crepe/system/ScriptSystem.cpp
@@ -8,7 +8,7 @@ using namespace std;
using namespace crepe;
void ScriptSystem::update() {
- dbg_trace();
+ //dbg_trace();
ComponentManager & mgr = this->mediator.component_manager;
RefVector<BehaviorScript> behavior_scripts = mgr.get_components_by_type<BehaviorScript>();