From 704e9bd3ac58484a5209e186798076f1cbd432ef Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 1 Nov 2022 16:35:03 +0100 Subject: wip --- src/tile-image.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/tile-image.hpp') 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 namespace floormat { struct tile_atlas; +using variant_t = std::uint16_t; + struct tile_image_proto final { std::shared_ptr 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& 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 -- cgit v1.2.3