diff options
author | Paul Gilbert | 2016-09-28 20:38:25 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-28 20:38:25 -0400 |
commit | 05de617c432efd9d1548e9c4ef1674296eb75ab7 (patch) | |
tree | 0b826512d262f4c695a8e4365eda3d65b0ed936e /engines/titanic | |
parent | aba58e6042a1247f36379e69b3338eae1d58c999 (diff) | |
download | scummvm-rg350-05de617c432efd9d1548e9c4ef1674296eb75ab7.tar.gz scummvm-rg350-05de617c432efd9d1548e9c4ef1674296eb75ab7.tar.bz2 scummvm-rg350-05de617c432efd9d1548e9c4ef1674296eb75ab7.zip |
TITANIC: Add transparency check to OSVideoSurface getPixel
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/support/video_surface.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index 50a5ca5f16..63ad782722 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -407,6 +407,12 @@ uint16 OSVideoSurface::getPixel(const Common::Point &pt) { return 0; if (pt.x >= 0 && pt.y >= 0 && pt.x < getWidth() && pt.y < getHeight()) { + if (_transparencySurface) { + const byte *pixelP = (const byte *)_transparencySurface->getBasePtr(pt.x, pt.y); + if (*pixelP != 0xF0) + return getTransparencyColor(); + } + lock(); uint16 pixel = *(uint16 *)_rawSurface->getBasePtr(pt.x, pt.y); unlock(); |