From b19fb671d6080de4e10457bb97335bbeac09c02a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 26 Sep 2019 18:18:38 -0700 Subject: GLK: ADRIFT: Move subengine out of release build exclusions --- engines/glk/detection.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/glk') diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp index 4be0c38041..60b2faa01c 100644 --- a/engines/glk/detection.cpp +++ b/engines/glk/detection.cpp @@ -156,7 +156,8 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) cons // Create the correct engine *engine = nullptr; - if ((*engine = create(syst, gameDesc)) != nullptr) {} + if ((*engine = create(syst, gameDesc)) != nullptr) {} + else if ((*engine = create(syst, gameDesc)) != nullptr) {} else if ((*engine = create(syst, gameDesc)) != nullptr) {} else if ((*engine = create(syst, gameDesc)) != nullptr) {} else if ((*engine = create(syst, gameDesc)) != nullptr) {} @@ -164,7 +165,6 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) cons else if ((*engine = create(syst, gameDesc)) != nullptr) {} else if ((*engine = create(syst, gameDesc)) != nullptr) {} #ifndef RELEASE_BUILD - else if ((*engine = create(syst, gameDesc)) != nullptr) {} else if ((*engine = create(syst, gameDesc)) != nullptr) {} else if ((td = Glk::TADS::TADSMetaEngine::findGame(gameDesc._gameId.c_str()))._description) { if (td._options & Glk::TADS::OPTION_TADS3) @@ -204,6 +204,7 @@ Common::String GlkMetaEngine::findFileByGameId(const Common::String &gameId) con PlainGameList GlkMetaEngine::getSupportedGames() const { PlainGameList list; + Glk::Adrift::AdriftMetaEngine::getSupportedGames(list); Glk::AdvSys::AdvSysMetaEngine::getSupportedGames(list); Glk::Alan2::Alan2MetaEngine::getSupportedGames(list); Glk::Alan3::Alan3MetaEngine::getSupportedGames(list); @@ -212,7 +213,6 @@ PlainGameList GlkMetaEngine::getSupportedGames() const { Glk::Hugo::HugoMetaEngine::getSupportedGames(list); Glk::Scott::ScottMetaEngine::getSupportedGames(list); #ifndef RELEASE_BUILD - Glk::Adrift::AdriftMetaEngine::getSupportedGames(list); Glk::Magnetic::MagneticMetaEngine::getSupportedGames(list); Glk::TADS::TADSMetaEngine::getSupportedGames(list); #endif @@ -221,7 +221,10 @@ PlainGameList GlkMetaEngine::getSupportedGames() const { } PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const { - Glk::GameDescriptor gd = Glk::AdvSys::AdvSysMetaEngine::findGame(gameId); + Glk::GameDescriptor gd = Glk::Adrift::AdriftMetaEngine::findGame(gameId); + if (gd._description) return gd; + + gd = Glk::AdvSys::AdvSysMetaEngine::findGame(gameId); if (gd._description) return gd; gd = Glk::Alan2::Alan2MetaEngine::findGame(gameId); @@ -243,9 +246,6 @@ PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const { if (gd._description) return gd; #ifndef RELEASE_BUILD - gd = Glk::Adrift::AdriftMetaEngine::findGame(gameId); - if (gd._description) return gd; - gd = Glk::Magnetic::MagneticMetaEngine::findGame(gameId); if (gd._description) return gd; @@ -260,6 +260,7 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const { detectClashes(); DetectedGames detectedGames; + Glk::Adrift::AdriftMetaEngine::detectGames(fslist, detectedGames); Glk::AdvSys::AdvSysMetaEngine::detectGames(fslist, detectedGames); Glk::Alan2::Alan2MetaEngine::detectGames(fslist, detectedGames); Glk::Alan3::Alan3MetaEngine::detectGames(fslist, detectedGames); @@ -269,7 +270,6 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const { Glk::Scott::ScottMetaEngine::detectGames(fslist, detectedGames); #ifndef RELEASE_BUILD - Glk::Adrift::AdriftMetaEngine::detectGames(fslist, detectedGames); Glk::Magnetic::MagneticMetaEngine::detectGames(fslist, detectedGames); Glk::TADS::TADSMetaEngine::detectGames(fslist, detectedGames); #endif @@ -279,6 +279,7 @@ DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const { void GlkMetaEngine::detectClashes() const { Common::StringMap map; + Glk::Adrift::AdriftMetaEngine::detectClashes(map); Glk::AdvSys::AdvSysMetaEngine::detectClashes(map); Glk::Alan2::Alan2MetaEngine::detectClashes(map); Glk::Alan3::Alan3MetaEngine::detectClashes(map); @@ -288,7 +289,6 @@ void GlkMetaEngine::detectClashes() const { Glk::Scott::ScottMetaEngine::detectClashes(map); #ifndef RELEASE_BUILD - Glk::Adrift::AdriftMetaEngine::detectClashes(map); Glk::Magnetic::MagneticMetaEngine::detectClashes(map); Glk::TADS::TADSMetaEngine::detectClashes(map); #endif -- cgit v1.2.3