Skip to content

Commit

Permalink
BLUGA-GRAPHICS: Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Nov 1, 2023
1 parent 4951c1b commit 99f6aea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

#pragma once

namespace Raylib {
namespace Systems {
constexpr float denominator = 100.0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "B-luga/Logger.hpp"
#include "B-luga/Maths/Maths.hpp"
#include "B-luga-graphics/SharedValues.hpp"
#include "B-luga-graphics/Raylib.hpp"
#include "B-luga-graphics/Raylib/Raylib.hpp"

namespace Systems {
namespace GraphicsSystems {
Expand Down Expand Up @@ -159,16 +159,16 @@ namespace Systems {
static void renderEntityList(std::vector<std::size_t> list)
{
Registry &registry = Registry::getInstance();
Registry::components<Raylib::Sprite> arrSprite = registry.getComponents<Raylib::Sprite>();
Registry::components<Raylib::SpriteShared> arrSprite = registry.getComponents<Raylib::SpriteShared>();
Registry::components<Types::Rect> arrRect = registry.getComponents<Types::Rect>();
Registry::components<Types::Position> arrPosition = registry.getComponents<Types::Position>();

for (auto id : list) {
if (arrPosition.exist(id) && arrSprite.exist(id)) {
if (arrRect.exist(id)) {
drawSpriteWithRect(arrPosition[id], arrSprite[id], arrRect[id], id);
drawSpriteWithRect(arrPosition[id], *arrSprite[id], arrRect[id], id);
} else {
drawSpriteWithoutRect(arrPosition[id], arrSprite[id], id);
drawSpriteWithoutRect(arrPosition[id], *arrSprite[id], id);
}
}
}
Expand Down

0 comments on commit 99f6aea

Please sign in to comment.