aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula/drascula.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2010-02-08 16:14:04 +0000
committerNicola Mettifogo2010-02-08 16:14:04 +0000
commitb658c61155ff189fe4381ba774993a69a3f572ea (patch)
treef1253fedfa1acdf0f4e71b13cfb78cc552809847 /engines/drascula/drascula.cpp
parenta9a0fdc69474f0491aa2662cb83ff8b7661ebd1a (diff)
downloadscummvm-rg350-b658c61155ff189fe4381ba774993a69a3f572ea.tar.gz
scummvm-rg350-b658c61155ff189fe4381ba774993a69a3f572ea.tar.bz2
scummvm-rg350-b658c61155ff189fe4381ba774993a69a3f572ea.zip
Let ArjFile return a SeekableReadStream instead of implementing
the same interface itself. The caller is now responsible for deleting the returned streams. svn-id: r47994
Diffstat (limited to 'engines/drascula/drascula.cpp')
-rw-r--r--engines/drascula/drascula.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 824a5eb2dd..56fbe48714 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -604,15 +604,15 @@ bool DrasculaEngine::runCurrentChapter() {
}
}
-char *DrasculaEngine::getLine(Common::SeekableReadStream &stream, char *buf, int len) {
+char *DrasculaEngine::getLine(Common::SeekableReadStream *stream, char *buf, int len) {
byte c;
char *b;
for (;;) {
b = buf;
while (true) {
- c = ~stream.readByte();
- if (stream.eos()) break;
+ c = ~stream->readByte();
+ if (stream->eos()) break;
if (c == '\r')
continue;
@@ -621,7 +621,7 @@ char *DrasculaEngine::getLine(Common::SeekableReadStream &stream, char *buf, int
*b++ = c;
}
*b = '\0';
- if (stream.eos() && b == buf)
+ if (stream->eos() && b == buf)
return NULL;
if (b != buf)
break;
@@ -629,13 +629,13 @@ char *DrasculaEngine::getLine(Common::SeekableReadStream &stream, char *buf, int
return buf;
}
-void DrasculaEngine::getIntFromLine(Common::SeekableReadStream &stream, int len, int* result) {
+void DrasculaEngine::getIntFromLine(Common::SeekableReadStream *stream, int len, int* result) {
char buf[256];
getLine(stream, buf, len);
sscanf(buf, "%d", result);
}
-void DrasculaEngine::getStringFromLine(Common::SeekableReadStream &stream, int len, char* result) {
+void DrasculaEngine::getStringFromLine(Common::SeekableReadStream *stream, int len, char* result) {
char buf[256];
getLine(stream, buf, len);
sscanf(buf, "%s", result);