From 8a84e3d6715e58d29abf4eb800fe32357d4b1297 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 6 Jan 2019 14:26:57 -0800 Subject: GLK: FROTZ: Default white color for v6 game background --- engines/glk/frotz/windows.cpp | 2 ++ engines/glk/window_graphics.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp index 54f4c4aae0..0c7237cbd0 100644 --- a/engines/glk/frotz/windows.cpp +++ b/engines/glk/frotz/windows.cpp @@ -48,6 +48,8 @@ void Windows::setup(bool isVersion6) { // For graphic games we have a background window covering the entire screen for greater // flexibility of wher we draw pictures, and the lower and upper areas sit on top of them _background = g_vm->glk_window_open(0, 0, 0, wintype_Graphics, 0); + _background->setBackgroundColor(0xffffff); + _lower = g_vm->glk_window_open(g_vm->glk_window_get_root(), winmethod_Arbitrary | winmethod_Fixed, 0, wintype_TextBuffer, 0); _upper = g_vm->glk_window_open(g_vm->glk_window_get_root(), diff --git a/engines/glk/window_graphics.cpp b/engines/glk/window_graphics.cpp index 049d31425b..d0f721d5c1 100644 --- a/engines/glk/window_graphics.cpp +++ b/engines/glk/window_graphics.cpp @@ -62,7 +62,9 @@ void GraphicsWindow::rearrange(const Rect &box) { if (newhgt < bothhgt) bothhgt = newhgt; - newSurface = new Graphics::ManagedSurface(newwid, newhgt, g_system->getScreenFormat()); + Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); + newSurface = new Graphics::ManagedSurface(newwid, newhgt, pixelFormat); + newSurface->clear(pixelFormat.RGBToColor(_bgnd[0], _bgnd[1], _bgnd[2])); // If the new surface is equal or bigger than the old one, copy it over if (_surface && bothwid && bothhgt) @@ -145,7 +147,7 @@ void GraphicsWindow::eraseRect(bool whole, const Rect &box) { // zero out hyperlinks for these coordinates g_vm->_selection->putHyperlink(0, hx0, hy0, hx1, hy1); - _surface->fillRect(Rect(x0, y0, x1, y1), MKTAG(_bgnd[0], _bgnd[1], _bgnd[2], 0)); + _surface->fillRect(Rect(x0, y0, x1, y1), _surface->format.RGBToColor(_bgnd[0], _bgnd[1], _bgnd[2])); touch(); } -- cgit v1.2.3