From 688db9394c1ba43c7d48d52ebba5b7b467f8186c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 31 Jan 2019 21:54:13 -0800 Subject: GLK: FROTZ: Fix writing transparently to header in Zork Zero --- engines/glk/frotz/screen.cpp | 7 ++++++- engines/glk/windows.cpp | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'engines/glk') diff --git a/engines/glk/frotz/screen.cpp b/engines/glk/frotz/screen.cpp index fc1ef27c6a..d62c0dc68d 100644 --- a/engines/glk/frotz/screen.cpp +++ b/engines/glk/frotz/screen.cpp @@ -66,9 +66,14 @@ void FrotzScreen::loadVersion6Fonts(Common::Archive *archive) { pi._lineSeparation = 0; g_vm->_defaultForeground = 0; - g_vm->_defaultBackground = g_system->getScreenFormat().RGBToColor(0xff, 0xff, 0xff); + g_vm->_defaultBackground = zcolor_Transparent; g_conf->_tMarginX = 3; + for (uint idx = 0; idx < style_NUMSTYLES; ++idx) { + g_conf->_tStyles[idx].bg = g_conf->_tStylesDefault[idx].bg = zcolor_Transparent; + g_conf->_gStyles[idx].bg = g_conf->_gStylesDefault[idx].bg = zcolor_Transparent; + } + _fonts.resize(8); // Load up the 8x8 Infocom font diff --git a/engines/glk/windows.cpp b/engines/glk/windows.cpp index ff3a57b980..020b68f66d 100644 --- a/engines/glk/windows.cpp +++ b/engines/glk/windows.cpp @@ -602,9 +602,13 @@ void Window::requestLineEventUni(uint32 *buf, uint maxlen, uint initlen) { void Window::redraw() { if (Windows::_forceRedraw) { - uint color = Windows::_overrideBgSet ? g_conf->_windowColor : _bgColor; - int y0 = _yAdj ? _bbox.top - _yAdj : _bbox.top; - g_vm->_screen->fillRect(Rect(_bbox.left, y0, _bbox.right, _bbox.bottom), color); + PairWindow *parent = dynamic_cast(_parent); + + if (!parent || parent->_dir != winmethod_Arbitrary) { + uint color = Windows::_overrideBgSet ? g_conf->_windowColor : _bgColor; + int y0 = _yAdj ? _bbox.top - _yAdj : _bbox.top; + g_vm->_screen->fillRect(Rect(_bbox.left, y0, _bbox.right, _bbox.bottom), color); + } } } -- cgit v1.2.3