diff options
author | Tobia Tesan | 2013-08-04 10:44:01 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-09-18 18:19:09 +0200 |
commit | 83ea7b7d949afe5c27e2ba221fd9cb065236afd0 (patch) | |
tree | 239552c8486d5121478b99e3ad1786d6ec26cad5 | |
parent | 9534ee0152b43885d15c1199e11e203d667bbeb8 (diff) | |
download | scummvm-rg350-83ea7b7d949afe5c27e2ba221fd9cb065236afd0.tar.gz scummvm-rg350-83ea7b7d949afe5c27e2ba221fd9cb065236afd0.tar.bz2 scummvm-rg350-83ea7b7d949afe5c27e2ba221fd9cb065236afd0.zip |
WINTERMUTE: Fix types in transform_struct for coherence; this silences warnings
-rw-r--r-- | engines/wintermute/graphics/transform_struct.cpp | 13 | ||||
-rw-r--r-- | engines/wintermute/graphics/transform_struct.h | 7 |
2 files changed, 16 insertions, 4 deletions
diff --git a/engines/wintermute/graphics/transform_struct.cpp b/engines/wintermute/graphics/transform_struct.cpp index 8edbf765b5..68cc1d9ad7 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(zoomX / 100.0 * kDefaultZoomX, + 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, diff --git a/engines/wintermute/graphics/transform_struct.h b/engines/wintermute/graphics/transform_struct.h index a54c4cc5d0..702664a72d 100644 --- a/engines/wintermute/graphics/transform_struct.h +++ b/engines/wintermute/graphics/transform_struct.h @@ -33,14 +33,14 @@ namespace Wintermute { * Has a number of overloaded constructors to accomodate various argument lists. */ -const uint32 kDefaultZoomX = 100; -const uint32 kDefaultZoomY = 100; +const int32 kDefaultZoomX = 100; +const int32 kDefaultZoomY = 100; const uint32 kDefaultRgbaMod = 0xFFFFFFFF; const int32 kDefaultHotspotX = 0; const int32 kDefaultHotspotY = 0; const int32 kDefaultOffsetX = 0; const int32 kDefaultOffsetY = 0; -const int32 kDefaultAngle = 0; +const uint32 kDefaultAngle = 0; struct TransformStruct { private: @@ -48,6 +48,7 @@ private: public: TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX = false, bool mirrorY = false, int32 offsetX = 0, int32 offsetY = 0); + TransformStruct(float zoomX, float zoomY, uint32 angle, int32 hotspotX, int32 hotspotY, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX = false, bool mirrorY = false, int32 offsetX = 0, int32 offsetY = 0); TransformStruct(int32 zoomX, int32 zoomY, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX = false, bool mirrorY = false); TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX = 0, int32 hotspotY = 0); TransformStruct(); |