diff options
Diffstat (limited to 'engines/pink/objects/actions/action_loop.cpp')
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp index 25e4d668f8..81760c5125 100644 --- a/engines/pink/objects/actions/action_loop.cpp +++ b/engines/pink/objects/actions/action_loop.cpp @@ -22,8 +22,9 @@ #include "action_loop.h" -#include <common/debug.h> #include <pink/archive.h> +#include <pink/objects/actors/actor.h> +#include <pink/cel_decoder.h> namespace Pink { @@ -40,8 +41,8 @@ void ActionLoop::deserialize(Archive &archive) { break; default: _style = kForward; + break; } - //_style = static_cast<Style>(style); } void ActionLoop::toConsole() { @@ -50,4 +51,19 @@ void ActionLoop::toConsole() { _name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame, _intro, _style); } +void ActionLoop::update() { + // for now it supports only forward loop animation + if (_style == kForward) { + if (_decoder->endOfVideo()){ + debug("ACTION LOOP : NEXT ITERATION"); + _decoder->rewind(); + } + } +} + +void ActionLoop::onStart() { + ActionPlay::onStart(); + _actor->endAction(); +} + } // End of namespace Pink
\ No newline at end of file |