summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/loader-impl.cpp4
-rw-r--r--main/main.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/main/loader-impl.cpp b/main/loader-impl.cpp
index 1f15ea68..1ddb8cdb 100644
--- a/main/loader-impl.cpp
+++ b/main/loader-impl.cpp
@@ -30,7 +30,7 @@ struct loader_impl final : loader_
std::string shader(Containers::StringView filename) override;
Trade::ImageData2D tile_texture(Containers::StringView filename) override;
- std::shared_ptr<struct tile_atlas> tile_atlas(Containers::StringView filename, Vector2i size) override;
+ std::shared_ptr<struct tile_atlas> tile_atlas(Containers::StringView filename, Vector2ui size) override;
explicit loader_impl();
~loader_impl() override;
@@ -46,7 +46,7 @@ std::string loader_impl::shader(Containers::StringView filename)
return ret;
}
-std::shared_ptr<tile_atlas> loader_impl::tile_atlas(Containers::StringView name, Vector2i size)
+std::shared_ptr<tile_atlas> loader_impl::tile_atlas(Containers::StringView name, Vector2ui size)
{
auto it = atlas_map.find(name);
if (it != atlas_map.end())
diff --git a/main/main.cpp b/main/main.cpp
index 4acdd471..9dc5ce4e 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -75,7 +75,7 @@ chunk app::make_test_chunk()
chunk c;
c.foreach_tile([&, this](tile& x, std::size_t k, local_coords pt) {
const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? floor2 : floor1;
- x.ground_image = { atlas, (std::uint8_t)(k % atlas->size()) };
+ x.ground_image = { atlas, (std::uint8_t)(k % atlas->num_tiles().product()) };
});
constexpr auto K = N/2;
c[{K, K }].wall_north = { wall1, 0 };