Merge branch 'master' into jgrpp-beta
# Conflicts: # src/settings.cpp # src/settings_gui.cpp # src/settings_internal.h # src/table/company_settings.ini # src/table/currency_settings.ini # src/table/gameopt_settings.ini # src/table/misc_settings.ini # src/table/settings.h.preamble # src/table/settings.ini # src/table/win32_settings.ini # src/table/window_settings.ini
This commit is contained in:
@@ -133,8 +133,7 @@ struct SettingsXref {
|
||||
SettingsXref(const char *target_, OnXrefValueConvert *conv_) : target(target_), conv(conv_) {}
|
||||
};
|
||||
|
||||
struct SettingDesc {
|
||||
SettingDescBase desc; ///< Settings structure (going to configuration file)
|
||||
struct SettingDesc : SettingDescBase {
|
||||
SaveLoad save; ///< Internal structure (going to savegame, parts to config)
|
||||
const char *patx_name; ///< Name to save/load setting from in PATX chunk, if nullptr save/load from PATS chunk as normal
|
||||
SettingsXref xref; ///< Details of SettingDesc to use instead of the contents of this one, useful for loading legacy savegames, if target field nullptr save/load as normal
|
||||
@@ -143,6 +142,8 @@ struct SettingDesc {
|
||||
SettingType GetType() const;
|
||||
};
|
||||
|
||||
typedef std::initializer_list<const SettingDesc> SettingTable;
|
||||
|
||||
const SettingDesc *GetSettingFromName(const char *name, bool ignore_version = false);
|
||||
bool SetSettingValue(const SettingDesc *sd, int32 value, bool force_newgame = false);
|
||||
bool SetSettingValue(const SettingDesc *sd, const char *value, bool force_newgame = false);
|
||||
|
Reference in New Issue
Block a user