aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobia Tesan2013-09-19 02:00:35 +0200
committerTobia Tesan2013-09-21 23:22:06 +0200
commitefc4284b42678ebc55d901902dc7db20c7aa2ff6 (patch)
tree792b85a79aa97e688711db71550360ea56a87b42
parentfa41ee132b83d99d77349f3e7d647248f2907ff5 (diff)
downloadscummvm-rg350-efc4284b42678ebc55d901902dc7db20c7aa2ff6.tar.gz
scummvm-rg350-efc4284b42678ebc55d901902dc7db20c7aa2ff6.tar.bz2
scummvm-rg350-efc4284b42678ebc55d901902dc7db20c7aa2ff6.zip
WINTERMUTE: Keep _alphaMode private in TransparentSurface
-rw-r--r--engines/wintermute/base/gfx/osystem/render_ticket.cpp8
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp7
-rw-r--r--engines/wintermute/graphics/transparent_surface.h8
3 files changed, 16 insertions, 7 deletions
diff --git a/engines/wintermute/base/gfx/osystem/render_ticket.cpp b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
index b1720c1b0b..a1538e9faf 100644
--- a/engines/wintermute/base/gfx/osystem/render_ticket.cpp
+++ b/engines/wintermute/base/gfx/osystem/render_ticket.cpp
@@ -107,9 +107,9 @@ void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface) const {
if (_owner) {
if (_transform._alphaDisable) {
- src._alphaMode = TransparentSurface::ALPHA_OPAQUE;
+ src.setAlphaMode(TransparentSurface::ALPHA_OPAQUE);
} else {
- src._alphaMode = _owner->getAlphaType();
+ src.setAlphaMode(_owner->getAlphaType());
}
}
src.blit(*_targetSurface, _dstRect.left, _dstRect.top, _transform._flip, &clipRect, _transform._rgbaMod, clipRect.width(), clipRect.height());
@@ -127,9 +127,9 @@ void RenderTicket::drawToSurface(Graphics::Surface *_targetSurface, Common::Rect
if (_owner) {
if (_transform._alphaDisable) {
- src._alphaMode = TransparentSurface::ALPHA_OPAQUE;
+ src.setAlphaMode(TransparentSurface::ALPHA_OPAQUE);
} else {
- src._alphaMode = _owner->getAlphaType();
+ src.setAlphaMode(_owner->getAlphaType());
}
}
src.blit(*_targetSurface, dstRect->left, dstRect->top, _transform._flip, clipRect, _transform._rgbaMod, clipRect->width(), clipRect->height());
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index cd200354f7..200cffb237 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -612,4 +612,11 @@ void TransparentSurface::applyColorKey(uint8 rKey, uint8 gKey, uint8 bKey, bool
}
}
+TransparentSurface::AlphaType TransparentSurface::getAlphaMode() {
+ return _alphaMode;
+}
+
+void TransparentSurface::setAlphaMode(TransparentSurface::AlphaType mode) {
+ _alphaMode = mode;
+}
} // End of namespace Wintermute
diff --git a/engines/wintermute/graphics/transparent_surface.h b/engines/wintermute/graphics/transparent_surface.h
index 598aaa55d7..fe5dc08fc0 100644
--- a/engines/wintermute/graphics/transparent_surface.h
+++ b/engines/wintermute/graphics/transparent_surface.h
@@ -81,8 +81,6 @@ struct TransparentSurface : public Graphics::Surface {
ALPHA_FULL = 2
};
- AlphaType _alphaMode;
-
/**
@brief renders the surface to another surface
@param pDest a pointer to the target image. In most cases this is the framebuffer.
@@ -120,6 +118,11 @@ struct TransparentSurface : public Graphics::Surface {
TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const;
TransparentSurface *rotoscale(const TransformStruct &transform) const;
+ AlphaType getAlphaMode();
+ void setAlphaMode(AlphaType);
+private:
+ AlphaType _alphaMode;
+
};
/**
@@ -134,7 +137,6 @@ struct TransparentSurface : public Graphics::Surface {
}
};*/
-
} // End of namespace Wintermute