From ff70186855bec22fe77043d89917b189218ff856 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 21 Apr 2014 19:12:28 -0400 Subject: MADS: Improve background user interface sprite animations --- engines/mads/msurface.cpp | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'engines/mads/msurface.cpp') diff --git a/engines/mads/msurface.cpp b/engines/mads/msurface.cpp index 75aad01ee1..2c9d093877 100644 --- a/engines/mads/msurface.cpp +++ b/engines/mads/msurface.cpp @@ -418,50 +418,6 @@ void MSurface::copyFrom(MSurface *src, const Common::Point &destPos, int depth, } } -void MSurface::mergeFrom(MSurface *src, const Common::Rect &srcBounds, const Common::Point &destPos) { - // Validation of the rectangle and position - int destX = destPos.x, destY = destPos.y; - if ((destX >= w) || (destY >= h)) - return; - - Common::Rect copyRect = srcBounds; - if (destX < 0) { - copyRect.left += -destX; - destX = 0; - } - else if (destX + copyRect.width() > w) { - copyRect.right -= destX + copyRect.width() - w; - } - if (destY < 0) { - copyRect.top += -destY; - destY = 0; - } - else if (destY + copyRect.height() > h) { - copyRect.bottom -= destY + copyRect.height() - h; - } - - if (!copyRect.isValidRect()) - return; - - // Copy the specified area - - byte *data = src->getData(); - byte *srcPtr = data + (src->getWidth() * copyRect.top + copyRect.left); - byte *destPtr = (byte *)pixels + (destY * getWidth()) + destX; - - for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { - // Process each line of the area - for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) { - // Check for the range used for on-screen text, which should be kept intact - if (srcPtr[xCtr] < 8 || srcPtr[xCtr] > 15) - destPtr[xCtr] = srcPtr[xCtr]; - } - - srcPtr += src->getWidth(); - destPtr += getWidth(); - } -} - void MSurface::scrollX(int xAmount) { if (xAmount == 0) return; -- cgit v1.2.3