diff options
-rw-r--r-- | engines/glk/streams.cpp | 12 | ||||
-rw-r--r-- | engines/glk/streams.h | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/engines/glk/streams.cpp b/engines/glk/streams.cpp index a2d5ca2aff..37cac4437a 100644 --- a/engines/glk/streams.cpp +++ b/engines/glk/streams.cpp @@ -1361,6 +1361,18 @@ FileStream *Streams::openFileStream(frefid_t fref, uint fmode, uint rock, bool u return stream; } +IOStream *Streams::openStream(Common::SeekableReadStream *rs, uint rock) { + IOStream *stream = new IOStream(this, rs, rock); + addStream(stream); + return stream; +} + +IOStream *Streams::openStream(Common::WriteStream *ws, uint rock) { + IOStream *stream = new IOStream(this, ws, rock); + addStream(stream); + return stream; +} + WindowStream *Streams::openWindowStream(Window *window) { WindowStream *stream = new WindowStream(this, window); addStream(stream); diff --git a/engines/glk/streams.h b/engines/glk/streams.h index df0d5df738..e4cce4a5bc 100644 --- a/engines/glk/streams.h +++ b/engines/glk/streams.h @@ -610,6 +610,16 @@ public: FileStream *openFileStream(frefid_t fref, uint fmode, uint rock = 0, bool unicode = false); /** + * Open a ScummVM read stream + */ + IOStream *openStream(Common::SeekableReadStream *rs, uint rock = 0); + + /** + * Open a ScummVM write stream + */ + IOStream *openStream(Common::WriteStream *ws, uint rock = 0); + + /** * Open a window stream */ WindowStream *openWindowStream(Window *window); |