Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SETTINGS_FUNC_H
00013 #define SETTINGS_FUNC_H
00014
00015 #include "core/smallvec_type.hpp"
00016 #include "company_type.h"
00017
00018 struct IniFile;
00019
00020 void IConsoleSetSetting(const char *name, const char *value, bool force_newgame = false);
00021 void IConsoleSetSetting(const char *name, int32 value);
00022 void IConsoleGetSetting(const char *name, bool force_newgame = false);
00023 void IConsoleListSettings(const char *prefilter);
00024
00025 void LoadFromConfig(bool minimal = false);
00026 void SaveToConfig();
00027 void CheckConfig();
00028
00029 void IniLoadWindowSettings(IniFile *ini, const char *grpname, void *desc);
00030 void IniSaveWindowSettings(IniFile *ini, const char *grpname, void *desc);
00031
00032
00033
00034 typedef AutoFreeSmallVector<char *, 4> GRFPresetList;
00035
00036 void GetGRFPresetList(GRFPresetList *list);
00037 struct GRFConfig *LoadGRFPresetFromConfig(const char *config_name);
00038 void SaveGRFPresetToConfig(const char *config_name, struct GRFConfig *config);
00039 void DeleteGRFPresetFromConfig(const char *config_name);
00040
00041 uint GetCompanySettingIndex(const char *name);
00042 void SetDefaultCompanySettings(CompanyID cid);
00043
00044 #if defined(ENABLE_NETWORK)
00045 void SyncCompanySettings();
00046 #else
00047 static inline void SyncCompanySettings() {}
00048 #endif
00049
00050 #endif