From baf6b58313d74ea0fad8c321b1ae88bccb8a63da Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 15 Jan 2017 10:11:40 -0500 Subject: TITANIC: Fix chicken dispensor --- engines/titanic/support/avi_surface.cpp | 3 ++- engines/titanic/support/avi_surface.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/titanic') diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 2cff894ba9..2c56c018d4 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -156,7 +156,7 @@ void AVISurface::seekToFrame(uint frameNumber) { if ((int)frameNumber != getFrame()) { _decoder->seekToFrame(frameNumber); - _currentFrame = (int)frameNumber; + _currentFrame = _priorFrame = (int)frameNumber; } } @@ -169,6 +169,7 @@ bool AVISurface::handleEvents(CMovieEventList &events) { return true; CMovieRangeInfo *info = _movieRangeInfo.front(); + _priorFrame = _currentFrame; _currentFrame += _isReversed ? -1 : 1; int newFrame = _currentFrame; diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h index 4ee6cc6e0b..099a257361 100644 --- a/engines/titanic/support/avi_surface.h +++ b/engines/titanic/support/avi_surface.h @@ -65,7 +65,7 @@ private: Graphics::ManagedSurface *_movieFrameSurface[2]; Graphics::ManagedSurface *_framePixels; bool _isReversed; - int _currentFrame; + int _currentFrame, _priorFrame; uint32 _priorFrameTime; Common::String _movieName; private: @@ -176,7 +176,7 @@ public: /** * Gets the current frame */ - int getFrame() const { return _currentFrame; } + int getFrame() const { return _priorFrame; } /** * Add a movie event -- cgit v1.2.3