From d0738d553a3ebdf2dc3433801382303151491c28 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 22 Dec 2008 20:35:48 +0000 Subject: Fixing the flow meter thingy in Urban Runner svn-id: r35491 --- engines/gob/coktelvideo.cpp | 8 ++++++++ engines/gob/coktelvideo.h | 1 + 2 files changed, 9 insertions(+) (limited to 'engines') diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index b7d13333b3..8ea13946d7 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -934,6 +934,11 @@ bool Vmd::load(Common::SeekableReadStream &stream) { } _flags = _stream->readUint16LE(); + + _scaleExternalX = 1; + if (!_externalCodec && !(_flags & 0x1000)) + _scaleExternalX = _bytesPerPixel; + _partsPerFrame = _stream->readUint16LE(); _firstFramePos = _stream->readUint32LE(); _stream->skip(4); // Unknown @@ -1112,6 +1117,8 @@ int16 Vmd::getWidth() const { void Vmd::setXY(int16 x, int16 y) { + x *= _scaleExternalX; + for (int i = 0; i < _framesCount; i++) { for (int j = 0; j < _partsPerFrame; j++) { @@ -1195,6 +1202,7 @@ void Vmd::clear(bool del) { _externalCodec = false; _bytesPerPixel = 1; + _scaleExternalX = 1; _vidMemBuffer = 0; } diff --git a/engines/gob/coktelvideo.h b/engines/gob/coktelvideo.h index cc6c08a86a..9d7dc93b3f 100644 --- a/engines/gob/coktelvideo.h +++ b/engines/gob/coktelvideo.h @@ -370,6 +370,7 @@ protected: bool _externalCodec; byte _bytesPerPixel; + byte _scaleExternalX; byte *_vidMemBuffer; PaletteLUT *_palLUT; -- cgit v1.2.3