diff options
author | Paul Gilbert | 2019-10-05 19:02:48 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-10-05 19:02:48 -0700 |
commit | 98eddcda1d4ec6b6e839ce0abdf09c55394474b2 (patch) | |
tree | 322e135fcc9cb60ffa4aa93c1ee59fdc48ec64f8 | |
parent | 8ab36786a4caa4033d9bb6d27b5fd8e0224fbdf2 (diff) | |
download | scummvm-rg350-98eddcda1d4ec6b6e839ce0abdf09c55394474b2.tar.gz scummvm-rg350-98eddcda1d4ec6b6e839ce0abdf09c55394474b2.tar.bz2 scummvm-rg350-98eddcda1d4ec6b6e839ce0abdf09c55394474b2.zip |
GLK: Add Streams methods for encapsulating ScummVM streams
-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); |