diff options
Diffstat (limited to 'src/common.hpp')
-rw-r--r-- | src/common.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common.hpp b/src/common.hpp index bbf83cf..8f610a5 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -121,16 +121,19 @@ namespace world { class path_finder_t { public: - v2f_t src, dst; + v2f_t src, dst, tile_center; path_node_t *nodes; size_t width, height; tile_index_t base; - std::stack<v2f_t> current_path, shortest_path; + + float shortest_dist; + std::deque<tile_index_t> path, shortest_path; ~path_finder_t(); void setup_nodes(v2f_t src_, v2f_t dst_); void find_r(tile_index_t index, float dist); void find(void); + bool export_path(std::list<v2f_t> *list); }; } @@ -215,6 +218,8 @@ namespace render { void render(game::state_t *game); void render(animated_texture_t *anim, rectf_t bounds, bool mirror = false); void render(oriented_sprite_t *sprite, rectf_t bounds, float angle); + + void debug_path(std::list<v2f_t> *path); }; } |