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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Mar 26 14:11:30 CET 2009


Revision: 39701
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39701&view=rev
Author:   fingolfin
Date:     2009-03-26 13:11:30 +0000 (Thu, 26 Mar 2009)

Log Message:
-----------
SCI: Match signature of readResourceMapSCI0 and readResourceMapSCI1 (helpful if we ever want to turn this into overloaded methods of ResourceManager subclasses, one subclass for each SCI version)

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

Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp	2009-03-26 13:11:11 UTC (rev 39700)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp	2009-03-26 13:11:30 UTC (rev 39701)
@@ -379,7 +379,8 @@
 			if (_mapVersion < SCI_VERSION_1)
 				resource_error = readResourceMapSCI0(source);
 			else
-				resource_error = readResourceMapSCI1(source, getVolume(source, 0));
+				resource_error = readResourceMapSCI1(source);
+
 			if (resource_error == SCI_ERROR_RESMAP_NOT_FOUND) {
 				// FIXME: Try reading w/o resource.map
 				resource_error = SCI_ERROR_NO_RESOURCE_FILES_FOUND;
@@ -957,7 +958,7 @@
 	return 0;
 }
 
-int ResourceManager::readResourceMapSCI1(ResourceSource *map, ResourceSource *vol) {
+int ResourceManager::readResourceMapSCI1(ResourceSource *map) {
 	Common::File file;
 	Resource *res;
 	if (!file.open(map->location_name))
@@ -1001,7 +1002,7 @@
 				res->type = (ResourceType)type;
 				res->number = number;
 				res->id = resId;//res->number | (res->type << 16);
-				res->source = _mapVersion < SCI_VERSION_1_1 ? getVolume(map, off  >> 28) : vol;
+				res->source = _mapVersion < SCI_VERSION_1_1 ? getVolume(map, off  >> 28) : getVolume(map, 0);
 				if (_mapVersion < SCI_VERSION_32)
 					res->file_offset = _mapVersion < SCI_VERSION_1_1 ? off & 0x0FFFFFFF : off << 1;
 				else

Modified: scummvm/trunk/engines/sci/scicore/resource.h
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.h	2009-03-26 13:11:11 UTC (rev 39700)
+++ scummvm/trunk/engines/sci/scicore/resource.h	2009-03-26 13:11:30 UTC (rev 39701)
@@ -284,7 +284,7 @@
 	/* Reads the SCI1 resource.map file from a local directory
 	** Returns   : (int) 0 on success, an SCI_ERROR_* code otherwise
 	*/
-	int readResourceMapSCI1(ResourceSource *map, ResourceSource *vol);
+	int readResourceMapSCI1(ResourceSource *map);
 
 	/**--- Patch management functions ---*/
 


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