Tools/MapExtractor: Fixed -e argument

This commit is contained in:
joschiwald
2017-08-06 18:21:09 +02:00
parent 16f2673343
commit 3eedb3b714

View File

@@ -183,16 +183,18 @@ struct MapLoadInfo
// **************************************************
// Extractor options
// **************************************************
enum Extract
enum Extract : uint8
{
EXTRACT_MAP = 1,
EXTRACT_DBC = 2,
EXTRACT_CAMERA = 4,
EXTRACT_GT = 8
EXTRACT_MAP = 0x1,
EXTRACT_DBC = 0x2,
EXTRACT_CAMERA = 0x4,
EXTRACT_GT = 0x8,
EXTRACT_ALL = EXTRACT_MAP | EXTRACT_DBC | EXTRACT_CAMERA | EXTRACT_GT
};
// Select data for extract
int CONF_extract = EXTRACT_MAP | EXTRACT_DBC | EXTRACT_CAMERA | EXTRACT_GT;
int CONF_extract = EXTRACT_ALL;
// This option allow limit minimum height to some value (Allow save some memory)
bool CONF_allow_height_limit = true;
@@ -255,7 +257,7 @@ void Usage(char const* prg)
"%s -[var] [value]\n"\
"-i set input path\n"\
"-o set output path\n"\
"-e extract only MAP(1)/DBC(2)/Camera(4)/gt(8) - standard: all(11)\n"\
"-e extract only MAP(1)/DBC(2)/Camera(4)/gt(8) - standard: all(15)\n"\
"-f height stored as int (less map size but lost some accuracy) 1 by default\n"\
"-l dbc locale\n"\
"Example: %s -f 0 -i \"c:\\games\\game\"\n", prg, prg);
@@ -299,7 +301,7 @@ void HandleArgs(int argc, char* arg[])
if (c + 1 < argc) // all ok
{
CONF_extract = atoi(arg[c++ + 1]);
if (!(CONF_extract > 0 && CONF_extract < 12))
if (!(CONF_extract > 0 && CONF_extract <= EXTRACT_ALL))
Usage(arg[0]);
}
else