X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2Fblock.cpp;h=a3db57d91242dfadece48003c0f656fc46ff1a64;hb=cdcfdb33e9b625976909a9fb604b756a1a057788;hp=32cbe04bbdd37bd6fbff379c1e01483b46b132cc;hpb=cdd865c1934eccbb1f1d0ffaf041e53f0fdd524b;p=blank.git diff --git a/src/world/block.cpp b/src/world/block.cpp index 32cbe04..a3db57d 100644 --- a/src/world/block.cpp +++ b/src/world/block.cpp @@ -76,7 +76,7 @@ BlockType::BlockType() noexcept , textures() , hsl_mod(0, 255, 255) , rgb_mod(255, 255, 255) -, outline_color(0, 0, 0) +, outline_color(0, 0, 0, 255) , gravity() , name("anonymous") , label("some block") @@ -155,7 +155,7 @@ void BlockType::Read( hsl_mod = BlockMesh::ColorMod(color_conv * 255.0f); } else if (name == "outline") { in.ReadVec(color_conv); - outline_color = BlockMesh::ColorMod(color_conv * 255.0f); + outline_color = PrimitiveMesh::Color(color_conv * 255.0f, 255); } else if (name == "gravity") { gravity = BlockGravity::Read(in); } else if (name == "label") { @@ -240,7 +240,7 @@ void BlockType::FillBlockMesh( void BlockType::OutlinePrimitiveMesh(PrimitiveMesh::Buffer &buf) const noexcept { if (!shape) return; shape->Outline(buf); - buf.colors.insert(buf.colors.end(), shape->OutlineCount(), PrimitiveMesh::Color(outline_color, 255)); + buf.colors.insert(buf.colors.end(), shape->OutlineCount(), outline_color); }