[Scummvm-cvs-logs] SF.net SVN: scummvm:[55275] scummvm/trunk
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Mon Jan 17 10:48:43 CET 2011
Revision: 55275
http://scummvm.svn.sourceforge.net/scummvm/?rev=55275&view=rev
Author: drmccoy
Date: 2011-01-17 09:48:42 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
GOB: Fix the flow rate gauge in Urban Runner
Modified Paths:
--------------
scummvm/trunk/engines/gob/videoplayer.cpp
scummvm/trunk/graphics/video/coktel_decoder.cpp
Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp 2011-01-16 22:30:19 UTC (rev 55274)
+++ scummvm/trunk/engines/gob/videoplayer.cpp 2011-01-17 09:48:42 UTC (rev 55275)
@@ -160,30 +160,32 @@
properties.sprite = -1;
video->surface.reset();
video->decoder->setSurfaceMemory();
- video->decoder->setXY(0, 0);
+ properties.x = properties.y = 0;
} else {
video->surface = _vm->_draw->_spritesArray[properties.sprite];
video->decoder->setSurfaceMemory(video->surface->getData(),
video->surface->getWidth(), video->surface->getHeight(), video->surface->getBPP());
if (!ownSurf || (ownSurf && screenSize)) {
- if ((properties.x >= 0) || (properties.y >= 0))
- video->decoder->setXY((properties.x < 0) ? 0xFFFF : properties.x,
- (properties.y < 0) ? 0xFFFF : properties.y);
- else
- video->decoder->setXY();
+ if ((properties.x >= 0) || (properties.y >= 0)) {
+ properties.x = (properties.x < 0) ? 0xFFFF : properties.x;
+ properties.y = (properties.y < 0) ? 0xFFFF : properties.y;
+ } else
+ properties.x = properties.y = -1;
} else
- video->decoder->setXY(0, 0);
+ properties.x = properties.y = 0;
}
} else {
properties.sprite = -1;
video->surface.reset();
video->decoder->setSurfaceMemory();
- video->decoder->setXY(0, 0);
+ properties.x = properties.y = 0;
}
}
+ video->decoder->setXY(properties.x, properties.y);
+
if (primary)
_needBlit = (properties.flags & kFlagUseBackSurfaceContent) && (properties.sprite == Draw::kFrontSurface);
Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp 2011-01-16 22:30:19 UTC (rev 55274)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp 2011-01-17 09:48:42 UTC (rev 55275)
@@ -1568,7 +1568,7 @@
}
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 @@
_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 @@
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 @@
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 @@
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 @@
PixelFormat pixelFormat = getPixelFormat();
uint16 x = _x;
- if (_blitMode == 1)
+ if ((_blitMode == 1) || (_blitMode == 3))
x /= 9;
const byte *src = (byte *)srcSurf.pixels +
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list