[Scummvm-cvs-logs] SF.net SVN: scummvm:[44449] scummvm/trunk/engines/sci/engine

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Mon Sep 28 22:21:10 CEST 2009


Revision: 44449
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44449&view=rev
Author:   wjpalenstijn
Date:     2009-09-28 20:21:09 +0000 (Mon, 28 Sep 2009)

Log Message:
-----------
SCI: Remove unsafe unmarkDeleted function.
It did not undo all effects of a script being deleted (specifically its
superclasses remain unlocked), causing an inconsistent
state. Also removed EcoQuest CD hack that worked around a specific
instance of this problem.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/segment.h
    scummvm/trunk/engines/sci/engine/vm.cpp

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-09-28 19:39:17 UTC (rev 44448)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-09-28 20:21:09 UTC (rev 44449)
@@ -218,12 +218,6 @@
 	if (scr) {
 		if (s->_executionStack.back().addr.pc.segment != id)
 			scr->setLockers(1);
-
-		// HACK for EcoQuest CD
-		if (s->_gameName == "ecoquest" && script == 821) {
-			warning("kDisposeScript hack for EcoQuest 1 CD: not disposing script 821");
-			scr->setLockers(2);
-		}
 	}
 
 	script_uninstantiate(s->segMan, script);

Modified: scummvm/trunk/engines/sci/engine/segment.h
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.h	2009-09-28 19:39:17 UTC (rev 44448)
+++ scummvm/trunk/engines/sci/engine/segment.h	2009-09-28 20:21:09 UTC (rev 44449)
@@ -433,13 +433,6 @@
 	}
 
 	/**
-	 * Marks the script as not deleted.
-	 */
-	void unmarkDeleted() {
-		_markedAsDeleted = false;
-	}
-
-	/**
 	 * Determines whether the script is marked as being deleted.
 	 */
 	bool isMarkedAsDeleted() const {

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-09-28 19:39:17 UTC (rev 44448)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-09-28 20:21:09 UTC (rev 44449)
@@ -208,10 +208,8 @@
 	int seg = s->segMan->getScriptSegment(script);
 	Script *scr = s->segMan->getScriptIfLoaded(seg);
 
-	if (!scr)  // Script not present yet?
+	if (!scr || scr->isMarkedAsDeleted()) // Script not present yet?
 		seg = script_instantiate(s->resMan, s->segMan, script);
-	else
-		scr->unmarkDeleted();
 
 	const int temp = s->segMan->validateExportFunc(pubfunct, seg);
 	if (!temp) {


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