aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/graphics
diff options
context:
space:
mode:
authorTobia Tesan2013-07-10 12:46:32 +0200
committerTobia Tesan2013-08-01 00:06:38 +0200
commit6f03fbac843410f457115bd075a6926ed3924ce0 (patch)
tree88c027130ca6a16fade0059c6f9703e0b16da3e9 /engines/wintermute/graphics
parent163cd6a5284a352225fbfa621a1e7152d0e5f8e0 (diff)
downloadscummvm-rg350-6f03fbac843410f457115bd075a6926ed3924ce0.tar.gz
scummvm-rg350-6f03fbac843410f457115bd075a6926ed3924ce0.tar.bz2
scummvm-rg350-6f03fbac843410f457115bd075a6926ed3924ce0.zip
WINTERMUTE: Pass structs by const reference
Diffstat (limited to 'engines/wintermute/graphics')
-rw-r--r--engines/wintermute/graphics/transform_tools.cpp4
-rw-r--r--engines/wintermute/graphics/transform_tools.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/graphics/transform_tools.cpp b/engines/wintermute/graphics/transform_tools.cpp
index 9e736366c3..01e8b486ce 100644
--- a/engines/wintermute/graphics/transform_tools.cpp
+++ b/engines/wintermute/graphics/transform_tools.cpp
@@ -26,7 +26,7 @@
namespace Wintermute {
- FloatPoint TransformTools::transformPoint(FloatPoint point, float rotate, Point32 zoom, bool mirrorX, bool mirrorY) {
+ FloatPoint TransformTools::transformPoint(const FloatPoint &point, const float rotate, const Point32 &zoom, const bool mirrorX, const bool mirrorY) {
float rotateRad = rotate * M_PI / 180;
FloatPoint newPoint;
newPoint.x = (point.x * cos(rotateRad) - point.y * sin(rotateRad))*zoom.x/DEFAULT_ZOOM_X;
@@ -40,7 +40,7 @@ namespace Wintermute {
return newPoint;
}
- Rect32 TransformTools::newRect (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);
diff --git a/engines/wintermute/graphics/transform_tools.h b/engines/wintermute/graphics/transform_tools.h
index ee4d16acb0..a9eabffe26 100644
--- a/engines/wintermute/graphics/transform_tools.h
+++ b/engines/wintermute/graphics/transform_tools.h
@@ -33,7 +33,7 @@ public:
/**
* Basic transform (scale + rotate) for a single point
*/
- static FloatPoint transformPoint(FloatPoint point, float rotate, Point32 zoom, bool mirrorX = false, bool mirrorY = false);
+ static FloatPoint transformPoint(const FloatPoint &point, const float rotate, const Point32 &zoom, const bool mirrorX = false, const bool mirrorY = false);
/**
* Takes a rectangle, a transform and a pointer to a point, "newHotspot".
@@ -41,7 +41,7 @@ public:
* and, as a side-effect, "newHotspot" will tell you where the hotspot will
* have ended up in the new rect, for centering.
*/
- static Rect32 newRect (Rect32 oldRect, const TransformStruct &transform, Point32 *newHotspot);
+ static Rect32 newRect (const Rect32 &oldRect, const TransformStruct &transform, Point32 *newHotspot);
};
} // End of namespace Wintermute
#endif