diff --git a/Image.h b/Image.h index ae21ce8..1b5a6ba 100644 --- a/Image.h +++ b/Image.h @@ -9,6 +9,8 @@ struct Color { Color() : r(0), g(0), b(0), a(0) {}; Color(u8 r, u8 g, u8 b) : r(r), g(g), b(b), a(255) {}; Color(u8 r, u8 g, u8 b, u8 a) : r(r), g(g), b(b), a(a) {}; + inline Color noAlpha() const { return Color(r, g, b); } + u8 r, g, b, a; }; diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 0416af0..f5d9574 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -526,7 +526,7 @@ void TileGenerator::renderMapBlock(const ustring &mapBlock, const BlockPos &pos, continue; } } else { - setZoomed(imageX, imageY, c); + setZoomed(imageX, imageY, c.noAlpha()); m_readPixels[z] |= (1 << x); } if(!(m_readInfo[z] & (1 << x))) {