diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 3 | ||||
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index b56b5e7..4a0ac1a 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -118,8 +118,6 @@ void SDLContext::draw(const Sprite & sprite, const Transform & transform, const = (SDL_RendererFlip) ((SDL_FLIP_HORIZONTAL * sprite.flip.flip_x) | (SDL_FLIP_VERTICAL * sprite.flip.flip_y)); - sprite.sprite_image->texture.get(); - this->set_rbg_texture(sprite.sprite_image, sprite.color.r, sprite.color.g, sprite.color.b); this->set_alpha_texture(sprite.sprite_image, sprite.color.a); @@ -135,7 +133,6 @@ void SDLContext::draw(const Sprite & sprite, const Transform & transform, const .h = sprite.sprite_rect.h, }; - SDL_Rect dstrect = { .x = static_cast<int>(adjusted_x), .y = static_cast<int>(adjusted_y), diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index 4abd9bd..0a2b85e 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -3,11 +3,11 @@ #include <vector> #include "../ComponentManager.h" +#include "../api/ParticleEmitter.h" #include "../api/Sprite.h" #include "../api/Transform.h" -#include "../facade/SDLContext.h" -#include "../api/ParticleEmitter.h" #include "../api/Vector2.h" +#include "../facade/SDLContext.h" #include "RenderSystem.h" @@ -27,8 +27,7 @@ void RenderSystem::update_camera() { } } -bool RenderSystem::render_particle(const Sprite & sprite, - Transform tm) { +bool RenderSystem::render_particle(const Sprite & sprite, Transform tm) { ComponentManager & mgr = this->component_manager; SDLContext & render = SDLContext::get_instance(); @@ -56,7 +55,7 @@ void RenderSystem::render_normal(const Sprite & sprite, const Transform & tm) { ComponentManager & mgr = this->component_manager; SDLContext & render = SDLContext::get_instance(); - + render.draw(sprite, tm, *curr_cam); } |