[Scummvm-cvs-logs] SF.net SVN: scummvm:[36022] scummvm/trunk/engines/kyra
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jan 23 05:57:20 CET 2009
Revision: 36022
http://scummvm.svn.sourceforge.net/scummvm/?rev=36022&view=rev
Author: fingolfin
Date: 2009-01-23 04:57:18 +0000 (Fri, 23 Jan 2009)
Log Message:
-----------
Renamed Kyra's Resource::getFileStream to createReadStream
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_hof.cpp
scummvm/trunk/engines/kyra/resource.cpp
scummvm/trunk/engines/kyra/resource.h
scummvm/trunk/engines/kyra/resource_intern.cpp
scummvm/trunk/engines/kyra/scene_lol.cpp
scummvm/trunk/engines/kyra/scene_mr.cpp
scummvm/trunk/engines/kyra/script.cpp
scummvm/trunk/engines/kyra/sound.cpp
scummvm/trunk/engines/kyra/sound_digital.cpp
scummvm/trunk/engines/kyra/staticres.cpp
scummvm/trunk/engines/kyra/text_mr.cpp
scummvm/trunk/engines/kyra/vqa.cpp
Modified: scummvm/trunk/engines/kyra/kyra_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/kyra_hof.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -1669,7 +1669,7 @@
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 @@
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);
Modified: scummvm/trunk/engines/kyra/resource.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/resource.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -164,7 +164,7 @@
}
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 @@
}
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 @@
}
uint32 Resource::getFileSize(const char *file) {
- Common::SeekableReadStream *stream = getFileStream(file);
+ Common::SeekableReadStream *stream = createReadStream(file);
if (!stream)
return 0;
@@ -300,7 +300,7 @@
}
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 @@
return true;
}
-Common::SeekableReadStream *Resource::getFileStream(const Common::String &file) {
+Common::SeekableReadStream *Resource::createReadStream(const Common::String &file) {
return _files.createReadStreamForMember(file);
}
Modified: scummvm/trunk/engines/kyra/resource.h
===================================================================
--- scummvm/trunk/engines/kyra/resource.h 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/resource.h 2009-01-23 04:57:18 UTC (rev 36022)
@@ -75,7 +75,7 @@
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:
Modified: scummvm/trunk/engines/kyra/resource_intern.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource_intern.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/resource_intern.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -881,7 +881,7 @@
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 @@
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 @@
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;
Modified: scummvm/trunk/engines/kyra/scene_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lol.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/scene_lol.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -553,10 +553,10 @@
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 @@
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;
Modified: scummvm/trunk/engines/kyra/scene_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_mr.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/scene_mr.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -363,7 +363,7 @@
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 @@
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);
Modified: scummvm/trunk/engines/kyra/script.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/script.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -224,7 +224,7 @@
destroy();
res->exists(filename, true);
- _stream = res->getFileStream(filename);
+ _stream = res->createReadStream(filename);
assert(_stream);
_startOffset = 0;
_endOffset = _stream->size();
Modified: scummvm/trunk/engines/kyra/sound.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/sound.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -81,7 +81,7 @@
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);
Modified: scummvm/trunk/engines/kyra/sound_digital.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_digital.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/sound_digital.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -401,7 +401,7 @@
if (!_vm->resource()->exists(file.c_str()))
continue;
- stream = _vm->resource()->getFileStream(file);
+ stream = _vm->resource()->createReadStream(file);
usedCodec = i;
}
Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/staticres.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -1177,7 +1177,7 @@
}
Common::SeekableReadStream *StaticResource::getFile(const char *name) {
- return _vm->resource()->getFileStream(getFilename(name));
+ return _vm->resource()->createReadStream(getFilename(name));
}
#pragma mark -
Modified: scummvm/trunk/engines/kyra/text_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_mr.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/text_mr.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -676,8 +676,8 @@
_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);
}
Modified: scummvm/trunk/engines/kyra/vqa.cpp
===================================================================
--- scummvm/trunk/engines/kyra/vqa.cpp 2009-01-23 04:45:44 UTC (rev 36021)
+++ scummvm/trunk/engines/kyra/vqa.cpp 2009-01-23 04:57:18 UTC (rev 36022)
@@ -185,7 +185,7 @@
debugC(9, kDebugLevelMovie, "VQAMovie::open('%s')", filename);
close();
- _file = _vm->resource()->getFileStream(filename);
+ _file = _vm->resource()->createReadStream(filename);
if (!_file)
return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list