aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/shape.cpp
diff options
context:
space:
mode:
authorPeter Kohaut2019-06-24 21:43:43 +0200
committerPeter Kohaut2019-06-24 21:45:56 +0200
commitdd0c0302782246d50290edd8681f03033078254c (patch)
tree038c210b1ba00df56e14afa69216e37025e877b2 /engines/bladerunner/shape.cpp
parent3036f8161ad86c10af14a3e37b8c788bcf17633f (diff)
downloadscummvm-rg350-dd0c0302782246d50290edd8681f03033078254c.tar.gz
scummvm-rg350-dd0c0302782246d50290edd8681f03033078254c.tar.bz2
scummvm-rg350-dd0c0302782246d50290edd8681f03033078254c.zip
BLADERUNNER: Fixed alpha channel issues
Alpha channel is inverted in the game assets and that lead to issues in OpenGL renderer. E.g. screenshot of savegames were partly black or showing artifacts closes #10983
Diffstat (limited to 'engines/bladerunner/shape.cpp')
-rw-r--r--engines/bladerunner/shape.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/bladerunner/shape.cpp b/engines/bladerunner/shape.cpp
index 39a7758a0f..2d01d1336a 100644
--- a/engines/bladerunner/shape.cpp
+++ b/engines/bladerunner/shape.cpp
@@ -112,7 +112,8 @@ void Shape::draw(Graphics::Surface &surface, int x, int y) const {
uint8 a, r, g, b;
gameDataPixelFormat().colorToARGB(shpColor, a, r, g, b);
- uint16 outColor = (uint16)surface.format.ARGBToColor(a, r, g, b);
+ // Ignore the alpha in the output as it is inversed in the input
+ uint16 outColor = (uint16)surface.format.RGBToColor(r, g, b);
if (!a) {
*(uint16 *)(surface.getBasePtr(dst_x + xi, dst_y + yi)) = outColor;