diff options
author | Tobia Tesan | 2013-07-15 22:39:55 +0200 |
---|---|---|
committer | Tobia Tesan | 2013-08-01 00:23:51 +0200 |
commit | 1ecdd2d61ad6dcf809c0cfaa37e7d9bbceb6bad3 (patch) | |
tree | d52ba9592c9f32f0b445740855885f3bc23ca8ad | |
parent | aeb4c0953805185ab70ceecb8e38b3b47c4322d9 (diff) | |
download | scummvm-rg350-1ecdd2d61ad6dcf809c0cfaa37e7d9bbceb6bad3.tar.gz scummvm-rg350-1ecdd2d61ad6dcf809c0cfaa37e7d9bbceb6bad3.tar.bz2 scummvm-rg350-1ecdd2d61ad6dcf809c0cfaa37e7d9bbceb6bad3.zip |
WINTERMUTE: #define to const for TransformStruct defaults
-rw-r--r-- | engines/wintermute/graphics/transform_struct.h | 4 | ||||
-rw-r--r-- | engines/wintermute/graphics/transform_tools.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/graphics/transform_struct.h b/engines/wintermute/graphics/transform_struct.h index 3fec9c0d0d..0ca7e9167d 100644 --- a/engines/wintermute/graphics/transform_struct.h +++ b/engines/wintermute/graphics/transform_struct.h @@ -26,8 +26,8 @@ #include "engines/wintermute/math/rect32.h" #include "engines/wintermute/dctypes.h" -const float kDefaultZoomX = 100.0; -const float kDefaultZoomY = 100.0; +const uint32 kDefaultZoomX = 100; +const uint32 kDefaultZoomY = 100; const uint32 kDefaultRgbaMod = 0xFFFFFFFF; const int32 kDefaultHotspotX = 0; const int32 kDefaultHotspotY = 0; diff --git a/engines/wintermute/graphics/transform_tools.cpp b/engines/wintermute/graphics/transform_tools.cpp index 52e6a51296..73f48402f4 100644 --- a/engines/wintermute/graphics/transform_tools.cpp +++ b/engines/wintermute/graphics/transform_tools.cpp @@ -29,8 +29,8 @@ 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; - newPoint.x = (point.x * cos(rotateRad) - point.y * sin(rotateRad))*zoom.x/kDefaultZoomX; - newPoint.y = (point.x * sin(rotateRad) + point.y * cos(rotateRad))*zoom.y/kDefaultZoomY; + newPoint.x = (point.x * cos(rotateRad) - point.y * sin(rotateRad)) * zoom.x / kDefaultZoomX; + newPoint.y = (point.x * sin(rotateRad) + point.y * cos(rotateRad)) * zoom.y / kDefaultZoomY; if (mirrorX) { newPoint.x *= -1; } |