aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz/windows.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-03 14:16:34 -0800
committerPaul Gilbert2019-01-03 14:16:34 -0800
commit642efa7f6a0772099a555b8bf612052ce8d5baff (patch)
treecb6eea0ba3eae455959b10bc1be232a69bd0f3b3 /engines/glk/frotz/windows.cpp
parentdf74a209ca8496f08283285337181ea73a69b78f (diff)
downloadscummvm-rg350-642efa7f6a0772099a555b8bf612052ce8d5baff.tar.gz
scummvm-rg350-642efa7f6a0772099a555b8bf612052ce8d5baff.tar.bz2
scummvm-rg350-642efa7f6a0772099a555b8bf612052ce8d5baff.zip
GLK: FROTZ: Hooked up window property reading
Diffstat (limited to 'engines/glk/frotz/windows.cpp')
-rw-r--r--engines/glk/frotz/windows.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index 4fa291e868..fcb57ceb57 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/frotz/windows.cpp
@@ -46,7 +46,6 @@ Window &Windows::operator[](uint idx) {
Window::Window() : _windows(nullptr), _win(nullptr), _tempVal(0) {}
-
winid_t Window::getWindow() {
if (!_win) {
// Window doesn't exist, so create it
@@ -94,24 +93,36 @@ uint16 Window::getProperty(WindowProperty propType) {
switch (propType) {
case Y_POS:
- return win->_bbox.top;
+ return win->_bbox.top / g_conf->_monoInfo._cellH;
case X_POS:
- return win->_bbox.left;
+ return win->_bbox.left / g_conf->_monoInfo._cellW;
case Y_SIZE:
- return win->_bbox.height();
+ return win->_bbox.height() / g_conf->_monoInfo._cellH;
case X_SIZE:
- return win->_bbox.width();
+ return win->_bbox.width() / g_conf->_monoInfo._cellW;
case Y_CURSOR:
return win->getCursor().y;
case X_CURSOR:
return win->getCursor().x;
+
default:
error("Read of an unimplemented property");
/*
LEFT_MARGIN = 6, RIGHT_MARGIN = 7, NEWLINE_INTERRUPT = 8, INTERRUPT_COUNTDOWN = 9,
TEXT_STYLE = 10, COLOUR_DATA = 11, FONT_NUMBER = 12, FONT_SIZE = 13, ATTRIBUTES = 14,
LINE_COUNT = 15, TRUE_FG_COLOR = 16, TRUE_BG_COLOR = 17
- */
+
+ case TRUE_FG_COLOR:
+ store(os_to_true_colour(lo(wp[winarg0()].colour)));
+
+ case TRUE_BG_COLOR:
+ zword bg = hi(wp[winarg0()].colour);
+
+ if (bg == TRANSPARENT_COLOUR)
+ store((zword)-4);
+ else
+ store(os_to_true_colour(bg));
+ */
}
}