diff options
author | whiterandrek | 2018-05-12 22:23:43 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 08d065229757c597d2a087d4901e115115f023e7 (patch) | |
tree | 42edc1ad9ba1443a658978679ac2f6906a6c2026 /engines | |
parent | 9cfa4970a24aea17530ad567905e8e38d207c951 (diff) | |
download | scummvm-rg350-08d065229757c597d2a087d4901e115115f023e7.tar.gz scummvm-rg350-08d065229757c597d2a087d4901e115115f023e7.tar.bz2 scummvm-rg350-08d065229757c597d2a087d4901e115115f023e7.zip |
PINK: implemented stopFrame
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 2 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play.cpp | 8 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play_with_sfx.cpp | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp index c821fb1530..b9e8600084 100644 --- a/engines/pink/objects/actions/action_loop.cpp +++ b/engines/pink/objects/actions/action_loop.cpp @@ -54,7 +54,7 @@ void ActionLoop::toConsole() { void ActionLoop::update() { // for now it supports only forward loop animation if (_style == kForward) { - if (_decoder->endOfVideo()){ + if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame){ //debug("ACTION LOOP : NEXT ITERATION"); _decoder->rewind(); } diff --git a/engines/pink/objects/actions/action_play.cpp b/engines/pink/objects/actions/action_play.cpp index d3ded9a45a..7749bc65e8 100644 --- a/engines/pink/objects/actions/action_play.cpp +++ b/engines/pink/objects/actions/action_play.cpp @@ -49,9 +49,13 @@ void ActionPlay::onStart() { for (int i = 0; i <= _startFrame; ++i) { _decoder->decodeNextFrame(); } +} - if (_stopFrame != -1) - _decoder->setEndFrame(_stopFrame); +void ActionPlay::update() { + if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame){ + _decoder->stop(); + _actor->endAction(); + } } } // End of namespace Pink diff --git a/engines/pink/objects/actions/action_play_with_sfx.cpp b/engines/pink/objects/actions/action_play_with_sfx.cpp index eaea104d89..a724dabe9a 100644 --- a/engines/pink/objects/actions/action_play_with_sfx.cpp +++ b/engines/pink/objects/actions/action_play_with_sfx.cpp @@ -42,9 +42,9 @@ void ActionPlayWithSfx::toConsole() { } void ActionPlayWithSfx::update() { - if (_decoder->endOfVideo() && _isLoop) { + if ((_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame) && _isLoop) { _decoder->rewind(); - } else if (_decoder->endOfVideo()) { + } else if (_decoder->endOfVideo() || _decoder->getCurFrame() == _stopFrame) { _decoder->stop(); _actor->endAction(); } |