summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-07 00:04:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-07 00:04:28 +0200
commit853049b279fa5adb3522bba671188247a1bc7141 (patch)
treeb9e9a361efab1025cc4ec54360c193f196eae84e
parenta5f814a06d8530a0655b71689d97b0f14ff187b4 (diff)
a
-rw-r--r--src/world.hpp11
1 files changed, 11 insertions, 0 deletions
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<decltype(x), decltype(x)>);
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<std::size_t>;
+}
+#endif
+
struct global_coords final {
chunk_coords chunk;
local_coords tile;