summary refs log tree commit diff
path: root/src/World/ChunkDimensions.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-22 17:35:00 +0200
committerMel <einebeere@gmail.com>2023-07-22 17:35:00 +0200
commit2eef7cf49b7a15559ee7bb6719411bcf67386213 (patch)
tree11eb7a4f437da7bfdde620c10a043960fd423cfb /src/World/ChunkDimensions.hpp
parent23d88e5f1c8f0c8652a07050fcfa8ff126e85d4a (diff)
downloadmeowcraft-2eef7cf49b7a15559ee7bb6719411bcf67386213.tar.zst
meowcraft-2eef7cf49b7a15559ee7bb6719411bcf67386213.zip
Propagation in lighting system
Diffstat (limited to 'src/World/ChunkDimensions.hpp')
-rw-r--r--src/World/ChunkDimensions.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/World/ChunkDimensions.hpp b/src/World/ChunkDimensions.hpp
new file mode 100644
index 0000000..99f2824
--- /dev/null
+++ b/src/World/ChunkDimensions.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "../Common/Sizes.hpp"
+
+// This file defines chunk dimensions outside of the `Chunk` class.
+// We need this to avoid cyclic dependencies for headers on which Chunk depends,
+// but which need the dimensions, too (i.e. `ChunkIndex`).
+// `Chunk` re-exports these so other units may use `Chunk::Width` and `Chunk::Height` as before.
+namespace MC::World::ChunkDimensions {
+
+static constexpr U32 Width = 16;
+static constexpr U32 Height = 128;
+
+}
\ No newline at end of file