aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-14 18:01:42 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit67275924b5255d7503fe8bd15c853cfec197c569 (patch)
tree8157208a17d4cb9ca87f666a396db1345cb97664
parent454f92cc74e1357b96ce06e8c77ed6c32cb30ba9 (diff)
downloadscummvm-rg350-67275924b5255d7503fe8bd15c853cfec197c569.tar.gz
scummvm-rg350-67275924b5255d7503fe8bd15c853cfec197c569.tar.bz2
scummvm-rg350-67275924b5255d7503fe8bd15c853cfec197c569.zip
GLK: Derive detection from MetaEngine rather than AdvancedMetaEngine
-rw-r--r--engines/glk/detection.cpp247
-rw-r--r--engines/glk/detection_tables.h29
-rw-r--r--engines/glk/frotz/detection.cpp20
-rw-r--r--engines/glk/frotz/detection.h11
-rw-r--r--engines/glk/frotz/detection_tables.cpp85
-rw-r--r--engines/glk/frotz/detection_tables.h102
-rw-r--r--engines/glk/frotz/frotz.cpp2
-rw-r--r--engines/glk/frotz/frotz.h2
-rw-r--r--engines/glk/frotz/glk_interface.cpp2
-rw-r--r--engines/glk/frotz/glk_interface.h2
-rw-r--r--engines/glk/frotz/processor.cpp2
-rw-r--r--engines/glk/frotz/processor.h2
-rw-r--r--engines/glk/glk.cpp2
-rw-r--r--engines/glk/glk.h20
-rw-r--r--engines/glk/glk_api.cpp2
-rw-r--r--engines/glk/glk_api.h2
-rw-r--r--engines/glk/module.mk2
-rw-r--r--engines/glk/scott/detection.cpp18
-rw-r--r--engines/glk/scott/detection.h10
-rw-r--r--engines/glk/scott/detection_tables.cpp85
-rw-r--r--engines/glk/scott/detection_tables.h80
-rw-r--r--engines/glk/scott/scott.cpp2
-rw-r--r--engines/glk/scott/scott.h2
23 files changed, 263 insertions, 468 deletions
diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp
index c3b6865e23..b3cbccc93e 100644
--- a/engines/glk/detection.cpp
+++ b/engines/glk/detection.cpp
@@ -21,6 +21,10 @@
*/
#include "glk/glk.h"
+#include "glk/frotz/detection.h"
+#include "glk/frotz/frotz.h"
+#include "glk/scott/detection.h"
+#include "glk/scott/scott.h"
#include "base/plugins.h"
#include "common/md5.h"
@@ -31,128 +35,14 @@
#include "engines/advancedDetector.h"
#include "graphics/colormasks.h"
#include "graphics/surface.h"
-
-#define MAX_SAVES 99
-
-namespace Glk {
-
-struct GlkGameDescription {
- ADGameDescription _desc;
- Common::String _filename;
- InterpreterType _interpType;
- Common::String _md5;
-};
-
-const Common::String &GlkEngine::getFilename() const {
- return _gameDescription->_filename;
-}
-uint32 GlkEngine::getFeatures() const {
- return _gameDescription->_desc.flags;
-}
-
-bool GlkEngine::isDemo() const {
- return (bool)(_gameDescription->_desc.flags & ADGF_DEMO);
-}
-
-Common::Language GlkEngine::getLanguage() const {
- return _gameDescription->_desc.language;
-}
-
-InterpreterType GlkEngine::getInterpreterType() const {
- return _gameDescription->_interpType;
-}
-
-const Common::String &GlkEngine::getGameMD5() const {
- return _gameDescription->_md5;
-}
-
-} // End of namespace Glk
-
-#include "glk/scott/detection_tables.h"
-#include "glk/frotz/detection_tables.h"
-#define SCOTT(ID, NAME) { ID, Glk::Scott::NAME##_DESC }
-#define ZCODE(ID, NAME) { ID, Glk::Frotz::NAME##_DESC }
-
-static const PlainGameDescriptor glkGames[] = {
- {"zcode", "Zcode Games" },
- {"scottadams", "Scott Adams Games"},
-
- // Infocom/Z-code games
- ZCODE("amfv", AMFV),
- ZCODE("arthur", ARTHUR),
- ZCODE("ballyhoo", BALLYHOO),
- ZCODE("beyondzork", BEYONDZORK),
- ZCODE("borderzone", BORDERZONE),
- ZCODE("bureaucracy", BUREAUCRACY),
- ZCODE("cutthroats", CUTTHROATS),
- ZCODE("deadline", DEADLINE),
- ZCODE("enchanter", ENCHANTER),
- ZCODE("hhgttg", HHGTTG),
- ZCODE("hijinx", HIJINX),
- ZCODE("infidel", INFIDEL),
- ZCODE("journey", JOURNEY),
- ZCODE("lgop", LGOP),
- ZCODE("lgop2", LGOP2),
- ZCODE("lurking", LURKING),
- ZCODE("minizork1", MINIZORK1),
- ZCODE("moonmist", MOONMIST),
- ZCODE("nordbert", NORDBERT),
- ZCODE("planetfall", PLANETFALL),
- ZCODE("plundered", PLUNDERED),
- ZCODE("sampler1", SAMPLER1),
- ZCODE("sampler2", SAMPLER2),
- ZCODE("seastalker", SEASTALKER),
- ZCODE("sherlockriddle", SHERLOCKRIDDLE),
- ZCODE("shogun", SHOGUN),
- ZCODE("sorcerer", SORCERER),
- ZCODE("spellbreaker", SPELLBREAKER),
- ZCODE("starcross", STARCROSS),
- ZCODE("stationfall", STATIONFALL),
- ZCODE("suspect", SUSPECT),
- ZCODE("suspended", SUSPENDED),
- ZCODE("trinity", TRINITY),
- ZCODE("wishbringer", WISHBRINGER),
- ZCODE("witness", WITNESS),
- ZCODE("zork0", ZORK0),
- ZCODE("zork1", ZORK1),
- ZCODE("zork2", ZORK2),
- ZCODE("zork3", ZORK3),
- ZCODE("ztuu", ZTUU),
-
- // Scott Adams games
- SCOTT("adventureland", ADVENTURELAND),
- SCOTT("pirateadventure", PIRATE_ADVENTURE),
- SCOTT("missionimpossible", MISSION_IMPOSSIBLE),
- SCOTT("voodoocastle", VOODOO_CASTLE),
- SCOTT("thecount", THE_COUNT),
- SCOTT("strangeodyssey", STRANGE_ODYSSEY),
- SCOTT("mysteryfunhouse", MYSTERY_FUN_HOUSE),
- SCOTT("pyramidofdoom", PYRAMID_OF_DOOM),
- SCOTT("ghosttown", GHOST_TOWN),
- SCOTT("savageisland1", SAVAGE_ISLAND1),
- SCOTT("savageisland2", SAVAGE_ISLAND2),
- SCOTT("goldenvoyage", THE_GOLDEN_VOYAGE),
- SCOTT("adventure13", ADVENTURE13),
- SCOTT("adventure14", ADVENTURE14),
- SCOTT("buckaroobanzai", BUCKAROO_BANZAI),
- SCOTT("marveladventure", MARVEL_ADVENTURE),
- SCOTT("scottsampler", MINI_SAMPLER),
- {0, 0}
-};
-
#include "common/config-manager.h"
#include "common/file.h"
-#include "glk/detection_tables.h"
-#include "glk/frotz/detection.h"
-#include "glk/frotz/frotz.h"
-#include "glk/scott/detection.h"
-#include "glk/scott/scott.h"
-class GlkMetaEngine : public AdvancedMetaEngine {
+#define MAX_SAVES 99
+
+class GlkMetaEngine : public MetaEngine {
public:
- GlkMetaEngine() : AdvancedMetaEngine(Glk::gameDescriptions, sizeof(Glk::GlkGameDescription), glkGames) {
- _maxScanDepth = 3;
- }
+ GlkMetaEngine() : MetaEngine() {}
virtual const char *getName() const {
return "ScummGlk Engine";
@@ -163,15 +53,28 @@ public:
}
virtual bool hasFeature(MetaEngineFeature f) const override;
- virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
+ virtual Common::Error createInstance(OSystem *syst, Engine **engine) const override;
virtual SaveStateList listSaves(const char *target) const;
virtual int getMaximumSaveSlot() const;
virtual void removeSaveState(const char *target, int slot) const;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
+ /**
+ * Returns a list of games supported by this engine.
+ */
+ virtual PlainGameList getSupportedGames() const override;
+
+ /**
+ * Runs the engine's game detector on the given list of files, and returns a
+ * (possibly empty) list of games supported by the engine which it was able
+ * to detect amongst the given files.
+ */
virtual DetectedGames detectGames(const Common::FSList &fslist) const override;
- virtual ADDetectedGames detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const override;
+ /**
+ * Query the engine for a PlainGameDescriptor for the specified gameid, if any.
+ */
+ virtual PlainGameDescriptor findGame(const char *gameId) const override;
};
bool GlkMetaEngine::hasFeature(MetaEngineFeature f) const {
@@ -192,21 +95,49 @@ bool Glk::GlkEngine::hasFeature(EngineFeature f) const {
(f == kSupportsSavingDuringRuntime);
}
-bool GlkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
- const Glk::GlkGameDescription *gd = (const Glk::GlkGameDescription *)desc;
-
- switch (gd->_interpType) {
- case Glk::INTERPRETER_FROTZ:
- *engine = new Glk::Frotz::Frotz(syst, gd);
- break;
- case Glk::INTERPRETER_SCOTT:
- *engine = new Glk::Scott::Scott(syst, gd);
- break;
- default:
- error("Unknown interpreter");
- }
+Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
+ assert(engine);
- return gd != 0;
+ Glk::GlkGameDescription gameDesc;
+ gameDesc._gameId = ConfMan.get("gameid");
+ gameDesc._filename = ConfMan.get("filename");
+
+ if (Glk::Frotz::FrotzMetaEngine::findGame(gameDesc._gameId.c_str()).description)
+ *engine = new Glk::Frotz::Frotz(syst, gameDesc);
+ else if (Glk::Scott::ScottMetaEngine::findGame(gameDesc._gameId.c_str()).description)
+ *engine = new Glk::Scott::Scott(syst, gameDesc);
+ else
+ return Common::kNoGameDataFoundError;
+
+ return Common::kNoError;
+}
+
+PlainGameList GlkMetaEngine::getSupportedGames() const {
+ PlainGameList list;
+ Glk::Frotz::FrotzMetaEngine::getSupportedGames(list);
+ Glk::Scott::ScottMetaEngine::getSupportedGames(list);
+
+ return list;
+}
+
+PlainGameDescriptor GlkMetaEngine::findGame(const char *gameId) const {
+ PlainGameDescriptor gd;
+
+ gd = Glk::Frotz::FrotzMetaEngine::findGame(gameId);
+ if (gd.description) return gd;
+
+ gd = Glk::Scott::ScottMetaEngine::findGame(gameId);
+ if (gd.description) return gd;
+
+ return PlainGameDescriptor();
+}
+
+DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
+ DetectedGames detectedGames;
+ Glk::Frotz::FrotzMetaEngine::detectGames(fslist, detectedGames);
+ Glk::Scott::ScottMetaEngine::detectGames(fslist, detectedGames);
+
+ return detectedGames;
}
SaveStateList GlkMetaEngine::listSaves(const char *target) const {
@@ -270,54 +201,6 @@ SaveStateDescriptor GlkMetaEngine::querySaveMetaInfos(const char *target, int sl
return SaveStateDescriptor();
}
-DetectedGames GlkMetaEngine::detectGames(const Common::FSList &fslist) const {
- DetectedGames detectedGames;
- Glk::Frotz::FrotzMetaEngine::detectGames(fslist, detectedGames);
- Glk::Scott::ScottMetaEngine::detectGames(fslist, detectedGames);
-
- return detectedGames;
-}
-
-static Glk::GlkGameDescription gameDescription;
-
-ADDetectedGames GlkMetaEngine::detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const {
- static char gameId[100];
- strcpy(gameId, ConfMan.get("gameid").c_str());
- Common::String filename = ConfMan.get("filename");
-
- Common::FSList fslist;
- DetectedGames detectedGames;
- fslist.push_back(parent.getChild(filename));
- ADDetectedGames results;
- Common::File f;
-
- // Check each sub-engine for any detected games
- if (Glk::Frotz::FrotzMetaEngine::detectGames(fslist, detectedGames))
- gameDescription._interpType = Glk::INTERPRETER_FROTZ;
- else if (Glk::Scott::ScottMetaEngine::detectGames(fslist, detectedGames))
- gameDescription._interpType = Glk::INTERPRETER_SCOTT;
- else
- // No match found, so return no results
- return results;
-
- // Set up the game description and return it
- if (f.open(parent.getChild(filename))) {
- DetectedGame gd = detectedGames.front();
-
- gameDescription._desc.gameId = gameId;
- gameDescription._desc.language = gd.language;
- gameDescription._desc.platform = gd.platform;
- gameDescription._desc.guiOptions = GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES);
- gameDescription._filename = filename;
- gameDescription._md5 = Common::computeStreamMD5AsString(f, 5000);
-
- ADDetectedGame dg((ADGameDescription *)&gameDescription);
- results.push_back(dg);
- }
-
- return results;
-}
-
#if PLUGIN_ENABLED_DYNAMIC(GLK)
REGISTER_PLUGIN_DYNAMIC(GLK, PLUGIN_TYPE_ENGINE, GlkMetaEngine);
#else
diff --git a/engines/glk/detection_tables.h b/engines/glk/detection_tables.h
deleted file mode 100644
index 47a761e1f1..0000000000
--- a/engines/glk/detection_tables.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-namespace Glk {
-
-static const GlkGameDescription gameDescriptions[] = {
- { AD_TABLE_END_MARKER, "", (InterpreterType)0, "" }
-};
-
-} // End of namespace Glk
diff --git a/engines/glk/frotz/detection.cpp b/engines/glk/frotz/detection.cpp
index 36303d409b..b77344db35 100644
--- a/engines/glk/frotz/detection.cpp
+++ b/engines/glk/frotz/detection.cpp
@@ -21,14 +21,27 @@
*/
#include "glk/frotz/detection.h"
+#include "glk/frotz/detection_tables.h"
#include "common/file.h"
#include "common/md5.h"
-#include "glk/frotz/detection_tables.h"
-
namespace Glk {
namespace Frotz {
+void FrotzMetaEngine::getSupportedGames(PlainGameList &games) {
+ for (const PlainGameDescriptor *pd = FROTZ_GAME_LIST; pd->gameId; ++pd)
+ games.push_back(*pd);
+}
+
+PlainGameDescriptor FrotzMetaEngine::findGame(const char *gameId) {
+ for (const PlainGameDescriptor *pd = FROTZ_GAME_LIST; pd->gameId; ++pd) {
+ if (!strcmp(gameId, pd->gameId))
+ return *pd;
+ }
+
+ return PlainGameDescriptor();;
+}
+
bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &gameList) {
const char *const EXTENSIONS[9] = { ".z1", ".z2", ".z3", ".z4", ".z5", ".z6", ".z7", ".z8", ".zblorb" };
@@ -66,7 +79,8 @@ bool FrotzMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &g
warning("Uknown zcode game %s - %s %d", filename.c_str(), md5.c_str(), filesize);
gd = DetectedGame("zcode", "Unrecognised zcode game", Common::UNK_LANG, Common::kPlatformUnknown);
} else {
- gd = DetectedGame(p->_gameId, p->_description, p->_language, Common::kPlatformUnknown, p->_extra);
+ PlainGameDescriptor gameDesc = findGame(p->_gameId);
+ gd = DetectedGame(p->_gameId, gameDesc.description, p->_language, Common::kPlatformUnknown, p->_extra);
}
gd.addExtraEntry("filename", filename);
diff --git a/engines/glk/frotz/detection.h b/engines/glk/frotz/detection.h
index 9cd9373b2b..6c70f98879 100644
--- a/engines/glk/frotz/detection.h
+++ b/engines/glk/frotz/detection.h
@@ -32,6 +32,17 @@ namespace Frotz {
class FrotzMetaEngine {
public:
/**
+ * Get a list of supported games
+ */
+ static void getSupportedGames(PlainGameList &games);
+
+
+ /**
+ * Returns a game description for the given game Id, if it's supported
+ */
+ static PlainGameDescriptor findGame(const char *gameId);
+
+ /**
* Detect supported games
*/
static bool detectGames(const Common::FSList &fslist, DetectedGames &gameList);
diff --git a/engines/glk/frotz/detection_tables.cpp b/engines/glk/frotz/detection_tables.cpp
deleted file mode 100644
index f52b099d75..0000000000
--- a/engines/glk/frotz/detection_tables.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "glk/frotz/detection_tables.h"
-
-namespace Glk {
-namespace Frotz {
-
-const char *const AMFV_DESC = "A Mind Forever Voyaging";
-const char *const ARTHUR_DESC = "Arthur: The Quest for Excalibur";
-const char *const BALLYHOO_DESC = "Ballyhoo";
-const char *const BEYONDZORK_DESC = "Beyond Zork";
-const char *const BORDERZONE_DESC = "Border Zone";
-const char *const BUREAUCRACY_DESC = "Bureaucracy";
-const char *const CUTTHROATS_DESC = "Cutthroats";
-const char *const DEADLINE_DESC = "Deadline";
-const char *const ENCHANTER_DESC = "Enchanter";
-const char *const HHGTTG_DESC = "The Hitchhiker's Guide to the Galaxy";
-const char *const HIJINX_DESC = "Hollywood Hijinx";
-const char *const INFIDEL_DESC = "Infidel";
-const char *const JOURNEY_DESC = "Journey";
-const char *const LGOP_DESC = "Leather Goddesses of Phobos";
-const char *const LGOP2_DESC = "Leather Goddesses of Phobos 2";
-const char *const LURKING_DESC = "The Lurking Horror";
-const char *const MINIZORK1_DESC = "Mini Zork I: The Great Underground Empire";
-const char *const MOONMIST_DESC = "Moonmist";
-const char *const NORDBERT_DESC = "Nord and Bert Couldn't Make Head or Tail of It";
-const char *const PLANETFALL_DESC = "Planetfall";
-const char *const PLUNDERED_DESC = "Plundered Hearts";
-const char *const SAMPLER1_DESC = "Infocom Sampler 1";
-const char *const SAMPLER2_DESC = "Infocom Sampler 2";
-const char *const SEASTALKER_DESC = "Seastalker";
-const char *const SHERLOCKRIDDLE_DESC = "Sherlock: The Riddle of the Crown Jewels";
-const char *const SHOGUN_DESC = "James Clavell's Shogun";
-const char *const SORCERER_DESC = "Sorcerer";
-const char *const SPELLBREAKER_DESC = "Spellbreaker";
-const char *const STARCROSS_DESC = "Starcross";
-const char *const STATIONFALL_DESC = "Stationfall";
-const char *const SUSPECT_DESC = "Suspect";
-const char *const SUSPENDED_DESC = "Suspended";
-const char *const TRINITY_DESC = "Trinity";
-const char *const WISHBRINGER_DESC = "Wishbringer";
-const char *const WITNESS_DESC = "The Witness";
-const char *const ZORK0_DESC = "Zork Zero: The Revenge of Megaboz";
-const char *const ZORK1_DESC = "Zork I: The Great Underground Empire";
-const char *const ZORK2_DESC = "Zork II: The Wizard of Frobozz";
-const char *const ZORK3_DESC = "Zork III: The Dungeon Master";
-const char *const ZTUU_DESC = "Zork: The Undiscovered Underground";
-
-#define NONE GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES)
-#define ENTRY0(ID, DESCRIPTION, VERSION, MD5, FILESIZE) { ID, DESCRIPTION##_DESC, VERSION, MD5, FILESIZE, Common::EN_ANY, NONE }
-#define FROTZ_TABLE_END_MARKER { nullptr, nullptr, nullptr, nullptr, 0, Common::EN_ANY, "" }
-
-const FrotzGameDescription FROTZ_GAMES[] = {
- ENTRY0("hhgttg", HHGTTG, "v31 Solid Gold", "379022bcd4ec74b90274c6100c33f579", 158412),
- ENTRY0("hhgttg", HHGTTG, "v47", "fdda8f4239819402c62db866bb61a648", 112622),
- ENTRY0("hhgttg", HHGTTG, "v56", "a214fcb42bc9f554d07d983a12f6a062", 113444),
- ENTRY0("hhgttg", HHGTTG, "v58", "e867d49ad1fb9406ff4e0678a4ee2ac9", 113332),
- ENTRY0("hhgttg", HHGTTG, "v59", "34f6abc1f2a42be127ef434fc475f0ee", 113334),
-
- FROTZ_TABLE_END_MARKER
-};
-
-
-} // End of namespace Frotz
-} // End of namespace Glk
diff --git a/engines/glk/frotz/detection_tables.h b/engines/glk/frotz/detection_tables.h
index 51994ed967..5eb310d768 100644
--- a/engines/glk/frotz/detection_tables.h
+++ b/engines/glk/frotz/detection_tables.h
@@ -20,7 +20,8 @@
*
*/
-#include "engines/advancedDetector.h"
+#include "engines/game.h"
+#include "common/gui_options.h"
#include "common/language.h"
namespace Glk {
@@ -31,7 +32,6 @@ namespace Frotz {
*/
struct FrotzGameDescription {
const char *const _gameId;
- const char *const _description;
const char *const _extra;
const char *const _md5;
size_t _filesize;
@@ -39,47 +39,63 @@ struct FrotzGameDescription {
const char *const _guiOptions;
};
-extern const FrotzGameDescription FROTZ_GAMES[];
-extern const char *const AMFV_DESC;
-extern const char *const ARTHUR_DESC;
-extern const char *const BALLYHOO_DESC;
-extern const char *const BEYONDZORK_DESC;
-extern const char *const BORDERZONE_DESC;
-extern const char *const BUREAUCRACY_DESC;
-extern const char *const CUTTHROATS_DESC;
-extern const char *const DEADLINE_DESC;
-extern const char *const ENCHANTER_DESC;
-extern const char *const HHGTTG_DESC;
-extern const char *const HIJINX_DESC;
-extern const char *const INFIDEL_DESC;
-extern const char *const JOURNEY_DESC;
-extern const char *const LGOP_DESC;
-extern const char *const LGOP2_DESC;
-extern const char *const LURKING_DESC;
-extern const char *const MINIZORK1_DESC;
-extern const char *const MOONMIST_DESC;
-extern const char *const NORDBERT_DESC;
-extern const char *const PLANETFALL_DESC;
-extern const char *const PLUNDERED_DESC;
-extern const char *const SAMPLER1_DESC;
-extern const char *const SAMPLER2_DESC;
-extern const char *const SEASTALKER_DESC;
-extern const char *const SHERLOCKRIDDLE_DESC;
-extern const char *const SHOGUN_DESC;
-extern const char *const SORCERER_DESC;
-extern const char *const SPELLBREAKER_DESC;
-extern const char *const STARCROSS_DESC;
-extern const char *const STATIONFALL_DESC;
-extern const char *const SUSPECT_DESC;
-extern const char *const SUSPENDED_DESC;
-extern const char *const TRINITY_DESC;
-extern const char *const WISHBRINGER_DESC;
-extern const char *const WITNESS_DESC;
-extern const char *const ZORK0_DESC;
-extern const char *const ZORK1_DESC;
-extern const char *const ZORK2_DESC;
-extern const char *const ZORK3_DESC;
-extern const char *const ZTUU_DESC;
+const PlainGameDescriptor FROTZ_GAME_LIST[] = {
+ { "amfv", "A Mind Forever Voyaging" },
+ { "arthur", "Arthur: The Quest for Excalibur" },
+ { "ballyhoo", "Ballyhoo" },
+ { "beyondzork", "Beyond Zork" },
+ { "borderzone", "Border Zone" },
+ { "bureaucracy", "Bureaucracy" },
+ { "cutthroats", "Cutthroats" },
+ { "deadline", "Deadline" },
+ { "enchanter", "Enchanter" },
+ { "hhgttg", "The Hitchhiker's Guide to the Galaxy" },
+ { "hollywoodhijinx", "Hollywood Hijinx" },
+ { "infidel", "Infidel" },
+ { "journey", "Journey" },
+ { "lgop", "Leather Goddesses of Phobos" },
+ { "lgop2", "Leather Goddesses of Phobos 2" },
+ { "lurkinghorror", "The Lurking Horror" },
+ { "minizork", "Mini Zork I: The Great Underground Empire" },
+ { "moonmist", "Moonmist" },
+ { "nordbert", "Nord and Bert Couldn't Make Head or Tail of It" },
+ { "planetfall", "Planetfall" },
+ { "plunderedhearts", "Plundered Hearts" },
+ { "infocomsampler1", "Infocom Sampler 1" },
+ { "infocomsampler2", "Infocom Sampler 2" },
+ { "seastalker", "Seastalker" },
+ { "sherlockriddle", "Sherlock: The Riddle of the Crown Jewels" },
+ { "shogun", "James Clavell's Shogun" },
+ { "sorcerer", "Sorcerer" },
+ { "spellbreaker", "Spellbreaker" },
+ { "starcross", "Starcross" },
+ { "stationfall", "Stationfall" },
+ { "suspect", "Suspect" },
+ { "suspended", "Suspended" },
+ { "trinity", "Trinity" },
+ { "wishbringer", "Wishbringer" },
+ { "thewitness", "The Witness" },
+ { "zork0", "Zork Zero: The Revenge of Megaboz" },
+ { "zork1", "Zork I: The Great Underground Empire" },
+ { "zork2", "Zork II: The Wizard of Frobozz" },
+ { "zork3", "Zork III: The Dungeon Master" },
+ { "ztuu", "Zork: The Undiscovered Underground" },
+ { nullptr, nullptr }
+};
+
+#define NONE GUIO4(GUIO_NOSPEECH, GUIO_NOSFX, GUIO_NOMUSIC, GUIO_NOSUBTITLES)
+#define ENTRY0(ID, VERSION, MD5, FILESIZE) { ID, VERSION, MD5, FILESIZE, Common::EN_ANY, NONE }
+#define FROTZ_TABLE_END_MARKER { nullptr, nullptr, nullptr, 0, Common::EN_ANY, "" }
+
+const FrotzGameDescription FROTZ_GAMES[] = {
+ ENTRY0("hhgttg", "v31 Solid Gold", "379022bcd4ec74b90274c6100c33f579", 158412),
+ ENTRY0("hhgttg", "v47", "fdda8f4239819402c62db866bb61a648", 112622),
+ ENTRY0("hhgttg", "v56", "a214fcb42bc9f554d07d983a12f6a062", 113444),
+ ENTRY0("hhgttg", "v58", "e867d49ad1fb9406ff4e0678a4ee2ac9", 113332),
+ ENTRY0("hhgttg", "v59", "34f6abc1f2a42be127ef434fc475f0ee", 113334),
+
+ FROTZ_TABLE_END_MARKER
+};
} // End of namespace Frotz
} // End of namespace Glk
diff --git a/engines/glk/frotz/frotz.cpp b/engines/glk/frotz/frotz.cpp
index f30acd0a4b..a6371b6ef3 100644
--- a/engines/glk/frotz/frotz.cpp
+++ b/engines/glk/frotz/frotz.cpp
@@ -29,7 +29,7 @@ namespace Frotz {
Frotz *g_vm;
-Frotz::Frotz(OSystem *syst, const GlkGameDescription *gameDesc) :
+Frotz::Frotz(OSystem *syst, const GlkGameDescription &gameDesc) :
Processor(syst, gameDesc) {
g_vm = this;
}
diff --git a/engines/glk/frotz/frotz.h b/engines/glk/frotz/frotz.h
index cecd88637a..e45abc07a8 100644
--- a/engines/glk/frotz/frotz.h
+++ b/engines/glk/frotz/frotz.h
@@ -36,7 +36,7 @@ public:
/**
* Constructor
*/
- Frotz(OSystem *syst, const GlkGameDescription *gameDesc);
+ Frotz(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Destructor
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp
index da27382c04..b9652bce46 100644
--- a/engines/glk/frotz/glk_interface.cpp
+++ b/engines/glk/frotz/glk_interface.cpp
@@ -25,7 +25,7 @@
namespace Glk {
namespace Frotz {
-GlkInterface::GlkInterface(OSystem *syst, const GlkGameDescription *gameDesc) :
+GlkInterface::GlkInterface(OSystem *syst, const GlkGameDescription &gameDesc) :
GlkAPI(syst, gameDesc),
oldstyle(0), curstyle(0), cury(1), curx(1), fixforced(0),
curr_fg(-2), curr_bg(-2), curr_font(1), prev_font(1), temp_font(0),
diff --git a/engines/glk/frotz/glk_interface.h b/engines/glk/frotz/glk_interface.h
index d78d49ffbb..8bbdb735df 100644
--- a/engines/glk/frotz/glk_interface.h
+++ b/engines/glk/frotz/glk_interface.h
@@ -181,7 +181,7 @@ public:
/**
* Constructor
*/
- GlkInterface(OSystem *syst, const GlkGameDescription *gameDesc);
+ GlkInterface(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Initialization
diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp
index a7cbad0427..442b0079fe 100644
--- a/engines/glk/frotz/processor.cpp
+++ b/engines/glk/frotz/processor.cpp
@@ -131,7 +131,7 @@ Opcode Processor::ext_opcodes[64] = {
&Processor::z_buffer_screen, // spec 1.1
};
-Processor::Processor(OSystem *syst, const GlkGameDescription *gameDesc) :
+Processor::Processor(OSystem *syst, const GlkGameDescription &gameDesc) :
GlkInterface(syst, gameDesc),
_finished(0), _sp(nullptr), _fp(nullptr), _frameCount(0),
zargc(0), _decoded(nullptr), _encoded(nullptr), _resolution(0),
diff --git a/engines/glk/frotz/processor.h b/engines/glk/frotz/processor.h
index 4bd9d2c5af..ddb264ca3f 100644
--- a/engines/glk/frotz/processor.h
+++ b/engines/glk/frotz/processor.h
@@ -1522,7 +1522,7 @@ public:
/**
* Constructor
*/
- Processor(OSystem *syst, const GlkGameDescription *gameDesc);
+ Processor(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Initialization
diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp
index a35f242f44..987fbc894a 100644
--- a/engines/glk/glk.cpp
+++ b/engines/glk/glk.cpp
@@ -41,7 +41,7 @@ namespace Glk {
GlkEngine *g_vm;
-GlkEngine::GlkEngine(OSystem *syst, const GlkGameDescription *gameDesc) :
+GlkEngine::GlkEngine(OSystem *syst, const GlkGameDescription &gameDesc) :
_gameDescription(gameDesc), Engine(syst), _random("Glk"), _clipboard(nullptr),
_conf(nullptr), _events(nullptr), _picList(nullptr), _screen(nullptr),
_selection(nullptr), _windows(nullptr), _copySelect(false), _terminated(false),
diff --git a/engines/glk/glk.h b/engines/glk/glk.h
index 92ea2aba91..b48d4e6e7d 100644
--- a/engines/glk/glk.h
+++ b/engines/glk/glk.h
@@ -70,7 +70,13 @@ enum GlkDebugChannels {
#define GLK_SAVEGAME_VERSION 1
-struct GlkGameDescription;
+struct GlkGameDescription {
+ Common::String _gameId;
+ Common::Language _language;
+ Common::String _filename;
+ InterpreterType _interpType;
+ Common::String _md5;
+};
/**
* Base class for the different interpreters
@@ -87,7 +93,7 @@ private:
*/
void initGraphicsMode();
protected:
- const GlkGameDescription *_gameDescription;
+ const GlkGameDescription _gameDescription;
Common::RandomSource _random;
int _loadSaveSlot;
@@ -119,7 +125,7 @@ public:
void (*gli_unregister_arr)(void *array, glui32 len, const char *typecode, gidispatch_rock_t objrock);
public:
- GlkEngine(OSystem *syst, const GlkGameDescription *gameDesc);
+ GlkEngine(OSystem *syst, const GlkGameDescription &gameDesc);
virtual ~GlkEngine();
/**
@@ -149,22 +155,22 @@ public:
/**
* Returns the language
*/
- Common::Language getLanguage() const;
+ Common::Language getLanguage() const { return _gameDescription._language; };
/**
* Returns the running interpreter type
*/
- InterpreterType getInterpreterType() const;
+ InterpreterType getInterpreterType() const { return _gameDescription._interpType; }
/**
* Returns the game's md5
*/
- const Common::String &getGameMD5() const;
+ const Common::String &getGameMD5() const { return _gameDescription._md5; }
/**
* Returns the primary filename for the game
*/
- const Common::String &getFilename() const;
+ const Common::String &getFilename() const { return _gameDescription._filename; }
/**
* Return the game engine's target name
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index c219cd1e3f..609401590a 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -34,7 +34,7 @@
namespace Glk {
-GlkAPI::GlkAPI(OSystem *syst, const GlkGameDescription *gameDesc) :
+GlkAPI::GlkAPI(OSystem *syst, const GlkGameDescription &gameDesc) :
GlkEngine(syst, gameDesc), _gliFirstEvent(false) {
// Set uppercase/lowercase tables
int ix, res;
diff --git a/engines/glk/glk_api.h b/engines/glk/glk_api.h
index f864ac9dc3..8a37df1b7c 100644
--- a/engines/glk/glk_api.h
+++ b/engines/glk/glk_api.h
@@ -43,7 +43,7 @@ public:
/**
* Constructor
*/
- GlkAPI(OSystem *syst, const GlkGameDescription *gameDesc);
+ GlkAPI(OSystem *syst, const GlkGameDescription &gameDesc);
void glk_exit(void);
void glk_set_interrupt_handler(void(*func)(void));
diff --git a/engines/glk/module.mk b/engines/glk/module.mk
index 0f79cd8478..b5230344a0 100644
--- a/engines/glk/module.mk
+++ b/engines/glk/module.mk
@@ -22,7 +22,6 @@ MODULE_OBJS := \
window_text_buffer.o \
window_text_grid.o \
frotz/detection.o \
- frotz/detection_tables.o \
frotz/frotz.o \
frotz/glk_interface.o \
frotz/mem.o \
@@ -39,7 +38,6 @@ MODULE_OBJS := \
frotz/processor_variables.o \
frotz/quetzal.o \
scott/detection.o \
- scott/detection_tables.o \
scott/scott.o
# This module can be built as a plugin
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);
diff --git a/engines/glk/scott/detection.h b/engines/glk/scott/detection.h
index 2c187cdc4a..384197c467 100644
--- a/engines/glk/scott/detection.h
+++ b/engines/glk/scott/detection.h
@@ -32,6 +32,16 @@ namespace Scott {
class ScottMetaEngine {
public:
/**
+ * Get a list of supported games
+ */
+ static void getSupportedGames(PlainGameList &games);
+
+ /**
+ * Returns a game description for the given game Id, if it's supported
+ */
+ static PlainGameDescriptor findGame(const char *gameId);
+
+ /**
* Detect supported games
*/
static bool detectGames(const Common::FSList &fslist, DetectedGames &gameList);
diff --git a/engines/glk/scott/detection_tables.cpp b/engines/glk/scott/detection_tables.cpp
deleted file mode 100644
index f9a2a6c03a..0000000000
--- a/engines/glk/scott/detection_tables.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "glk/scott/detection_tables.h"
-
-namespace Glk {
-namespace Scott {
-
-const char *const ADVENTURELAND_DESC = "Adventureland";
-const char *const PIRATE_ADVENTURE_DESC = "Pirate Adventure";
-const char *const MISSION_IMPOSSIBLE_DESC = "Mission Impossible";
-const char *const VOODOO_CASTLE_DESC = "Voodoo Castle";
-const char *const THE_COUNT_DESC = "The Count";
-const char *const STRANGE_ODYSSEY_DESC = "Strange Odyssey";
-const char *const MYSTERY_FUN_HOUSE_DESC = "Mystery Fun House";
-const char *const PYRAMID_OF_DOOM_DESC = "Pyramid Of Doom";
-const char *const GHOST_TOWN_DESC = "Ghost Town";
-const char *const SAVAGE_ISLAND1_DESC = "Savage Island, Part 1";
-const char *const SAVAGE_ISLAND2_DESC = "Savage Island, Part 2";
-const char *const THE_GOLDEN_VOYAGE_DESC = "The Golden Voyage";
-const char *const ADVENTURE13_DESC = "Adventure 13";
-const char *const ADVENTURE14_DESC = "Adventure 14";
-const char *const BUCKAROO_BANZAI_DESC = "Buckaroo Banzai";
-const char *const MARVEL_ADVENTURE_DESC = "Marvel Adventure #1";
-const char *const MINI_SAMPLER_DESC = "Adventure International's Mini-Adventure Sampler";
-
-const ScottGame SCOTT_GAMES[] = {
- // PC game versions
- { "7c6f495d757a54e73d259efc718d8024", "adventureland", 15896, ADVENTURELAND_DESC },
- { "ea535fa7684508410151b4561de1f323", "pirateadventure", 16325, PIRATE_ADVENTURE_DESC },
- { "379c77a9a483886366b3b5c425e56410", "missionimpossible", 15275, MISSION_IMPOSSIBLE_DESC },
- { "a530a6857d1092eaa177eee575c94c71", "voodoocastle", 15852, VOODOO_CASTLE_DESC },
- { "5ebb4ade985670bb2eac54f8fa202214", "thecount", 17476, THE_COUNT_DESC },
- { "c57bb6df04dc77a2b232bc5bcab6e417", "strangeodyssey", 17489, STRANGE_ODYSSEY_DESC },
- { "ce2931ac3d5cbc270a5cb7be9e614f6e", "mysteryfunhouse", 17165, MYSTERY_FUN_HOUSE_DESC },
- { "4e6127fad6b5d75eccd3f3b101f8c9c8", "pyramidofdoom", 17673, PYRAMID_OF_DOOM_DESC },
- { "2c08327ab06d5490bd9e367ddaeca627", "ghosttown", 17831, GHOST_TOWN_DESC },
- { "8feb77f11d32e9567ce2fc7d435eaf44", "savageisland1", 19533, SAVAGE_ISLAND1_DESC },
- { "20c40a349f7a214ac515fb1d63c30a87", "savageisland2", 18367, SAVAGE_ISLAND2_DESC },
- { "e2a8f956ab215012d1495550c4c11ee8", "goldenvoyage", 18513, THE_GOLDEN_VOYAGE_DESC },
- { "f986d7e1ee074f65b6c1d00461c9b3c3", "adventure13", 19232, ADVENTURE13_DESC },
- { "6d98f422cc986d959a3c74351785aea3", "adventure14", 19013, ADVENTURE14_DESC },
- { "aadcc04e6b37eb9d30a58b5bc775842e", "marveladventure", 18876, MARVEL_ADVENTURE_DESC },
- { "d569a769f304dc02b3062d97458ddd01", "scottsampler", 13854, MINI_SAMPLER_DESC },
-
- // PDA game versions
- { "ae541fc1085da2f7d561b72ed20a6bc1", "adventureland", 18003, ADVENTURELAND_DESC },
- { "cbd47ab4fcfe00231ffd71d52378d410", "pirateadventure", 18482, PIRATE_ADVENTURE_DESC },
- { "9251ab2c64e63559d8a6e9e6246760a5", "missionimpossible", 17227, MISSION_IMPOSSIBLE_DESC },
- { "be849c5747c7fc3b201984afb4403b8e", "voodoocastle", 18140, VOODOO_CASTLE_DESC },
- { "85b75b6079b5ee572b5259b29a0e5d21", "thecount", 19999, THE_COUNT_DESC },
- { "c423cae841ac1927b5b2e503607b21bc", "strangeodyssey", 20115, STRANGE_ODYSSEY_DESC },
- { "326b98b991d401605074e64d474ce566", "mysteryfunhouse", 19700, MYSTERY_FUN_HOUSE_DESC },
- { "8ef9010399f055da9adb15ce7745a11c", "pyramidofdoom", 20320, PYRAMID_OF_DOOM_DESC },
- { "fcdcca8b2acf76ba2d0006cefa3630a1", "ghosttown", 20687, GHOST_TOWN_DESC },
- { "c8aaa80f07c40fa8e4b17432644919dc", "savageisland1", 22669, SAVAGE_ISLAND1_DESC },
- { "2add0f28d9b236c866890cdf8d86ee60", "savageisland2", 21169, SAVAGE_ISLAND2_DESC },
- { "675126bd0477e8ed9230ad3db5afc45f", "goldenvoyage", 21401, THE_GOLDEN_VOYAGE_DESC },
- { "0ef0def798d895ed766041fa99dd28a0", "adventure13", 22346, ADVENTURE13_DESC },
- { "0bf1bcc649422798332a38c88588fdff", "adventure14", 22087, ADVENTURE14_DESC },
- { "a0a5423967287dae9cbeb9abe8324479", "buckaroobanzai", 21038, BUCKAROO_BANZAI_DESC },
- { nullptr, nullptr, 0, nullptr }
-};
-
-} // End of namespace Frotz
-} // End of namespace Glk
diff --git a/engines/glk/scott/detection_tables.h b/engines/glk/scott/detection_tables.h
index 6365bde638..37a016393a 100644
--- a/engines/glk/scott/detection_tables.h
+++ b/engines/glk/scott/detection_tables.h
@@ -20,7 +20,8 @@
*
*/
-#include "engines/advancedDetector.h"
+#include "engines/game.h"
+#include "common/gui_options.h"
#include "common/language.h"
namespace Glk {
@@ -33,27 +34,66 @@ struct ScottGame {
const char *_md5;
const char *_gameId;
int32 _filesize;
- const char *_desc;
};
-extern const ScottGame SCOTT_GAMES[];
-extern const char *const ADVENTURELAND_DESC;
-extern const char *const PIRATE_ADVENTURE_DESC;
-extern const char *const MISSION_IMPOSSIBLE_DESC;
-extern const char *const VOODOO_CASTLE_DESC;
-extern const char *const THE_COUNT_DESC;
-extern const char *const STRANGE_ODYSSEY_DESC;
-extern const char *const MYSTERY_FUN_HOUSE_DESC;
-extern const char *const PYRAMID_OF_DOOM_DESC;
-extern const char *const GHOST_TOWN_DESC;
-extern const char *const SAVAGE_ISLAND1_DESC;
-extern const char *const SAVAGE_ISLAND2_DESC;
-extern const char *const THE_GOLDEN_VOYAGE_DESC;
-extern const char *const ADVENTURE13_DESC;
-extern const char *const ADVENTURE14_DESC;
-extern const char *const BUCKAROO_BANZAI_DESC;
-extern const char *const MARVEL_ADVENTURE_DESC;
-extern const char *const MINI_SAMPLER_DESC;
+const PlainGameDescriptor SCOTT_GAME_LIST[] = {
+ { "adventureland", "Adventureland" },
+ { "pirateadventure", "Pirate Adventure" },
+ { "missionimpossible", "Mission Impossible" },
+ { "voodoocastle", "Voodoo Castle" },
+ { "thecount", "The Count" },
+ { "strangeodyssey", "Strange Odyssey" },
+ { "mysteryfunhouse", "Mystery Fun House" },
+ { "pyramidofdoom", "Pyramid Of Doom" },
+ { "ghosttown", "Ghost Town" },
+ { "savageisland1", "Savage Island, Part 1" },
+ { "savageisland2", "Savage Island, Part 2" },
+ { "goldenvoyage", "The Golden Voyage" },
+ { "adventure13", "Adventure 13" },
+ { "adventure14", "Adventure 14" },
+ { "buckaroobanzai", "Buckaroo Banzai" },
+ { "marveladventure", "Marvel Adventure #1" },
+ { "scottsampler", "Adventure International's Mini-Adventure Sampler" },
+ { nullptr, nullptr }
+};
+
+const ScottGame SCOTT_GAMES[] = {
+ // PC game versions
+ { "7c6f495d757a54e73d259efc718d8024", "adventureland", 15896 },
+ { "ea535fa7684508410151b4561de1f323", "pirateadventure", 16325 },
+ { "379c77a9a483886366b3b5c425e56410", "missionimpossible", 15275 },
+ { "a530a6857d1092eaa177eee575c94c71", "voodoocastle", 15852 },
+ { "5ebb4ade985670bb2eac54f8fa202214", "thecount", 17476 },
+ { "c57bb6df04dc77a2b232bc5bcab6e417", "strangeodyssey", 17489 },
+ { "ce2931ac3d5cbc270a5cb7be9e614f6e", "mysteryfunhouse", 17165 },
+ { "4e6127fad6b5d75eccd3f3b101f8c9c8", "pyramidofdoom", 17673 },
+ { "2c08327ab06d5490bd9e367ddaeca627", "ghosttown", 17831 },
+ { "8feb77f11d32e9567ce2fc7d435eaf44", "savageisland1", 19533 },
+ { "20c40a349f7a214ac515fb1d63c30a87", "savageisland2", 18367 },
+ { "e2a8f956ab215012d1495550c4c11ee8", "goldenvoyage", 18513 },
+ { "f986d7e1ee074f65b6c1d00461c9b3c3", "adventure13", 19232 },
+ { "6d98f422cc986d959a3c74351785aea3", "adventure14", 19013 },
+ { "aadcc04e6b37eb9d30a58b5bc775842e", "marveladventure", 18876 },
+ { "d569a769f304dc02b3062d97458ddd01", "scottsampler", 13854 },
+
+ // PDA game versions
+ { "ae541fc1085da2f7d561b72ed20a6bc1", "adventureland", 18003 },
+ { "cbd47ab4fcfe00231ffd71d52378d410", "pirateadventure", 18482 },
+ { "9251ab2c64e63559d8a6e9e6246760a5", "missionimpossible", 17227 },
+ { "be849c5747c7fc3b201984afb4403b8e", "voodoocastle", 18140 },
+ { "85b75b6079b5ee572b5259b29a0e5d21", "thecount", 19999 },
+ { "c423cae841ac1927b5b2e503607b21bc", "strangeodyssey", 20115 },
+ { "326b98b991d401605074e64d474ce566", "mysteryfunhouse", 19700 },
+ { "8ef9010399f055da9adb15ce7745a11c", "pyramidofdoom", 20320 },
+ { "fcdcca8b2acf76ba2d0006cefa3630a1", "ghosttown", 20687 },
+ { "c8aaa80f07c40fa8e4b17432644919dc", "savageisland1", 22669 },
+ { "2add0f28d9b236c866890cdf8d86ee60", "savageisland2", 21169 },
+ { "675126bd0477e8ed9230ad3db5afc45f", "goldenvoyage", 21401 },
+ { "0ef0def798d895ed766041fa99dd28a0", "adventure13", 22346 },
+ { "0bf1bcc649422798332a38c88588fdff", "adventure14", 22087 },
+ { "a0a5423967287dae9cbeb9abe8324479", "buckaroobanzai", 21038 },
+ { nullptr, nullptr, 0 }
+};
} // End of namespace Frotz
} // End of namespace Glk
diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index 2def1a2a74..6fedab1644 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -26,7 +26,7 @@
namespace Glk {
namespace Scott {
-Scott::Scott(OSystem *syst, const GlkGameDescription *gameDesc) : GlkAPI(syst, gameDesc),
+Scott::Scott(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gameDesc),
Items(nullptr), Rooms(nullptr), Verbs(nullptr), Nouns(nullptr), Messages(nullptr),
Actions(nullptr), CurrentCounter(0), SavedRoom(0), Options(0), Width(0), TopHeight(0),
split_screen(true), Bottom(0), Top(0), BitFlags(0), _saveSlot(-1) {
diff --git a/engines/glk/scott/scott.h b/engines/glk/scott/scott.h
index 68994855fb..cf5f7bd644 100644
--- a/engines/glk/scott/scott.h
+++ b/engines/glk/scott/scott.h
@@ -167,7 +167,7 @@ public:
/**
* Constructor
*/
- Scott(OSystem *syst, const GlkGameDescription *gameDesc);
+ Scott(OSystem *syst, const GlkGameDescription &gameDesc);
/**
* Execute the game