19 #ifndef OPENXCOM_OPTIONS_H
20 #define OPENXCOM_OPTIONS_H
25 #include "OptionInfo.h"
31 enum ScrollType { SCROLL_NONE, SCROLL_TRIGGER, SCROLL_AUTO };
35 enum SaveSort { SORT_NAME_ASC, SORT_NAME_DESC, SORT_DATE_ASC, SORT_DATE_DESC };
37 enum MusicFormat { MUSIC_AUTO, MUSIC_FLAC, MUSIC_OGG, MUSIC_MP3, MUSIC_MOD, MUSIC_WAV, MUSIC_ADLIB, MUSIC_MIDI };
64 #include "Options.inc.h"
72 bool init(
int argc,
char *argv[]);
74 void load(
const std::string &filename =
"options");
76 void save(
const std::string &filename =
"options");
void updateOptions()
Updates the game's options with those in the configuation file, if it exists yet, and any supplied on...
Definition: Options.cpp:469
MusicFormat
Music format preferences.
Definition: Options.h:37
void switchDisplay()
Switches old/new display options for temporarily testing a new display setup.
Definition: Options.cpp:634
const std::vector< std::string > & getDataList()
Returns the game's list of possible Data folders.
Definition: Options.cpp:579
void setDataFolder(const std::string &folder)
Changes the game's current Data folder where resources and X-Com files are loaded from...
Definition: Options.cpp:570
void create()
Sets up the options by creating their OptionInfo metadata.
Definition: Options.cpp:57
PathPreview
Path preview modes (can be OR'd together).
Definition: Options.h:41
std::string getUserFolder()
Returns the game's User folder where saves are stored in.
Definition: Options.cpp:589
bool init(int argc, char *argv[])
Handles the initialization of setting up default options and finding and loading any existing ones...
Definition: Options.cpp:386
SoundFormat
Sound format preferences.
Definition: Options.h:39
std::string getConfigFolder()
Returns the game's Config folder where settings are stored in.
Definition: Options.cpp:600
ScrollType
Battlescape drag scrolling types.
Definition: Options.h:31
std::string getDataFolder()
Returns the game's current Data folder where resources and X-Com files are loaded from...
Definition: Options.cpp:560
void save(const std::string &filename)
Saves options to a YAML file.
Definition: Options.cpp:530
void resetDefault()
Resets the options back to their defaults.
Definition: Options.cpp:276
const std::vector< OptionInfo > & getOptionInfo()
Returns the game's list of all available option information.
Definition: Options.cpp:609
KeyboardType
Keyboard input modes.
Definition: Options.h:33
SaveSort
Savegame sorting modes.
Definition: Options.h:35
void setFolders()
Sets up the game's Data folder where the data files are loaded from and the User folder and Config fo...
Definition: Options.cpp:423
void load(const std::string &filename)
Loads options from a YAML file.
Definition: Options.cpp:502
void backupDisplay()
Saves display settings temporarily to be able to revert to old ones.
Definition: Options.cpp:618