[Scummvm-git-logs] scummvm master -> 8a84e3d6715e58d29abf4eb800fe32357d4b1297

dreammaster paulfgilbert at gmail.com
Sun Jan 6 23:54:31 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8a84e3d671 GLK: FROTZ: Default white color for v6 game background


Commit: 8a84e3d6715e58d29abf4eb800fe32357d4b1297
    https://github.com/scummvm/scummvm/commit/8a84e3d6715e58d29abf4eb800fe32357d4b1297
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-01-06T14:26:57-08:00

Commit Message:
GLK: FROTZ: Default white color for v6 game background

Changed paths:
    engines/glk/frotz/windows.cpp
    engines/glk/window_graphics.cpp


diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index 54f4c4a..0c7237c 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 049d314..d0f721d 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();
 }
 





More information about the Scummvm-git-logs mailing list