diff options
Diffstat (limited to 'src/chunk.hpp')
-rw-r--r-- | src/chunk.hpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/chunk.hpp b/src/chunk.hpp index 0cd7bcfc..e825ce33 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -87,26 +87,18 @@ struct chunk final float depth = -1; }; + using RTree = ::RTree<std::uint64_t, float, 2, float>; + ground_mesh_tuple ensure_ground_mesh() noexcept; tile_atlas* ground_atlas_at(std::size_t i) const noexcept; - wall_mesh_tuple ensure_wall_mesh() noexcept; tile_atlas* wall_atlas_at(std::size_t i) const noexcept; - scenery_mesh_tuple ensure_scenery_mesh() noexcept; void ensure_passability() noexcept; - - using RTree = ::RTree<std::uint64_t, float, 2, float>; - RTree* rtree() noexcept; - struct world& world() noexcept { return *_world; } - template<typename F> - requires requires(F fun) { fun(); } - void with_scenery_update(entity& e, F&& fun); - [[nodiscard]] bool can_place_entity(const entity_proto& proto, local_coords pos); void add_entity(const std::shared_ptr<entity>& e); @@ -147,7 +139,7 @@ private: bool operator==(const bbox& other) const noexcept; }; static bool _bbox_for_scenery(const entity& s, bbox& value) noexcept; - static bool _bbox_for_scenery(const entity& s, local_coords local, Vector2b offset, bbox& value) noexcept; + static bool _bbox_for_scenery(const entity& s, local_coords local, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size, bbox& value) noexcept; void _remove_bbox(const bbox& x); void _add_bbox(const bbox& x); void _replace_bbox(const bbox& x0, const bbox& x, bool b0, bool b); |