diff options
author | Filippos Karapetis | 2010-11-11 23:46:53 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-11 23:46:53 +0000 |
commit | ee85ca00077947296c810884febbb336782608b2 (patch) | |
tree | 78cfdf067e61f0357082aa79f5dc1c61a7faf836 /engines | |
parent | a0199df818a90fcd142ef7d0adbc3bbda98003ac (diff) | |
download | scummvm-rg350-ee85ca00077947296c810884febbb336782608b2.tar.gz scummvm-rg350-ee85ca00077947296c810884febbb336782608b2.tar.bz2 scummvm-rg350-ee85ca00077947296c810884febbb336782608b2.zip |
SCI: Properly adding SCI3 script patches (a regression of r54211)
svn-id: r54213
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/resource.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index fd3c73fddb..7454bcad3f 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1441,10 +1441,8 @@ void ResourceManager::readResourcePatches() { ResourceSource *psrcPatch; for (int i = kResourceTypeView; i < kResourceTypeInvalid; ++i) { - const char *suffix = (getSciVersion() == SCI_VERSION_3 && i == kResourceTypeScript) ? "csc" : s_resourceTypeSuffixes[i]; - // Ignore the types that can't be patched (and Robot/VMD is handled externally for now) - if (!suffix || i == kResourceTypeRobot || i == kResourceTypeVMD) + if (!s_resourceTypeSuffixes[i] || i == kResourceTypeRobot || i == kResourceTypeVMD) continue; files.clear(); @@ -1455,9 +1453,15 @@ void ResourceManager::readResourcePatches() { SearchMan.listMatchingMembers(files, mask); // SCI1 and later naming - nnn.typ mask = "*."; - mask += suffix; + mask += s_resourceTypeSuffixes[i]; SearchMan.listMatchingMembers(files, mask); + if (i == kResourceTypeScript && files.size() == 0) { + // SCI3 (we can't use getSciVersion() at this point) + mask = "*.csc"; + SearchMan.listMatchingMembers(files, mask); + } + for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) { bool bAdd = false; name = (*x)->getName(); |