From 2860d6e665e908e8a66c147ea45ea6398959c628 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 4 Dec 2022 23:50:17 +0100 Subject: Moved shooting lines below markers --- kurator/src/Battle.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kurator/src/Battle.cpp b/kurator/src/Battle.cpp index 8c35969..8d28dba 100644 --- a/kurator/src/Battle.cpp +++ b/kurator/src/Battle.cpp @@ -75,6 +75,15 @@ Battle::draw() const const int height = GetScreenHeight(); const double scale = std::min(width/30000.0, height/30000.0); auto& registry = battle->registry(); + auto lines = registry.view(); + for (const auto& [entity, line] : lines.each()) { + DrawLine( + width/2 + line.start.x*scale, + height/2 + line.start.y*scale, + width/2 + line.end.x*scale, + height/2 + line.end.y*scale, + line.color); + } auto view = registry.view(); for (auto [entity, marker, transform] : view.each()) { const int x = width/2 + transform.position.x*scale; @@ -89,15 +98,6 @@ Battle::draw() const const int y = height/2 + transform.position.y*scale - text.font_size/2 + offset.y; DrawText(text.text.c_str(), x, y, text.font_size, text.color); } - auto lines = registry.view(); - for (const auto& [entity, line] : lines.each()) { - DrawLine( - width/2 + line.start.x*scale, - height/2 + line.start.y*scale, - width/2 + line.end.x*scale, - height/2 + line.end.y*scale, - line.color); - } auto points = registry.view(); double totals[2] {0.0, 0.0}; // FIXME and extract for (const auto& [entity, points, team] : points.each()) { -- cgit v1.1