[Scummvm-cvs-logs] SF.net SVN: scummvm:[50524] scummvm/trunk/engines/m4

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Wed Jun 30 12:17:55 CEST 2010


Revision: 50524
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50524&view=rev
Author:   dreammaster
Date:     2010-06-30 10:17:54 +0000 (Wed, 30 Jun 2010)

Log Message:
-----------
Removed deprecated destAdjust parameters from the frame drawing code

Modified Paths:
--------------
    scummvm/trunk/engines/m4/graphics.cpp
    scummvm/trunk/engines/m4/graphics.h
    scummvm/trunk/engines/m4/mads_views.cpp

Modified: scummvm/trunk/engines/m4/graphics.cpp
===================================================================
--- scummvm/trunk/engines/m4/graphics.cpp	2010-06-30 10:13:20 UTC (rev 50523)
+++ scummvm/trunk/engines/m4/graphics.cpp	2010-06-30 10:17:54 UTC (rev 50524)
@@ -401,8 +401,8 @@
  * Copies a given image onto a destination surface with scaling, transferring only pixels that meet
  * the specified depth requirement on a secondary surface contain depth information
  */
-void M4Surface::copyFrom(M4Surface *src, int destX, int destY, Common::Point destAdjust,
-						 int depth, M4Surface *depthsSurface, int scale, int transparentColour) {
+void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth, 
+						 M4Surface *depthsSurface, int scale, int transparentColour) {
 
 	if (scale == 100) {
 		// Copy the specified area
@@ -428,7 +428,7 @@
 		byte *srcPtr = data + (src->width() * copyRect.top + copyRect.left);
 		byte *depthsData = depthsSurface->getBasePtr();
 		byte *depthsPtr = depthsData + (depthsSurface->pitch * destY) + destX;
-		byte *destPtr = (byte *)pixels + ((destY + destAdjust.y) * pitch) + destX + destAdjust.x;
+		byte *destPtr = (byte *)pixels + (destY * pitch) + destX;
 
 		// 100% scaling variation
 		for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) {
@@ -521,7 +521,7 @@
 	if (spriteHeight <= 0)
 		return;
 
-	byte *destPixelsP = this->getBasePtr(destX + spriteLeft + destAdjust.x, destY + spriteTop + destAdjust.y);
+	byte *destPixelsP = this->getBasePtr(destX + spriteLeft, destY + spriteTop);
 	const byte *depthPixelsP = depthsSurface->getBasePtr(destX + spriteLeft, destY + spriteTop);
 
 	spriteLeft = (spriteLeft * (normalFrame ? 1 : -1));

Modified: scummvm/trunk/engines/m4/graphics.h
===================================================================
--- scummvm/trunk/engines/m4/graphics.h	2010-06-30 10:13:20 UTC (rev 50523)
+++ scummvm/trunk/engines/m4/graphics.h	2010-06-30 10:17:54 UTC (rev 50524)
@@ -173,7 +173,7 @@
 	void frameRect(const Common::Rect &r, uint8 color);
 	void fillRect(const Common::Rect &r, uint8 color);
 	void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColour = -1);
-	void copyFrom(M4Surface *src, int destX, int destY, Common::Point destAdjust, int depth, M4Surface *depthSurface, 
+	void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface, 
 			int scale, int transparentColour = -1);
 
 	void update() {
@@ -196,7 +196,7 @@
 	}
 	inline void copyTo(M4Surface *dest, int destX, int destY, int depth, M4Surface *depthsSurface, int scale,
 				int transparentColour = -1) {
-		dest->copyFrom(this, destX, destY, Common::Point(0, 0), depth, depthsSurface, scale, transparentColour);
+		dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColour);
 	}
 
 	void scrollX(int xAmount);

Modified: scummvm/trunk/engines/m4/mads_views.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_views.cpp	2010-06-30 10:13:20 UTC (rev 50523)
+++ scummvm/trunk/engines/m4/mads_views.cpp	2010-06-30 10:17:54 UTC (rev 50524)
@@ -158,8 +158,8 @@
 
 				if (slot.depth > 1) {
 					// Draw the frame with depth processing
-					_owner._bgSurface->copyFrom(frame, xp, yp, Common::Point(), slot.depth, 
-						_owner._depthSurface, 100, frame->getTransparencyIndex());
+					_owner._bgSurface->copyFrom(frame, xp, yp, slot.depth, _owner._depthSurface, 100, 
+						frame->getTransparencyIndex());
 				} else {
 					// No depth, so simply draw the image
 					frame->copyTo(_owner._bgSurface, xp, yp, frame->getTransparencyIndex());
@@ -199,8 +199,8 @@
 			// Minimalised drawing
 			assert(slot.spriteListIndex < (int)_sprites.size());
 			M4Sprite *spr = spriteSet.getFrame((slot.frameNumber & 0x7fff) - 1);
-			viewport->copyFrom(spr, slot.xp, slot.yp, Common::Point(0, 0), slot.depth, _owner._depthSurface, 
-				slot.scale, spr->getTransparencyIndex());
+			viewport->copyFrom(spr, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale, 
+				spr->getTransparencyIndex());
 		} else {
 			int xp, yp;
 			M4Sprite *spr = spriteSet.getFrame(slot.frameNumber - 1);
@@ -215,8 +215,7 @@
 
 			if (slot.depth > 1) {
 				// Draw the frame with depth processing
-				viewport->copyFrom(spr, xp, yp, Common::Point(0, 0), slot.depth, _owner._depthSurface, 100,
-					spr->getTransparencyIndex());
+				viewport->copyFrom(spr, xp, yp, slot.depth, _owner._depthSurface, 100, spr->getTransparencyIndex());
 			} else {
 				// No depth, so simply draw the image
 				spr->copyTo(viewport, xp, yp, spr->getTransparencyIndex());


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