Skip to content

Commit

Permalink
ACCESS: Add detection entry and subfolder adding for CD version
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 9, 2014
1 parent 5a3dfb1 commit 814d4eb
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions engines/access/access.cpp
Expand Up @@ -154,6 +154,18 @@ void AccessEngine::initialize() {
DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling");

if (isCD()) {
const Common::FSNode gameDataDir(ConfMan.get("path"));
const Common::FSNode cdromDir = gameDataDir.getChild("cdrom");

for (int idx = 0; idx < 15; ++idx) {
Common::String folder = (idx == 0) ? "game" :
Common::String::format("chap%.2d", idx);
SearchMan.addSubDirectoryMatching(cdromDir, folder);
}
}

// Create sub-objects of the engine
_debugger = new Debugger(this);
_events = new EventsManager(this);
_files = new FileManager(this);
Expand Down
1 change: 1 addition & 0 deletions engines/access/access.h
Expand Up @@ -200,6 +200,7 @@ class AccessEngine : public Engine {
virtual ~AccessEngine();

uint32 getFeatures() const;
bool isCD() const;
Common::Language getLanguage() const;
Common::Platform getPlatform() const;
uint16 getVersion() const;
Expand Down
4 changes: 4 additions & 0 deletions engines/access/detection.cpp
Expand Up @@ -56,6 +56,10 @@ uint32 AccessEngine::getFeatures() const {
return _gameDescription->desc.flags;
}

bool AccessEngine::isCD() const {
return (bool)(_gameDescription->desc.flags & ADGF_CD);
}

Common::Language AccessEngine::getLanguage() const {
return _gameDescription->desc.language;
}
Expand Down
18 changes: 18 additions & 0 deletions engines/access/detection_tables.h
Expand Up @@ -41,6 +41,24 @@ static const AccessGameDescription gameDescriptions[] = {
0
},

{
// Amazon Guadians of Eden - CD English
{
"amazon",
"CD",
{
{ "checksum.crc", 0, "bef85478132fec74cb5d9067f3a37d24", 8 },
AD_LISTEND
},
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_CD,
GUIO1(GUIO_NONE)
},
GType_Amazon,
0
},

{ AD_TABLE_END_MARKER, 0, 0 }
};

Expand Down

0 comments on commit 814d4eb

Please sign in to comment.