diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 03:18:00 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-11 03:18:00 +0100 |
commit | f3d870a400395e75f601f32a3bbb3e68502d9000 (patch) | |
tree | 3735b14eaa74d4a80d9197ac973b5dbffbd675d6 /src/chunk.cpp | |
parent | b91deae59c69ca41d5feffaf4f16b29ee47af64d (diff) |
fix some todo's
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r-- | src/chunk.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp index aabb69f8..a49669c5 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -28,7 +28,7 @@ bool chunk::empty(bool force) const noexcept return false; for (auto i = 0uz; i < TILE_COUNT; i++) if (!_objects.empty() || - _ground && _ground->_ground_atlases[i] || + _ground && _ground->atlases[i] || _walls && (_walls->atlases[i*2+0] || _walls->atlases[i*2+1])) return _maybe_empty = false; if (!_objects.empty()) @@ -36,7 +36,7 @@ bool chunk::empty(bool force) const noexcept return true; } -tile_atlas* chunk::ground_atlas_at(size_t i) const noexcept { return _ground ? _ground->_ground_atlases[i].get() : nullptr; } +tile_atlas* chunk::ground_atlas_at(size_t i) const noexcept { return _ground ? _ground->atlases[i].get() : nullptr; } tile_ref chunk::operator[](size_t idx) noexcept { return { *this, uint8_t(idx) }; } tile_proto chunk::operator[](size_t idx) const noexcept { return tile_proto(tile_ref { *const_cast<chunk*>(this), uint8_t(idx) }); } @@ -86,7 +86,6 @@ void chunk::mark_ground_modified() noexcept mark_passability_modified(); } -// todo this can use _replace_bbox too void chunk::mark_walls_modified() noexcept { if (!_walls_modified && !is_log_quiet()) |