diff options
Diffstat (limited to 'engines/groovie/player.cpp')
-rw-r--r-- | engines/groovie/player.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp index 8badd90012..4b8ae0083f 100644 --- a/engines/groovie/player.cpp +++ b/engines/groovie/player.cpp @@ -29,18 +29,19 @@ namespace Groovie { VideoPlayer::VideoPlayer(GroovieEngine *vm) : - _vm(vm), _syst(vm->_system), _file(NULL), _audioStream(NULL) { + _vm(vm), _syst(vm->_system), _file(NULL), _audioStream(NULL), _fps(0), _overrideSpeed(false) { } bool VideoPlayer::load(Common::SeekableReadStream *file, uint16 flags) { _file = file; _flags = flags; + _overrideSpeed = false; _audioStream = NULL; - uint16 fps = loadInternal(); + _fps = loadInternal(); - if (fps != 0) { - _millisBetweenFrames = 1000 / fps; + if (_fps != 0) { + setOverrideSpeed(_overrideSpeed); _begunPlaying = false; return true; } else { @@ -49,6 +50,18 @@ bool VideoPlayer::load(Common::SeekableReadStream *file, uint16 flags) { } } +void VideoPlayer::setOverrideSpeed(bool isOverride) +{ + _overrideSpeed = isOverride; + if (_fps != 0) + { + if (isOverride) + _millisBetweenFrames = 1000 / 26; + else + _millisBetweenFrames = 1000 / _fps; + } +} + bool VideoPlayer::playFrame() { bool end = true; |