From 41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Jul 2023 01:20:53 +0200 Subject: Add crude texture transparency --- src/World/BlockType.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/World/BlockType.hpp') diff --git a/src/World/BlockType.hpp b/src/World/BlockType.hpp index 472523f..82c63d3 100644 --- a/src/World/BlockType.hpp +++ b/src/World/BlockType.hpp @@ -26,6 +26,16 @@ public: operator Value() const { return m_block; } + bool is_transparent() const { + switch (m_block) { + case Air: + case Leaves: + return true; + default: + return false; + } + } + static std::vector all() { return { Air, @@ -34,6 +44,8 @@ public: Stone, Sand, Snow, + Wood, + Leaves, Water, }; } -- cgit 1.4.1