mirror of
https://github.com/minetest/minetestmapper.git
synced 2025-07-02 00:20:22 +02:00
Added draworigin.
This commit is contained in:
@ -196,11 +196,6 @@ void TileGenerator::setDrawScale(bool drawScale)
|
||||
}
|
||||
}
|
||||
|
||||
void TileGenerator::setDrawUnderground(bool drawUnderground)
|
||||
{
|
||||
m_drawUnderground = drawUnderground;
|
||||
}
|
||||
|
||||
void TileGenerator::parseColorsFile(const std::string &fileName)
|
||||
{
|
||||
ifstream in;
|
||||
@ -243,6 +238,9 @@ void TileGenerator::generate(const std::string &input, const std::string &output
|
||||
if (m_drawScale) {
|
||||
renderScale();
|
||||
}
|
||||
if (m_drawOrigin) {
|
||||
renderOrigin();
|
||||
}
|
||||
writeImage(output);
|
||||
}
|
||||
|
||||
@ -535,6 +533,13 @@ void TileGenerator::renderScale()
|
||||
}
|
||||
}
|
||||
|
||||
void TileGenerator::renderOrigin()
|
||||
{
|
||||
int imageX = -m_xMin * 16 + m_border;
|
||||
int imageY = m_mapHeight - m_zMin * -16 + m_border;
|
||||
gdImageArc(m_image, imageX, imageY, 12, 12, 0, 360, rgb2int(m_originColor.r, m_originColor.g, m_originColor.b));
|
||||
}
|
||||
|
||||
inline std::list<int> TileGenerator::getZValueList() const
|
||||
{
|
||||
std::list<int> zlist;
|
||||
|
Reference in New Issue
Block a user