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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jul 13 17:43:00 CEST 2010


Revision: 50845
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50845&view=rev
Author:   m_kiewitz
Date:     2010-07-13 15:42:59 +0000 (Tue, 13 Jul 2010)

Log Message:
-----------
SCI: change handling of priority in combination with embedded cels inside picture resources, change in r49029 was wrong - fixes pq1 (map not changing when driving car)

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

Modified: scummvm/trunk/engines/sci/graphics/picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/picture.cpp	2010-07-13 08:00:22 UTC (rev 50844)
+++ scummvm/trunk/engines/sci/graphics/picture.cpp	2010-07-13 15:42:59 UTC (rev 50845)
@@ -307,6 +307,8 @@
 	if (!_addToFlag)
 		clearColor = _screen->getColorWhite();
 
+	byte drawMask = priority == 255 ? GFX_SCREEN_MASK_VISUAL : GFX_SCREEN_MASK_VISUAL | GFX_SCREEN_MASK_PRIORITY;
+
 	ptr = celBitmap;
 	if (!_mirroredFlag) {
 		// Draw bitmap to screen
@@ -314,7 +316,7 @@
 		while (y < lastY) {
 			curByte = *ptr++;
 			if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
-				_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL | GFX_SCREEN_MASK_PRIORITY, curByte, priority, 0);
+				_screen->putPixel(x, y, drawMask, curByte, priority, 0);
 
 			x++;
 
@@ -331,7 +333,7 @@
 		while (y < lastY) {
 			curByte = *ptr++;
 			if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
-				_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL | GFX_SCREEN_MASK_PRIORITY, curByte, priority, 0);
+				_screen->putPixel(x, y, drawMask, curByte, priority, 0);
 			
 			if (x == leftX) {
 				if (width > rightX - leftX) // Skip extra pixels at the end of the row
@@ -658,8 +660,6 @@
 					vectorGetAbsCoordsNoMirror(data, curPos, x, y);
 					size = READ_LE_UINT16(data + curPos); curPos += 2;
 					_priority = pic_priority; // set global priority so the cel gets drawn using current priority as well
-					if (pic_priority == 255)
-						_priority = 0; // if priority not set, use priority 0
 					drawCelData(data, _resource->size, curPos, curPos + 8, 0, x, y);
 					curPos += size;
 					break;


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