diff options
author | Einar Johan Trøan Sømåen | 2013-08-05 03:25:22 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-08-05 03:25:22 +0200 |
commit | a932e51b14b0bee5d79988587b3e5161efcb812a (patch) | |
tree | b80b7affd9eae68a7f5d65cc8890bfae5b028d5d /engines/wintermute/graphics/transform_tools.cpp | |
parent | 71a1d18b0cffccf8f871b0ea77bc8ba239cb10cc (diff) | |
download | scummvm-rg350-a932e51b14b0bee5d79988587b3e5161efcb812a.tar.gz scummvm-rg350-a932e51b14b0bee5d79988587b3e5161efcb812a.tar.bz2 scummvm-rg350-a932e51b14b0bee5d79988587b3e5161efcb812a.zip |
WINTERMUTE: Fix formatting.
Diffstat (limited to 'engines/wintermute/graphics/transform_tools.cpp')
-rw-r--r-- | engines/wintermute/graphics/transform_tools.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/wintermute/graphics/transform_tools.cpp b/engines/wintermute/graphics/transform_tools.cpp index 4f05e19a92..ebf9092aaa 100644 --- a/engines/wintermute/graphics/transform_tools.cpp +++ b/engines/wintermute/graphics/transform_tools.cpp @@ -25,7 +25,7 @@ #include <math.h> namespace Wintermute { - + FloatPoint TransformTools::transformPoint(const FloatPoint &point, const float rotate, const Point32 &zoom, const bool mirrorX, const bool mirrorY) { float rotateRad = rotate * M_PI / 180.0f; FloatPoint newPoint; @@ -40,20 +40,19 @@ FloatPoint TransformTools::transformPoint(const FloatPoint &point, const float r return newPoint; } -Rect32 TransformTools::newRect (const Rect32 &oldRect, const TransformStruct &transform, Point32 *newHotspot) { - +Rect32 TransformTools::newRect(const Rect32 &oldRect, const TransformStruct &transform, Point32 *newHotspot) { Point32 nw(oldRect.left, oldRect.top); Point32 ne(oldRect.right, oldRect.top); Point32 sw(oldRect.left, oldRect.bottom); Point32 se(oldRect.right, oldRect.bottom); - + FloatPoint nw1, ne1, sw1, se1; nw1 = transformPoint(nw - transform._hotspot, transform._angle, transform._zoom); ne1 = transformPoint(ne - transform._hotspot, transform._angle, transform._zoom); sw1 = transformPoint(sw - transform._hotspot, transform._angle, transform._zoom); se1 = transformPoint(se - transform._hotspot, transform._angle, transform._zoom); - + float top = MIN(nw1.y, MIN(ne1.y, MIN(sw1.y, se1.y))); float bottom = MAX(nw1.y, MAX(ne1.y, MAX(sw1.y, se1.y))); float left = MIN(nw1.x, MIN(ne1.x, MIN(sw1.x, se1.x))); @@ -64,7 +63,7 @@ Rect32 TransformTools::newRect (const Rect32 &oldRect, const TransformStruct &tr newHotspot->x = (uint32)(-floor(left)); res.top = (int32)(floor(top)) + transform._hotspot.y; - res.bottom = (int32)(ceil(bottom)) + transform._hotspot.y; + res.bottom = (int32)(ceil(bottom)) + transform._hotspot.y; res.left = (int32)(floor(left)) + transform._hotspot.x; res.right = (int32)(ceil(right)) + transform._hotspot.x; |