aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-27 16:59:20 +0000
committerFilippos Karapetis2010-01-27 16:59:20 +0000
commit9471e66940361e36cac8c266ab6c99a4e6d83a1f (patch)
treeee5170e038c41215a5026310c985ecd18bd1ec7d
parent12569a5f325b2cdbcf3d696329a105ef5b94fd8a (diff)
downloadscummvm-rg350-9471e66940361e36cac8c266ab6c99a4e6d83a1f.tar.gz
scummvm-rg350-9471e66940361e36cac8c266ab6c99a4e6d83a1f.tar.bz2
scummvm-rg350-9471e66940361e36cac8c266ab6c99a4e6d83a1f.zip
Don't patch audio36 resources, when the associated patches are for audio resources (e.g. the sound effects in LB2CD)
svn-id: r47603
-rw-r--r--engines/sci/resource.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 7af7dbd685..7a83cd6bda 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -996,8 +996,13 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType restype,
patch_data_offset = file.readByte();
if (patchtype != restype) {
- debug("Patching %s failed - resource type mismatch", source->location_name.c_str());
- return;
+ // audio and audio36 resources got the same extension, so don't try and load them twice
+ if (patchtype == kResourceTypeAudio && restype == kResourceTypeAudio36) {
+ return; // don't throw a warning, the relevant audio resource has already been patched
+ } else {
+ debug("Patching %s failed - resource type mismatch", source->location_name.c_str());
+ return;
+ }
}
// Fixes SQ5/German, patch file special case logic taken from SCI View disassembly