diff options
author | Gregory Montoir | 2008-12-03 22:15:05 +0000 |
---|---|---|
committer | Gregory Montoir | 2008-12-03 22:15:05 +0000 |
commit | 9ad879af48a5079b2c2b79dd65135d7f468085ea (patch) | |
tree | 4d01da3e0515bf3914af5bc385345b4476c5e81e | |
parent | 353a239bdb824e57e67745752d2df15dc3ae0687 (diff) | |
download | scummvm-rg350-9ad879af48a5079b2c2b79dd65135d7f468085ea.tar.gz scummvm-rg350-9ad879af48a5079b2c2b79dd65135d7f468085ea.tar.bz2 scummvm-rg350-9ad879af48a5079b2c2b79dd65135d7f468085ea.zip |
reworked bud tucker demo detection
svn-id: r35228
-rw-r--r-- | engines/tucker/detection.cpp | 32 | ||||
-rw-r--r-- | engines/tucker/staticres.cpp | 5 | ||||
-rw-r--r-- | engines/tucker/tucker.h | 1 |
3 files changed, 24 insertions, 14 deletions
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp index cfbac613f5..f80c9b5dfa 100644 --- a/engines/tucker/detection.cpp +++ b/engines/tucker/detection.cpp @@ -27,6 +27,7 @@ #include "common/advancedDetector.h" #include "common/savefile.h" #include "common/system.h" +#include "common/fs.h" #include "base/plugins.h" @@ -70,14 +71,6 @@ static const Common::ADGameDescription tuckerGameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - { - "tucker", - "Demo", - AD_ENTRY1s("sample.bnk", "0c58636237f90238cbfd49d76b3e5c1a", 10780), - Common::EN_ANY, - Common::kPlatformPC, - Common::ADGF_DEMO - }, AD_TABLE_END_MARKER }; @@ -92,6 +85,15 @@ static const Common::ADParams detectionParams = { 0 }; +static const Common::ADGameDescription tuckerDemoGameDescription = { + "tucker", + "Demo", + AD_ENTRY1(0, 0), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_DEMO +}; + class TuckerMetaEngine : public Common::AdvancedMetaEngine { public: TuckerMetaEngine() : Common::AdvancedMetaEngine(detectionParams) { @@ -122,6 +124,20 @@ public: return desc != 0; } + virtual const Common::ADGameDescription *fallbackDetect(const Common::FSList &fslist) const { + for (Common::FSList::const_iterator d = fslist.begin(); d != fslist.end(); ++d) { + Common::FSList audiofslist; + if (d->isDirectory() && d->getName().compareToIgnoreCase("audio") && d->getChildren(audiofslist, Common::FSNode::kListFilesOnly)) { + for (Common::FSList::const_iterator f = audiofslist.begin(); f != audiofslist.end(); ++f) { + if (!f->isDirectory() && f->getName().compareToIgnoreCase("demorolc.raw")) { + return &tuckerDemoGameDescription; + } + } + } + } + return 0; + } + virtual SaveStateList listSaves(const char *target) const { Common::String pattern = Tucker::generateGameStateFileName(target, 0, true); Common::StringList filenames = g_system->getSavefileManager()->listSavefiles(pattern.c_str()); diff --git a/engines/tucker/staticres.cpp b/engines/tucker/staticres.cpp index 0db11899ab..1ae0f54759 100644 --- a/engines/tucker/staticres.cpp +++ b/engines/tucker/staticres.cpp @@ -165,11 +165,6 @@ const int TuckerEngine::_staticData3Table[1600] = { 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000 }; -const int TuckerEngine::_instructionIdTable[] = { - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'l', 'm', - 'n', 'o', 'p', 'r', 's', 't', 'v', 'w', 'x', '+' -}; - int TuckerEngine::_locationHeightTable[80] = { 0x00, 0x1C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h index 5d9ad6b007..67084c9dd3 100644 --- a/engines/tucker/tucker.h +++ b/engines/tucker/tucker.h @@ -813,7 +813,6 @@ protected: static const uint8 _sprC02LookupTable[100]; static const uint8 _sprC02LookupTable2[100]; static const int _staticData3Table[1600]; - static const int _instructionIdTable[20]; static int _locationHeightTable[80]; static int _objectKeysPosXTable[80]; static int _objectKeysPosYTable[80]; |