aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTobia Tesan2013-07-15 22:24:46 +0200
committerTobia Tesan2013-08-01 00:14:29 +0200
commit63b8132ea3ec6fe6bcfcb43d1e0c9baf481eab1e (patch)
treeb7804ecf6ece6a62375c05ff8289254ab8911faf /engines
parent06ec0067665c4aa2369ea0b3b451ca0e7b2951c1 (diff)
downloadscummvm-rg350-63b8132ea3ec6fe6bcfcb43d1e0c9baf481eab1e.tar.gz
scummvm-rg350-63b8132ea3ec6fe6bcfcb43d1e0c9baf481eab1e.tar.bz2
scummvm-rg350-63b8132ea3ec6fe6bcfcb43d1e0c9baf481eab1e.zip
WINTERMUTE: Remove single-argument zoom, rename mirrorX => getMirrorX() in transform_struct.h
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp4
-rw-r--r--engines/wintermute/graphics/transform_struct.cpp37
-rw-r--r--engines/wintermute/graphics/transform_struct.h7
3 files changed, 6 insertions, 42 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
index 6db4818945..02f7f991e1 100644
--- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp
@@ -321,14 +321,14 @@ bool BaseSurfaceOSystem::endPixelOp() {
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceOSystem::display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct(100, mirrorX, mirrorY));
+ return drawSprite(x, y, &rect, nullptr, TransformStruct(DEFAULT_ZOOM_X, DEFAULT_ZOOM_Y, mirrorX, mirrorY));
}
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceOSystem::displayTrans(int x, int y, Rect32 rect, uint32 alpha, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
_rotation = 0;
- return drawSprite(x, y, &rect, nullptr, TransformStruct(100, blendMode, alpha, mirrorX, mirrorY));
+ return drawSprite(x, y, &rect, nullptr, TransformStruct(DEFAULT_ZOOM_X, DEFAULT_ZOOM_Y, blendMode, alpha, mirrorX, mirrorY));
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/graphics/transform_struct.cpp b/engines/wintermute/graphics/transform_struct.cpp
index dc5e45feea..c179d42ab1 100644
--- a/engines/wintermute/graphics/transform_struct.cpp
+++ b/engines/wintermute/graphics/transform_struct.cpp
@@ -61,28 +61,6 @@ TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, TSpriteBlendMode blen
Point32(DEFAULT_OFFSET_X, DEFAULT_OFFSET_Y));
}
-TransformStruct::TransformStruct(int32 zoom, TSpriteBlendMode blendMode, uint32 rgbaMod, bool mirrorX, bool mirrorY) {
- init(Point32(zoom, zoom),
- DEFAULT_ANGLE,
- Point32(DEFAULT_HOTSPOT_X, DEFAULT_HOTSPOT_Y),
- false,
- blendMode,
- rgbaMod,
- mirrorX, mirrorY,
- Point32(DEFAULT_OFFSET_X, DEFAULT_OFFSET_Y));
-}
-
-TransformStruct::TransformStruct(int32 zoom, bool mirrorX, bool mirrorY) {
- init(Point32(zoom, zoom),
- DEFAULT_ANGLE,
- Point32(DEFAULT_HOTSPOT_X, DEFAULT_HOTSPOT_Y),
- true,
- BLEND_NORMAL,
- DEFAULT_RGBAMOD,
- mirrorX, mirrorY,
- Point32(DEFAULT_OFFSET_X, DEFAULT_OFFSET_Y));
-}
-
TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX, int32 hotspotY) {
init(Point32(zoomX, zoomY),
angle,
@@ -94,17 +72,6 @@ TransformStruct::TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 h
Point32(DEFAULT_OFFSET_X, DEFAULT_OFFSET_Y));
}
-TransformStruct::TransformStruct(int32 zoom) {
- init(Point32(zoom, zoom),
- DEFAULT_ANGLE,
- Point32(DEFAULT_HOTSPOT_X, DEFAULT_HOTSPOT_Y),
- true,
- BLEND_NORMAL,
- DEFAULT_RGBAMOD,
- false, false,
- Point32(DEFAULT_OFFSET_X, DEFAULT_OFFSET_Y));
-}
-
TransformStruct::TransformStruct() {
init(Point32(DEFAULT_ZOOM_X, DEFAULT_ZOOM_Y),
DEFAULT_ANGLE,
@@ -116,11 +83,11 @@ TransformStruct::TransformStruct() {
Point32(DEFAULT_OFFSET_X, DEFAULT_OFFSET_Y));
}
-bool TransformStruct::mirrorX() const {
+bool TransformStruct::getMirrorX() const {
return (bool)(_flip & TransparentSurface::FLIP_H);
}
-bool TransformStruct::mirrorY() const {
+bool TransformStruct::getMirrorY() const {
return (bool)(_flip & TransparentSurface::FLIP_V);
}
} // End of namespace Wintermute
diff --git a/engines/wintermute/graphics/transform_struct.h b/engines/wintermute/graphics/transform_struct.h
index 1f7d556fe7..6b021b5cd5 100644
--- a/engines/wintermute/graphics/transform_struct.h
+++ b/engines/wintermute/graphics/transform_struct.h
@@ -48,10 +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(int32 zoomX, int32 zoomY, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX = false, bool mirrorY = false);
- TransformStruct(int32 zoom, TSpriteBlendMode blendMode, uint32 alpha, bool mirrorX, bool mirrorY);
- TransformStruct(int32 zoom, bool mirrorX, bool mirrorY);
TransformStruct(int32 zoomX, int32 zoomY, uint32 angle, int32 hotspotX = 0, int32 hotspotY = 0);
- TransformStruct(int32 zoom);
TransformStruct();
Point32 _zoom; ///< Zoom; 100 = no zoom
@@ -63,8 +60,8 @@ public:
uint32 _rgbaMod; ///< RGBa
Point32 _offset;
- bool mirrorX() const;
- bool mirrorY() const;
+ bool getMirrorX() const;
+ bool getMirrorY() const;
bool operator==(const TransformStruct &compare) const {
return (compare._angle == _angle &&