aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/resource.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-08-26 22:44:17 -0400
committerMatthew Hoops2011-08-26 22:44:17 -0400
commit4a69dc13d92e82fff85dc5a3a923b74ced259ffa (patch)
tree8945cd3745fd65f28b043caf7b1beddbbce2b2a1 /engines/sci/resource.cpp
parentad293b249e74dd1cfbdbd721d02145efbdaf9eca (diff)
parent5e174cbfe466dbbe8e5470b0a00de1481b986181 (diff)
downloadscummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.tar.gz
scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.tar.bz2
scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r--engines/sci/resource.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index f18b6c91f5..1b8b7b2f0e 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1721,15 +1721,19 @@ int ResourceManager::readResourceMapSCI1(ResourceSource *map) {
if (!resource) {
addResource(resId, source, fileOffset);
} else {
- // if resource is already present, change it to new content
- // this is needed at least for pharkas/german. This version
- // contains several duplicate resources INSIDE the resource
- // data files like fonts, views, scripts, etc. And if we use
- // the first entries, half of the game will be english and
- // umlauts will also be missing :P
- resource->_source = source;
- resource->_fileOffset = fileOffset;
- resource->size = 0;
+ // If the resource is already present in a volume, change it to
+ // the new content (but only in a volume, so as not to overwrite
+ // external patches - refer to bug #3366295).
+ // This is needed at least for the German version of Pharkas.
+ // That version contains several duplicate resources INSIDE the
+ // resource data files like fonts, views, scripts, etc. Thus,
+ // if we use the first entries in the resource file, half of the
+ // game will be English and umlauts will also be missing :P
+ if (resource->_source->getSourceType() == kSourceVolume) {
+ resource->_source = source;
+ resource->_fileOffset = fileOffset;
+ resource->size = 0;
+ }
}
}
}