![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
Container for all the various global game options and customizable settings. More...
Functions | |
void | create () |
Sets up the options by creating their OptionInfo metadata. More... | |
void | resetDefault () |
Resets the options back to their defaults. More... | |
void | loadArgs (int argc, char *argv[]) |
Loads options from a set of command line arguments, in the format "-option value". More... | |
const std::map< std::string, ModInfo > & | getModInfos () |
Gets the map of mod ids to mod infos. | |
bool | init (int argc, char *argv[]) |
Handles the initialization of setting up default options and finding and loading any existing ones. More... | |
void | updateMods () |
Refreshes the mods and filemaps. | |
std::string | getActiveMaster () |
Gets the currently active master mod. More... | |
void | updateReservedSpace () |
Updates the reservedSpace for master mods if necessary. | |
void | mapResources () |
Maps resources in active mods to the virtual file system. | |
void | setFolders () |
Sets up the game's Data folder where the data files are loaded from and the User folder and Config folder where settings and saves are stored in. More... | |
void | userSplitMasters () |
Splits the game's User folder by master mod, creating a subfolder for each one and moving the apppropriate user data among them. More... | |
void | updateOptions () |
Updates the game's options with those in the configuration file, if it exists yet, and any supplied on the command line. More... | |
bool | load (const std::string &filename) |
Loads options from a YAML file. More... | |
bool | save (const std::string &filename) |
Saves options to a YAML file. More... | |
std::string | getDataFolder () |
Returns the game's current Data folder where resources and X-Com files are loaded from. More... | |
void | setDataFolder (const std::string &folder) |
Changes the game's current Data folder where resources and X-Com files are loaded from. More... | |
const std::vector< std::string > & | getDataList () |
Returns the game's list of possible Data folders. More... | |
std::string | getUserFolder () |
Returns the game's User folder where saves are stored in. More... | |
std::string | getConfigFolder () |
Returns the game's Config folder where settings are stored in. More... | |
std::string | getMasterUserFolder () |
Returns the game's User folder for the currently loaded master mod. More... | |
const std::vector< OptionInfo > & | getOptionInfo () |
Returns the game's list of all available option information. More... | |
std::vector< const ModInfo * > | getActiveMods () |
Returns a list of currently active mods. More... | |
void | backupDisplay () |
Saves display settings temporarily to be able to revert to old ones. More... | |
void | switchDisplay () |
Switches old/new display options for temporarily testing a new display setup. More... | |
Container for all the various global game options and customizable settings.
void OpenXcom::Options::backupDisplay | ( | ) |
Saves display settings temporarily to be able to revert to old ones.
Backup display options.
void OpenXcom::Options::create | ( | ) |
Sets up the options by creating their OptionInfo metadata.
Creates the options info.
std::string OpenXcom::Options::getActiveMaster | ( | ) |
std::vector< const ModInfo * > OpenXcom::Options::getActiveMods | ( | ) |
Returns a list of currently active mods.
Gets the list of currently active mods.
They must be enabled and activable.
std::string OpenXcom::Options::getConfigFolder | ( | ) |
Returns the game's Config folder where settings are stored in.
Gets the game's config folder.
Normally the same as the User folder.
std::string OpenXcom::Options::getDataFolder | ( | ) |
Returns the game's current Data folder where resources and X-Com files are loaded from.
Gets the game's data folder.
const std::vector< std::string > & OpenXcom::Options::getDataList | ( | ) |
Returns the game's list of possible Data folders.
Gets the game's data list.
std::string OpenXcom::Options::getMasterUserFolder | ( | ) |
Returns the game's User folder for the currently loaded master mod.
Gets the game's master mod user folder.
const std::vector< OptionInfo > & OpenXcom::Options::getOptionInfo | ( | ) |
Returns the game's list of all available option information.
Gets the game's options.
std::string OpenXcom::Options::getUserFolder | ( | ) |
Returns the game's User folder where saves are stored in.
Gets the game's user folder.
bool OpenXcom::Options::init | ( | int | argc, |
char * | argv[] | ||
) |
Handles the initialization of setting up default options and finding and loading any existing ones.
Initializes the options settings.
argc | Number of arguments. |
argv | Array of argument strings. |
bool OpenXcom::Options::load | ( | const std::string & | filename | ) |
Loads options from a YAML file.
Loads options from YAML.
filename | YAML filename. |
void OpenXcom::Options::loadArgs | ( | int | argc, |
char * | argv[] | ||
) |
Loads options from a set of command line arguments, in the format "-option value".
argc | Number of arguments. |
argv | Array of argument strings. |
void OpenXcom::Options::resetDefault | ( | ) |
Resets the options back to their defaults.
Restores default options.
bool OpenXcom::Options::save | ( | const std::string & | filename | ) |
Saves options to a YAML file.
Saves options to YAML.
filename | YAML filename. |
void OpenXcom::Options::setDataFolder | ( | const std::string & | folder | ) |
Changes the game's current Data folder where resources and X-Com files are loaded from.
Sets the game's data folder.
folder | Full path to Data folder. |
void OpenXcom::Options::setFolders | ( | ) |
Sets up the game's Data folder where the data files are loaded from and the User folder and Config folder where settings and saves are stored in.
Sets the game's data, user and config folders.
void OpenXcom::Options::switchDisplay | ( | ) |
Switches old/new display options for temporarily testing a new display setup.
Switches display options.
void OpenXcom::Options::updateOptions | ( | ) |
Updates the game's options with those in the configuration file, if it exists yet, and any supplied on the command line.
Update game options from config file and command line.
void OpenXcom::Options::userSplitMasters | ( | ) |
Splits the game's User folder by master mod, creating a subfolder for each one and moving the apppropriate user data among them.
Sets the game's user master folders.