From 853049b279fa5adb3522bba671188247a1bc7141 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 7 Oct 2022 00:04:28 +0200 Subject: a --- src/world.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/world.hpp b/src/world.hpp index bd4f24df..21b2c764 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -1,14 +1,25 @@ #pragma once #include "src/chunk.hpp" +#include "compat/assert.hpp" namespace Magnum::Examples { struct chunk_coords final { std::int16_t x = 0, y = 0; +#if 0 + static_assert(std::is_same_v); static constexpr std::size_t max_bits = sizeof(chunk_coords::x)*8 * 3 / 4; static_assert(max_bits*4/3/8 == sizeof(decltype(chunk_coords::x))); + constexpr chunk_coords(std::int16_t x, std::int16_t y); +#endif }; +#if 0 +constexpr chunk_coords::chunk_coords(std::int16_t x, std::int16_t y) : x{x}, y{y} { + using s = std::make_signed_t; +} +#endif + struct global_coords final { chunk_coords chunk; local_coords tile; -- cgit v1.2.3