[Scummvm-cvs-logs] SF.net SVN: scummvm:[49026] scummvm/trunk/engines/sci/graphics/ports.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu May 13 23:14:37 CEST 2010


Revision: 49026
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49026&view=rev
Author:   m_kiewitz
Date:     2010-05-13 21:14:37 +0000 (Thu, 13 May 2010)

Log Message:
-----------
SCI: remove hack code for shadows and implement them properly (shadow is actually part of the window, not added onto the window) - fixes especially lsl5

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/ports.cpp

Modified: scummvm/trunk/engines/sci/graphics/ports.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/ports.cpp	2010-05-13 20:19:54 UTC (rev 49025)
+++ scummvm/trunk/engines/sci/graphics/ports.cpp	2010-05-13 21:14:37 UTC (rev 49026)
@@ -276,13 +276,6 @@
 	if (restoreRect == 0)
 		pwnd->restoreRect = pwnd->dims;
 
-	if (!(pwnd->wndStyle & (SCI_WINDOWMGR_STYLE_USER | SCI_WINDOWMGR_STYLE_NOFRAME))) {
-		// The shadow is drawn slightly outside the window.
-		// Enlarge restoreRect to cover that.
-		pwnd->restoreRect.bottom++;
-		pwnd->restoreRect.right++;
-	}
-
 	if (draw)
 		drawWindow(pwnd);
 	setPort((Port *)pwnd);
@@ -314,16 +307,18 @@
 	if ((getSciVersion() >= SCI_VERSION_1_LATE) ? !(wndStyle & _styleUser) : wndStyle != _styleUser) {
 		r = pWnd->dims;
 		if (!(wndStyle & SCI_WINDOWMGR_STYLE_NOFRAME)) {
-			r.translate(1, 1);
-			_paint16->frameRect(r);// shadow
+			r.top++;
+			r.left++;
+			_paint16->frameRect(r);// draw shadow
 			r.translate(-1, -1);
-			_paint16->frameRect(r);// window frame
+			_paint16->frameRect(r);// draw actual window frame
 
 			if (wndStyle & SCI_WINDOWMGR_STYLE_TITLE) {
 				if (getSciVersion() <= SCI_VERSION_0_LATE) {
 					// draw a black line between titlebar and actual window content for SCI0
 					r.bottom = r.top + 10;
 					_paint16->frameRect(r);
+					r.bottom = pWnd->dims.bottom - 1;
 				}
 				r.grow(-1);
 				if (getSciVersion() <= SCI_VERSION_0_LATE)
@@ -337,7 +332,7 @@
 					penColor(oldcolor);
 				}
 
-				r = pWnd->dims;
+				r.grow(+1);
 				r.top += 9;
 			}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list