Skip to content

Commit

Permalink
DM: Add detection for Amiga v2.0 English
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterGrascph committed Aug 26, 2016
1 parent 96cc074 commit 5ae7d3a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 9 deletions.
33 changes: 27 additions & 6 deletions engines/dm/detection.cpp
Expand Up @@ -7,28 +7,48 @@
#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
};


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 {
Expand All @@ -38,8 +58,9 @@ class DMMetaEngine : public AdvancedMetaEngine {
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(); }
Expand Down
8 changes: 5 additions & 3 deletions engines/dm/dm.cpp
Expand Up @@ -21,9 +21,8 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
// Do these from run

//Specify all default directories
const Common::FSNode gameDataDir(ConfMan.get("example"));
SearchMan.addSubDirectoryMatching(gameDataDir, "example2");

//const Common::FSNode gameDataDir(ConfMan.get("example"));
//SearchMan.addSubDirectoryMatching(gameDataDir, "example2");
DebugMan.addDebugChannel(kDMDebugExample, "example", "example desc");

// regiser random source
Expand Down Expand Up @@ -55,6 +54,9 @@ Common::Error DMEngine::run() {
// Run main loop
debug("DMEngine:: start main loop");

while (true)
debug("Run!");

return Common::kNoError;
}

Expand Down

0 comments on commit 5ae7d3a

Please sign in to comment.