OpenTTD Source 20250205-master-gfd85ab1e2c
settings_func.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
7
10#ifndef SETTINGS_FUNC_H
11#define SETTINGS_FUNC_H
12
13#include "company_type.h"
14#include "string_type.h"
15#include "newgrf_config.h"
16
17struct IniFile;
18
19void IConsoleSetSetting(const char *name, const char *value, bool force_newgame = false);
20void IConsoleSetSetting(const char *name, int32_t value);
21void IConsoleGetSetting(const char *name, bool force_newgame = false);
22void IConsoleListSettings(const char *prefilter);
23
24void LoadFromConfig(bool minimal = false);
25void SaveToConfig();
26
27void IniLoadWindowSettings(IniFile &ini, const char *grpname, void *desc);
28void IniSaveWindowSettings(IniFile &ini, const char *grpname, void *desc);
29
31GRFConfigList LoadGRFPresetFromConfig(const char *config_name);
32void SaveGRFPresetToConfig(const char *config_name, GRFConfigList &config);
33void DeleteGRFPresetFromConfig(const char *config_name);
34
36
38
39#endif /* SETTINGS_FUNC_H */
Types related to companies.
Owner
Enum for all companies/owners.
Functions to find and configure NewGRFs.
void SyncCompanySettings()
Sync all company settings in a multiplayer game.
StringList GetGRFPresetList()
Get the list of known NewGrf presets.
void IniLoadWindowSettings(IniFile &ini, const char *grpname, void *desc)
Load a WindowDesc from config.
Definition settings.cpp:882
void SetDefaultCompanySettings(CompanyID cid)
Set the company settings for a new company to their default values.
void LoadFromConfig(bool minimal=false)
Load the values from the configuration files.
void SaveGRFPresetToConfig(const char *config_name, GRFConfigList &config)
Save a NewGRF configuration with a preset name.
void SaveToConfig()
Save the values to the configuration file.
void IniSaveWindowSettings(IniFile &ini, const char *grpname, void *desc)
Save a WindowDesc to config.
Definition settings.cpp:893
void DeleteGRFPresetFromConfig(const char *config_name)
Delete a NewGRF configuration by preset name.
void IConsoleListSettings(const char *prefilter)
List all settings and their value to the console.
void IConsoleGetSetting(const char *name, bool force_newgame=false)
Output value of a specific setting to the console.
GRFConfigList LoadGRFPresetFromConfig(const char *config_name)
Load a NewGRF configuration by preset-name.
Types for strings.
std::vector< std::string > StringList
Type for a list of strings.
Definition string_type.h:60
Ini file that supports both loading and saving.
Definition ini_type.h:88