summary refs log tree commit diff
path: root/src/World/Chunk.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/Chunk.hpp')
-rw-r--r--src/World/Chunk.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp
index 7415d7c..cb4f7e1 100644
--- a/src/World/Chunk.hpp
+++ b/src/World/Chunk.hpp
@@ -7,15 +7,15 @@
 #include "BlockSide.hpp"
 #include "../GFX/Binder.hpp"
 
-#define CHUNK_WIDTH 16
-#define CHUNK_HEIGHT 64
-
 namespace MC::World {
 
 class Chunk {
 public:
+    static constexpr const uint32_t Width = 16;
+    static constexpr const uint32_t Height = 64;
+
     Chunk(int64_t x, int64_t y)
-        : m_blocks{}, m_position{(float)x * CHUNK_WIDTH, 0.0f, (float)y * CHUNK_WIDTH} {};
+        : m_blocks{}, m_position{(float)x * Chunk::Width, 0.0f, (float)y * Chunk::Width} {};
 
     void set(uint32_t x, uint32_t y, uint32_t z, BlockType type);
 
@@ -32,7 +32,7 @@ private:
     };
 
     Vector<3> m_position;
-    BlockData m_blocks[CHUNK_WIDTH][CHUNK_HEIGHT][CHUNK_WIDTH];
+    BlockData m_blocks[Chunk::Width][Chunk::Height][Chunk::Width];
 };
 
 }