[Scummvm-cvs-logs] scummvm master -> f758b8422c821b54c5825fa92d25cf3d1c410e3a

eriktorbjorn eriktorbjorn at telia.com
Tue Oct 2 22:15:55 CEST 2012


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:
f758b8422c TOLTECS: Draw shaded rects to "front screen", not "background"


Commit: f758b8422c821b54c5825fa92d25cf3d1c410e3a
    https://github.com/scummvm/scummvm/commit/f758b8422c821b54c5825fa92d25cf3d1c410e3a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-10-02T13:12:56-07:00

Commit Message:
TOLTECS: Draw shaded rects to "front screen", not "background"

The shadeRect() function is called just once (at the time of writing)
and immediately afterwards the "front screen" is copied to the
"background". Therefore, drawing to the background doesn't seem to
make any sense.

The colors are wrong, but I assume that's for the same reason that the
text colors are wrong as well.

Changed paths:
    engines/toltecs/menu.cpp



diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index c214205..ac91191 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -413,7 +413,7 @@ void MenuSystem::restoreRect(int x, int y, int w, int h) {
 }
 
 void MenuSystem::shadeRect(int x, int y, int w, int h, byte color1, byte color2) {
-	byte *src = (byte *)_background->getBasePtr(x, y);
+	byte *src = (byte *)_vm->_screen->_frontScreen + x + y * 640;
 	for (int xc = 0; xc < w; xc++) {
 		src[xc] = color2;
 		src[xc + h * 640] = color1;






More information about the Scummvm-git-logs mailing list