diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-01 16:35:03 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-01 16:35:03 +0100 |
commit | 704e9bd3ac58484a5209e186798076f1cbd432ef (patch) | |
tree | 511479ebd088d5c9524803c6f3fe4641009b58bc /src/tile-image.hpp | |
parent | 7ff1f0911e0b0c314d6e639887b705d6fc0d78aa (diff) |
wip
Diffstat (limited to 'src/tile-image.hpp')
-rw-r--r-- | src/tile-image.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tile-image.hpp b/src/tile-image.hpp index 033d3916..5a13e13f 100644 --- a/src/tile-image.hpp +++ b/src/tile-image.hpp @@ -1,16 +1,20 @@ #pragma once #include "compat/integer-types.hpp" +#include <memory> namespace floormat { struct tile_atlas; +using variant_t = std::uint16_t; + struct tile_image_proto final { std::shared_ptr<tile_atlas> atlas; - std::uint16_t variant = (std::uint16_t)-1; + variant_t variant = (std::uint16_t)-1; friend bool operator==(const tile_image_proto& a, const tile_image_proto& b) noexcept; + operator bool() const noexcept; }; struct tile_image_ref final @@ -21,9 +25,9 @@ struct tile_image_ref final tile_image_ref(std::shared_ptr<tile_atlas>& atlas, std::uint16_t& variant) noexcept; tile_image_ref(const tile_image_ref&) noexcept; tile_image_ref(tile_image_ref&&) noexcept; - tile_image_ref& operator=(tile_image_ref&& tile_rvalue_ref) noexcept; tile_image_ref& operator=(const tile_image_proto& tile_proto) noexcept; operator tile_image_proto() const noexcept; + operator bool() const noexcept; }; } // namespace floormat |