[Scummvm-cvs-logs] SF.net SVN: scummvm:[54162] scummvm/trunk/engines/sci/resource.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Tue Nov 9 17:56:31 CET 2010


Revision: 54162
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54162&view=rev
Author:   mthreepwood
Date:     2010-11-09 16:56:31 +0000 (Tue, 09 Nov 2010)

Log Message:
-----------
SCI: Fix Lighthouse SCI2.1 demo

This is a regression from r54155. Fixed by moving the chunk resource loading earlier.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/resource.cpp

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2010-11-09 16:23:08 UTC (rev 54161)
+++ scummvm/trunk/engines/sci/resource.cpp	2010-11-09 16:56:31 UTC (rev 54162)
@@ -667,6 +667,22 @@
 	}
 
 	delete resources;
+
+#ifdef ENABLE_SCI32
+	if (_mapVersion >= kResVersionSci2) {
+		// If we have no scripts, but chunk 0 is present, open up the chunk
+		// to try to get to any scripts in there. The Lighthouse SCI2.1 demo
+		// does exactly this.
+
+		resources = listResources(kResourceTypeScript);
+
+		if (resources->empty() && testResource(ResourceId(kResourceTypeChunk, 0)))
+			addResourcesFromChunk(0);
+
+		delete resources;
+	}
+#endif
+
 	return 1;
 }
 
@@ -865,21 +881,6 @@
 		}
 #endif
 	}
-
-#ifdef ENABLE_SCI32
-	if (getSciVersion() >= SCI_VERSION_2_1) {
-		// If we have no scripts, but chunk 0 is present, open up the chunk
-		// to try to get to any scripts in there. The Lighthouse SCI2.1 demo
-		// does exactly this.
-
-		Common::List<ResourceId> *scriptList = listResources(kResourceTypeScript);
-
-		if (scriptList->empty() && testResource(ResourceId(kResourceTypeChunk, 0)))
-			addResourcesFromChunk(0);
-
-		delete scriptList;
-	}
-#endif
 }
 
 ResourceManager::~ResourceManager() {


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