diff options
-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; } |