diff options
author | richiesams | 2013-08-29 01:52:37 -0500 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-09-24 13:59:38 +0200 |
commit | a81c9a52a34cba1ecf358d612ddbcd6e517a2830 (patch) | |
tree | a4abcfa1f4b2a87a8ae1ff6d5540c06e9536135a | |
parent | bb77333d4f4025b053ad311092ad0390368522ea (diff) | |
download | scummvm-rg350-a81c9a52a34cba1ecf358d612ddbcd6e517a2830.tar.gz scummvm-rg350-a81c9a52a34cba1ecf358d612ddbcd6e517a2830.tar.bz2 scummvm-rg350-a81c9a52a34cba1ecf358d612ddbcd6e517a2830.zip |
ZVISION: Fix LeverControl 'mirrored' support
-rw-r--r-- | engines/zvision/lever_control.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp index d515f9e784..7d23b68768 100644 --- a/engines/zvision/lever_control.cpp +++ b/engines/zvision/lever_control.cpp @@ -322,8 +322,13 @@ int LeverControl::calculateVectorAngle(const Common::Point &pointOne, const Comm } void LeverControl::renderFrame(uint frameNumber) { - if (frameNumber < _lastRenderedFrame && _mirrored) { - frameNumber = (_frameCount * 2) - 1 - frameNumber; + if (frameNumber == 0) { + _lastRenderedFrame = frameNumber; + } else if (frameNumber < _lastRenderedFrame && _mirrored) { + _lastRenderedFrame = frameNumber; + frameNumber = (_frameCount * 2) - frameNumber - 1; + } else { + _lastRenderedFrame = frameNumber; } const uint16 *frameData; @@ -342,14 +347,13 @@ void LeverControl::renderFrame(uint frameNumber) { } else if (_fileType == AVI) { _animation.avi->seekToFrame(frameNumber); const Graphics::Surface *surface = _animation.avi->decodeNextFrame(); - frameData = (const uint16 *)surface->getBasePtr(0, 0); + frameData = (const uint16 *)surface->getPixels(); pitch = surface->pitch; width = surface->w; height = surface->h; } _engine->_system->copyRectToScreen(frameData, pitch, x + _engine->_workingWindow.left, y + _engine->_workingWindow.top, width, height); - _lastRenderedFrame = frameNumber; } } // End of namespace ZVision |