Maintain a circular buffer of recent commands, add to crashlog.
[openttd-joker.git] / src / game / game_config.hpp
blob4a0ec97fdd3c506bb5af4ec1313729fcc03f5b87
1 /* $Id: game_config.hpp 23737 2012-01-03 20:37:56Z truebrain $ */
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 */
10 /** @file game_config.hpp GameConfig stores the configuration settings of every Game. */
12 #ifndef GAME_CONFIG_HPP
13 #define GAME_CONFIG_HPP
15 #include "../script/script_config.hpp"
17 class GameConfig : public ScriptConfig {
18 public:
19 /**
20 * Get the config of a company.
22 static GameConfig *GetConfig(ScriptSettingSource source = SSS_DEFAULT);
24 GameConfig() :
25 ScriptConfig()
28 GameConfig(const GameConfig *config) :
29 ScriptConfig(config)
32 class GameInfo *GetInfo() const;
34 /**
35 * When ever the Game Scanner is reloaded, all infos become invalid. This
36 * function tells GameConfig about this.
37 * @param force_exact_match If true try to find the exact same version
38 * as specified. If false any version is ok.
39 * @return \c true if the reset was successful, \c false if the Game was no longer
40 * found.
42 bool ResetInfo(bool force_exact_match);
44 protected:
45 /* virtual */ ScriptInfo *FindInfo(const char *name, int version, bool force_exact_match);
48 #endif /* GAME_CONFIG_HPP */