diff options
author | Peter Kohaut | 2019-06-24 21:43:43 +0200 |
---|---|---|
committer | Peter Kohaut | 2019-06-24 21:45:56 +0200 |
commit | dd0c0302782246d50290edd8681f03033078254c (patch) | |
tree | 038c210b1ba00df56e14afa69216e37025e877b2 /engines/bladerunner/shape.cpp | |
parent | 3036f8161ad86c10af14a3e37b8c788bcf17633f (diff) | |
download | scummvm-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.cpp | 3 |
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; |