aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp2
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp2
-rw-r--r--common/archive.cpp14
-rw-r--r--common/archive.h10
-rw-r--r--common/file.cpp4
-rw-r--r--common/fs.h4
-rw-r--r--common/unarj.cpp2
-rw-r--r--common/unzip.cpp4
-rw-r--r--common/unzip.h2
-rw-r--r--common/xmlparser.cpp2
-rw-r--r--engines/kyra/resource.cpp2
-rw-r--r--engines/kyra/resource_intern.cpp4
-rw-r--r--engines/kyra/resource_intern.h4
-rw-r--r--engines/parallaction/disk_br.cpp4
-rw-r--r--engines/parallaction/disk_ns.cpp20
-rw-r--r--engines/scumm/he/resource_he.cpp2
-rw-r--r--engines/scumm/he/script_v60he.cpp2
-rw-r--r--graphics/video/dxa_player.cpp2
-rw-r--r--graphics/video/flic_player.cpp2
-rw-r--r--graphics/video/smk_player.cpp2
-rw-r--r--gui/ThemeEngine.cpp4
21 files changed, 47 insertions, 47 deletions
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index 330b9a5d6a..7034d90a30 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -252,7 +252,7 @@ bool VirtualKeyboardParser::parserCallback_layout(ParserNode *node) {
_mode->bitmapName = node->values["bitmap"];
- SeekableReadStream *file = _keyboard->_fileArchive->openFile(_mode->bitmapName);
+ SeekableReadStream *file = _keyboard->_fileArchive->createReadStreamForMember(_mode->bitmapName);
if (!file)
return parserError("Bitmap '%s' not found", _mode->bitmapName.c_str());
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp
index b03c2fe445..1314ab7370 100644
--- a/backends/vkeybd/virtual-keyboard.cpp
+++ b/backends/vkeybd/virtual-keyboard.cpp
@@ -103,7 +103,7 @@ bool VirtualKeyboard::loadKeyboardPack(String packName) {
#ifdef USE_ZLIB
_fileArchive = new ZipArchive(vkDir.getChild(packName + ".zip"));
if (_fileArchive->hasFile(packName + ".xml")) {
- if (!_parser->loadStream(_fileArchive->openFile(packName + ".xml")))
+ if (!_parser->loadStream(_fileArchive->createReadStreamForMember(packName + ".xml")))
return false;
} else {
warning("Could not find %s.xml file in %s.zip keyboard pack", packName.c_str(), packName.c_str());
diff --git a/common/archive.cpp b/common/archive.cpp
index 614215685a..d8b2c61dd1 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -39,7 +39,7 @@ String GenericArchiveMember::getName() const {
}
SeekableReadStream *GenericArchiveMember::createReadStream() const {
- return _parent->openFile(_name);
+ return _parent->createReadStreamForMember(_name);
}
@@ -136,23 +136,23 @@ ArchiveMemberPtr FSDirectory::getMember(const String &name) {
return ArchiveMemberPtr(new FSNode(node));
}
-SeekableReadStream *FSDirectory::openFile(const String &name) const {
+SeekableReadStream *FSDirectory::createReadStreamForMember(const String &name) const {
if (name.empty() || !_node.isDirectory())
return 0;
FSNode node = lookupCache(_fileCache, name);
if (!node.exists()) {
- warning("FSDirectory::openFile: FSNode does not exist");
+ warning("FSDirectory::createReadStreamForMember: FSNode does not exist");
return 0;
} else if (node.isDirectory()) {
- warning("FSDirectory::openFile: FSNode is a directory");
+ warning("FSDirectory::createReadStreamForMember: FSNode is a directory");
return 0;
}
SeekableReadStream *stream = node.createReadStream();
if (!stream)
- warning("FSDirectory::openFile: Can't create stream for file '%s'", name.c_str());
+ warning("FSDirectory::createReadStreamForMember: Can't create stream for file '%s'", name.c_str());
return stream;
}
@@ -434,14 +434,14 @@ ArchiveMemberPtr SearchSet::getMember(const String &name) {
return ArchiveMemberPtr();
}
-SeekableReadStream *SearchSet::openFile(const String &name) const {
+SeekableReadStream *SearchSet::createReadStreamForMember(const String &name) const {
if (name.empty())
return 0;
ArchiveNodeList::iterator it = _list.begin();
for ( ; it != _list.end(); ++it) {
if (it->_arc->hasFile(name))
- return it->_arc->openFile(name);
+ return it->_arc->createReadStreamForMember(name);
}
return 0;
diff --git a/common/archive.h b/common/archive.h
index ea556d199f..36bc5bc7c9 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -95,7 +95,7 @@ public:
/**
* Add all the names present in the Archive which match pattern to
- * list. Returned names can be used as parameters to openFile.
+ * list. Returned names can be used as parameters to createReadStreamForMember.
* Must not remove elements from the list.
*
* @return the number of names added to list
@@ -104,7 +104,7 @@ public:
/**
* Add all the names present in the Archive to list. Returned
- * names can be used as parameters to openFile.
+ * names can be used as parameters to createReadStreamForMember.
* Must not remove elements from the list.
*
* @return the number of names added to list
@@ -120,7 +120,7 @@ public:
* Create a stream bound to a file in the archive.
* @return the newly created input stream
*/
- virtual SeekableReadStream *openFile(const String &name) const = 0;
+ virtual SeekableReadStream *createReadStreamForMember(const String &name) const = 0;
};
@@ -194,10 +194,10 @@ public:
virtual ArchiveMemberPtr getMember(const String &name);
/**
- * Implements openFile from Archive base class. The current policy is
+ * Implements createReadStreamForMember from Archive base class. The current policy is
* opening the first file encountered that matches the name.
*/
- virtual SeekableReadStream *openFile(const String &name) const;
+ virtual SeekableReadStream *createReadStreamForMember(const String &name) const;
};
diff --git a/common/file.cpp b/common/file.cpp
index 6184004b35..0cec608d89 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -62,12 +62,12 @@ bool File::open(const String &filename, Archive &archive) {
SeekableReadStream *stream = 0;
if (archive.hasFile(filename)) {
debug(3, "Opening hashed: %s", filename.c_str());
- stream = archive.openFile(filename);
+ stream = archive.createReadStreamForMember(filename);
} else if (archive.hasFile(filename + ".")) {
// WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails"
// sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot)
debug(3, "Opening hashed: %s.", filename.c_str());
- stream = archive.openFile(filename + ".");
+ stream = archive.createReadStreamForMember(filename + ".");
}
return open(stream, filename);
diff --git a/common/fs.h b/common/fs.h
index 61ce21bec5..b8e6aeecc4 100644
--- a/common/fs.h
+++ b/common/fs.h
@@ -243,7 +243,7 @@ public:
* Again, only SLASHES are used as separators independently from the
* underlying file system.
*
- * Relative paths can be specified when calling matching functions like openFile(),
+ * Relative paths can be specified when calling matching functions like createReadStreamForMember(),
* hasFile(), listMatchingMembers() and listMembers(). Please see the function
* specific comments for more information.
*
@@ -333,7 +333,7 @@ public:
* Open the specified file. A full match of relative path and filename is needed
* for success.
*/
- virtual SeekableReadStream *openFile(const String &name) const;
+ virtual SeekableReadStream *createReadStreamForMember(const String &name) const;
};
diff --git a/common/unarj.cpp b/common/unarj.cpp
index e69869a720..4a969a6ef0 100644
--- a/common/unarj.cpp
+++ b/common/unarj.cpp
@@ -350,7 +350,7 @@ bool ArjFile::open(const Common::String &filename) {
error("Attempt to open another instance of archive");
if (_fallBack) {
- _uncompressed = SearchMan.openFile(filename);
+ _uncompressed = SearchMan.createReadStreamForMember(filename);
if (_uncompressed)
return true;
}
diff --git a/common/unzip.cpp b/common/unzip.cpp
index 9b102872f8..0fff54fbe3 100644
--- a/common/unzip.cpp
+++ b/common/unzip.cpp
@@ -1376,7 +1376,7 @@ public:
*/
ZipArchive::ZipArchive(const Common::String &name) {
- SeekableReadStream *stream = SearchMan.openFile(name);
+ SeekableReadStream *stream = SearchMan.createReadStreamForMember(name);
_zipFile = unzOpen(stream);
}
@@ -1428,7 +1428,7 @@ ArchiveMemberPtr ZipArchive::getMember(const String &name) {
return ArchiveMemberPtr(new GenericArchiveMember(name, this));
}
-Common::SeekableReadStream *ZipArchive::openFile(const Common::String &name) const {
+Common::SeekableReadStream *ZipArchive::createReadStreamForMember(const Common::String &name) const {
if (!_zipFile)
return 0;
diff --git a/common/unzip.h b/common/unzip.h
index 970a84ad57..94d098208a 100644
--- a/common/unzip.h
+++ b/common/unzip.h
@@ -62,7 +62,7 @@ public:
virtual bool hasFile(const String &name);
virtual int listMembers(ArchiveMemberList &list);
virtual ArchiveMemberPtr getMember(const String &name);
- virtual SeekableReadStream *openFile(const String &name) const;
+ virtual SeekableReadStream *createReadStreamForMember(const String &name) const;
};
} // End of namespace Common
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp
index 10085d3b8e..1385af795b 100644
--- a/common/xmlparser.cpp
+++ b/common/xmlparser.cpp
@@ -31,7 +31,7 @@
namespace Common {
bool XMLParser::loadFile(const Common::String &filename) {
- _stream = SearchMan.openFile(filename);
+ _stream = SearchMan.createReadStreamForMember(filename);
if (!_stream)
return false;
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index e319b89023..6e1623e984 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -311,7 +311,7 @@ bool Resource::loadFileToBuf(const char *file, void *buf, uint32 maxSize) {
}
Common::SeekableReadStream *Resource::getFileStream(const Common::String &file) {
- return _files.openFile(file);
+ return _files.createReadStreamForMember(file);
}
Common::Archive *Resource::loadArchive(const Common::String &name, Common::SharedPtr<Common::ArchiveMember> member) {
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 68a4a55886..4f435e8927 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -69,7 +69,7 @@ Common::ArchiveMemberPtr PlainArchive::getMember(const Common::String &name) {
return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
}
-Common::SeekableReadStream *PlainArchive::openFile(const Common::String &name) const {
+Common::SeekableReadStream *PlainArchive::createReadStreamForMember(const Common::String &name) const {
FileMap::const_iterator fDesc = _files.find(name);
if (fDesc == _files.end())
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) const {
+Common::SeekableReadStream *CachedArchive::createReadStreamForMember(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 6f16a2ba8e..4f15985dd2 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) const;
+ Common::SeekableReadStream *createReadStreamForMember(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) const;
+ Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
private:
struct Entry {
byte *data;
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index 1bb4023010..0dca43a55c 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -101,7 +101,7 @@ Common::SeekableReadStream *Disk_br::openFile_internal(bool errorOnNotFound, con
lookup = name + ext;
}
- Common::SeekableReadStream *stream = _sset.openFile(lookup);
+ Common::SeekableReadStream *stream = _sset.createReadStreamForMember(lookup);
if (stream) {
return stream;
}
@@ -116,7 +116,7 @@ Common::SeekableReadStream *Disk_br::openFile_internal(bool errorOnNotFound, con
lookup.deleteLastChar();
}
lookup += ext;
- stream = _sset.openFile(lookup);
+ stream = _sset.createReadStreamForMember(lookup);
}
}
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index a526facaad..94d9f8482b 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -78,7 +78,7 @@ public:
NSArchive(Common::SeekableReadStream *stream, Common::Platform platform, uint32 features);
~NSArchive();
- Common::SeekableReadStream *openFile(const Common::String &name) const;
+ Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
bool hasFile(const Common::String &name);
int listMembers(Common::ArchiveMemberList &list);
Common::ArchiveMemberPtr getMember(const Common::String &name);
@@ -127,8 +127,8 @@ uint32 NSArchive::lookup(const char *name) const {
return i;
}
-Common::SeekableReadStream *NSArchive::openFile(const Common::String &name) const {
- debugC(3, kDebugDisk, "NSArchive::openFile(%s)", name.c_str());
+Common::SeekableReadStream *NSArchive::createReadStreamForMember(const Common::String &name) const {
+ debugC(3, kDebugDisk, "NSArchive::createReadStreamForMember(%s)", name.c_str());
if (name.empty())
return 0;
@@ -136,7 +136,7 @@ Common::SeekableReadStream *NSArchive::openFile(const Common::String &name) cons
uint32 index = lookup(name.c_str());
if (index == _numFiles) return 0;
- debugC(9, kDebugDisk, "NSArchive::openFile: '%s' found in slot %i", name.c_str(), index);
+ debugC(9, kDebugDisk, "NSArchive::createReadStreamForMember: '%s' found in slot %i", name.c_str(), index);
int offset = _archiveOffsets[index];
int endOffset = _archiveOffsets[index] + _archiveLenghts[index];
@@ -195,7 +195,7 @@ Common::SeekableReadStream *Disk_ns::openFile(const char *filename) {
void Disk_ns::addArchive(const Common::String& name, int priority) {
- Common::SeekableReadStream *stream = _sset.openFile(name);
+ Common::SeekableReadStream *stream = _sset.createReadStreamForMember(name);
if (!stream)
error("Disk_ns::addArchive() couldn't find archive '%s'", name.c_str());
@@ -257,13 +257,13 @@ void DosDisk_ns::init() {
Common::SeekableReadStream *DosDisk_ns::tryOpenFile(const char* name) {
debugC(3, kDebugDisk, "DosDisk_ns::tryOpenFile(%s)", name);
- Common::SeekableReadStream *stream = _sset.openFile(name);
+ Common::SeekableReadStream *stream = _sset.createReadStreamForMember(name);
if (stream)
return stream;
char path[PATH_LEN];
sprintf(path, "%s.pp", name);
- return _sset.openFile(path);
+ return _sset.createReadStreamForMember(path);
}
@@ -896,18 +896,18 @@ GfxObj* AmigaDisk_ns::loadStatic(const char* name) {
Common::SeekableReadStream *AmigaDisk_ns::tryOpenFile(const char* name) {
debugC(3, kDebugDisk, "AmigaDisk_ns::tryOpenFile(%s)", name);
- Common::SeekableReadStream *stream = _sset.openFile(name);
+ Common::SeekableReadStream *stream = _sset.createReadStreamForMember(name);
if (stream)
return stream;
char path[PATH_LEN];
sprintf(path, "%s.pp", name);
- stream = _sset.openFile(path);
+ stream = _sset.createReadStreamForMember(path);
if (stream)
return new PowerPackerStream(*stream);
sprintf(path, "%s.dd", name);
- stream = _sset.openFile(path);
+ stream = _sset.createReadStreamForMember(path);
if (stream)
return new PowerPackerStream(*stream);
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index ebe13f29a4..1b5b467512 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -167,7 +167,7 @@ int Win32ResExtractor::extractResource_(const char *resType, char *resName, byte
}
/* get file size */
- fi.file = SearchMan.openFile(_fileName);
+ fi.file = SearchMan.createReadStreamForMember(_fileName);
if (!fi.file) {
error("Cannot open file %s", _fileName.c_str());
}
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 8cf74983ca..86ce492033 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -1010,7 +1010,7 @@ void ScummEngine_v60he::o60_openFile() {
// TODO / FIXME: Consider using listSavefiles to avoid unneccessary openForLoading calls
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);
if (_hInFileTable[slot] == 0) {
- _hInFileTable[slot] = SearchMan.openFile(filename);
+ _hInFileTable[slot] = SearchMan.createReadStreamForMember(filename);
}
break;
case 2:
diff --git a/graphics/video/dxa_player.cpp b/graphics/video/dxa_player.cpp
index 397d1232da..78c2b75fed 100644
--- a/graphics/video/dxa_player.cpp
+++ b/graphics/video/dxa_player.cpp
@@ -72,7 +72,7 @@ bool DXAPlayer::loadFile(const char *fileName) {
closeFile();
- _fileStream = SearchMan.openFile(fileName);
+ _fileStream = SearchMan.createReadStreamForMember(fileName);
if (!_fileStream)
return false;
diff --git a/graphics/video/flic_player.cpp b/graphics/video/flic_player.cpp
index b928981ef3..f1c051d480 100644
--- a/graphics/video/flic_player.cpp
+++ b/graphics/video/flic_player.cpp
@@ -66,7 +66,7 @@ int32 FlicPlayer::getFrameCount() {
bool FlicPlayer::loadFile(const char *fileName) {
closeFile();
- _fileStream = SearchMan.openFile(fileName);
+ _fileStream = SearchMan.createReadStreamForMember(fileName);
if (!_fileStream)
return false;
diff --git a/graphics/video/smk_player.cpp b/graphics/video/smk_player.cpp
index 143fa04621..5f162b0815 100644
--- a/graphics/video/smk_player.cpp
+++ b/graphics/video/smk_player.cpp
@@ -356,7 +356,7 @@ bool SMKPlayer::loadFile(const char *fileName) {
closeFile();
- _fileStream = SearchMan.openFile(fileName);
+ _fileStream = SearchMan.createReadStreamForMember(fileName);
if (!_fileStream)
return false;
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 3e61400f9f..89b666ce58 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -580,7 +580,7 @@ bool ThemeEngine::addBitmap(const Common::String &filename) {
// If not, try to load the bitmap via the ImageDecoder class.
surf = Graphics::ImageDecoder::loadFile(filename);
if (!surf && _themeArchive) {
- Common::SeekableReadStream *stream = _themeArchive->openFile(filename);
+ Common::SeekableReadStream *stream = _themeArchive->createReadStreamForMember(filename);
if (stream) {
surf = Graphics::ImageDecoder::loadFile(*stream);
delete stream;
@@ -1243,7 +1243,7 @@ const Graphics::Font *ThemeEngine::loadFontFromArchive(const Common::String &fil
const Graphics::Font *font = 0;
if (_themeArchive)
- stream = _themeArchive->openFile(filename);
+ stream = _themeArchive->createReadStreamForMember(filename);
if (stream) {
font = Graphics::NewFont::loadFromCache(*stream);
delete stream;