[Scummvm-git-logs] scummvm master -> 05de617c432efd9d1548e9c4ef1674296eb75ab7

dreammaster dreammaster at scummvm.org
Thu Sep 29 02:38:35 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
05de617c43 TITANIC: Add transparency check to OSVideoSurface getPixel


Commit: 05de617c432efd9d1548e9c4ef1674296eb75ab7
    https://github.com/scummvm/scummvm/commit/05de617c432efd9d1548e9c4ef1674296eb75ab7
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-28T20:38:25-04:00

Commit Message:
TITANIC: Add transparency check to OSVideoSurface getPixel

Changed paths:
    engines/titanic/support/video_surface.cpp



diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp
index 50a5ca5..63ad782 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();





More information about the Scummvm-git-logs mailing list