From 28331efb18a9700e556879e51915cd0ecb51ae79 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 24 Oct 2017 10:29:10 +0200 Subject: Node elimination basics. --- src/common.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/common.hpp') diff --git a/src/common.hpp b/src/common.hpp index 79c160a..bf2a300 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -45,8 +45,9 @@ namespace world { char type; }; - typedef vec_t sector_index_t; - typedef vec_t tile_index_t; + typedef int64_t coord_t; + typedef vec_t sector_index_t; + typedef vec_t tile_index_t; sector_index_t sector_index_at(v2f_t x); tile_index_t tile_index_at(v2f_t x); @@ -85,7 +86,7 @@ namespace world { sector_t *get_sector(sector_index_t index); tile_t *get_tile(tile_index_t index); - bool find_path(v2f_t src, v2f_t dst, rectf_t size, std::list *path); + bool find_path(v2f_t src, v2f_t dst, rectf_t size, entity_t *ignore, std::list *path); // FIXME: iterators instead of returning std::lists std::list get_sectors(rectf_t rect); @@ -131,7 +132,8 @@ namespace world { ~path_finder_t(); void setup_nodes(v2f_t src_, v2f_t dst_); - void find_r(tile_index_t index, float dist); + void eliminate_nodes(rectf_t bounds); + void find_r(tile_index_t index, float dist, float limit); bool find(void); void export_path(std::list *list); }; -- cgit