diff options
author | Max Horn | 2009-03-26 13:11:30 +0000 |
---|---|---|
committer | Max Horn | 2009-03-26 13:11:30 +0000 |
commit | c21110f36ee9618fd94f306eba39fe9208eb887d (patch) | |
tree | f3bdc93d21db2a7084f3b718c302389ba62c29e5 /engines/sci | |
parent | fb364ee28177270e7cf0cb70e845acd597c4cd3c (diff) | |
download | scummvm-rg350-c21110f36ee9618fd94f306eba39fe9208eb887d.tar.gz scummvm-rg350-c21110f36ee9618fd94f306eba39fe9208eb887d.tar.bz2 scummvm-rg350-c21110f36ee9618fd94f306eba39fe9208eb887d.zip |
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)
svn-id: r39701
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/scicore/resource.cpp | 7 | ||||
-rw-r--r-- | engines/sci/scicore/resource.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/scicore/resource.cpp b/engines/sci/scicore/resource.cpp index 9b35f206ba..e0f3b8c8de 100644 --- a/engines/sci/scicore/resource.cpp +++ b/engines/sci/scicore/resource.cpp @@ -379,7 +379,8 @@ int ResourceManager::scanNewSources(ResourceSource *source) { 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 @@ int ResourceManager::readResourceMapSCI0(ResourceSource *map) { 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 @@ int ResourceManager::readResourceMapSCI1(ResourceSource *map, ResourceSource *vo 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 diff --git a/engines/sci/scicore/resource.h b/engines/sci/scicore/resource.h index dafb2aa7d9..29cf38e265 100644 --- a/engines/sci/scicore/resource.h +++ b/engines/sci/scicore/resource.h @@ -284,7 +284,7 @@ protected: /* 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 ---*/ |