aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/lever_control.cpp6
-rw-r--r--engines/zvision/lever_control.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp
index 7592968413..4ed3f10878 100644
--- a/engines/zvision/lever_control.cpp
+++ b/engines/zvision/lever_control.cpp
@@ -45,6 +45,7 @@ LeverControl::LeverControl(ZVision *engine, uint32 key, Common::SeekableReadStre
_frameCount(0),
_startFrame(0),
_currentFrame(0),
+ _lastRenderedFrame(0),
_mouseIsCaptured(false),
_isReturning(false) {
@@ -318,6 +319,10 @@ int LeverControl::calculateVectorAngle(const Common::Point &pointOne, const Comm
}
void LeverControl::renderFrame(uint frameNumber) {
+ if (frameNumber < _lastRenderedFrame && _mirrored) {
+ frameNumber = (_frameCount * 2) - 1 - frameNumber;
+ }
+
const uint16 *frameData;
int pitch;
int x = _animationCoords.left;
@@ -341,6 +346,7 @@ void LeverControl::renderFrame(uint frameNumber) {
}
_engine->_system->copyRectToScreen(frameData, pitch, x + _engine->_workingWindow.left, y + _engine->_workingWindow.top, width, height);
+ _lastRenderedFrame = frameNumber;
}
} // End of namespace ZVision
diff --git a/engines/zvision/lever_control.h b/engines/zvision/lever_control.h
index 42577a1776..cf41aac6b3 100644
--- a/engines/zvision/lever_control.h
+++ b/engines/zvision/lever_control.h
@@ -80,6 +80,7 @@ private:
FrameInfo *_frameInfo;
uint _currentFrame;
+ uint _lastRenderedFrame;
bool _mouseIsCaptured;
bool _isReturning;
Common::Point _lastMousePos;