aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2016-03-01 19:16:03 +0100
committerJohannes Schickel2016-03-01 19:16:10 +0100
commitfd5799aa194f2a81cc79075c7a42586d0d5b2693 (patch)
treefca651af5ad873f7dab3b262cd86885f103628e5 /engines
parent91b5c5a413af1e2a61d3f8457deff54a75a8d754 (diff)
downloadscummvm-rg350-fd5799aa194f2a81cc79075c7a42586d0d5b2693.tar.gz
scummvm-rg350-fd5799aa194f2a81cc79075c7a42586d0d5b2693.tar.bz2
scummvm-rg350-fd5799aa194f2a81cc79075c7a42586d0d5b2693.zip
SCI: Fix Macintosh game sources listing.
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/resource.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 578a8cbdf7..7fb09fe69e 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -565,12 +565,11 @@ Resource *ResourceManager::testResource(ResourceId id) {
}
int ResourceManager::addAppropriateSources() {
- Common::ArchiveMemberList files;
-
if (Common::File::exists("resource.map")) {
// SCI0-SCI2 file naming scheme
ResourceSource *map = addExternalMap("resource.map");
+ Common::ArchiveMemberList files;
SearchMan.listMatchingMembers(files, "resource.0??");
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
@@ -587,11 +586,11 @@ int ResourceManager::addAppropriateSources() {
#endif
} else if (Common::MacResManager::exists("Data1")) {
// Mac SCI1.1+ file naming scheme
- SearchMan.listMatchingMembers(files, "Data?*");
+ Common::Array<Common::String> files;
+ Common::MacResManager::listFiles(files, "Data?");
- for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
- Common::String filename = (*x)->getName();
- addSource(new MacResourceForkResourceSource(filename, atoi(filename.c_str() + 4)));
+ for (Common::Array<Common::String>::const_iterator x = files.begin(); x != files.end(); ++x) {
+ addSource(new MacResourceForkResourceSource(*x, atoi(x->c_str() + 4)));
}
#ifdef ENABLE_SCI32
@@ -600,7 +599,7 @@ int ResourceManager::addAppropriateSources() {
addSource(new MacResourceForkResourceSource("Patches", 100));
} else {
// SCI2.1-SCI3 file naming scheme
- Common::ArchiveMemberList mapFiles;
+ Common::ArchiveMemberList mapFiles, files;
SearchMan.listMatchingMembers(mapFiles, "resmap.0??");
SearchMan.listMatchingMembers(files, "ressci.0??");