diff options
author | Matthew Hoops | 2011-02-09 17:54:34 +0000 |
---|---|---|
committer | Matthew Hoops | 2011-02-09 17:54:34 +0000 |
commit | aac6bd518152571e8e119a733c76b9c2ade45cfb (patch) | |
tree | 65f4bc684980b2489898bfa19baf276019fee9e3 /engines | |
parent | dc4dd174af04144c8f31396290fee42226649d67 (diff) | |
download | scummvm-rg350-aac6bd518152571e8e119a733c76b9c2ade45cfb.tar.gz scummvm-rg350-aac6bd518152571e8e119a733c76b9c2ade45cfb.tar.bz2 scummvm-rg350-aac6bd518152571e8e119a733c76b9c2ade45cfb.zip |
SCI: Improve speed of Mac resource fork sources
svn-id: r55859
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/resource.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index cabf9f1717..1530cc2c58 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1849,16 +1849,6 @@ void MacResourceForkResourceSource::scanSource(ResourceManager *resMan) { Common::MacResIDArray idArray = _macResMan->getResIDArray(tagArray[i]); for (uint32 j = 0; j < idArray.size(); j++) { - // Get the size of the file - Common::SeekableReadStream *stream = _macResMan->getResource(tagArray[i], idArray[j]); - - // Some IBIS resources have a size of 0, so we skip them - if (!stream) - continue; - - uint32 fileSize = stream->size(); - delete stream; - ResourceId resId; // Check to see if we've got a base36 encoded resource name @@ -1885,7 +1875,8 @@ void MacResourceForkResourceSource::scanSource(ResourceManager *resMan) { } // Overwrite Resource instance. Resource forks may contain patches. - resMan->updateResource(resId, this, fileSize); + // The size will be filled in later by decompressResource() + resMan->updateResource(resId, this, 0); } } } @@ -1954,15 +1945,6 @@ int Resource::readResourceInfo(ResVersion volVersion, Common::SeekableReadStream szUnpacked = file->readUint16LE(); wCompression = file->readUint16LE(); break; - case kResVersionSci11Mac: - // Doesn't store this data in the resource. Fortunately, - // we already have this data. - type = getType(); - number = getNumber(); - szPacked = file->size(); - szUnpacked = file->size(); - wCompression = 0; - break; #ifdef ENABLE_SCI32 case kResVersionSci2: case kResVersionSci3: |