diff options
author | Torbjörn Andersson | 2007-04-14 14:07:11 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-04-14 14:07:11 +0000 |
commit | 4b4d7dec8ef1483c81221027ffb6d3a5c2f8ee9f (patch) | |
tree | 0882b810fab56f933d0d86a9ff0328f04f5e6350 /engines/sword1 | |
parent | 2d2b3d0ed21ec800a8a87f9fde8d27206a0dc9c7 (diff) | |
download | scummvm-rg350-4b4d7dec8ef1483c81221027ffb6d3a5c2f8ee9f.tar.gz scummvm-rg350-4b4d7dec8ef1483c81221027ffb6d3a5c2f8ee9f.tar.bz2 scummvm-rg350-4b4d7dec8ef1483c81221027ffb6d3a5c2f8ee9f.zip |
I must have accidentally broken frame skipping when I added DXA playback. Made
frame skipping actually skip the updateScreen() call.
svn-id: r26469
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/animation.cpp | 9 | ||||
-rw-r--r-- | engines/sword1/animation.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 84259f572a..5a381e7393 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -119,11 +119,11 @@ bool MoviePlayer::checkSkipFrame(void) { return true; } -void MoviePlayer::syncFrame(void) { +bool MoviePlayer::syncFrame(void) { _ticks += 83; if (checkSkipFrame()) { warning("Skipped frame %d", _currentFrame); - return; + return false; } if (_bgSoundStream) { while (_snd->isSoundHandleActive(_bgSoundHandle) && (_snd->getSoundElapsedTime(_bgSoundHandle) * 12) / 1000 < _currentFrame) { @@ -140,6 +140,7 @@ void MoviePlayer::syncFrame(void) { _system->delayMillis(10); } } + return true; } /** @@ -197,8 +198,8 @@ void MoviePlayer::play(void) { Common::EventManager *eventMan = _system->getEventManager(); while (!terminated && decodeFrame()) { processFrame(); - syncFrame(); - updateScreen(); + if (syncFrame()) + updateScreen(); _currentFrame++; Common::Event event; while (eventMan->pollEvent(event)) { diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h index 7566df29f2..34f05d0a11 100644 --- a/engines/sword1/animation.h +++ b/engines/sword1/animation.h @@ -90,7 +90,7 @@ protected: virtual bool initOverlays(uint32 id); virtual bool decodeFrame(void) = 0; virtual void processFrame(void) = 0; - virtual void syncFrame(void); + virtual bool syncFrame(void); virtual void updateScreen(void) = 0; }; |