diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-20 23:52:36 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-20 23:52:36 +0200 |
commit | 394f6fedbbafe905bdb10c998b0d2b476a1d710f (patch) | |
tree | 222a18dbadb213f962bc620eecce4443e2ca5f9b /src/tile-atlas.hpp | |
parent | 3c4a9458dd06868fa9bbaab1742ef91816bcd8ac (diff) |
fix tile_atlas::num_tiles() snafu
Diffstat (limited to 'src/tile-atlas.hpp')
-rw-r--r-- | src/tile-atlas.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tile-atlas.hpp b/src/tile-atlas.hpp index 5fb0f899..a24ea96f 100644 --- a/src/tile-atlas.hpp +++ b/src/tile-atlas.hpp @@ -22,7 +22,8 @@ struct tile_atlas final static constexpr quad wall_quad_W(Vector3 center, Vector3 size); static constexpr std::array<UnsignedShort, 6> indices(std::size_t N); [[maybe_unused]] Vector2ui pixel_size() const { return size_; } - Vector2ui num_tiles() const { return dims_; } + std::size_t num_tiles() const { return dims_.product(); } + Vector2ui num_tiles2() const { return dims_; } GL::Texture2D& texture() { return tex_; } Containers::StringView name() const { return name_; } |