Tools/mmaps_generator: Print readme with --help

This commit is contained in:
Shauren
2020-06-19 17:49:56 +02:00
parent 22a3cb4432
commit 7d9880252c
2 changed files with 14 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
Generator command line args
R"(Generator command line args
--threads [#] Max number of threads used by the generator
Default: 3
@@ -53,6 +53,7 @@ Generator command line args
this command will build the map regardless of --skip* option settings
if you do not specify a map number, builds all maps that pass the filters specified by --skip* options
--help This message
examples:
@@ -67,3 +68,4 @@ builds all tiles of map 0
movement_extractor 0 --tile 34,46
builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain)
)"

View File

@@ -28,6 +28,11 @@
#include <unordered_map>
#include <vector>
constexpr char Readme[] =
{
#include "Info/readme.txt"
};
using namespace MMAP;
namespace
@@ -241,6 +246,12 @@ bool handleArgs(int argc, char** argv,
offMeshInputPath = param;
}
else if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-?"))
{
printf("%s\n", Readme);
silent = true;
return false;
}
else
{
int map = atoi(argv[i]);