From c9873dae4312be326c04ab1081db6b57da237daa Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 26 Aug 2011 01:56:50 +0300 Subject: SCI: Fixed bug #3366295 - "SCI: User-translated files are ignored" Thanks to tinekefrineke and tdhs for pinpointing the actual problem in the resource manager --- engines/sci/resource.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'engines/sci/resource.cpp') 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; + } } } } -- cgit v1.2.3