1
0
mirror of https://github.com/luanti-org/minetestmapper.git synced 2025-10-06 05:45:21 +02:00

Optimize database access further by allowing "brute-force" queries instead of listing available blocks

Also adds a heuristic that will enable this behaviour automatically.
This commit is contained in:
sfan5
2020-03-27 21:10:00 +01:00
parent 5b264fd443
commit 7ff2288627
14 changed files with 317 additions and 89 deletions

View File

@@ -33,6 +33,7 @@ static void usage()
" --zoom <zoomlevel>\n"
" --colors <colors.txt>\n"
" --scales [t][b][l][r]\n"
" --exhaustive never|y|full|auto\n"
"Color format: '#000000'\n";
std::cout << usage_text;
}
@@ -90,6 +91,7 @@ int main(int argc, char *argv[])
{"colors", required_argument, 0, 'C'},
{"scales", required_argument, 0, 'f'},
{"noemptyimage", no_argument, 0, 'n'},
{"exhaustive", required_argument, 0, 'j'},
{0, 0, 0, 0}
};
@@ -201,6 +203,19 @@ int main(int argc, char *argv[])
case 'n':
generator.setDontWriteEmpty(true);
break;
case 'j': {
int mode;
if (!strcmp(optarg, "never"))
mode = EXH_NEVER;
else if (!strcmp(optarg, "y"))
mode = EXH_Y;
else if (!strcmp(optarg, "full"))
mode = EXH_FULL;
else
mode = EXH_AUTO;
generator.setExhaustiveSearch(mode);
}
break;
default:
exit(1);
}