summary refs log tree commit diff
path: root/src/World/BlockType.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-08 03:25:44 +0200
committerMel <einebeere@gmail.com>2023-07-08 03:25:44 +0200
commitfe2baedc760c2f29e2c720f6b1132a2de33c5430 (patch)
treedfbe1c72a17805a3cab6e0d47433e9021890c9ca /src/World/BlockType.hpp
parent41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 (diff)
downloadmeowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.tar.zst
meowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.zip
Use own size types
Diffstat (limited to 'src/World/BlockType.hpp')
-rw-r--r--src/World/BlockType.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/World/BlockType.hpp b/src/World/BlockType.hpp
index 82c63d3..dbf6f78 100644
--- a/src/World/BlockType.hpp
+++ b/src/World/BlockType.hpp
@@ -1,13 +1,13 @@
 #pragma once
 
-#include <cstdint>
+#include "../Common/Sizes.hpp"
 #include <vector>
 
 namespace MC::World {
 
 class BlockType {
 public:
-    enum Value : uint8_t {
+    enum Value : U8 {
         Air,
         Dirt,
         Grass,
@@ -19,14 +19,14 @@ public:
         Water,
     };
 
-    static constexpr uint8_t Size = Water + 1;
+    static constexpr U8 Size = Water + 1;
 
     BlockType() : m_block(Air) {}
     BlockType(Value block) : m_block(block) {}
 
     operator Value() const { return m_block; }
 
-    bool is_transparent() const {
+    Bool is_transparent() const {
         switch (m_block) {
         case Air:
         case Leaves: