diff options
author | Matthew Hoops | 2012-06-15 23:11:28 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-06-15 23:11:28 -0400 |
commit | 984e0012d9b96a752b40a008aa1689d43d9a9920 (patch) | |
tree | 9a3660348d5c8dcc548d2507a9d3081d32849111 | |
parent | 5230a0d61795e2855625a43d60dc3bc2ed83fc3d (diff) | |
download | scummvm-rg350-984e0012d9b96a752b40a008aa1689d43d9a9920.tar.gz scummvm-rg350-984e0012d9b96a752b40a008aa1689d43d9a9920.tar.bz2 scummvm-rg350-984e0012d9b96a752b40a008aa1689d43d9a9920.zip |
GRAPHICS: Fix colorToARGB's alpha value when no alpha channel is present
-rw-r--r-- | graphics/pixelformat.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index e0cf6ce401..ca4ef11c17 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -97,7 +97,7 @@ struct PixelFormat { } inline void colorToARGB(uint32 color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) const { - a = ((color >> aShift) << aLoss) & 0xFF; + a = (aBits() == 0) ? 0xFF : (((color >> aShift) << aLoss) & 0xFF); r = ((color >> rShift) << rLoss) & 0xFF; g = ((color >> gShift) << gLoss) & 0xFF; b = ((color >> bShift) << bLoss) & 0xFF; |