settings_func.h
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 void IConsoleSetSetting(const char *name, const char *value, bool force_newgame = false);
00019 void IConsoleSetSetting(const char *name, int32 value);
00020 void IConsoleGetSetting(const char *name, bool force_newgame = false);
00021 void IConsoleListSettings(const char *prefilter);
00022
00023 void LoadFromConfig();
00024 void SaveToConfig();
00025 void CheckConfig();
00026
00027
00028
00029 typedef AutoFreeSmallVector<char *, 4> GRFPresetList;
00030
00031 void GetGRFPresetList(GRFPresetList *list);
00032 struct GRFConfig *LoadGRFPresetFromConfig(const char *config_name);
00033 void SaveGRFPresetToConfig(const char *config_name, struct GRFConfig *config);
00034 void DeleteGRFPresetFromConfig(const char *config_name);
00035
00036 uint GetCompanySettingIndex(const char *name);
00037 void SetDefaultCompanySettings(CompanyID cid);
00038
00039 #if defined(ENABLE_NETWORK)
00040 void SyncCompanySettings();
00041 #else
00042 static inline void SyncCompanySettings() {}
00043 #endif
00044
00045 #endif