settings_func.h

Go to the documentation of this file.
00001 /* $Id: settings_func.h 17248 2009-08-21 20:21:05Z rubidium $ */
00002 
00003 /*
00004  * This file is part of OpenTTD.
00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
00008  */
00009 
00012 #ifndef SETTINGS_FUNC_H
00013 #define SETTINGS_FUNC_H
00014 
00015 #include "core/smallvec_type.hpp"
00016 
00017 void IConsoleSetSetting(const char *name, const char *value);
00018 void IConsoleSetSetting(const char *name, int32 value);
00019 void IConsoleGetSetting(const char *name);
00020 void IConsoleListSettings(const char *prefilter);
00021 
00022 void LoadFromConfig();
00023 void SaveToConfig();
00024 void CheckConfig();
00025 
00026 /* Functions to load and save NewGRF settings to a separate
00027  * configuration file, used for presets. */
00028 typedef AutoFreeSmallVector<char *, 4> GRFPresetList;
00029 
00030 void GetGRFPresetList(GRFPresetList *list);
00031 struct GRFConfig *LoadGRFPresetFromConfig(const char *config_name);
00032 void SaveGRFPresetToConfig(const char *config_name, struct GRFConfig *config);
00033 void DeleteGRFPresetFromConfig(const char *config_name);
00034 
00035 uint GetCompanySettingIndex(const char *name);
00036 void SetDefaultCompanySettings(CompanyID cid);
00037 
00038 #if defined(ENABLE_NETWORK)
00039 void SyncCompanySettings();
00040 #else /* ENABLE_NETWORK */
00041 static inline void SyncCompanySettings() {}
00042 #endif /* ENABLE_NETWORK */
00043 
00044 #endif /* SETTINGS_FUNC_H */

Generated on Tue Jan 5 21:02:58 2010 for OpenTTD by  doxygen 1.5.6