diff options
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/animation_node.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/zvision/animation_node.cpp b/engines/zvision/animation_node.cpp index 73e419ee19..967dee2c4a 100644 --- a/engines/zvision/animation_node.cpp +++ b/engines/zvision/animation_node.cpp @@ -190,6 +190,13 @@ void AnimationNode::addPlayNode(int32 slot, int x, int y, int x2, int y2, int st nod.pos = Common::Rect(x, y, x2 + 1, y2 + 1); nod.start = start_frame; nod.stop = end_frame; + if (_fileType == RLF) { + if (nod.stop >= (int)_animation.rlf->frameCount()) + nod.stop = _animation.rlf->frameCount() - 1; + } else if (_fileType == AVI) { + if (nod.stop > (int)_animation.avi->getFrameCount()) + nod.stop = _animation.avi->getFrameCount(); + } nod.slot = slot; nod._cur_frm = -1; nod._delay = 0; |