diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3eb444c..0a3432b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,7 +17,7 @@ int main() { window.setFramerateLimit(60); ImGui::SFML::Init(window); - silly::editor::Floor floor(30, 30); + silly::editor::TileFloor tileFloor(30, 30); sf::Clock deltaClock; while (window.isOpen()) { @@ -44,13 +44,17 @@ int main() { } } + tileFloor.update(window); + ImGui::SFML::Update(window, deltaClock.restart()); window.clear(); + tileFloor.render(window); + // rendering grid - for (int x = 0; x < floor.get_width(); x++) { - for (int y = 0; y < floor.get_height(); y++) { + for (int x = 0; x < tileFloor.get_width(); x++) { + for (int y = 0; y < tileFloor.get_height(); y++) { sf::RectangleShape shape({size, size}); shape.setFillColor(sf::Color::Transparent); shape.setOutlineColor(sf::Color(80, 80, 80)); |
