summaryrefslogtreecommitdiffhomepage
path: root/src/tile-atlas.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-08-27 14:46:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-08-27 15:04:01 +0200
commit7d333c4077491ed7128a79598d04a01a05ed367d (patch)
treed1040d1d90d9f8e5c7351c5b0ed725cecbad8b03 /src/tile-atlas.cpp
parentd6556c2fa3a3a2880e27afb788e87d49e6c1ecb9 (diff)
loader: call setLabel() on tile_atlas with full path
Diffstat (limited to 'src/tile-atlas.cpp')
-rw-r--r--src/tile-atlas.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tile-atlas.cpp b/src/tile-atlas.cpp
index c6de3e89..298e7f9e 100644
--- a/src/tile-atlas.cpp
+++ b/src/tile-atlas.cpp
@@ -10,15 +10,15 @@
namespace floormat {
-tile_atlas::tile_atlas(StringView name, const ImageView2D& image, Vector2ub tile_count, Optional<enum pass_mode> p) :
+tile_atlas::tile_atlas(StringView path, StringView name, const ImageView2D& image, Vector2ub tile_count, Optional<enum pass_mode> p) :
texcoords_{make_texcoords_array(Vector2ui(image.size()), tile_count)},
- name_{name}, size_{image.size()}, dims_{tile_count}, passability{std::move(p)}
+ path_{path}, name_{name}, size_{image.size()}, dims_{tile_count}, passability{std::move(p)}
{
constexpr auto variant_max = std::numeric_limits<variant_t>::max();
fm_soft_assert(num_tiles() <= variant_max);
fm_soft_assert(dims_[0] > 0 && dims_[1] > 0);
fm_soft_assert(size_ % Vector2ui{tile_count} == Vector2ui());
- tex_.setLabel(name_)
+ tex_.setLabel(path_)
.setWrapping(GL::SamplerWrapping::ClampToEdge)
.setMagnificationFilter(GL::SamplerFilter::Linear)
.setMinificationFilter(GL::SamplerFilter::Linear)