diff options
Diffstat (limited to 'src/render.cpp')
-rw-r--r-- | src/render.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/render.cpp b/src/render.cpp index 9e3adfa..87f4216 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -146,6 +146,24 @@ void state_t::render(oriented_sprite_t *sprite, rectf_t bounds, float angle) render(sprite->textures + index, bounds, mirror); } +void state_t::debug_path(std::list<v2f_t> *path) +{ + bool first = true; + sf::Vertex line[2]; + + 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); + } +} + animated_texture_t::~animated_texture_t(void) { delete[] frames; |