aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/facade/SDLContext.cpp2
-rw-r--r--src/crepe/system/RenderSystem.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index c4c96e2..e87a2c5 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -159,7 +159,7 @@ SDLContext::texture_from_path(const std::string & path) {
SDL_Surface * tmp = IMG_Load(path.c_str());
if (tmp == nullptr) {
- throw Exception("surface cannot be load from %s", path.c_str());
+ tmp = IMG_Load("../asset/texture/ERROR.png");
}
std::unique_ptr<SDL_Surface, std::function<void(SDL_Surface *)>>
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index 10211a3..3a1def5 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -6,6 +6,7 @@
#include "../api/Transform.h"
#include "../facade/SDLContext.h"
#include "../util/log.h"
+#include "api/ParticleEmitter.h"
#include "RenderSystem.h"
@@ -42,8 +43,7 @@ void RenderSystem::render_sprites() const {
ComponentManager & mgr = ComponentManager::get_instance();
- std::vector<std::reference_wrapper<Sprite>> sprites
- = mgr.get_components_by_type<Sprite>();
+ auto sprites = mgr.get_components_by_type<Sprite>();
SDLContext & render = SDLContext::get_instance();
for (const Sprite & sprite : sprites) {