|
@@ -194,12 +194,13 @@ static void ShowHelp()
|
|
|
#endif
|
|
|
" -I graphics_set = Force the graphics set (see below)\n"
|
|
|
" -S sounds_set = Force the sounds set (see below)\n"
|
|
|
" -M music_set = Force the music set (see below)\n"
|
|
|
" -c config_file = Use 'config_file' instead of 'openttd.cfg'\n"
|
|
|
" -x = Never save configuration changes to disk\n"
|
|
|
" -X = Don't use global folders to search for files\n"
|
|
|
" -q savegame = Write some information about the savegame and exit\n"
|
|
|
"\n",
|
|
|
lastof(buf)
|
|
|
);
|
|
|
|
|
|
/* List the graphics packs */
|
|
@@ -503,12 +504,13 @@ static const OptionData _options[] = {
|
|
|
GETOPT_SHORT_OPTVAL('d'),
|
|
|
GETOPT_SHORT_NOVAL('e'),
|
|
|
GETOPT_SHORT_OPTVAL('g'),
|
|
|
GETOPT_SHORT_VALUE('G'),
|
|
|
GETOPT_SHORT_VALUE('c'),
|
|
|
GETOPT_SHORT_NOVAL('x'),
|
|
|
GETOPT_SHORT_NOVAL('X'),
|
|
|
GETOPT_SHORT_VALUE('q'),
|
|
|
GETOPT_SHORT_NOVAL('h'),
|
|
|
GETOPT_END()
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -527,12 +529,13 @@ int openttd_main(int argc, char *argv[])
|
|
|
std::string sounds_set;
|
|
|
std::string music_set;
|
|
|
Dimension resolution = {0, 0};
|
|
|
std::unique_ptr<AfterNewGRFScan> scanner(new AfterNewGRFScan());
|
|
|
bool dedicated = false;
|
|
|
char *debuglog_conn = nullptr;
|
|
|
bool only_local_path = false;
|
|
|
|
|
|
extern bool _dedicated_forks;
|
|
|
_dedicated_forks = false;
|
|
|
|
|
|
_game_mode = GM_MENU;
|
|
|
_switch_mode = SM_MENU;
|
|
@@ -605,13 +608,13 @@ int openttd_main(int argc, char *argv[])
|
|
|
/* Give a random map if no seed has been given */
|
|
|
if (scanner->generation_seed == GENERATE_NEW_SEED) {
|
|
|
scanner->generation_seed = InteractiveRandom();
|
|
|
}
|
|
|
break;
|
|
|
case 'q': {
|
|
|
DeterminePaths(argv[0]);
|
|
|
DeterminePaths(argv[0], only_local_path);
|
|
|
if (StrEmpty(mgo.opt)) {
|
|
|
ret = 1;
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
char title[80];
|
|
@@ -634,12 +637,13 @@ int openttd_main(int argc, char *argv[])
|
|
|
WriteSavegameInfo(title);
|
|
|
return ret;
|
|
|
}
|
|
|
case 'G': scanner->generation_seed = strtoul(mgo.opt, nullptr, 10); break;
|
|
|
case 'c': _config_file = mgo.opt; break;
|
|
|
case 'x': scanner->save_config = false; break;
|
|
|
case 'X': only_local_path = true; break;
|
|
|
case 'h':
|
|
|
i = -2; // Force printing of help.
|
|
|
break;
|
|
|
}
|
|
|
if (i == -2) break;
|
|
|
}
|
|
@@ -647,22 +651,22 @@ int openttd_main(int argc, char *argv[])
|
|
|
if (i == -2 || mgo.numleft > 0) {
|
|
|
/* Either the user typed '-h', they made an error, or they added unrecognized command line arguments.
|
|
|
* In all cases, print the help, and exit.
|
|
|
*
|
|
|
* The next two functions are needed to list the graphics sets. We can't do them earlier
|
|
|
* because then we cannot show it on the debug console as that hasn't been configured yet. */
|
|
|
DeterminePaths(argv[0]);
|
|
|
DeterminePaths(argv[0], only_local_path);
|
|
|
TarScanner::DoScan(TarScanner::BASESET);
|
|
|
BaseGraphics::FindSets();
|
|
|
BaseSounds::FindSets();
|
|
|
BaseMusic::FindSets();
|
|
|
ShowHelp();
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
DeterminePaths(argv[0]);
|
|
|
DeterminePaths(argv[0], only_local_path);
|
|
|
TarScanner::DoScan(TarScanner::BASESET);
|
|
|
|
|
|
if (dedicated) DEBUG(net, 3, "Starting dedicated server, version %s", _openttd_revision);
|
|
|
if (_dedicated_forks && !dedicated) _dedicated_forks = false;
|
|
|
|
|
|
#if defined(UNIX)
|