aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2009-01-23 04:57:18 +0000
committerMax Horn2009-01-23 04:57:18 +0000
commit2d866c0483231a4814c7a7e6c11f303a4dfe6af2 (patch)
tree2a4fc1433701957ede044b7bae73b67750b0d354 /engines
parent14c5bbbccf30f333b92092ca55063b338335c3a5 (diff)
downloadscummvm-rg350-2d866c0483231a4814c7a7e6c11f303a4dfe6af2.tar.gz
scummvm-rg350-2d866c0483231a4814c7a7e6c11f303a4dfe6af2.tar.bz2
scummvm-rg350-2d866c0483231a4814c7a7e6c11f303a4dfe6af2.zip
Renamed Kyra's Resource::getFileStream to createReadStream
svn-id: r36022
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/kyra_hof.cpp4
-rw-r--r--engines/kyra/resource.cpp10
-rw-r--r--engines/kyra/resource.h2
-rw-r--r--engines/kyra/resource_intern.cpp6
-rw-r--r--engines/kyra/scene_lol.cpp6
-rw-r--r--engines/kyra/scene_mr.cpp4
-rw-r--r--engines/kyra/script.cpp2
-rw-r--r--engines/kyra/sound.cpp2
-rw-r--r--engines/kyra/sound_digital.cpp2
-rw-r--r--engines/kyra/staticres.cpp2
-rw-r--r--engines/kyra/text_mr.cpp4
-rw-r--r--engines/kyra/vqa.cpp2
12 files changed, 23 insertions, 23 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 4aa32495ea..01af6fb0bc 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -1669,7 +1669,7 @@ void KyraEngine_HoF::displayInvWsaLastFrame() {
void KyraEngine_HoF::setCauldronState(uint8 state, bool paletteFade) {
memcpy(_screen->getPalette(2), _screen->getPalette(0), 768);
- Common::SeekableReadStream *file = _res->getFileStream("_POTIONS.PAL");
+ Common::SeekableReadStream *file = _res->createReadStream("_POTIONS.PAL");
if (!file)
error("Couldn't load cauldron palette");
file->seek(state*18, SEEK_SET);
@@ -1841,7 +1841,7 @@ bool KyraEngine_HoF::updateCauldron() {
void KyraEngine_HoF::cauldronRndPaletteFade() {
showMessage(0, 0xCF);
int index = _rnd.getRandomNumberRng(0x0F, 0x16);
- Common::SeekableReadStream *file = _res->getFileStream("_POTIONS.PAL");
+ Common::SeekableReadStream *file = _res->createReadStream("_POTIONS.PAL");
if (!file)
error("Couldn't load cauldron palette");
file->seek(index*18, SEEK_SET);
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 6e1623e984..5d82500d17 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -164,7 +164,7 @@ bool Resource::loadPakFile(Common::String name, Common::SharedPtr<Common::Archiv
}
bool Resource::loadFileList(const Common::String &filedata) {
- Common::SeekableReadStream *f = getFileStream(filedata);
+ Common::SeekableReadStream *f = createReadStream(filedata);
if (!f)
return false;
@@ -267,7 +267,7 @@ void Resource::listFiles(const Common::String &pattern, Common::ArchiveMemberLis
}
uint8 *Resource::fileData(const char *file, uint32 *size) {
- Common::SeekableReadStream *stream = getFileStream(file);
+ Common::SeekableReadStream *stream = createReadStream(file);
if (!stream)
return 0;
@@ -290,7 +290,7 @@ bool Resource::exists(const char *file, bool errorOutOnFail) {
}
uint32 Resource::getFileSize(const char *file) {
- Common::SeekableReadStream *stream = getFileStream(file);
+ Common::SeekableReadStream *stream = createReadStream(file);
if (!stream)
return 0;
@@ -300,7 +300,7 @@ uint32 Resource::getFileSize(const char *file) {
}
bool Resource::loadFileToBuf(const char *file, void *buf, uint32 maxSize) {
- Common::SeekableReadStream *stream = getFileStream(file);
+ Common::SeekableReadStream *stream = createReadStream(file);
if (!stream)
return false;
@@ -310,7 +310,7 @@ bool Resource::loadFileToBuf(const char *file, void *buf, uint32 maxSize) {
return true;
}
-Common::SeekableReadStream *Resource::getFileStream(const Common::String &file) {
+Common::SeekableReadStream *Resource::createReadStream(const Common::String &file) {
return _files.createReadStreamForMember(file);
}
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index e14e1c92c4..1724a1b26a 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -75,7 +75,7 @@ public:
bool exists(const char *file, bool errorOutOnFail=false);
uint32 getFileSize(const char *file);
uint8* fileData(const char *file, uint32 *size);
- Common::SeekableReadStream *getFileStream(const Common::String &file);
+ Common::SeekableReadStream *createReadStream(const Common::String &file);
bool loadFileToBuf(const char *file, void *buf, uint32 maxSize);
protected:
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 4f435e8927..23fe2e530b 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -881,7 +881,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
sprintf(filenameExt, extension.c_str(), currentFile);
filenameTemp = filenameBase + Common::String(filenameExt);
- if (!(tmpFile = owner->getFileStream(filenameTemp))) {
+ if (!(tmpFile = owner->createReadStream(filenameTemp))) {
debug(3, "couldn't open file '%s'\n", filenameTemp.c_str());
break;
}
@@ -958,7 +958,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
sprintf(filenameExt, extension.c_str(), i);
filenameTemp = a->filename + Common::String(filenameExt);
- if (!(tmpFile = owner->getFileStream(filenameTemp))) {
+ if (!(tmpFile = owner->createReadStream(filenameTemp))) {
debug(3, "couldn't open file '%s'\n", filenameTemp.c_str());
break;
}
@@ -1017,7 +1017,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
sprintf(filenameExt, extension.c_str(), i + 1);
filenameTemp = a->filename + Common::String(filenameExt);
- Common::SeekableReadStream *tmpFile2 = owner->getFileStream(filenameTemp);
+ Common::SeekableReadStream *tmpFile2 = owner->createReadStream(filenameTemp);
tmpFile->read(hdr, m);
tmpFile2->read(hdr + m, b);
delete tmpFile2;
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index da839dbf8b..a458b93fae 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -553,10 +553,10 @@ void LoLEngine::releaseMonsterShapes(int monsterIndex) {
void LoLEngine::loadLevelShpDat(const char *shpFile, const char *datFile, bool flag) {
memset(_tempBuffer5120, 0, 5120);
- _lvlShpFileHandle = _res->getFileStream(shpFile);
+ _lvlShpFileHandle = _res->createReadStream(shpFile);
_lvlShpNum = _lvlShpFileHandle->readUint16LE();
- Common::SeekableReadStream *s = _res->getFileStream(datFile);
+ Common::SeekableReadStream *s = _res->createReadStream(datFile);
_levelFileDataSize = s->readUint16LE();
delete[] _levelFileData;
@@ -677,7 +677,7 @@ void LoLEngine::loadLevelGraphics(const char *file, int specialColor, int weight
char tname[13];
snprintf(tname, sizeof(tname), "LEVEL%.02d.TLC", _currentLevel);
- Common::SeekableReadStream *s = _res->getFileStream(tname);
+ Common::SeekableReadStream *s = _res->createReadStream(tname);
s->read(_tlcTable1, 256);
s->read(_tlcTable2, 5120);
delete s;
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index 72ce4ecc35..2b7d37a017 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -363,7 +363,7 @@ void KyraEngine_MR::loadSceneMsc() {
strcat(filename, ".MSC");
_res->exists(filename, true);
- Common::SeekableReadStream *stream = _res->getFileStream(filename);
+ Common::SeekableReadStream *stream = _res->createReadStream(filename);
assert(stream);
int16 minY = 0, height = 0;
minY = stream->readSint16LE();
@@ -399,7 +399,7 @@ void KyraEngine_MR::initSceneScript(int unk1) {
strcat(filename, ".DAT");
_res->exists(filename, true);
- Common::SeekableReadStream *stream = _res->getFileStream(filename);
+ Common::SeekableReadStream *stream = _res->createReadStream(filename);
assert(stream);
stream->seek(2, SEEK_CUR);
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index da99abed73..ebffa6ce20 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -224,7 +224,7 @@ void ScriptFileParser::setFile(const char *filename, Resource *res) {
destroy();
res->exists(filename, true);
- _stream = res->getFileStream(filename);
+ _stream = res->createReadStream(filename);
assert(_stream);
_startOffset = 0;
_endOffset = _stream->size();
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 5699cce5db..5063fb5fed 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -81,7 +81,7 @@ int32 Sound::voicePlay(const char *file, bool isSfx) {
strcpy(filenamebuffer, file);
strcat(filenamebuffer, _supportedCodecs[i].fileext);
- Common::SeekableReadStream *stream = _vm->resource()->getFileStream(filenamebuffer);
+ Common::SeekableReadStream *stream = _vm->resource()->createReadStream(filenamebuffer);
if (!stream)
continue;
audioStream = _supportedCodecs[i].streamFunc(stream, true, 0, 0, 1);
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index b21336e993..6b81b1c022 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -401,7 +401,7 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer::
if (!_vm->resource()->exists(file.c_str()))
continue;
- stream = _vm->resource()->getFileStream(file);
+ stream = _vm->resource()->createReadStream(file);
usedCodec = i;
}
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index ce1e54ea48..36ec89f308 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -1177,7 +1177,7 @@ const char *StaticResource::getFilename(const char *name) {
}
Common::SeekableReadStream *StaticResource::getFile(const char *name) {
- return _vm->resource()->getFileStream(getFilename(name));
+ return _vm->resource()->createReadStream(getFilename(name));
}
#pragma mark -
diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp
index dc3e1235c6..b8ccfc106a 100644
--- a/engines/kyra/text_mr.cpp
+++ b/engines/kyra/text_mr.cpp
@@ -676,8 +676,8 @@ void KyraEngine_MR::updateDlgBuffer() {
_res->exists(cnvFile, true);
_res->exists(dlgFile, true);
- _cnvFile = _res->getFileStream(cnvFile);
- _dlgBuffer = _res->getFileStream(dlgFile);
+ _cnvFile = _res->createReadStream(cnvFile);
+ _dlgBuffer = _res->createReadStream(dlgFile);
assert(_cnvFile);
assert(_dlgBuffer);
}
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 851f36f742..3282fb0988 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -185,7 +185,7 @@ bool VQAMovie::open(const char *filename) {
debugC(9, kDebugLevelMovie, "VQAMovie::open('%s')", filename);
close();
- _file = _vm->resource()->getFileStream(filename);
+ _file = _vm->resource()->createReadStream(filename);
if (!_file)
return false;