From 5ae7d3a84b04336b65b93e2efe1c988c795e1752 Mon Sep 17 00:00:00 2001 From: WinterGrascph Date: Tue, 26 Apr 2016 23:33:03 +0200 Subject: DM: Add detection for Amiga v2.0 English --- engines/dm/detection.cpp | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'engines/dm/detection.cpp') diff --git a/engines/dm/detection.cpp b/engines/dm/detection.cpp index 4c970e32c9..443d2dba78 100644 --- a/engines/dm/detection.cpp +++ b/engines/dm/detection.cpp @@ -7,13 +7,35 @@ #include "engines/advancedDetector.h" namespace DM { static const PlainGameDescriptor DMGames[] = { + {"dm", "Dungeon Master"}, {0, 0} }; static const ADGameDescription gameDescriptions[] = { + { + "dm", "Amiga 2.0v English", + { + {"graphics.dat", 0, "6A2F135B53C2220F0251FA103E2A6E7E", 411960}, + {"Dungeon.dat", 0, "30028FB6A301ECB20127EF0B3AF32B05", 25006}, + AD_LISTEND + }, + Common::EN_GRB, Common::kPlatformAmiga, ADGF_NO_FLAGS, GUIO1(GUIO_NONE) + }, + AD_TABLE_END_MARKER }; +static ADGameDescription fallbackDesc = { + "dm", + "Unknown version", + AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor + Common::UNK_LANG, + Common::kPlatformDOS, + ADGF_NO_FLAGS, + GUIO1(GUIO_NONE) +}; + + static const ADExtraGuiOptionsMap optionsList[] = { AD_EXTRA_GUI_OPTIONS_TERMINATOR }; @@ -21,14 +43,12 @@ static const ADExtraGuiOptionsMap optionsList[] = { class DMMetaEngine : public AdvancedMetaEngine { public: - - DMMetaEngine() : AdvancedMetaEngine(DM::gameDescriptions, sizeof(ADGameDescription), DMGames, optionsList) { - _singleId = "Dummy"; + _singleId = "dm"; } virtual const char *getName() const { - return "Dummy"; + return "Dungeon Master"; } virtual const char *getOriginalCopyright() const { @@ -38,8 +58,9 @@ public: virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { return gameDescriptions; } virtual bool hasFeature(MetaEngineFeature f) const { return false; } virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { - *engine = new DM::DMEngine(syst); - return true; + if(desc) + *engine = new DM::DMEngine(syst); + return desc != nullptr; } virtual int getMaximumSaveSlot() const { return 99; } virtual SaveStateList listSaves(const char *target) const { return SaveStateList(); } -- cgit v1.2.3