mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-01 15:09:47 +00:00
WINTERMUTE: Remove single-argument zoom, rename mirrorX => getMirrorX() in transform_struct.h
This commit is contained in:
parent
06ec006766
commit
63b8132ea3
@ -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));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -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
|
||||
|
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user