diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-01 11:48:59 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-01 11:48:59 +0100 |
commit | 078c376b6255fb6fd24362b27862819444327265 (patch) | |
tree | 2c160075a1cd171a034fd475e82f5af5209291cf /src/tile.cpp | |
parent | 51398dfed2c6615aada518d85bf2d6d04f307063 (diff) |
src: make scenery aware of its chunk
Diffstat (limited to 'src/tile.cpp')
-rw-r--r-- | src/tile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tile.cpp b/src/tile.cpp index 34d2a6e1..25b413a9 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -30,7 +30,7 @@ std::shared_ptr<const anim_atlas> tile_ref::scenery_atlas() const noexcept { tile_image_ref tile_ref::ground() noexcept { return {_chunk->_ground_atlases[i], _chunk->_ground_variants[i] }; } tile_image_ref tile_ref::wall_north() noexcept { return {_chunk->_wall_atlases[i*2+0], _chunk->_wall_variants[i*2+0] }; } tile_image_ref tile_ref::wall_west() noexcept { return {_chunk->_wall_atlases[i*2+1], _chunk->_wall_variants[i*2+1] }; } -scenery_ref tile_ref::scenery() noexcept { return {_chunk->_scenery_atlases[i], _chunk->_scenery_variants[i] }; } +scenery_ref tile_ref::scenery() noexcept { return { *_chunk, i }; } tile_image_proto tile_ref::ground() const noexcept { return { _chunk->_ground_atlases[i], _chunk->_ground_variants[i] }; } tile_image_proto tile_ref::wall_north() const noexcept { return { _chunk->_wall_atlases[i*2+0], _chunk->_wall_variants[i*2+0] }; } |