aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/graphics/transform_struct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/graphics/transform_struct.cpp')
-rw-r--r--engines/wintermute/graphics/transform_struct.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/wintermute/graphics/transform_struct.cpp b/engines/wintermute/graphics/transform_struct.cpp
index 8edbf765b5..643c6b413f 100644
--- a/engines/wintermute/graphics/transform_struct.cpp
+++ b/engines/wintermute/graphics/transform_struct.cpp
@@ -37,7 +37,6 @@ void TransformStruct::init(Point32 zoom, uint32 angle, Point32 hotspot, bool alp
_offset = offset;
}
-
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) {
init(Point32(zoomX, zoomY),
angle,
@@ -49,6 +48,18 @@ TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 h
Point32(offsetX, offsetY));
}
+TransformStruct::TransformStruct(float zoomX, float zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY, int32 offsetX, int32 offsetY) {
+ init(Point32((int32)(zoomX / 100.0 * kDefaultZoomX),
+ (int32)(zoomY / 100.0 * kDefaultZoomY)),
+ angle,
+ Point32(hotspotX, hotspotY),
+ false,
+ blendMode,
+ rgbaMod,
+ mirrorX, mirrorY,
+ Point32(offsetX, offsetY));
+}
+
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY) {
init(Point32(zoomX, zoomY),
kDefaultAngle,