aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-02 14:28:58 +0200
committerEinar Johan Trøan Sømåen2012-06-02 14:28:58 +0200
commit74ff79e90bb2862e8c84867ff50f56675c1b4c7e (patch)
tree6ace98e89562894831d6505c33ed4dfcb87b8487 /engines/wintermute
parente7a802700c3872215049d304fb6898549eef56f5 (diff)
downloadscummvm-rg350-74ff79e90bb2862e8c84867ff50f56675c1b4c7e.tar.gz
scummvm-rg350-74ff79e90bb2862e8c84867ff50f56675c1b4c7e.tar.bz2
scummvm-rg350-74ff79e90bb2862e8c84867ff50f56675c1b4c7e.zip
WINTERMUTE: Implement IsTransparentAtLite, to fix the BitmapFont-drawing.
Diffstat (limited to 'engines/wintermute')
-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;