aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-15 10:11:40 -0500
committerPaul Gilbert2017-01-15 10:11:40 -0500
commitbaf6b58313d74ea0fad8c321b1ae88bccb8a63da (patch)
tree918b1b408ad275351a41b7d20e391899c3da7e2c /engines/titanic
parenta17109887cac2f039476ffc18fd396de4bf78d01 (diff)
downloadscummvm-rg350-baf6b58313d74ea0fad8c321b1ae88bccb8a63da.tar.gz
scummvm-rg350-baf6b58313d74ea0fad8c321b1ae88bccb8a63da.tar.bz2
scummvm-rg350-baf6b58313d74ea0fad8c321b1ae88bccb8a63da.zip
TITANIC: Fix chicken dispensor
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/support/avi_surface.cpp3
-rw-r--r--engines/titanic/support/avi_surface.h4
2 files changed, 4 insertions, 3 deletions
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