WINTERMUTE: Fix types in transform_struct for coherence; this silences warnings

This commit is contained in:
Tobia Tesan 2013-08-04 10:44:01 +02:00 committed by Einar Johan Trøan Sømåen
parent 9534ee0152
commit 83ea7b7d94
2 changed files with 16 additions and 4 deletions

View File

@ -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,

View File

@ -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();