aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMarisa-Chan2013-12-24 15:37:11 +0700
committerMarisa-Chan2013-12-24 15:37:11 +0700
commit48156debaf148b50acd3eb6e3de7020498016a5f (patch)
tree1a2e9b666c7b30d919b64939a220f2e6e36bafc2 /engines
parent0c7d1d2d3691f93701e33f40cb665d87004e5499 (diff)
downloadscummvm-rg350-48156debaf148b50acd3eb6e3de7020498016a5f.tar.gz
scummvm-rg350-48156debaf148b50acd3eb6e3de7020498016a5f.tar.bz2
scummvm-rg350-48156debaf148b50acd3eb6e3de7020498016a5f.zip
ZVISION: Fix animation_node upper frame.
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/animation_node.cpp7
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;