diff options
author | Matthew Hoops | 2009-12-27 22:41:33 +0000 |
---|---|---|
committer | Matthew Hoops | 2009-12-27 22:41:33 +0000 |
commit | 86306e1e4d5b24aef93d150b7b05ee0c05021521 (patch) | |
tree | 22a10f0f1fee3ecf017ef9c6f7d69c23e51af3ec /engines | |
parent | 420ab4306604db8c6ffe69d28b929c3b23a6ad30 (diff) | |
download | scummvm-rg350-86306e1e4d5b24aef93d150b7b05ee0c05021521.tar.gz scummvm-rg350-86306e1e4d5b24aef93d150b7b05ee0c05021521.tar.bz2 scummvm-rg350-86306e1e4d5b24aef93d150b7b05ee0c05021521.zip |
wCompressed is still a uint16 in SCI32, so correct the vol version detection.
svn-id: r46661
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/resource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 58a51d3463..67186ed244 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -819,7 +819,7 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { // SCI0 volume format: {wResId wPacked+4 wUnpacked wCompression} = 8 bytes // SCI1 volume format: {bResType wResNumber wPacked+4 wUnpacked wCompression} = 9 bytes // SCI1.1 volume format: {bResType wResNumber wPacked wUnpacked wCompression} = 9 bytes - // SCI32 volume format : {bResType wResNumber dwPacked dwUnpacked wCompression} = 13 bytes + // SCI32 volume format: {bResType wResNumber dwPacked dwUnpacked wCompression} = 13 bytes // Try to parse volume with SCI0 scheme to see if it make sense // Checking 1MB of data should be enough to determine the version uint16 resId, wCompression; @@ -835,7 +835,7 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { resId = fileStream->readUint16LE(); dwPacked = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE(); dwUnpacked = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE(); - wCompression = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE(); + wCompression = fileStream->readUint16LE(); if (fileStream->eos()) { delete fileStream; return curVersion; @@ -873,7 +873,7 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { else if (curVersion == kResVersionSci11) fileStream->seek(sci11Align && ((9 + dwPacked) % 2) ? dwPacked + 1 : dwPacked, SEEK_CUR); else if (curVersion == kResVersionSci32) - fileStream->seek(dwPacked - 2, SEEK_CUR); + fileStream->seek(dwPacked, SEEK_CUR); } delete fileStream; |