mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-25 17:03:47 +01:00
Fix drawing of transparent nodes without --drawalpha (fixes #41)
This commit is contained in:
parent
9503f76805
commit
d490cf0a31
2
Image.h
2
Image.h
@ -9,6 +9,8 @@ struct Color {
|
|||||||
Color() : r(0), g(0), b(0), a(0) {};
|
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) : 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) {};
|
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;
|
u8 r, g, b, a;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ void TileGenerator::renderMapBlock(const ustring &mapBlock, const BlockPos &pos,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setZoomed(imageX, imageY, c);
|
setZoomed(imageX, imageY, c.noAlpha());
|
||||||
m_readPixels[z] |= (1 << x);
|
m_readPixels[z] |= (1 << x);
|
||||||
}
|
}
|
||||||
if(!(m_readInfo[z] & (1 << x))) {
|
if(!(m_readInfo[z] & (1 << x))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user