aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/agos.h2
-rw-r--r--engines/agos/animation.cpp4
-rw-r--r--engines/agos/res.cpp24
-rw-r--r--engines/agos/res_snd.cpp4
-rw-r--r--engines/agos/saveload.cpp4
-rw-r--r--engines/agos/subroutine.cpp2
6 files changed, 20 insertions, 20 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index d171902133..9b9cbce94f 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -198,7 +198,7 @@ public:
#endif
virtual bool hasFile(const Common::String &name) const;
- Common::SeekableReadStream *open(const Common::String &filename);
+ virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &filename) const;
private:
bool _fallBack;
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index db2cff328c..c7176fe7e8 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -251,7 +251,7 @@ bool MoviePlayerDXA::load() {
}
Common::String videoName = Common::String::format("%s.dxa", baseName);
- Common::SeekableReadStream *videoStream = _vm->_archives.open(videoName);
+ Common::SeekableReadStream *videoStream = _vm->_archives.createReadStreamForMember(videoName);
if (!videoStream)
error("Failed to load video file %s", videoName.c_str());
if (!loadStream(videoStream))
@@ -415,7 +415,7 @@ MoviePlayerSMK::MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name)
bool MoviePlayerSMK::load() {
Common::String videoName = Common::String::format("%s.smk", baseName);
- Common::SeekableReadStream *videoStream = _vm->_archives.open(videoName);
+ Common::SeekableReadStream *videoStream = _vm->_archives.createReadStreamForMember(videoName);
if (!videoStream)
error("Failed to load video file %s", videoName.c_str());
if (!loadStream(videoStream))
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 284b252d91..03acb0a161 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -54,12 +54,12 @@ bool ArchiveMan::hasFile(const Common::String &name) const {
return Common::SearchSet::hasFile(name);
}
-Common::SeekableReadStream *ArchiveMan::open(const Common::String &filename) {
+Common::SeekableReadStream *ArchiveMan::createReadStreamForMember(const Common::String &filename) const {
if (_fallBack && SearchMan.hasFile(filename)) {
return SearchMan.createReadStreamForMember(filename);
}
- return createReadStreamForMember(filename);
+ return Common::SearchSet::createReadStreamForMember(filename);
}
#ifdef ENABLE_AGOS2
@@ -180,7 +180,7 @@ void AGOSEngine_PN::loadGamePcFile() {
if (getFileName(GAME_BASEFILE) != NULL) {
// Read dataBase
- in = _archives.open(getFileName(GAME_BASEFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_BASEFILE));
if (!in) {
error("loadGamePcFile: Can't load database file '%s'", getFileName(GAME_BASEFILE));
}
@@ -198,7 +198,7 @@ void AGOSEngine_PN::loadGamePcFile() {
if (getFileName(GAME_TEXTFILE) != NULL) {
// Read textBase
- in = _archives.open(getFileName(GAME_TEXTFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_TEXTFILE));
if (!in) {
error("loadGamePcFile: Can't load textbase file '%s'", getFileName(GAME_TEXTFILE));
}
@@ -221,7 +221,7 @@ void AGOSEngine::loadGamePcFile() {
if (getFileName(GAME_BASEFILE) != NULL) {
/* Read main gamexx file */
- in = _archives.open(getFileName(GAME_BASEFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_BASEFILE));
if (!in) {
error("loadGamePcFile: Can't load gamexx file '%s'", getFileName(GAME_BASEFILE));
}
@@ -247,7 +247,7 @@ void AGOSEngine::loadGamePcFile() {
if (getFileName(GAME_TBLFILE) != NULL) {
/* Read list of TABLE resources */
- in = _archives.open(getFileName(GAME_TBLFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_TBLFILE));
if (!in) {
error("loadGamePcFile: Can't load table resources file '%s'", getFileName(GAME_TBLFILE));
}
@@ -268,7 +268,7 @@ void AGOSEngine::loadGamePcFile() {
if (getFileName(GAME_STRFILE) != NULL) {
/* Read list of TEXT resources */
- in = _archives.open(getFileName(GAME_STRFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_STRFILE));
if (!in)
error("loadGamePcFile: Can't load text resources file '%s'", getFileName(GAME_STRFILE));
@@ -282,7 +282,7 @@ void AGOSEngine::loadGamePcFile() {
if (getFileName(GAME_STATFILE) != NULL) {
/* Read list of ROOM STATE resources */
- in = _archives.open(getFileName(GAME_STATFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_STATFILE));
if (!in) {
error("loadGamePcFile: Can't load state resources file '%s'", getFileName(GAME_STATFILE));
}
@@ -305,7 +305,7 @@ void AGOSEngine::loadGamePcFile() {
if (getFileName(GAME_RMSLFILE) != NULL) {
/* Read list of ROOM ITEMS resources */
- in = _archives.open(getFileName(GAME_RMSLFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_RMSLFILE));
if (!in) {
error("loadGamePcFile: Can't load room resources file '%s'", getFileName(GAME_RMSLFILE));
}
@@ -321,7 +321,7 @@ void AGOSEngine::loadGamePcFile() {
if (getFileName(GAME_XTBLFILE) != NULL) {
/* Read list of XTABLE resources */
- in = _archives.open(getFileName(GAME_XTBLFILE));
+ in = _archives.createReadStreamForMember(getFileName(GAME_XTBLFILE));
if (!in) {
error("loadGamePcFile: Can't load xtable resources file '%s'", getFileName(GAME_XTBLFILE));
}
@@ -822,7 +822,7 @@ void AGOSEngine::loadVGABeardFile(uint16 id) {
sprintf(filename, "0%d.VGA", id);
}
- in = _archives.open(filename);
+ in = _archives.createReadStreamForMember(filename);
if (!in)
error("loadSimonVGAFile: Can't load %s", filename);
@@ -900,7 +900,7 @@ void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) {
}
}
- in = _archives.open(filename);
+ in = _archives.createReadStreamForMember(filename);
if (!in) {
if (useError)
error("loadVGAVideoFile: Can't load %s", filename);
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index e9a7ea4de9..2777d4f269 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -452,7 +452,7 @@ static const char *const dimpSoundList[32] = {
void AGOSEngine::loadSoundFile(const char* filename) {
Common::SeekableReadStream *in;
- in = _archives.open(filename);
+ in = _archives.createReadStreamForMember(filename);
if (!in)
error("loadSound: Can't load %s", filename);
@@ -475,7 +475,7 @@ void AGOSEngine::loadSound(uint16 sound, int16 pan, int16 vol, uint16 type) {
assert(sound >= 1 && sound <= 32);
sprintf(filename, "%s.wav", dimpSoundList[sound - 1]);
- in = _archives.open(filename);
+ in = _archives.createReadStreamForMember(filename);
if (!in)
error("loadSound: Can't load %s", filename);
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 920dbb0a0d..4fbde09ff8 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -1019,7 +1019,7 @@ bool AGOSEngine::loadGame(const char *filename, bool restartMode) {
if (restartMode) {
// Load restart state
- f = _archives.open(filename);
+ f = _archives.createReadStreamForMember(filename);
} else {
f = _saveFileMan->openForLoading(filename);
}
@@ -1193,7 +1193,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) {
if (restartMode) {
// Load restart state
- f = _archives.open(filename);
+ f = _archives.createReadStreamForMember(filename);
} else {
f = _saveFileMan->openForLoading(filename);
}
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index a319153bad..f5aad2dcc8 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -266,7 +266,7 @@ Common::SeekableReadStream *AGOSEngine::openTablesFile(const char *filename) {
}
Common::SeekableReadStream *AGOSEngine::openTablesFile_simon1(const char *filename) {
- Common::SeekableReadStream *in = _archives.open(filename);
+ Common::SeekableReadStream *in = _archives.createReadStreamForMember(filename);
if (!in)
error("openTablesFile: Can't open '%s'", filename);
return in;