mirror of
https://github.com/minetest/minetestmapper.git
synced 2025-02-11 01:33:07 +01:00
Print warning on failure to write metadata file.
This commit is contained in:
parent
ae5a1b8fbe
commit
e4397212e9
@ -280,11 +280,19 @@ void TileGenerator::generate(const std::string &input, const std::string &output
|
|||||||
|
|
||||||
mf.open(mfn.str().c_str());
|
mf.open(mfn.str().c_str());
|
||||||
|
|
||||||
|
if (mf.is_open())
|
||||||
|
{
|
||||||
|
|
||||||
mf << "BaseName: " << output << std::endl;
|
mf << "BaseName: " << output << std::endl;
|
||||||
mf << "NumTiles: " << m_numTilesX << " " << m_numTilesY << std::endl;
|
mf << "NumTiles: " << m_numTilesX << " " << m_numTilesY << std::endl;
|
||||||
mf << "MinTile: " << minTileX << " " << minTileY << std::endl;
|
mf << "MinTile: " << minTileX << " " << minTileY << std::endl;
|
||||||
mf << "TileSize: " << (m_tileW*16) << " " << (m_tileH*16) << std::endl;
|
mf << "TileSize: " << (m_tileW*16) << " " << (m_tileH*16) << std::endl;
|
||||||
mf.close();
|
mf.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "Warning: could not write to '" << mfn.str() << "'!" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
for (int x = 0; x < m_numTilesX; x++)
|
for (int x = 0; x < m_numTilesX; x++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user