diff options
Diffstat (limited to 'engines/zvision/animation_node.cpp')
-rw-r--r-- | engines/zvision/animation_node.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/zvision/animation_node.cpp b/engines/zvision/animation_node.cpp index 89d0f5e451..365ff747f4 100644 --- a/engines/zvision/animation_node.cpp +++ b/engines/zvision/animation_node.cpp @@ -191,4 +191,21 @@ bool AnimationNode::stop() { return false; } +void AnimationNode::setNewFrameDelay(int32 newDelay) { + if (newDelay > 0) { + PlayNodes::iterator it = _playList.begin(); + if (it != _playList.end()) { + playnode *nod = &(*it); + float percent = (float)nod->_delay / (float)_frmDelay; + nod->_delay = percent * newDelay; // Scale to new max + } + + _frmDelay = newDelay; + } +} + +int32 AnimationNode::getFrameDelay() { + return _frmDelay; +} + } // End of namespace ZVision |