diff options
author | Filippos Karapetis | 2010-11-11 19:38:32 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-11 19:38:32 +0000 |
commit | a65ab98726442b0e207c2466b238535bb2a6b016 (patch) | |
tree | b9bd2dab3b523ec8e4596eb06fd4c9d9c052985e | |
parent | 8b14137c07bceda262e5423aadea830c761dc2bc (diff) | |
download | scummvm-rg350-a65ab98726442b0e207c2466b238535bb2a6b016.tar.gz scummvm-rg350-a65ab98726442b0e207c2466b238535bb2a6b016.tar.bz2 scummvm-rg350-a65ab98726442b0e207c2466b238535bb2a6b016.zip |
SCI: Use the new CSC extension for SCI3 scripts
svn-id: r54211
-rw-r--r-- | engines/sci/resource.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index e9a88df541..fd3c73fddb 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -117,6 +117,9 @@ static const char *s_resourceTypeNames[] = { "chunk", "macibin", "macibis", "macpict" }; +// Resource type suffixes. Note that the +// suffic of SCI3 scripts has been changed from +// scr to csc static const char *s_resourceTypeSuffixes[] = { "v56", "p56", "scr", "tex", "snd", "", "voc", "fon", "cur", "pat", @@ -1438,8 +1441,10 @@ 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 (!s_resourceTypeSuffixes[i] || i == kResourceTypeRobot || i == kResourceTypeVMD) + if (!suffix || i == kResourceTypeRobot || i == kResourceTypeVMD) continue; files.clear(); @@ -1450,7 +1455,7 @@ void ResourceManager::readResourcePatches() { SearchMan.listMatchingMembers(files, mask); // SCI1 and later naming - nnn.typ mask = "*."; - mask += s_resourceTypeSuffixes[i]; + mask += suffix; SearchMan.listMatchingMembers(files, mask); for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) { |