X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fblock.hpp;h=0f567c4b5fdf3400b5209ed64c76766a00f4fb88;hb=7caa2326d25d4fc5ba98318dfccb508bb3e16820;hp=1fa9c8416a4d694fcaa715f08463df7c3aeb3db6;hpb=804bde3fc09e4317eef629861638a68bfad3e343;p=blank.git diff --git a/src/block.hpp b/src/block.hpp index 1fa9c84..0f567c4 100644 --- a/src/block.hpp +++ b/src/block.hpp @@ -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; @@ -81,10 +80,12 @@ private: /// single 1x1x1 cube struct Block { - const BlockType *type; + using Pos = glm::vec3; - constexpr explicit Block(const BlockType *t = &BlockType::DEFAULT) - : type(t) { } + int type; + + constexpr explicit Block(int type = 0) + : type(type) { } };