aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorSven Hesse2011-01-17 09:48:42 +0000
committerSven Hesse2011-01-17 09:48:42 +0000
commitda65a3cbf39cf23e4b803bfe9b498d0c5e1c36ec (patch)
treeb8c64d6051dc61ce1eda2d082e50b97d9327745d /graphics
parent8a1e9c8256fe8021e32ceea5e76d095f50a4d490 (diff)
downloadscummvm-rg350-da65a3cbf39cf23e4b803bfe9b498d0c5e1c36ec.tar.gz
scummvm-rg350-da65a3cbf39cf23e4b803bfe9b498d0c5e1c36ec.tar.bz2
scummvm-rg350-da65a3cbf39cf23e4b803bfe9b498d0c5e1c36ec.zip
GOB: Fix the flow rate gauge in Urban Runner
svn-id: r55275
Diffstat (limited to 'graphics')
-rw-r--r--graphics/video/coktel_decoder.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index dd9f646735..c1cb5e17a2 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -1568,7 +1568,7 @@ bool VMDDecoder::seek(int32 frame, int whence, bool restart) {
}
void VMDDecoder::setXY(uint16 x, uint16 y) {
- if (_blitMode == 1)
+ if ((_blitMode == 1) || (_blitMode == 3))
x *= _bytesPerPixel;
for (uint32 i = 0; i < _frameCount; i++) {
@@ -1764,10 +1764,13 @@ bool VMDDecoder::assessVideoProperties() {
_blitMode = _bytesPerPixel - 1;
_bytesPerPixel = n;
+ if ((_blitMode == 1) && !(_flags & 0x1000))
+ _blitMode = 3;
+
_isPaletted = false;
}
- if (_blitMode == 1)
+ if ((_blitMode == 1) || (_blitMode == 3))
_width /= _bytesPerPixel;
if (_hasVideo) {
@@ -2168,7 +2171,7 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
Common::Rect realRect = rect;
Common::Rect fakeRect = rect;
- if (_blitMode == 1) {
+ if ((_blitMode == 1) || (_blitMode == 3)) {
realRect = Common::Rect(rect.left / _bytesPerPixel, rect.top,
rect.right / _bytesPerPixel, rect.bottom);
@@ -2270,7 +2273,7 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
else if (_bytesPerPixel == 3)
blit24(*surface, *blockRect);
- if (_blitMode == 1)
+ if ((_blitMode == 1) || (_blitMode == 3))
*blockRect = Common::Rect(blockRect->left + _x / _bytesPerPixel, blockRect->top + _y,
blockRect->right + _x / _bytesPerPixel, blockRect->bottom + _y);
else
@@ -2294,6 +2297,8 @@ void VMDDecoder::blit16(const Surface &srcSurf, Common::Rect &rect) {
uint16 x = _x;
if (_blitMode == 1)
x /= 4;
+ else if (_blitMode == 3)
+ x /= 2;
const byte *src = (byte *)srcSurf.pixels +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
@@ -2334,7 +2339,7 @@ void VMDDecoder::blit24(const Surface &srcSurf, Common::Rect &rect) {
PixelFormat pixelFormat = getPixelFormat();
uint16 x = _x;
- if (_blitMode == 1)
+ if ((_blitMode == 1) || (_blitMode == 3))
x /= 9;
const byte *src = (byte *)srcSurf.pixels +