diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-06-19 17:49:56 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-06-30 22:39:06 +0200 |
commit | 8130024497e370af3a2cbc0c633773386a66f2ef (patch) | |
tree | c9e1516bd4a7e43aeb2dec6afa2406fa03436ec0 /src/tools | |
parent | b9510f43c7a5e8194eb70295ca8a51781b65306d (diff) |
Tools/mmaps_generator: Print readme with --help
(cherry picked from commit 7d9880252ce01b80a18e7f2cc5320a76e3399ce2)
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/mmaps_generator/Info/readme.txt | 17 | ||||
-rw-r--r-- | src/tools/mmaps_generator/PathGenerator.cpp | 11 |
2 files changed, 21 insertions, 7 deletions
diff --git a/src/tools/mmaps_generator/Info/readme.txt b/src/tools/mmaps_generator/Info/readme.txt index 4f85efd63e3..5178138c65f 100644 --- a/src/tools/mmaps_generator/Info/readme.txt +++ b/src/tools/mmaps_generator/Info/readme.txt @@ -1,7 +1,7 @@ -Generator command line args +R"(Generator command line args --threads [#] Max number of threads used by the generator - Default: 3 + Default: Same as CPU cores --offMeshInput [file.*] Path to file containing off mesh connections data. Format must be: (see offmesh_example.txt) @@ -18,7 +18,7 @@ Generator command line args --maxAngle [#] Max walkable inclination angle - float between 45 and 90 degrees (default 60) + float between 45 and 90 degrees (default 55) --skipLiquid [true|false] extract liquid data for maps @@ -53,16 +53,19 @@ 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: -movement_extractor +mmaps_generator builds maps using the default settings (see above for defaults) -movement_extractor --skipContinents true +mmaps_generator --skipContinents true builds the default maps, except continents -movement_extractor 0 +mmaps_generator 0 builds all tiles of map 0 -movement_extractor 0 --tile 34,46 +mmaps_generator 0 --tile 34,46 builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain) +)"
\ No newline at end of file diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp index c24240ef205..cff2007d867 100644 --- a/src/tools/mmaps_generator/PathGenerator.cpp +++ b/src/tools/mmaps_generator/PathGenerator.cpp @@ -25,6 +25,11 @@ #include <boost/filesystem.hpp> #include <unordered_map> +constexpr char Readme[] = +{ +#include "Info/readme.txt" +}; + using namespace MMAP; namespace @@ -254,6 +259,12 @@ bool handleArgs(int argc, char** argv, { allowDebug = true; } + else if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-?")) + { + printf("%s\n", Readme); + silent = true; + return false; + } else { int map = atoi(argv[i]); |