[Scummvm-cvs-logs] SF.net SVN: scummvm: [32489] scummvm/trunk/engines/drascula

sev at users.sourceforge.net sev at users.sourceforge.net
Mon Jun 2 07:56:57 CEST 2008


Revision: 32489
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32489&view=rev
Author:   sev
Date:     2008-06-01 22:56:53 -0700 (Sun, 01 Jun 2008)

Log Message:
-----------
Proper detection for packed German and French versions. Removed unneeded code.

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

Modified: scummvm/trunk/engines/drascula/detection.cpp
===================================================================
--- scummvm/trunk/engines/drascula/detection.cpp	2008-06-02 05:38:28 UTC (rev 32488)
+++ scummvm/trunk/engines/drascula/detection.cpp	2008-06-02 05:56:53 UTC (rev 32489)
@@ -36,28 +36,13 @@
 struct DrasculaGameDescription {
 	Common::ADGameDescription desc;
 
-	int gameID;
-	int gameType;
 	uint32 features;
-	uint16 version;
 };
 
-uint32 DrasculaEngine::getGameID() const {
-	return _gameDescription->gameID;
-}
-
 uint32 DrasculaEngine::getFeatures() const {
 	return _gameDescription->features;
 }
 
-Common::Platform DrasculaEngine::getPlatform() const {
-	return _gameDescription->desc.platform;
-}
-
-uint16 DrasculaEngine::getVersion() const {
-	return _gameDescription->version;
-}
-
 Common::Language DrasculaEngine::getLanguage() const {
 	return _gameDescription->desc.language;
 }
@@ -85,9 +70,6 @@
 			Common::ADGF_NO_FLAGS
 		},
 		0,
-		0,
-		0,
-		0,
 	},
 
 	{
@@ -100,10 +82,7 @@
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		0,
-		0,
-		0,
-		0,
+		GF_PACKED,
 	},
 
 	{
@@ -111,15 +90,16 @@
 		{
 			"drascula",
 			0,
-			AD_ENTRY1s("packet.003", "e8f4dc6091037329bab4ddb1cba35807", 719728),
+			{
+				{"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+				{"packet.003", 0, "e8f4dc6091037329bab4ddb1cba35807", 719728},
+				{NULL, 0, NULL, 0}
+			},
 			Common::DE_DEU,
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		0,
-		0,
-		0,
-		0,
+		GF_PACKED,
 	},
 
 	{
@@ -127,15 +107,16 @@
 		{
 			"drascula",
 			0,
-			AD_ENTRY1s("packet.002", "4401123400f22f212b89f15fb4b43013", 721122),
+			{
+				{"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563},
+				{"packet.003", 0, "4401123400f22f212b89f15fb4b43013", 721122},
+				{NULL, 0, NULL, 0}
+			},
 			Common::FR_FRA,
 			Common::kPlatformPC,
 			Common::ADGF_NO_FLAGS
 		},
-		0,
-		0,
-		0,
-		0,
+		GF_PACKED,
 	},
 
 	{
@@ -149,9 +130,6 @@
 			Common::ADGF_NO_FLAGS
 		},
 		0,
-		0,
-		0,
-		0,
 	},
 
 	{
@@ -165,9 +143,6 @@
 			Common::ADGF_NO_FLAGS
 		},
 		0,
-		0,
-		0,
-		0,
 	},
 
 	{
@@ -181,9 +156,6 @@
 			Common::ADGF_NO_FLAGS
 		},
 		0,
-		0,
-		0,
-		0,
 	},
 
 	{
@@ -197,33 +169,11 @@
 			Common::ADGF_NO_FLAGS
 		},
 		0,
-		0,
-		0,
-		0,
 	},
 
-	{ AD_TABLE_END_MARKER, 0, 0, 0, 0 }
+	{ AD_TABLE_END_MARKER, 0, }
 };
 
-/**
- * The fallback game descriptor used by the Drascula engine's fallbackDetector.
- * Contents of this struct are to be overwritten by the fallbackDetector.
- */
-static DrasculaGameDescription g_fallbackDesc = {
-	{
-		"",
-		"",
-		AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor
-		Common::UNK_LANG,
-		Common::kPlatformPC,
-		Common::ADGF_NO_FLAGS
-	},
-	0,
-	0,
-	0,
-	0,
-};
-
 } // End of namespace Drascula
 
 static const Common::ADParams detectionParams = {
@@ -258,9 +208,6 @@
 	}
 
 	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
-
-	const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const;
-
 };
 
 bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
@@ -271,21 +218,6 @@
 	return gd != 0;
 }
 
-const Common::ADGameDescription *DrasculaMetaEngine::fallbackDetect(const FSList *fslist) const {
-	// Set the default values for the fallback descriptor's ADGameDescription part.
-	Drascula::g_fallbackDesc.desc.language = Common::UNK_LANG;
-	Drascula::g_fallbackDesc.desc.platform = Common::kPlatformPC;
-	Drascula::g_fallbackDesc.desc.flags = Common::ADGF_NO_FLAGS;
-
-	// Set default values for the fallback descriptor's DrasculaGameDescription part.
-	Drascula::g_fallbackDesc.gameID = 0;
-	Drascula::g_fallbackDesc.features = 0;
-	Drascula::g_fallbackDesc.version = 0;
-
-	//return (const Common::ADGameDescription *)&Drascula::g_fallbackDesc;
-	return NULL;
-}
-
 #if PLUGIN_ENABLED_DYNAMIC(DRASCULA)
 	REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, DrasculaMetaEngine);
 #else

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-06-02 05:38:28 UTC (rev 32488)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-06-02 05:56:53 UTC (rev 32489)
@@ -60,11 +60,6 @@
 
 	const GameSettings *g;
 
-	const char *gameid = ConfMan.get("gameid").c_str();
-	for (g = drasculaSettings; g->gameid; ++g)
-		if (!scumm_stricmp(g->gameid, gameid))
-			_gameId = g->id;
-
 	_rnd = new Common::RandomSource();
 	syst->getEventManager()->registerRandomSource(*_rnd, "drascula");
 

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-06-02 05:38:28 UTC (rev 32488)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-06-02 05:56:53 UTC (rev 32489)
@@ -47,6 +47,7 @@
 namespace Drascula {
 
 enum DrasculaGameFeatures {
+	GF_PACKED = (1 << 0)
 };
 
 enum Languages {
@@ -144,7 +145,6 @@
 static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 };
 
 class DrasculaEngine : public ::Engine {
-	int _gameId;
 	Common::KeyState _keyPressed;
 
 protected:
@@ -155,16 +155,10 @@
 public:
 	DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gameDesc);
 	virtual ~DrasculaEngine();
-	int getGameId() {
-		return _gameId;
-	}
 
 	Common::RandomSource *_rnd;
 	const DrasculaGameDescription *_gameDescription;
-	uint32 getGameID() const;
 	uint32 getFeatures() const;
-	uint16 getVersion() const;
-	Common::Platform getPlatform() const;
 	Common::Language getLanguage() const;
 	void updateEvents();
 


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