[Scummvm-cvs-logs] SF.net SVN: scummvm:[34838] scummvm/trunk/engines/cine/gfx.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Wed Oct 22 21:56:39 CEST 2008


Revision: 34838
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34838&view=rev
Author:   buddha_
Date:     2008-10-22 19:56:38 +0000 (Wed, 22 Oct 2008)

Log Message:
-----------
Make incrustMask and incrustSprite only draw to the current background in Operation Stealth.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/gfx.cpp

Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2008-10-22 17:44:12 UTC (rev 34837)
+++ scummvm/trunk/engines/cine/gfx.cpp	2008-10-22 19:56:38 UTC (rev 34838)
@@ -980,19 +980,15 @@
  */
 void OSRenderer::incrustMask(const objectStruct &obj, uint8 color) {
 	const byte *data = animDataTable[obj.frame].data();
-	int x, y, width, height, i;
+	int x, y, width, height;
 
 	x = obj.x;
 	y = obj.y;
 	width = animDataTable[obj.frame]._realWidth;
 	height = animDataTable[obj.frame]._height;
 
-	for (i = 0; i < 8; i++) {
-		if (!_bgTable[i].bg) {
-			continue;
-		}
-
-		gfxFillSprite(data, width, height, _bgTable[i].bg, x, y, color);
+	if (_bgTable[_currentBg].bg) {
+		gfxFillSprite(data, width, height, _bgTable[_currentBg].bg, x, y, color);
 	}
 }
 
@@ -1017,7 +1013,7 @@
  */
 void OSRenderer::incrustSprite(const objectStruct &obj) {
 	const byte *data = animDataTable[obj.frame].data();
-	int x, y, width, height, transColor, i;
+	int x, y, width, height, transColor;
 
 	x = obj.x;
 	y = obj.y;
@@ -1025,12 +1021,8 @@
 	width = animDataTable[obj.frame]._realWidth;
 	height = animDataTable[obj.frame]._height;
 
-	for (i = 0; i < 8; i++) {
-		if (!_bgTable[i].bg) {
-			continue;
-		}
-
-		drawSpriteRaw2(data, transColor, width, height, _bgTable[i].bg, x, y);
+	if (_bgTable[_currentBg].bg) {
+		drawSpriteRaw2(data, transColor, width, height, _bgTable[_currentBg].bg, x, y);
 	}
 }
 


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