diff options
author | Filippos Karapetis | 2011-08-26 01:56:50 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-08-26 01:56:50 +0300 |
commit | c9873dae4312be326c04ab1081db6b57da237daa (patch) | |
tree | 6e09183f9e080fa0da30b927e1f053b1c8432efb /engines/sci | |
parent | d570b415610b62e97537c76df5778d6825a7c3e4 (diff) | |
download | scummvm-rg350-c9873dae4312be326c04ab1081db6b57da237daa.tar.gz scummvm-rg350-c9873dae4312be326c04ab1081db6b57da237daa.tar.bz2 scummvm-rg350-c9873dae4312be326c04ab1081db6b57da237daa.zip |
SCI: Fixed bug #3366295 - "SCI: User-translated files are ignored"
Thanks to tinekefrineke and tdhs for pinpointing the actual problem in the
resource manager
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/resource.cpp | 22 |
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; + } } } } |