aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-10-19 19:42:56 -0700
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit9e804bf4848d926c32bc3f1fbb5f0ee663fecaa1 (patch)
tree2e6b1645de9a947c59ce77c36fb93e7c1d51822d /engines
parentb9bafba382a9756cbedbb2008086208e24834139 (diff)
downloadscummvm-rg350-9e804bf4848d926c32bc3f1fbb5f0ee663fecaa1.tar.gz
scummvm-rg350-9e804bf4848d926c32bc3f1fbb5f0ee663fecaa1.tar.bz2
scummvm-rg350-9e804bf4848d926c32bc3f1fbb5f0ee663fecaa1.zip
GLK: Added glk_set_window
Diffstat (limited to 'engines')
-rw-r--r--engines/gargoyle/glk.cpp2
-rw-r--r--engines/gargoyle/windows.cpp6
-rw-r--r--engines/gargoyle/windows.h6
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/gargoyle/glk.cpp b/engines/gargoyle/glk.cpp
index 278faf5678..7274ff2af4 100644
--- a/engines/gargoyle/glk.cpp
+++ b/engines/gargoyle/glk.cpp
@@ -136,7 +136,7 @@ strid_t Glk::glk_window_get_echo_stream(winid_t win) {
}
void Glk::glk_set_window(winid_t win) {
- // TODO
+ _windows->setCurrent(win ? win->str : nullptr);
}
strid_t Glk::glk_stream_open_file(frefid_t fileref, glui32 fmode,
diff --git a/engines/gargoyle/windows.cpp b/engines/gargoyle/windows.cpp
index 8dc546a61d..0bc16b2c25 100644
--- a/engines/gargoyle/windows.cpp
+++ b/engines/gargoyle/windows.cpp
@@ -89,7 +89,7 @@ WindowStyle G_STYLES[style_NUMSTYLES] = {
Windows::Windows(Graphics::Screen *screen) : _screen(screen), _forceRedraw(true), _moreFocus(false),
_windowList(nullptr), _rootWin(nullptr), _focusWin(nullptr), _mask(nullptr),
- _claimSelect(0) {
+ _claimSelect(0), _currentStr(nullptr) {
_confLockCols = false;
_confLockRows = false;
_wMarginx = 15;
@@ -280,6 +280,10 @@ void Windows::clearSelection() {
_claimSelect = false;
}
+void Windows::setCurrent(Common::WriteStream *stream) {
+ _currentStr = stream;
+}
+
/*--------------------------------------------------------------------------*/
Window::Window(Windows *windows, glui32 rock) : _magicnum(MAGIC_WINDOW_NUM),
diff --git a/engines/gargoyle/windows.h b/engines/gargoyle/windows.h
index 64adf81450..02fa7aab35 100644
--- a/engines/gargoyle/windows.h
+++ b/engines/gargoyle/windows.h
@@ -54,6 +54,7 @@ private:
bool _moreFocus;
bool _claimSelect;
WindowMask *_mask;
+ Common::WriteStream *_currentStr;
private:
/**
* Create a new window
@@ -111,6 +112,11 @@ public:
Window *getRoot() const { return _rootWin; }
void clearSelection();
+
+ /**
+ * Set the current output stream
+ */
+ void setCurrent(Common::WriteStream *stream);
};
/**