From fe31aa28c422f1fab32ab3b72d8369d539c8496e Mon Sep 17 00:00:00 2001 From: yexo Date: Mon, 20 Aug 2012 21:01:40 +0000 Subject: (svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro) --- src/game/game.hpp | 5 +++++ src/game/game_core.cpp | 9 +++++++++ 2 files changed, 14 insertions(+) (limited to 'src/game') diff --git a/src/game/game.hpp b/src/game/game.hpp index 50d97b50c..0347758e4 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -13,6 +13,7 @@ #define GAME_HPP #include "../core/string_compare_type.hpp" +#include "game_scanner.hpp" #include /** A list that maps AI names to their AIInfo object. */ @@ -101,6 +102,10 @@ public: static bool HasGame(const struct ContentInfo *ci, bool md5sum); static bool HasGameLibrary(const ContentInfo *ci, bool md5sum); #endif + /** Gets the ScriptScanner instance that is used to find Game scripts */ + static GameScannerInfo *GetScannerInfo(); + /** Gets the ScriptScanner instance that is used to find Game Libraries */ + static GameScannerLibrary *GetScannerLibrary(); private: static uint frame_counter; ///< Tick counter for the Game code. diff --git a/src/game/game_core.cpp b/src/game/game_core.cpp index c1892097f..f56dddf83 100644 --- a/src/game/game_core.cpp +++ b/src/game/game_core.cpp @@ -253,3 +253,12 @@ } #endif /* defined(ENABLE_NETWORK) */ + +/* static */ GameScannerInfo *Game::GetScannerInfo() +{ + return Game::scanner_info; +} +/* static */ GameScannerLibrary *Game::GetScannerLibrary() +{ + return Game::scanner_library; +} -- cgit v1.2.3-54-g00ecf