summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:56:06 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:56:06 +0000
commit5718c2e2e3299d95a6c30c456209da091eede83d (patch)
tree4f9ca68164ca815204b3fca7e0f42310a9fee430 /src/game
parentc99950c21537f9c890e4eac6d077c0ec6f31b7aa (diff)
downloadopenttd-5718c2e2e3299d95a6c30c456209da091eede83d.tar.xz
(svn r23607) -Add: wire GameScript in all the GUIs
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index 363682797..bc9a9d502 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -43,6 +43,11 @@ public:
*/
static class GameInstance *GetGameInstance() { return Game::instance; }
+ /**
+ * Get the current GameInfo.
+ */
+ static class GameInfo *GetInfo() { return Game::info; }
+
static void Rescan();
static void ResetConfig();
@@ -55,6 +60,11 @@ public:
/** Wrapper function for GameScannerInfo::FindInfo */
static class GameInfo *FindInfo(const char *name, int version, bool force_exact_match);
+ /**
+ * Get the current active instance.
+ */
+ static class GameInstance *GetInstance() { return Game::instance; }
+
private:
static uint frame_counter; ///< Tick counter for the Game code.
static class GameInstance *instance; ///< Instance to the current active Game.