From a65ab98726442b0e207c2466b238535bb2a6b016 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 11 Nov 2010 19:38:32 +0000 Subject: SCI: Use the new CSC extension for SCI3 scripts svn-id: r54211 --- engines/sci/resource.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines/sci/resource.cpp') 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) { -- cgit v1.2.3