From be8ab17542bea5d783166f320cf3ed02b7b88b20 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 11 Sep 2023 04:18:11 +0200 Subject: wip --- src/path-search.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/path-search.hpp') 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 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 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); }; -- cgit v1.2.3