aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/video_surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-30 21:54:03 -0400
committerPaul Gilbert2016-09-30 21:54:03 -0400
commit09561bd36c9add746b6e426088ac67faaa069dfc (patch)
treedf559625565822b85362e548be2433d5aa69926c /engines/titanic/support/video_surface.cpp
parent67acdb628bf371f04b7387c61dc0f669360abe40 (diff)
downloadscummvm-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.cpp10
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();
}