X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2Fblock.cpp;h=d6e5507ddf5777f1b061dca6e256099d34397c68;hb=1bc2f230105ad6e1ee8d999ddc079cd85d244bf9;hp=954a112579089d71b2e8478ad60f7393f4b47c31;hpb=ba55bf4293f3abc742eef710545a4b207ba2c820;p=blank.git diff --git a/src/world/block.cpp b/src/world/block.cpp index 954a112..d6e5507 100644 --- a/src/world/block.cpp +++ b/src/world/block.cpp @@ -2,8 +2,6 @@ #include "BlockType.hpp" #include "BlockTypeRegistry.hpp" -#include "../model/geometry.hpp" - #include #include #include @@ -73,6 +71,8 @@ BlockType::BlockType() noexcept , rgb_mod(1.0f, 1.0f, 1.0f) , outline_color(-1, -1, -1) , label("some block") +, place_sound(-1) +, remove_sound(-1) , id(0) , luminosity(0) , visible(true) @@ -117,10 +117,10 @@ void BlockType::FillBlockMesh( buf.rgb_mods.insert(buf.rgb_mods.end(), shape->VertexCount(), rgb_mod); } -void BlockType::FillOutlineMesh(OutlineMesh::Buffer &buf) const noexcept { +void BlockType::OutlinePrimitiveMesh(PrimitiveMesh::Buffer &buf) const noexcept { if (!shape) return; shape->Outline(buf); - buf.colors.insert(buf.colors.end(), shape->OutlineCount(), outline_color); + buf.colors.insert(buf.colors.end(), shape->OutlineCount(), glm::vec4(outline_color, 1.0f)); }