aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/shape.cpp
diff options
context:
space:
mode:
authorPeter Kohaut2019-08-31 23:06:30 +0200
committerPeter Kohaut2019-08-31 23:09:19 +0200
commita7399c5111cc7ebeea284498a1ee5ac7542bb96d (patch)
treef89653b084b58ce909d4487a8251338acaf236d0 /engines/bladerunner/shape.cpp
parent6fc73734c12248947ff2214ffd517a32816031c4 (diff)
downloadscummvm-rg350-a7399c5111cc7ebeea284498a1ee5ac7542bb96d.tar.gz
scummvm-rg350-a7399c5111cc7ebeea284498a1ee5ac7542bb96d.tar.bz2
scummvm-rg350-a7399c5111cc7ebeea284498a1ee5ac7542bb96d.zip
BLADERUNNER: Use best pixel format on every platform
Updated all drawing routines to be pixel format agnostic. Might decrease performance.
Diffstat (limited to 'engines/bladerunner/shape.cpp')
-rw-r--r--engines/bladerunner/shape.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/bladerunner/shape.cpp b/engines/bladerunner/shape.cpp
index de7a572fa6..60fa869fc1 100644
--- a/engines/bladerunner/shape.cpp
+++ b/engines/bladerunner/shape.cpp
@@ -112,11 +112,11 @@ void Shape::draw(Graphics::Surface &surface, int x, int y) const {
uint8 a, r, g, b;
gameDataPixelFormat().colorToARGB(shpColor, 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(CLIP(dst_x + xi, 0, surface.w - 1), CLIP(dst_y + yi, 0, surface.h - 1))) = outColor;
+ // Ignore the alpha in the output as it is inversed in the input
+ void *dstPtr = surface.getBasePtr(CLIP(dst_x + xi, 0, surface.w - 1), CLIP(dst_y + yi, 0, surface.h - 1));
+ drawPixel(surface, dstPtr, surface.format.RGBToColor(r, g, b));
}
}
src_p += 2 * (_width - rect_w);