[Scummvm-cvs-logs] SF.net SVN: scummvm:[54213] scummvm/trunk/engines/sci/resource.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Nov 12 00:46:56 CET 2010
Revision: 54213
http://scummvm.svn.sourceforge.net/scummvm/?rev=54213&view=rev
Author: thebluegr
Date: 2010-11-11 23:46:53 +0000 (Thu, 11 Nov 2010)
Log Message:
-----------
SCI: Properly adding SCI3 script patches (a regression of r54211)
Modified Paths:
--------------
scummvm/trunk/engines/sci/resource.cpp
Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp 2010-11-11 23:04:04 UTC (rev 54212)
+++ scummvm/trunk/engines/sci/resource.cpp 2010-11-11 23:46:53 UTC (rev 54213)
@@ -1441,10 +1441,8 @@
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 @@
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();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list