aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorRetro-Junk2016-08-30 22:50:54 +0300
committerEugene Sandulenko2016-08-30 23:41:14 +0200
commit46316fdb63c5ce945fbad3434d9078628014097a (patch)
treeff6e45e99bb1b41b6e7f3779092e11ba5e467480 /engines/fullpipe
parentdd68bf0f183715127fbd6d2d4495d392e298a647 (diff)
downloadscummvm-rg350-46316fdb63c5ce945fbad3434d9078628014097a.tar.gz
scummvm-rg350-46316fdb63c5ce945fbad3434d9078628014097a.tar.bz2
scummvm-rg350-46316fdb63c5ce945fbad3434d9078628014097a.zip
FULLPIPE: Fix length calculation in AniHandler::getNumCycles
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/anihandler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/fullpipe/anihandler.cpp b/engines/fullpipe/anihandler.cpp
index 71c894b9fe..126abbf247 100644
--- a/engines/fullpipe/anihandler.cpp
+++ b/engines/fullpipe/anihandler.cpp
@@ -639,7 +639,6 @@ Common::Point *AniHandler::getNumCycles(Common::Point *pRes, Movement *mov, int
int p1y = point.y;
int newmult = 0;
- int oldlen = *len;
if (abs(p1y) > abs(p1x)) {
if (mov->calcSomeXY(point, 0, -1)->y)
@@ -685,13 +684,13 @@ Common::Point *AniHandler::getNumCycles(Common::Point *pRes, Movement *mov, int
int p2x = 0;
int p2y = 0;
- if (!oldlen)
- oldlen = -1;
+ if (!*len)
+ *len = -1;
- if (oldlen > 0) {
+ if (*len > 0) {
++*mult;
- mov->calcSomeXY(point, 0, oldlen);
+ mov->calcSomeXY(point, 0, *len);
p2x = point.x;
p2y = point.y;