From 48156debaf148b50acd3eb6e3de7020498016a5f Mon Sep 17 00:00:00 2001 From: Marisa-Chan Date: Tue, 24 Dec 2013 15:37:11 +0700 Subject: ZVISION: Fix animation_node upper frame. --- engines/zvision/animation_node.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines/zvision/animation_node.cpp') 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; -- cgit v1.2.3