diff options
-rw-r--r-- | engines/wintermute/base/gfx/osystem/render_ticket.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/graphics/transparent_surface.cpp | 7 | ||||
-rw-r--r-- | engines/wintermute/graphics/transparent_surface.h | 8 |
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 |