From e7b2afeafba26aa13c5cc994c6f2050f53c0ede1 Mon Sep 17 00:00:00 2001 From: Rodrigo Delduca Date: Sun, 27 Oct 2024 06:03:49 -0300 Subject: [PATCH] Work in progress --- src/entity.cpp | 2 +- src/entitymanager.cpp | 8 +++----- src/fontfactory.cpp | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/entity.cpp b/src/entity.cpp index e97a3ce..4d71bcc 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -6,7 +6,7 @@ entity::entity(const entityprops &&props) : _props(std::move(props)) {} entity::~entity() { - std::cout << "entity::~entity(), id: " << _props.id << std::endl; + std::cout << "~entity id: " << _props.id << std::endl; } std::shared_ptr entity::create(const entityprops &&props) { diff --git a/src/entitymanager.cpp b/src/entitymanager.cpp index a55cac1..0534adc 100644 --- a/src/entitymanager.cpp +++ b/src/entitymanager.cpp @@ -7,7 +7,6 @@ #include "rect.hpp" #include "resourcemanager.hpp" #include "size.hpp" -#include "vector2d.hpp" using namespace framework; using json = nlohmann::json; @@ -87,10 +86,9 @@ void entitymanager::update(double_t delta) { entity->update(delta); } - for (auto itA = _entities.begin(); itA != _entities.end(); ++itA) { - for (auto itB = std::next(itA); itB != _entities.end(); ++itB) { - if ((*itA)->colliding_with(**itB)) { - // Placeholder for collision handling logic + for (auto a = _entities.begin(); a != _entities.end(); ++a) { + for (auto b = std::next(a); b != _entities.end(); ++b) { + if ((*a)->colliding_with(**b)) { } } } diff --git a/src/fontfactory.cpp b/src/fontfactory.cpp index 97f6b3e..9d6ec85 100644 --- a/src/fontfactory.cpp +++ b/src/fontfactory.cpp @@ -34,6 +34,9 @@ std::shared_ptr fontfactory::get(const std::string &face) { static const auto black = color("#000000"); static const auto white = color("#ffffff"); static const auto mangeta = color("#ff00ff"); + UNUSED(black); + UNUSED(white); + UNUSED(mangeta); for (auto y = 0; y < height; ++y) { for (auto x = 0; x < width; ++x) {