summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp10
1 files changed, 6 insertions, 4 deletions
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<int64_t, 2> sector_index_t;
- typedef vec_t<int64_t, 2> tile_index_t;
+ typedef int64_t coord_t;
+ typedef vec_t<coord_t, 2> sector_index_t;
+ typedef vec_t<coord_t, 2> 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<v2f_t> *path);
+ bool find_path(v2f_t src, v2f_t dst, rectf_t size, entity_t *ignore, std::list<v2f_t> *path);
// FIXME: iterators instead of returning std::lists
std::list<sector_t*> 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<v2f_t> *list);
};