Codechange: split settings.ini over several files (#9421)

This reduced the load on compilers, as currently for example MacOS
doesn't like the huge settings-tables.

Additionally, nobody can find settings, as the list is massive and
unordered. By splitting it, it becomes a little bit more sensible.
This commit is contained in:
Patric Stout
2021-07-09 21:16:03 +02:00
committed by GitHub
parent d9ca9ca555
commit 8f5d0ecde3
21 changed files with 3925 additions and 3534 deletions

View File

@@ -312,8 +312,10 @@ static constexpr const SettingDesc *GetSettingDesc(const SettingVariant &desc)
return std::visit([](auto&& arg) -> const SettingDesc * { return &arg; }, desc);
}
typedef span<const SettingVariant> SettingTable;
const SettingDesc *GetSettingFromName(const std::string_view name);
void GetSettingSaveLoadByPrefix(const std::string_view prefix, std::vector<SaveLoad> &saveloads);
void GetSaveLoadFromSettingTable(SettingTable settings, std::vector<SaveLoad> &saveloads);
bool SetSettingValue(const IntSettingDesc *sd, int32 value, bool force_newgame = false);
bool SetSettingValue(const StringSettingDesc *sd, const std::string value, bool force_newgame = false);