diff options
author | Paul Gilbert | 2016-09-30 21:54:03 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-30 21:54:03 -0400 |
commit | 09561bd36c9add746b6e426088ac67faaa069dfc (patch) | |
tree | df559625565822b85362e548be2433d5aa69926c /engines/titanic/support/video_surface.cpp | |
parent | 67acdb628bf371f04b7387c61dc0f669360abe40 (diff) | |
download | scummvm-rg350-09561bd36c9add746b6e426088ac67faaa069dfc.tar.gz scummvm-rg350-09561bd36c9add746b6e426088ac67faaa069dfc.tar.bz2 scummvm-rg350-09561bd36c9add746b6e426088ac67faaa069dfc.zip |
TITANIC: Use CRawSurface in video surface getPixel
Diffstat (limited to 'engines/titanic/support/video_surface.cpp')
-rw-r--r-- | engines/titanic/support/video_surface.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp index 63ad782722..166a954dc1 100644 --- a/engines/titanic/support/video_surface.cpp +++ b/engines/titanic/support/video_surface.cpp @@ -22,6 +22,7 @@ #include "titanic/support/video_surface.h" #include "titanic/support/image_decoders.h" +#include "titanic/support/raw_surface.h" #include "titanic/support/screen_manager.h" #include "titanic/titanic.h" @@ -408,8 +409,13 @@ uint16 OSVideoSurface::getPixel(const Common::Point &pt) { 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) + CRawSurface rawSurface(&_transparencySurface->rawSurface(), _transparencyMode); + rawSurface.setRow(_transBlitFlag ? pt.y : getHeight() - pt.y - 1); + rawSurface.resetPitch(); + rawSurface.setCol(pt.x); + rawSurface.moveX(0); + + if (rawSurface.isPixelTransparent2()) return getTransparencyColor(); } |