aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/resource.cpp2
-rw-r--r--engines/kyra/resource_intern.cpp6
-rw-r--r--engines/kyra/resource_intern.h4
-rw-r--r--engines/kyra/staticres.cpp2
-rw-r--r--engines/parallaction/disk_ns.cpp8
5 files changed, 11 insertions, 11 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 061cb7e602..e319b89023 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -319,7 +319,7 @@ Common::Archive *Resource::loadArchive(const Common::String &name, Common::Share
if (cachedArchive != _archiveCache.end())
return cachedArchive->_value;
- Common::SeekableReadStream *stream = member->open();
+ Common::SeekableReadStream *stream = member->createReadStream();
if (!stream)
return 0;
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 1368b005c9..68a4a55886 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -69,12 +69,12 @@ Common::ArchiveMemberPtr PlainArchive::getMember(const Common::String &name) {
return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
}
-Common::SeekableReadStream *PlainArchive::openFile(const Common::String &name) {
+Common::SeekableReadStream *PlainArchive::openFile(const Common::String &name) const {
FileMap::const_iterator fDesc = _files.find(name);
if (fDesc == _files.end())
return 0;
- Common::SeekableReadStream *parent = _file->open();
+ Common::SeekableReadStream *parent = _file->createReadStream();
if (!parent)
return 0;
@@ -124,7 +124,7 @@ Common::ArchiveMemberPtr CachedArchive::getMember(const Common::String &name) {
return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
}
-Common::SeekableReadStream *CachedArchive::openFile(const Common::String &name) {
+Common::SeekableReadStream *CachedArchive::openFile(const Common::String &name) const {
FileMap::const_iterator fDesc = _files.find(name);
if (fDesc == _files.end())
return 0;
diff --git a/engines/kyra/resource_intern.h b/engines/kyra/resource_intern.h
index f768100afe..6f16a2ba8e 100644
--- a/engines/kyra/resource_intern.h
+++ b/engines/kyra/resource_intern.h
@@ -52,7 +52,7 @@ public:
bool hasFile(const Common::String &name);
int listMembers(Common::ArchiveMemberList &list);
Common::ArchiveMemberPtr getMember(const Common::String &name);
- Common::SeekableReadStream *openFile(const Common::String &name);
+ Common::SeekableReadStream *openFile(const Common::String &name) const;
private:
struct Entry {
uint32 offset;
@@ -82,7 +82,7 @@ public:
bool hasFile(const Common::String &name);
int listMembers(Common::ArchiveMemberList &list);
Common::ArchiveMemberPtr getMember(const Common::String &name);
- Common::SeekableReadStream *openFile(const Common::String &name);
+ Common::SeekableReadStream *openFile(const Common::String &name) const;
private:
struct Entry {
byte *data;
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 3e510f552f..ce1e54ea48 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -144,7 +144,7 @@ bool StaticResource::loadStaticResourceFile() {
bool foundWorkingKyraDat = false;
for (Common::ArchiveMemberList::iterator i = kyraDatFiles.begin(); i != kyraDatFiles.end(); ++i) {
- Common::SeekableReadStream *file = (*i)->open();
+ Common::SeekableReadStream *file = (*i)->createReadStream();
if (!checkKyraDat(file)) {
delete file;
continue;
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index 43f20be054..a526facaad 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -72,13 +72,13 @@ class NSArchive : public Common::Archive {
uint32 _archiveOffsets[MAX_ARCHIVE_ENTRIES];
uint32 _numFiles;
- uint32 lookup(const char *name);
+ uint32 lookup(const char *name) const;
public:
NSArchive(Common::SeekableReadStream *stream, Common::Platform platform, uint32 features);
~NSArchive();
- Common::SeekableReadStream *openFile(const Common::String &name);
+ Common::SeekableReadStream *openFile(const Common::String &name) const;
bool hasFile(const Common::String &name);
int listMembers(Common::ArchiveMemberList &list);
Common::ArchiveMemberPtr getMember(const Common::String &name);
@@ -119,7 +119,7 @@ NSArchive::~NSArchive() {
delete _stream;
}
-uint32 NSArchive::lookup(const char *name) {
+uint32 NSArchive::lookup(const char *name) const {
uint32 i = 0;
for ( ; i < _numFiles; i++) {
if (!scumm_stricmp(_archiveDir[i], name)) break;
@@ -127,7 +127,7 @@ uint32 NSArchive::lookup(const char *name) {
return i;
}
-Common::SeekableReadStream *NSArchive::openFile(const Common::String &name) {
+Common::SeekableReadStream *NSArchive::openFile(const Common::String &name) const {
debugC(3, kDebugDisk, "NSArchive::openFile(%s)", name.c_str());
if (name.empty())