[Scummvm-cvs-logs] SF.net SVN: scummvm:[35228] scummvm/trunk/engines/tucker

cyx at users.sourceforge.net cyx at users.sourceforge.net
Wed Dec 3 23:15:06 CET 2008


Revision: 35228
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35228&view=rev
Author:   cyx
Date:     2008-12-03 22:15:05 +0000 (Wed, 03 Dec 2008)

Log Message:
-----------
reworked bud tucker demo detection

Modified Paths:
--------------
    scummvm/trunk/engines/tucker/detection.cpp
    scummvm/trunk/engines/tucker/staticres.cpp
    scummvm/trunk/engines/tucker/tucker.h

Modified: scummvm/trunk/engines/tucker/detection.cpp
===================================================================
--- scummvm/trunk/engines/tucker/detection.cpp	2008-12-03 22:14:47 UTC (rev 35227)
+++ scummvm/trunk/engines/tucker/detection.cpp	2008-12-03 22:15:05 UTC (rev 35228)
@@ -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 @@
 		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 @@
 	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 @@
 		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());

Modified: scummvm/trunk/engines/tucker/staticres.cpp
===================================================================
--- scummvm/trunk/engines/tucker/staticres.cpp	2008-12-03 22:14:47 UTC (rev 35227)
+++ scummvm/trunk/engines/tucker/staticres.cpp	2008-12-03 22:15:05 UTC (rev 35228)
@@ -165,11 +165,6 @@
 	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,

Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h	2008-12-03 22:14:47 UTC (rev 35227)
+++ scummvm/trunk/engines/tucker/tucker.h	2008-12-03 22:15:05 UTC (rev 35228)
@@ -813,7 +813,6 @@
 	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];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list