aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base/BSurfaceSDL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Base/BSurfaceSDL.cpp')
-rw-r--r--engines/wintermute/Base/BSurfaceSDL.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/BSurfaceSDL.cpp
index 0b16f3d39b..af41231968 100644
--- a/engines/wintermute/Base/BSurfaceSDL.cpp
+++ b/engines/wintermute/Base/BSurfaceSDL.cpp
@@ -361,6 +361,16 @@ bool CBSurfaceSDL::IsTransparentAtLite(int X, int Y) {
warning("CBSurfaceSDL::IsTransparentAtLite not ported yet");
hasWarned = true;
}
+ if (_surface->format.bytesPerPixel == 4) {
+ uint32 pixel = *(uint32*)_surface->getBasePtr(X, Y);
+ uint8 r,g,b,a;
+ _surface->format.colorToARGB(pixel, a, r, g, b);
+ if (a <= 128) {
+ return true;
+ } else {
+ return false;
+ }
+ }
#if 0
uint32 format;
int access;