aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2015-11-17 23:17:48 +0100
committerEugene Sandulenko2015-11-17 23:17:48 +0100
commit5d0f38d747e7583d0ca5959cd642468ba67cd04c (patch)
tree811cb9e4d94ab7eb052a2f4b978b68bbb6fe833b
parent4dc23ea2893ad60c683e12a34c4667a5e14f5ccf (diff)
downloadscummvm-rg350-5d0f38d747e7583d0ca5959cd642468ba67cd04c.tar.gz
scummvm-rg350-5d0f38d747e7583d0ca5959cd642468ba67cd04c.tar.bz2
scummvm-rg350-5d0f38d747e7583d0ca5959cd642468ba67cd04c.zip
GRAPHICS: Fix rendering in some corner cases
-rw-r--r--graphics/transparent_surface.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/graphics/transparent_surface.cpp b/graphics/transparent_surface.cpp
index f6e8cacb8b..992a5dc879 100644
--- a/graphics/transparent_surface.cpp
+++ b/graphics/transparent_surface.cpp
@@ -41,8 +41,6 @@
namespace Graphics {
-static const int kAShift = 0;//img->format.aShift;
-
static const int kBModShift = 0;//img->format.bShift;
static const int kGModShift = 8;//img->format.gShift;
static const int kRModShift = 16;//img->format.rShift;
@@ -118,7 +116,7 @@ void doBlitBinaryFast(byte *ino, byte *outo, uint32 width, uint32 height, uint32
in = ino;
for (uint32 j = 0; j < width; j++) {
uint32 pix = *(uint32 *)in;
- int a = (pix >> kAShift) & 0xff;
+ int a = (pix >> kAModShift) & 0xff;
if (a != 0) { // Full opacity (Any value not exactly 0 is Opaque here)
*(uint32 *)out = pix;
@@ -338,7 +336,7 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
retSize.setWidth(0);
retSize.setHeight(0);
// Check if we need to draw anything at all
- int ca = (color >> 24) & 0xff;
+ int ca = (color >> kAModShift) & 0xff;
if (ca == 0) {
return retSize;