diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-11 04:18:11 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-11 14:20:10 +0200 |
commit | be8ab17542bea5d783166f320cf3ed02b7b88b20 (patch) | |
tree | 5bf6fae735faa69b84a87384cb48336e9cfa9fe6 /src/path-search.hpp | |
parent | 1af31374db91b0fd6091b27d4c199edaee989612 (diff) |
wip
Diffstat (limited to 'src/path-search.hpp')
-rw-r--r-- | src/path-search.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/path-search.hpp b/src/path-search.hpp index 39fde1e4..f044a381 100644 --- a/src/path-search.hpp +++ b/src/path-search.hpp @@ -69,7 +69,6 @@ class search final }; struct obj_position { Vector2 center, size; }; - struct bbox { Vector2 min, max; }; chunk_cache cache; Array<global_coords> output; @@ -80,6 +79,8 @@ class search final void ensure_allocated(chunk_coords a, chunk_coords b); public: + struct bbox { Vector2 min, max; }; + // todo remember to check from.z() == to.z() // todo add simple bresenham short-circuit Optional<search_result> operator()(world& w, object_id own_id, global_coords from, Vector2b from_offset, Vector2ub size, global_coords to, Vector2b to_offset); @@ -89,7 +90,7 @@ public: static bool sample_rtree(world& w, chunk_coords_ ch0, Vector2 center, Vector2 size, object_id own_id); static bool sample_rtree(world& w, global_coords coord, Vector2b offset, Vector2ub size, object_id own_id); - static bbox make_neighbor_tile_bbox(global_coords coord, Vector2ub own_size, rotation r); + static bbox make_neighbor_tile_bbox(Vector2i coord, Vector2ub own_size, rotation r); static neighbors get_walkable_neighbor_tiles(world& w, global_coords pos, Vector2 size, object_id own_id); }; |