(svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro)

This commit is contained in:
yexo
2012-08-20 21:01:40 +00:00
parent 3132b9a9ab
commit 4d1d6332fb
10 changed files with 114 additions and 27 deletions

View File

@@ -13,6 +13,7 @@
#define GAME_HPP
#include "../core/string_compare_type.hpp"
#include "game_scanner.hpp"
#include <map>
/** 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.

View File

@@ -253,3 +253,12 @@
}
#endif /* defined(ENABLE_NETWORK) */
/* static */ GameScannerInfo *Game::GetScannerInfo()
{
return Game::scanner_info;
}
/* static */ GameScannerLibrary *Game::GetScannerLibrary()
{
return Game::scanner_library;
}