aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-14 22:29:17 +0000
committerEugene Sandulenko2010-10-12 22:45:53 +0000
commit992c504968303fcd4ccc89007d4ca660b79184c9 (patch)
tree831069eac761907502d59958ae1a43ef743f3ae8 /engines
parent06fc35ffe874b3dad16804f5827b5e5845444889 (diff)
downloadscummvm-rg350-992c504968303fcd4ccc89007d4ca660b79184c9.tar.gz
scummvm-rg350-992c504968303fcd4ccc89007d4ca660b79184c9.tar.bz2
scummvm-rg350-992c504968303fcd4ccc89007d4ca660b79184c9.zip
SWORD25: Further fixes for package manager
svn-id: r53243
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/package/scummvmpackagemanager.cpp18
-rw-r--r--engines/sword25/package/scummvmpackagemanager.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/sword25/package/scummvmpackagemanager.cpp b/engines/sword25/package/scummvmpackagemanager.cpp
index 1cc7a3c9d7..fdd32aee68 100644
--- a/engines/sword25/package/scummvmpackagemanager.cpp
+++ b/engines/sword25/package/scummvmpackagemanager.cpp
@@ -166,25 +166,25 @@ Common::FSNode BS_ScummVMPackageManager::GetFSNode(const Common::String &FileNam
PathElementArray pathElements = SeparatePath(FileName, _currentDirectory);
// Loop through checking each archive
- Common::List<ArchiveEntry>::iterator i;
+ Common::List<ArchiveEntry *>::iterator i;
for (i = _archiveList.begin(); i != _archiveList.end(); ++i) {
- if (i->MountPath.size() > pathElements.size())
+ if ((*i)->MountPath.size() > pathElements.size())
// The mount path has more subfolder depth than the search entry, so skip it
continue;
// Check the path against that of the archive
PathElementArray::iterator iPath = pathElements.begin();
- PathElementArray::iterator iEntry = i->MountPath.begin();
+ PathElementArray::iterator iEntry = (*i)->MountPath.begin();
- for (; iEntry != i->MountPath.end(); ++iEntry, ++iPath) {
+ for (; iEntry != (*i)->MountPath.end(); ++iEntry, ++iPath) {
if (Common::String(iPath->GetBegin(), iPath->GetEnd()) ==
Common::String(iEntry->GetBegin(), iEntry->GetEnd()))
break;
}
- if (iEntry == i->MountPath.end()) {
+ if (iEntry == (*i)->MountPath.end()) {
// Look into the archive for the desired file
- Common::Archive *archiveFolder = i->Archive;
+ Common::Archive *archiveFolder = (*i)->Archive;
if (archiveFolder->hasFile(FileName)) {
}
@@ -211,9 +211,9 @@ bool BS_ScummVMPackageManager::LoadPackage(const Common::String &FileName, const
BS_LOGLN("Package '%s' mounted as '%s'.", FileName.c_str(), MountPosition.c_str());
Common::ArchiveMemberList files;
zipFile->listMembers(files);
- debugC(0, "Capacity %d", files.size());
+ debug(0, "Capacity %d", files.size());
- _archiveList.push_back(ArchiveEntry(zipFile, pathElements));
+ _archiveList.push_back(new ArchiveEntry(zipFile, pathElements));
return true;
}
@@ -232,7 +232,7 @@ bool BS_ScummVMPackageManager::LoadDirectoryAsPackage(const Common::String &Dire
return false;
} else {
BS_LOGLN("Directory '%s' mounted as '%s'.", DirectoryName.c_str(), MountPosition.c_str());
- _archiveList.push_front(ArchiveEntry(folderArchive, pathElements));
+ _archiveList.push_front(new ArchiveEntry(folderArchive, pathElements));
return true;
}
}
diff --git a/engines/sword25/package/scummvmpackagemanager.h b/engines/sword25/package/scummvmpackagemanager.h
index a837f03bee..3c000f545d 100644
--- a/engines/sword25/package/scummvmpackagemanager.h
+++ b/engines/sword25/package/scummvmpackagemanager.h
@@ -85,7 +85,7 @@ private:
Common::String _currentDirectory;
Common::FSNode _rootFolder;
- Common::List<ArchiveEntry> _archiveList;
+ Common::List<ArchiveEntry *> _archiveList;
Common::FSNode GetFSNode(const Common::String &FileName);
public: