aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTobia Tesan2013-06-27 17:19:52 +0200
committerTobia Tesan2013-08-01 00:02:47 +0200
commit321c7f071668025b1c9bb16e28a70c29843e45de (patch)
tree996645becb39fab1ccb86545e4006e4713a5b84d /engines
parent58e096de97d7b8a0c09f5ac0bd6ff65853669a80 (diff)
downloadscummvm-rg350-321c7f071668025b1c9bb16e28a70c29843e45de.tar.gz
scummvm-rg350-321c7f071668025b1c9bb16e28a70c29843e45de.tar.bz2
scummvm-rg350-321c7f071668025b1c9bb16e28a70c29843e45de.zip
WINTERMUTE: Removed useless argument from rotate()
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp3
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp8
-rw-r--r--engines/wintermute/graphics/transparent_surface.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
index 23cf5c318e..3f94c2e500 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -53,8 +53,7 @@ RenderTicket::RenderTicket(BaseSurfaceOSystem *owner, const Graphics::Surface *s
// Then scale it if necessary
if (_transform._angle != 0) {
TransparentSurface src(*_surface, false);
- Common::Rect srcRect_1(srcRect->left, srcRect->top, srcRect->right, srcRect->bottom);
- Graphics::Surface *temp = src.rotate(srcRect_1, transform);
+ Graphics::Surface *temp = src.rotate(transform);
_surface->free();
delete _surface;
_surface = temp;
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 87cb143dac..3f64305487 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -496,10 +496,10 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
return retSize;
}
-TransparentSurface *TransparentSurface::rotate(Common::Rect aSrcRect, TransformStruct transform) const {
+TransparentSurface *TransparentSurface::rotate(TransformStruct transform) const {
Point32 newHotspot;
- Rect32 rect = TransformTools::newRect(Rect32 (aSrcRect), transform, &newHotspot);
- Common::Rect srcRect(0, 0, (int16)(aSrcRect.right - aSrcRect.left), (int16)(aSrcRect.bottom - aSrcRect.top));
+ Common::Rect srcRect(0, 0, (int16)w, (int16)h);
+ Rect32 rect = TransformTools::newRect(Rect32 (srcRect), transform, &newHotspot);
Common::Rect dstRect(0, 0, (int16)(rect.right - rect.left), (int16)(rect.bottom - rect.top));
TransparentSurface *target = new TransparentSurface();
@@ -526,7 +526,7 @@ TransparentSurface *TransparentSurface::rotate(Common::Rect aSrcRect, TransformS
targY += transform._hotspot.y;
if (FAST_TRANSFORM) {
- bilinearCopy(targX, targY, x, y, srcRect, dstRect, this, target);
+ nearestCopy(targX, targY, x, y, srcRect, dstRect, this, target);
} else {
bilinearCopy(targX, targY, x, y, srcRect, dstRect, this, target);
}
diff --git a/engines/wintermute/graphics/transparent_surface.h b/engines/wintermute/graphics/transparent_surface.h
index b81dbe86e9..474b10a6f1 100644
--- a/engines/wintermute/graphics/transparent_surface.h
+++ b/engines/wintermute/graphics/transparent_surface.h
@@ -111,7 +111,7 @@ struct TransparentSurface : public Graphics::Surface {
void applyColorKey(uint8 r, uint8 g, uint8 b, bool overwriteAlpha = false);
TransparentSurface *scale (uint16 newWidth, uint16 newHeight) const;
- TransparentSurface *rotate(Common::Rect srcRect, TransformStruct transform) const;
+ TransparentSurface *rotate(TransformStruct transform) const;
static byte *_lookup;
static void destroyLookup();
private: