diff options
author | Paul Gilbert | 2018-11-14 18:01:42 -0800 |
---|---|---|
committer | Paul Gilbert | 2018-12-08 19:05:59 -0800 |
commit | 67275924b5255d7503fe8bd15c853cfec197c569 (patch) | |
tree | 8157208a17d4cb9ca87f666a396db1345cb97664 /engines/glk/scott/detection.cpp | |
parent | 454f92cc74e1357b96ce06e8c77ed6c32cb30ba9 (diff) | |
download | scummvm-rg350-67275924b5255d7503fe8bd15c853cfec197c569.tar.gz scummvm-rg350-67275924b5255d7503fe8bd15c853cfec197c569.tar.bz2 scummvm-rg350-67275924b5255d7503fe8bd15c853cfec197c569.zip |
GLK: Derive detection from MetaEngine rather than AdvancedMetaEngine
Diffstat (limited to 'engines/glk/scott/detection.cpp')
-rw-r--r-- | engines/glk/scott/detection.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/glk/scott/detection.cpp b/engines/glk/scott/detection.cpp index 523b02de52..a02e3c56ad 100644 --- a/engines/glk/scott/detection.cpp +++ b/engines/glk/scott/detection.cpp @@ -24,10 +24,25 @@ #include "glk/scott/detection_tables.h" #include "common/file.h" #include "common/md5.h" +#include "engines/game.h" namespace Glk { namespace Scott { +void ScottMetaEngine::getSupportedGames(PlainGameList &games) { + for (const PlainGameDescriptor *pd = SCOTT_GAME_LIST; pd->gameId; ++pd) + games.push_back(*pd); +} + +PlainGameDescriptor ScottMetaEngine::findGame(const char *gameId) { + for (const PlainGameDescriptor *pd = SCOTT_GAME_LIST; pd->gameId; ++pd) { + if (!strcmp(gameId, pd->gameId)) + return *pd; + } + + return PlainGameDescriptor();; +} + bool ScottMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) { Common::File gameFile; Common::String md5; @@ -48,7 +63,8 @@ bool ScottMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g if (p->_filesize) { // Found a match - DetectedGame gd(p->_gameId, p->_desc, Common::EN_ANY, Common::kPlatformUnknown); + PlainGameDescriptor gameDesc = findGame(p->_gameId); + DetectedGame gd(p->_gameId, gameDesc.description, Common::EN_ANY, Common::kPlatformUnknown); gd.addExtraEntry("filename", file->getName()); gameList.push_back(gd); |