diff options
author | Paul Gilbert | 2010-06-30 10:17:54 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-06-30 10:17:54 +0000 |
commit | 8de571556012eae3cff13b3b86f8554b5ba070b4 (patch) | |
tree | 43e6067e8a4352e8b5b903fd12e98f5bf09eb6c7 | |
parent | 0c283ed197d839cb81e5957424833700ada1c4ae (diff) | |
download | scummvm-rg350-8de571556012eae3cff13b3b86f8554b5ba070b4.tar.gz scummvm-rg350-8de571556012eae3cff13b3b86f8554b5ba070b4.tar.bz2 scummvm-rg350-8de571556012eae3cff13b3b86f8554b5ba070b4.zip |
Removed deprecated destAdjust parameters from the frame drawing code
svn-id: r50524
-rw-r--r-- | engines/m4/graphics.cpp | 8 | ||||
-rw-r--r-- | engines/m4/graphics.h | 4 | ||||
-rw-r--r-- | engines/m4/mads_views.cpp | 11 |
3 files changed, 11 insertions, 12 deletions
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp index 56c40a7402..107bcbc6f9 100644 --- a/engines/m4/graphics.cpp +++ b/engines/m4/graphics.cpp @@ -401,8 +401,8 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest * 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 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, Common::Point des 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 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, Common::Point des 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)); diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h index 5e97d4f09b..c2eb11c575 100644 --- a/engines/m4/graphics.h +++ b/engines/m4/graphics.h @@ -173,7 +173,7 @@ public: 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 @@ public: } 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); diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp index c9aacbad4e..21ea3a75cb 100644 --- a/engines/m4/mads_views.cpp +++ b/engines/m4/mads_views.cpp @@ -158,8 +158,8 @@ void MadsSpriteSlots::drawBackground() { 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 @@ void MadsSpriteSlots::drawForeground(M4Surface *viewport) { // 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 @@ void MadsSpriteSlots::drawForeground(M4Surface *viewport) { 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()); |