diff options
Diffstat (limited to 'engines/mohawk/detection.cpp')
-rw-r--r-- | engines/mohawk/detection.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp index c185a63174..98783d703e 100644 --- a/engines/mohawk/detection.cpp +++ b/engines/mohawk/detection.cpp @@ -46,6 +46,14 @@ namespace Mohawk { +struct MohawkGameDescription { + ADGameDescription desc; + + uint8 gameType; + uint32 features; + const char *appName; +}; + const char* MohawkEngine::getGameId() const { return _gameDescription->desc.gameId; } @@ -99,6 +107,23 @@ bool MohawkEngine_Riven::hasFeature(EngineFeature f) const { || (f == kSupportsSavingDuringRuntime); } +Common::String MohawkEngine_Riven::getDatafileLanguageName() const { + const ADGameFileDescription *fileDesc; + for (fileDesc = _gameDescription->desc.filesDescriptions; fileDesc->fileName; fileDesc++) { + if (Common::String(fileDesc->fileName).hasPrefix("a_data_")) { + break; + } + } + + if (!fileDesc->fileName) { + warning("Malformed 25th Anniversary Riven entry"); + + return ""; + } + + return Common::String(&fileDesc->fileName[7], strlen(fileDesc->fileName) - 7 - 4); +} + #endif } // End of Namespace Mohawk |