aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/vqa_decoder.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/vqa_decoder.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/vqa_decoder.cpp')
-rw-r--r--engines/bladerunner/vqa_decoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/bladerunner/vqa_decoder.cpp b/engines/bladerunner/vqa_decoder.cpp
index cb7028f764..d3250577c2 100644
--- a/engines/bladerunner/vqa_decoder.cpp
+++ b/engines/bladerunner/vqa_decoder.cpp
@@ -835,11 +835,11 @@ void VQADecoder::VQAVideoTrack::VPTRWriteBlock(Graphics::Surface *surface, unsig
uint8 a, r, g, b;
gameDataPixelFormat().colorToARGB(vqaColor, 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 (!(alpha && a)) {
- *(uint16 *)(surface->getBasePtr(CLIP(dst_x + x, (uint32)0, (uint32)(surface->w - 1)), CLIP(dst_y + y, (uint32)0, (uint32)(surface->h - 1)))) = outColor;
+ void* dstPtr = surface->getBasePtr(CLIP(dst_x + x, (uint32)0, (uint32)(surface->w - 1)), CLIP(dst_y + y, (uint32)0, (uint32)(surface->h - 1)));
+ // Ignore the alpha in the output as it is inversed in the input
+ drawPixel(*surface, dstPtr, surface->format.RGBToColor(r, g, b));
}
}
}