Add --dumpblock flag for advanced use

This is not only useful for debugging minetestmapper itself but
also makes it a standalone tool for extracting data you want to work on
from a Minetest map.
This commit is contained in:
sfan5
2022-02-09 21:52:28 +01:00
parent 2e353312b5
commit b491dd375a
5 changed files with 56 additions and 13 deletions

View File

@ -92,6 +92,8 @@ public:
void generate(const std::string &input, const std::string &output);
void printGeometry(const std::string &input);
void dumpBlock(const std::string &input, BlockPos pos);
static std::set<std::string> getSupportedBackends();
private:

View File

@ -13,6 +13,7 @@ struct BlockPos {
int16_t z;
BlockPos() : x(0), y(0), z(0) {}
explicit BlockPos(int16_t v) : x(v), y(v), z(v) {}
BlockPos(int16_t x, int16_t y, int16_t z) : x(x), y(y), z(z) {}
// Implements the inverse ordering so that (2,2,2) < (1,1,1)