Add the "core" command line option.

This option specifies a [core]'s id which is to be loaded.
Not used yet.
This commit is contained in:
Fabian Müller 2014-11-06 06:31:34 +01:00
parent 2b388ab5b2
commit c6e118f084
2 changed files with 5 additions and 0 deletions

View file

@ -160,6 +160,7 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
("clock", "Adds the option to show a clock for testing the drawing timer.")
("config-dir", po::value<std::string>(), "sets the path of the userdata directory to $HOME/<arg> or My Documents\\My Games\\<arg> for Windows. You can specify also an absolute path outside the $HOME or My Documents\\My Games directory. DEPRECATED: use userdata-path and userconfig-path instead.")
("config-path", "prints the path of the userdata directory and exits. DEPRECATED: use userdata-path and userconfig-path instead.")
("core", po::value<std::string>(), "overrides the loaded core with the one which id is spcified.")
("data-dir", po::value<std::string>(), "overrides the data directory with the one specified.")
("data-path", "prints the path of the data directory and exits.")
("debug,d", "enables additional command mode options in-game.")
@ -301,6 +302,8 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
campaign_scenario = vm["campaign-scenario"].as<std::string>();
if (vm.count("clock"))
clock = true;
if (vm.count("core"))
core_id = vm["core"].as<std::string>();
if (vm.count("config-dir"))
userdata_dir = vm["config-dir"].as<std::string>(); //TODO: complain and remove
if (vm.count("config-path"))

View file

@ -57,6 +57,8 @@ public:
boost::optional<std::string> campaign_scenario;
/// True if --clock was given on the command line. Enables
bool clock;
/// Non-empty if --core was given on the command line. Chooses the core to be loaded.
boost::optional<std::string> core_id;
/// True if --data-path was given on the command line. Prints path to data directory and exits.
bool data_path;
/// Non-empty if --data-dir was given on the command line. Sets the config dir to the specified one.