summaryrefslogtreecommitdiffhomepage
path: root/src/path-search.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-25 06:11:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-25 06:11:52 +0200
commit18d1db7d8be97fd9aea67c352e78b376d7145f4b (patch)
treeb28d9b272bf1a0e5bf971c4e162e8ef2bf44b037 /src/path-search.hpp
parent627dc90720e083b2e458ab7efb4dcca739b7a19a (diff)
a
Diffstat (limited to 'src/path-search.hpp')
-rw-r--r--src/path-search.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/path-search.hpp b/src/path-search.hpp
index 68cf41a4..4d3c7d23 100644
--- a/src/path-search.hpp
+++ b/src/path-search.hpp
@@ -41,9 +41,9 @@ struct path_search_result final
const global_coords* data() const;
private:
- mutable path_search_result* _next;
+ mutable path_search_result* _next = nullptr;
std::unique_ptr<global_coords[]> _path;
- size_t _size;
+ size_t _size = 0;
};
class path_search final
@@ -54,7 +54,7 @@ class path_search final
auto end() const { return neighbors.data() + size; }
std::array<global_coords, 4> neighbors;
- uint8_t size;
+ uint8_t size = 0;
};
struct chunk_tiles_cache
@@ -91,7 +91,8 @@ public:
static bool is_passable(world& w, global_coords coord, Vector2b offset, Vector2ub size, object_id own_id);
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);
+ static bbox bbox_union(bbox bb, Vector2i coord, Vector2b offset, Vector2ub size);
+ static neighbors get_walkable_neighbor_tiles(world& w, global_coords coord, Vector2ub size, object_id own_id);
};
} // namespace floormat