summaryrefslogtreecommitdiffhomepage
path: root/src/tile.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-11 03:18:00 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-11 03:18:00 +0100
commitf3d870a400395e75f601f32a3bbb3e68502d9000 (patch)
tree3735b14eaa74d4a80d9197ac973b5dbffbd675d6 /src/tile.cpp
parentb91deae59c69ca41d5feffaf4f16b29ee47af64d (diff)
fix some todo's
Diffstat (limited to 'src/tile.cpp')
-rw-r--r--src/tile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tile.cpp b/src/tile.cpp
index 4f49f214..ce21d506 100644
--- a/src/tile.cpp
+++ b/src/tile.cpp
@@ -18,22 +18,22 @@ wall_image_proto tile_proto::wall_west() const noexcept { return { wall_west_at
tile_ref::tile_ref(struct chunk& c, uint8_t i) noexcept : _chunk{&c}, i{i} {}
-std::shared_ptr<tile_atlas> tile_ref::ground_atlas() noexcept { return _chunk->_ground ? _chunk->_ground->_ground_atlases[i] : nullptr; }
+std::shared_ptr<tile_atlas> tile_ref::ground_atlas() noexcept { return _chunk->_ground ? _chunk->_ground->atlases[i] : nullptr; }
std::shared_ptr<wall_atlas> tile_ref::wall_north_atlas() noexcept { return _chunk->_walls ? _chunk->_walls->atlases[i*2+0] : nullptr; }
std::shared_ptr<wall_atlas> tile_ref::wall_west_atlas() noexcept { return _chunk->_walls ? _chunk->_walls->atlases[i*2+1] : nullptr; }
-std::shared_ptr<const tile_atlas> tile_ref::ground_atlas() const noexcept { return _chunk->_ground ? _chunk->_ground->_ground_atlases[i] : nullptr; }
+std::shared_ptr<const tile_atlas> tile_ref::ground_atlas() const noexcept { return _chunk->_ground ? _chunk->_ground->atlases[i] : nullptr; }
std::shared_ptr<const wall_atlas> tile_ref::wall_north_atlas() const noexcept { return _chunk->_walls ? _chunk->_walls->atlases[i*2+0] : nullptr; }
std::shared_ptr<const wall_atlas> tile_ref::wall_west_atlas() const noexcept { return _chunk->_walls ? _chunk->_walls->atlases[i*2+1] : nullptr; }
-tile_image_ref tile_ref::ground() noexcept { _chunk->ensure_alloc_ground(); return {_chunk->_ground->_ground_atlases[i], _chunk->_ground->_ground_variants[i] }; }
+tile_image_ref tile_ref::ground() noexcept { _chunk->ensure_alloc_ground(); return {_chunk->_ground->atlases[i], _chunk->_ground->variants[i] }; }
wall_image_ref tile_ref::wall_north() noexcept { _chunk->ensure_alloc_walls(); return {_chunk->_walls->atlases[i*2+0], _chunk->_walls->variants[i*2+0] }; }
wall_image_ref tile_ref::wall_west() noexcept { _chunk->ensure_alloc_walls(); return {_chunk->_walls->atlases[i*2+1], _chunk->_walls->variants[i*2+1] }; }
tile_image_proto tile_ref::ground() const noexcept
{
_chunk->ensure_alloc_ground();
- return { _chunk->_ground->_ground_atlases[i], _chunk->_ground->_ground_variants[i] };
+ return { _chunk->_ground->atlases[i], _chunk->_ground->variants[i] };
}
wall_image_proto tile_ref::wall_north() const noexcept
@@ -57,8 +57,8 @@ tile_ref::operator tile_proto() const noexcept
_chunk->ensure_alloc_ground();
_chunk->ensure_alloc_walls();
return {
- _chunk->_ground->_ground_atlases[i], _chunk->_walls->atlases[i*2+0], _chunk->_walls->atlases[i*2+1],
- _chunk->_ground->_ground_variants[i], _chunk->_walls->variants[i*2+0], _chunk->_walls->variants[i*2+1],
+ _chunk->_ground->atlases[i], _chunk->_walls->atlases[i*2+0], _chunk->_walls->atlases[i*2+1],
+ _chunk->_ground->variants[i], _chunk->_walls->variants[i*2+0], _chunk->_walls->variants[i*2+1],
};
}