[Scummvm-cvs-logs] SF.net SVN: scummvm:[45508] scummvm/trunk/engines/sci/gui

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Oct 29 21:32:55 CET 2009


Revision: 45508
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45508&view=rev
Author:   m_kiewitz
Date:     2009-10-29 20:32:55 +0000 (Thu, 29 Oct 2009)

Log Message:
-----------
SCI/newgui: SciGuiPicture now acts like sierra sci when drawing cels, so we dont need some hardcoded variable and differ when clearing screen

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_gfx.cpp
    scummvm/trunk/engines/sci/gui/gui_picture.cpp
    scummvm/trunk/engines/sci/gui/gui_screen.cpp
    scummvm/trunk/engines/sci/gui/gui_screen.h

Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-29 20:31:35 UTC (rev 45507)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp	2009-10-29 20:32:55 UTC (rev 45508)
@@ -300,9 +300,9 @@
 	SciGuiPicture *picture;
 
 	picture = new SciGuiPicture(_s->resMan, this, _screen, _palette, pictureId);
-	// do we add to a picture? if not -> clear screen
+	// do we add to a picture? if not -> clear screen with white
 	if (!addToFlag) {
-		ClearScreen(_screen->_colorClearScreen);
+		ClearScreen(_screen->_colorWhite);
 	}
 	picture->draw(animationNr, mirroredFlag, addToFlag, paletteId);
 }

Modified: scummvm/trunk/engines/sci/gui/gui_picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_picture.cpp	2009-10-29 20:31:35 UTC (rev 45507)
+++ scummvm/trunk/engines/sci/gui/gui_picture.cpp	2009-10-29 20:32:55 UTC (rev 45508)
@@ -209,6 +209,13 @@
 	leftX = callerX + _gfx->GetPort()->left;
 	rightX = MIN<int16>(width + leftX, _gfx->GetPort()->rect.right + _gfx->GetPort()->left);
 
+	// Change clearcolor to white, if we dont add to an existing picture. That way we will paint everything on screen
+	//  but white and that wont matter because the screen is supposed to be already white. It seems that most (if not all)
+	//  SCI1.1 games use color 0 as transparency and SCI1 games use color 255 as transparency. Sierra SCI seems to paint
+	//  the whole data to screen and wont skip over transparent pixels. So this will actually make it work like Sierra
+	if (!_addToFlag)
+		clearColor = _screen->_colorWhite;
+
 	ptr = celBitmap;
 	if (!_mirroredFlag) {
 		// Draw bitmap to screen
@@ -605,7 +612,7 @@
 
 	// This logic was taken directly from sierra sci, floodfill will get aborted on various occations
 	if (screenMask & SCI_SCREEN_MASK_VISUAL) {
-		if ((color == _screen->_colorWhite) || (searchColor != _screen->_colorClearScreen))
+		if ((color == _screen->_colorWhite) || (searchColor != _screen->_colorWhite))
 			return;
 	} else if (screenMask & SCI_SCREEN_MASK_PRIORITY) {
 		if ((priority == 0) || (searchPriority != 0))

Modified: scummvm/trunk/engines/sci/gui/gui_screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.cpp	2009-10-29 20:31:35 UTC (rev 45507)
+++ scummvm/trunk/engines/sci/gui/gui_screen.cpp	2009-10-29 20:32:55 UTC (rev 45508)
@@ -56,18 +56,12 @@
 
 	if (_resMan->isVGA()) {
 		_colorWhite = 255;
-		// TODO: Find out whats really different between SCI11 and SCI1, because actually the clearScreen in SCI11
-		//  really uses 255 as well
-		if (getSciVersion() >= SCI_VERSION_1_1) {
-			_colorClearScreen = 0;
+		if (getSciVersion() >= SCI_VERSION_1_1)
 			_colorDefaultVectorData = 255;
-		} else {
-			_colorClearScreen = 255;
+		else
 			_colorDefaultVectorData = 0;
-		}
 	} else {
 		_colorWhite = 15;
-		_colorClearScreen = 15;
 		_colorDefaultVectorData = 0;
 	}
 }

Modified: scummvm/trunk/engines/sci/gui/gui_screen.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.h	2009-10-29 20:31:35 UTC (rev 45507)
+++ scummvm/trunk/engines/sci/gui/gui_screen.h	2009-10-29 20:32:55 UTC (rev 45508)
@@ -86,7 +86,6 @@
 	int _picNotValid; // possible values 0, 1 and 2
 
 	byte _colorWhite;
-	byte _colorClearScreen;
 	byte _colorDefaultVectorData;
 
 private:


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