Permalink
Browse files

GLK: FROTZ: Default white color for v6 game background

  • Loading branch information...
dreammaster committed Jan 6, 2019
1 parent 302d26b commit 8a84e3d6715e58d29abf4eb800fe32357d4b1297
Showing with 6 additions and 2 deletions.
  1. +2 −0 engines/glk/frotz/windows.cpp
  2. +4 −2 engines/glk/window_graphics.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(),
@@ -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();
}

0 comments on commit 8a84e3d

Please sign in to comment.