[Scummvm-cvs-logs] SF.net SVN: scummvm: [31121] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Mar 14 18:31:05 CET 2008


Revision: 31121
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31121&view=rev
Author:   fingolfin
Date:     2008-03-14 10:31:04 -0700 (Fri, 14 Mar 2008)

Log Message:
-----------
Started to get rid of Common::EncapsulatedADGameDesc (using plain Common::ADGameDescription instead)

Modified Paths:
--------------
    scummvm/trunk/common/advancedDetector.cpp
    scummvm/trunk/common/advancedDetector.h
    scummvm/trunk/engines/agi/detection.cpp
    scummvm/trunk/engines/agos/detection.cpp
    scummvm/trunk/engines/cine/detection.cpp
    scummvm/trunk/engines/cruise/detection.cpp
    scummvm/trunk/engines/drascula/detection.cpp
    scummvm/trunk/engines/gob/detection.cpp
    scummvm/trunk/engines/igor/detection.cpp
    scummvm/trunk/engines/kyra/detection.cpp
    scummvm/trunk/engines/lure/detection.cpp
    scummvm/trunk/engines/parallaction/detection.cpp
    scummvm/trunk/engines/saga/detection.cpp
    scummvm/trunk/engines/touche/detection.cpp

Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/common/advancedDetector.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -271,14 +271,12 @@
 		}
 	}
 
-	if (result.realDesc != 0) {
-		debug(2, "Running %s", toGameDescriptor(result, params.list).description().c_str());
-	}
-
 	if (result.realDesc == 0) {
 		return kNoGameDataFoundError;
 	}
-	if (!createInstance(syst, engine, result)) {
+
+	debug(2, "Running %s", toGameDescriptor(result, params.list).description().c_str());
+	if (!createInstance(syst, engine, result.realDesc)) {
 		return kNoGameDataFoundError;
 	}
 	return kNoError;

Modified: scummvm/trunk/common/advancedDetector.h
===================================================================
--- scummvm/trunk/common/advancedDetector.h	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/common/advancedDetector.h	2008-03-14 17:31:04 UTC (rev 31121)
@@ -232,9 +232,8 @@
 	virtual PluginError createInstance(OSystem *syst, Engine **engine) const;
 
 	// To be provided by subclasses
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const = 0;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const = 0;
 
-
 	/**
 	 * An (optional) generic fallback detect function which is invoked
 	 * if both the regular MD5 based detection as well as the file

Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/agi/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -2270,15 +2270,15 @@
 		return "Sierra AGI Engine (C) Sierra On-Line Software";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 
 	Common::EncapsulatedADGameDesc fallbackDetect(const FSList *fslist) const {
 		return Agi::fallbackDetector(fslist);
 	}
 };
 
-bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Agi::AGIGameDescription *gd = (const Agi::AGIGameDescription *)(encapsulatedDesc.realDesc);
+bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Agi::AGIGameDescription *gd = (const Agi::AGIGameDescription *)desc;
 	bool res = true;
 
 	switch (gd->gameType) {

Modified: scummvm/trunk/engines/agos/detection.cpp
===================================================================
--- scummvm/trunk/engines/agos/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/agos/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -109,11 +109,11 @@
 		return "AGOS (C) Adventure Soft";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const AGOS::AGOSGameDescription *gd = (const AGOS::AGOSGameDescription *)(encapsulatedDesc.realDesc);
+bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const AGOS::AGOSGameDescription *gd = (const AGOS::AGOSGameDescription *)desc;
 	bool res = true;
 
 	switch (gd->gameType) {

Modified: scummvm/trunk/engines/cine/detection.cpp
===================================================================
--- scummvm/trunk/engines/cine/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/cine/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -498,11 +498,11 @@
 		return "Future Wars & Operation Stealth (C) Delphine Software";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Cine::CINEGameDescription *gd = (const Cine::CINEGameDescription *)(encapsulatedDesc.realDesc);
+bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Cine::CINEGameDescription *gd = (const Cine::CINEGameDescription *)desc;
 	if (gd) {
 		*engine = new Cine::CineEngine(syst, gd);
 	}

Modified: scummvm/trunk/engines/cruise/detection.cpp
===================================================================
--- scummvm/trunk/engines/cruise/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/cruise/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -133,11 +133,11 @@
 		return "Cruise for a Corpse (C) Delphine Software";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool CruiseMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Cruise::CRUISEGameDescription *gd = (const Cruise::CRUISEGameDescription *)(encapsulatedDesc.realDesc);
+bool CruiseMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Cruise::CRUISEGameDescription *gd = (const Cruise::CRUISEGameDescription *)desc;
 	if (gd) {
 		*engine = new Cruise::CruiseEngine(syst, gd);
 	}

Modified: scummvm/trunk/engines/drascula/detection.cpp
===================================================================
--- scummvm/trunk/engines/drascula/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/drascula/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -173,15 +173,15 @@
 		return "Drascula Engine (C) 2000 Alcachofa Soft, 1996 (C) Digital Dreams Multimedia, 1994 (C) Emilio de Paz";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 
 	Common::EncapsulatedADGameDesc fallbackDetect(const FSList *fslist) const {
 		return Drascula::fallbackDetector(fslist);
 	}
 };
 
-bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Drascula::DrasculaGameDescription *gd = (const Drascula::DrasculaGameDescription *)(encapsulatedDesc.realDesc);
+bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Drascula::DrasculaGameDescription *gd = (const Drascula::DrasculaGameDescription *)desc;
 	if (gd) {
 		*engine = new Drascula::DrasculaEngine(syst, gd);
 	}

Modified: scummvm/trunk/engines/gob/detection.cpp
===================================================================
--- scummvm/trunk/engines/gob/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/gob/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -1869,11 +1869,11 @@
 		return "Goblins Games (C) Coktel Vision";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)(encapsulatedDesc.realDesc);
+bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc;
 	if (gd) {
 		*engine = new Gob::GobEngine(syst);
 		((Gob::GobEngine *)*engine)->initGame(gd);

Modified: scummvm/trunk/engines/igor/detection.cpp
===================================================================
--- scummvm/trunk/engines/igor/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/igor/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -116,11 +116,11 @@
 		return "Igor: Objective Uikokahonia (C) Pendulo Studios";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool IgorMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const IgorGameDescription *gd = (const IgorGameDescription *)(encapsulatedDesc.realDesc);
+bool IgorMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const IgorGameDescription *gd = (const IgorGameDescription *)desc;
 	if (gd) {
 		Igor::DetectedGameVersion dgv;
 		dgv.version = gd->gameVersion;

Modified: scummvm/trunk/engines/kyra/detection.cpp
===================================================================
--- scummvm/trunk/engines/kyra/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/kyra/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -440,11 +440,11 @@
 		return "The Legend of Kyrandia (C) Westwood Studios";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const KYRAGameDescription *gd = (const KYRAGameDescription *)(encapsulatedDesc.realDesc);
+bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const KYRAGameDescription *gd = (const KYRAGameDescription *)desc;
 	bool res = true;
 
 	Kyra::GameFlags flags = gd->flags;

Modified: scummvm/trunk/engines/lure/detection.cpp
===================================================================
--- scummvm/trunk/engines/lure/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/lure/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -184,11 +184,11 @@
 		return "Lure of the Temptress (C) Revolution";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Lure::LureGameDescription *gd = (const Lure::LureGameDescription *)(encapsulatedDesc.realDesc);
+bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Lure::LureGameDescription *gd = (const Lure::LureGameDescription *)desc;
 	if (gd) {
 		*engine = new Lure::LureEngine(syst, gd);
 	}

Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/parallaction/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -194,11 +194,11 @@
 		return "Nippon Safes Inc. (C) Dynabyte";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)(encapsulatedDesc.realDesc);
+bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)desc;
 	bool res = true;
 
 	switch (gd->gameType) {

Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/saga/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -151,11 +151,11 @@
 		return "Inherit the Earth (C) Wyrmkeep Entertainment";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)(encapsulatedDesc.realDesc);
+bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)desc;
 	if (gd) {
 		*engine = new Saga::SagaEngine(syst, gd);
 	}

Modified: scummvm/trunk/engines/touche/detection.cpp
===================================================================
--- scummvm/trunk/engines/touche/detection.cpp	2008-03-14 14:05:49 UTC (rev 31120)
+++ scummvm/trunk/engines/touche/detection.cpp	2008-03-14 17:31:04 UTC (rev 31121)
@@ -135,11 +135,11 @@
 		return "Touche: The Adventures of the 5th Musketeer (C) Clipper Software";
 	}
 
-	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
-bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
-	const Common::ADGameDescription *gd = encapsulatedDesc.realDesc;
+bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
+	const Common::ADGameDescription *gd = desc;
 	if (gd) {
 		*engine = new Touche::ToucheEngine(syst, gd->language);
 	}


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