Skip to content

Commit 8130024

Browse files
committed
Tools/mmaps_generator: Print readme with --help
(cherry picked from commit 7d98802)
1 parent b9510f4 commit 8130024

2 files changed

Lines changed: 21 additions & 7 deletions

File tree

src/tools/mmaps_generator/Info/readme.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Generator command line args
1+
R"(Generator command line args
22

33
--threads [#] Max number of threads used by the generator
4-
Default: 3
4+
Default: Same as CPU cores
55

66
--offMeshInput [file.*] Path to file containing off mesh connections data.
77
Format must be: (see offmesh_example.txt)
@@ -18,7 +18,7 @@ Generator command line args
1818

1919
--maxAngle [#] Max walkable inclination angle
2020

21-
float between 45 and 90 degrees (default 60)
21+
float between 45 and 90 degrees (default 55)
2222

2323
--skipLiquid [true|false] extract liquid data for maps
2424

@@ -53,16 +53,19 @@ Generator command line args
5353
this command will build the map regardless of --skip* option settings
5454
if you do not specify a map number, builds all maps that pass the filters specified by --skip* options
5555

56+
--help This message
57+
5658
examples:
5759

58-
movement_extractor
60+
mmaps_generator
5961
builds maps using the default settings (see above for defaults)
6062

61-
movement_extractor --skipContinents true
63+
mmaps_generator --skipContinents true
6264
builds the default maps, except continents
6365

64-
movement_extractor 0
66+
mmaps_generator 0
6567
builds all tiles of map 0
6668

67-
movement_extractor 0 --tile 34,46
69+
mmaps_generator 0 --tile 34,46
6870
builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain)
71+
)"

src/tools/mmaps_generator/PathGenerator.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
#include <boost/filesystem.hpp>
2626
#include <unordered_map>
2727

28+
constexpr char Readme[] =
29+
{
30+
#include "Info/readme.txt"
31+
};
32+
2833
using namespace MMAP;
2934

3035
namespace
@@ -254,6 +259,12 @@ bool handleArgs(int argc, char** argv,
254259
{
255260
allowDebug = true;
256261
}
262+
else if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-?"))
263+
{
264+
printf("%s\n", Readme);
265+
silent = true;
266+
return false;
267+
}
257268
else
258269
{
259270
int map = atoi(argv[i]);

0 commit comments

Comments
 (0)