diff options
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r-- | engines/sci/resource.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 5b57eed123..31ceb6808c 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1399,7 +1399,20 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType resource } byte patchType = convertResType(fileStream->readByte()); - byte patchDataOffset = fileStream->readByte(); + int32 patchDataOffset; + if (_volVersion < kResVersionSci2) { + patchDataOffset = fileStream->readByte(); + } else if (patchType == kResourceTypeView) { + fileStream->seek(3, SEEK_SET); + patchDataOffset = fileStream->readByte() + 22 + 2; + } else if (patchType == kResourceTypePic) { + patchDataOffset = 2; + } else if (patchType == kResourceTypePalette) { + fileStream->seek(3, SEEK_SET); + patchDataOffset = fileStream->readByte() + 2; + } else { + patchDataOffset = 0; + } delete fileStream; |