mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-22 07:23:46 +01:00
Added path separator handling.
This commit is contained in:
parent
6dff561ec0
commit
1edbba5a94
@ -233,7 +233,12 @@ void TileGenerator::parseColorsFile(const std::string &fileName)
|
|||||||
|
|
||||||
void TileGenerator::generate(const std::string &input, const std::string &output)
|
void TileGenerator::generate(const std::string &input, const std::string &output)
|
||||||
{
|
{
|
||||||
openDb(input);
|
string input_path = input;
|
||||||
|
if (input_path[input.length() - 1] != PATH_SEPARATOR) {
|
||||||
|
input_path += PATH_SEPARATOR;
|
||||||
|
}
|
||||||
|
|
||||||
|
openDb(input_path);
|
||||||
loadBlocks();
|
loadBlocks();
|
||||||
createImage();
|
createImage();
|
||||||
renderMap();
|
renderMap();
|
||||||
@ -244,7 +249,7 @@ void TileGenerator::generate(const std::string &input, const std::string &output
|
|||||||
renderOrigin();
|
renderOrigin();
|
||||||
}
|
}
|
||||||
if (m_drawPlayers) {
|
if (m_drawPlayers) {
|
||||||
renderPlayers(input);
|
renderPlayers(input_path);
|
||||||
}
|
}
|
||||||
writeImage(output);
|
writeImage(output);
|
||||||
printUnknown();
|
printUnknown();
|
||||||
|
Loading…
Reference in New Issue
Block a user