]> git.localhorst.tv Git - blank.git/blobdiff - src/block.hpp
store block type as ID rather than pointer
[blank.git] / src / block.hpp
index a757740b77000e6768c2519b6a696c4eef833a74..0f567c4b5fdf3400b5209ed64c76766a00f4fb88 100644 (file)
@@ -29,7 +29,6 @@ struct BlockType {
                const glm::vec3 &outline_color = { -1, -1, -1 })
        : id(-1), visible(v), shape(shape), color(color), outline_color(outline_color) { }
 
-       static const BlockType DEFAULT;
        static const NullShape DEFAULT_SHAPE;
 
 
@@ -83,10 +82,10 @@ struct Block {
 
        using Pos = glm::vec3;
 
-       const BlockType *type;
+       int type;
 
-       constexpr explicit Block(const BlockType *t = &BlockType::DEFAULT)
-       : type(t) { }
+       constexpr explicit Block(int type = 0)
+       : type(type) { }
 
 };