summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-07-24 08:25:42 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-07-24 08:25:42 +0200
commit968905a4056d1ab7b13f15817a03f3e6dbb3fbea (patch)
tree423fa2d7cbb17271abad8543422d23e436e6950e /src
parentd60c3b214989c486b9af9e9935a52acd183b5370 (diff)
remove unused chunk::at_offset
Diffstat (limited to 'src')
-rw-r--r--src/chunk.cpp11
-rw-r--r--src/chunk.hpp2
2 files changed, 0 insertions, 13 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index ac529090..c116d991 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -41,16 +41,6 @@ tile_proto chunk::operator[](local_coords xy) const noexcept { return operator[]
chunk_coords_ chunk::coord() const noexcept { return _coord; }
-tile_ref chunk::at_offset(local_coords pos, Vector2i off)
-{
- const auto coord = global_coords{_coord, pos};
- const auto coord2 = coord + off;
- if (coord.chunk() == coord2.chunk()) [[likely]]
- return operator[](coord2.local());
- else
- return (*_world)[coord2].t;
-}
-
Optional<tile_ref> chunk::at_offset_(local_coords pos, Vector2i off)
{
const auto coord = global_coords{_coord, pos};
@@ -66,7 +56,6 @@ Optional<tile_ref> chunk::at_offset_(local_coords pos, Vector2i off)
}
}
-tile_ref chunk::at_offset(tile_ref r, Vector2i off) { return at_offset(local_coords{r.index()}, off); }
Optional<tile_ref> chunk::at_offset_(tile_ref r, Vector2i off) { return at_offset_(local_coords{r.index()}, off); }
void chunk::mark_ground_modified() noexcept
diff --git a/src/chunk.hpp b/src/chunk.hpp
index cf41a970..cb5dca51 100644
--- a/src/chunk.hpp
+++ b/src/chunk.hpp
@@ -34,8 +34,6 @@ public:
tile_proto operator[](local_coords xy) const noexcept;
chunk_coords_ coord() const noexcept;
- tile_ref at_offset(local_coords pos, Vector2i off);
- tile_ref at_offset(tile_ref r, Vector2i off);
Optional<tile_ref> at_offset_(local_coords pos, Vector2i off);
Optional<tile_ref> at_offset_(tile_ref r, Vector2i off);