aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-27 17:31:11 +0000
committerFilippos Karapetis2010-01-27 17:31:11 +0000
commit8ff7efea81d5d72c5d6358ca11c414bd7dfbed83 (patch)
treee45cc5cec25301dc0c3768db8e1c6134f54944f1
parent9471e66940361e36cac8c266ab6c99a4e6d83a1f (diff)
downloadscummvm-rg350-8ff7efea81d5d72c5d6358ca11c414bd7dfbed83.tar.gz
scummvm-rg350-8ff7efea81d5d72c5d6358ca11c414bd7dfbed83.tar.bz2
scummvm-rg350-8ff7efea81d5d72c5d6358ca11c414bd7dfbed83.zip
Do not try and patch files for resource types greater or equal to audio36 (i.e. audio36, sync36 etc), as these won't work with the current patch scheme
svn-id: r47604
-rw-r--r--engines/sci/resource.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 7a83cd6bda..a421ca4718 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -996,13 +996,7 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType restype,
patch_data_offset = file.readByte();
if (patchtype != restype) {
- // 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;
- }
+ debug("Patching %s failed - resource type mismatch", source->location_name.c_str());
}
// Fixes SQ5/German, patch file special case logic taken from SCI View disassembly
@@ -1052,7 +1046,10 @@ void ResourceManager::readResourcePatches(ResourceSource *source) {
const char *szResType;
ResourceSource *psrcPatch;
- for (int i = kResourceTypeView; i < kResourceTypeInvalid; ++i) {
+ // Do not try and patch files for resource types greater or
+ // equal to audio36 (i.e. audio36, sync36, robot etc), as these won't work
+ // with this patch scheme
+ for (int i = kResourceTypeView; i < kResourceTypeAudio36; ++i) {
files.clear();
szResType = getResourceTypeName((ResourceType)i);
// SCI0 naming - type.nnn