|
|
@@ -2,11 +2,13 @@
|
|
|
#include "../components/Position.hpp"
|
|
|
#include "../components/Sprite.hpp"
|
|
|
|
|
|
-void Dungeon::RenderingSystem::Render(SDL_Renderer *renderer, entt::registry ®istry) {
|
|
|
- const auto view = registry.view<Position, Sprite>();
|
|
|
+namespace Slate {
|
|
|
+ void RenderingSystem::Render(SDL_Renderer *renderer, entt::registry ®istry) {
|
|
|
+ const auto view = registry.view<Position, Sprite>();
|
|
|
|
|
|
- view.each([&](const Position &p, const Sprite &s) {
|
|
|
- const SDL_FRect dstRect = {p.x, p.y, s.rect.w, s.rect.h};
|
|
|
- SDL_RenderTexture(renderer, s.texture, &s.rect, &dstRect);
|
|
|
- });
|
|
|
+ view.each([&](const Position &p, const Sprite &s) {
|
|
|
+ const SDL_FRect dstRect = {p.x, p.y, s.rect.w, s.rect.h};
|
|
|
+ SDL_RenderTexture(renderer, s.texture, &s.rect, &dstRect);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|