OpenTTD

game_config.hpp
Go to the documentation of this file.
1 /* $Id: game_config.hpp 23737 2012-01-03 20:37:56Z truebrain $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef GAME_CONFIG_HPP
13 #define GAME_CONFIG_HPP
14
15 #include "../script/script_config.hpp"
16
17 class GameConfig : public ScriptConfig {
18 public:
22 static GameConfig *GetConfig(ScriptSettingSource source = SSS_DEFAULT);
23
24 GameConfig() :
25 ScriptConfig()
26 {}
27
28 GameConfig(const GameConfig *config) :
29 ScriptConfig(config)
30 {}
31
32 class GameInfo *GetInfo() const;
33
42 bool ResetInfo(bool force_exact_match);
43
44 protected:
45 /* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
46 };
47
48 #endif /* GAME_CONFIG_HPP */
GameConfig::ResetInfo
bool ResetInfo(bool force_exact_match)
When ever the Game Scanner is reloaded, all infos become invalid.
Definition: game_config.cpp:42
ScriptConfig
Script settings.
Definition: script_config.hpp:57
GameConfig::GetConfig
static GameConfig * GetConfig(ScriptSettingSource source=SSS_DEFAULT)
Get the config of a company.
Definition: game_config.cpp:20
GameConfig
Definition: game_config.hpp:17
GameInfo
All static information from an Game like name, version, etc.
Definition: game_info.hpp:18
ScriptConfig::SSS_DEFAULT
Get the Script config from the current game mode.
Definition: script_config.hpp:105
GameConfig::FindInfo
ScriptInfo * FindInfo(const char *name, int version, bool force_exact_match)
This function should call back to the Scanner in charge of this Config, to find the ScriptInfo belong...
Definition: game_config.cpp:37
ScriptInfo
All static information from an Script like name, version, etc.
Definition: script_info.hpp:32
ScriptConfig::ScriptSettingSource
ScriptSettingSource
Where to get the config from, either default (depends on current game mode) or force either newgame o...
Definition: script_config.hpp:104
ScriptConfig::version
int version
Version of the Script.
Definition: script_config.hpp:187
ScriptConfig::name
const char * name
Name of the Script.
Definition: script_config.hpp:186