Tools/mmaps_generator: Print readme with --help

(cherry picked from commit 7d9880252c)
This commit is contained in:
Shauren
2020-06-19 17:49:56 +02:00
parent b9510f43c7
commit 8130024497
2 changed files with 21 additions and 7 deletions

View File

@@ -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)
)"

View File

@@ -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]);