summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-17 23:20:46 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-17 23:23:12 +0100
commit90c43f035f41cf901832794f0b4e00c2b5569723 (patch)
tree4cb7bc4f09509c03bbeb3cb3fcf6b115fca910f0 /src/chunk.hpp
parentc17cef93bd6bbc1b071dcd82df0dbc9420e52ef4 (diff)
dddd
Diffstat (limited to 'src/chunk.hpp')
-rw-r--r--src/chunk.hpp14
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);