aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-25 23:22:43 +0300
committerEugene Sandulenko2016-07-25 23:24:42 +0300
commit699d97b2de0290b393ca9d69bfce290604c9fa4b (patch)
tree982a53603705a5e660e34eb4aa710b77140c8c30
parent9eb2c7362c1c05c9a28ae53d30e61e4ad4514674 (diff)
downloadscummvm-rg350-699d97b2de0290b393ca9d69bfce290604c9fa4b.tar.gz
scummvm-rg350-699d97b2de0290b393ca9d69bfce290604c9fa4b.tar.bz2
scummvm-rg350-699d97b2de0290b393ca9d69bfce290604c9fa4b.zip
FULLPIPE: Fix subItems addressing in MGM
-rw-r--r--engines/fullpipe/mgm.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index 8a7e72ec4a..a30e791691 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -392,7 +392,7 @@ int MGM::countPhases(int idx, int subIdx, int endIdx, int flag) {
res += _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->movement->countPhasesWithFlag(-1, flag);
- subIdx = _items[idx]->subItems[subIdx + 6 * endIdx * _items[idx]->statics.size()]->staticsIndex;
+ subIdx = _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->staticsIndex;
}
return res;
@@ -518,7 +518,7 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
int stidx = getStaticsIndex(idx, item->movements1[i]->_staticsObj2);
int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
- int newsz = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+ int newsz = sz + item->subItems[stidx + st2idx * _items[idx]->statics.size()]->field_C;
if (recalc >= 0) {
if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1 ||
@@ -530,8 +530,8 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
mov->calcSomeXY(point, 0, -1);
- item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x + point.x;
- item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y + point.y;
+ item->subItems[subIdx]->x = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->x + point.x;
+ item->subItems[subIdx]->y = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->y + point.y;
}
}
}
@@ -551,12 +551,12 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
- item->subItems[subIdx]->field_C = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+ item->subItems[subIdx]->field_C = sz + item->subItems[stidx + st2idx * _items[idx]->statics.size()]->field_C;
mov->calcSomeXY(point, 0, -1);
- item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x - point.x;
- item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y - point.y;
+ item->subItems[subIdx]->x = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->x - point.x;
+ item->subItems[subIdx]->y = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->y - point.y;
}
}
}