diff options
Diffstat (limited to 'src/render.cpp')
-rw-r--r-- | src/render.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/render.cpp b/src/render.cpp index 8f2fdc7..76701b6 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -277,20 +277,15 @@ void state_t::render_line(v2f_t x0, v2f_t x1, sf::Color color) window->draw(line, 2, sf::Lines); } -void state_t::debug_path(std::list<v2f_t> *path) +void state_t::debug_path(v2f_t x, std::list<v2f_t> *path) { - bool first = true; sf::Vertex line[2]; + line[0] = sf::Vertex(x, sf::Color::Blue); + for (v2f_t &point : *path) { line[1] = line[0]; line[0] = sf::Vertex(point, sf::Color::Blue); - - if (first) { - first = false; - continue; - } - window->draw(line, 2, sf::Lines); } } |