From fe2baedc760c2f29e2c720f6b1132a2de33c5430 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Jul 2023 03:25:44 +0200 Subject: Use own size types --- src/World/BlockType.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/World/BlockType.hpp') 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 +#include "../Common/Sizes.hpp" #include 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: -- cgit 1.4.1