aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/statics.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-08-29 00:40:14 +0300
committerEugene Sandulenko2013-09-06 14:51:21 +0300
commitcac623a8219e17a84e032a9c3415538741a65d9e (patch)
tree4b007eb257d1e9d23eefc9a052871e0bb538f20d /engines/fullpipe/statics.cpp
parentd8d5e2d67f4caa009918b35cb543ea6ab0a408e0 (diff)
downloadscummvm-rg350-cac623a8219e17a84e032a9c3415538741a65d9e.tar.gz
scummvm-rg350-cac623a8219e17a84e032a9c3415538741a65d9e.tar.bz2
scummvm-rg350-cac623a8219e17a84e032a9c3415538741a65d9e.zip
FULLPIPE: Bugfixes for StaticANIObject::startAnim()
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r--engines/fullpipe/statics.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 7e4c1397ac..ad51b8fa4c 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -907,26 +907,24 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
if (_flags & 0x80)
return false;
- warning("STUB: StaticANIObject::startAnim(%d, %d, %d)", movementId, messageQueueId, dynPhaseIdx);
+ debug(0, "StaticANIObject::startAnim(%d, %d, %d)", movementId, messageQueueId, dynPhaseIdx);
if (_messageQueueId) {
updateGlobalMessageQueue(messageQueueId, _id);
return false;
}
- bool found = false;
- Movement *mov;
+ Movement *mov = 0;
for (uint i = 0; i < _movements.size(); i++) {
- mov = (Movement *)_movements[i];
- if (mov->_id != movementId) {
- found = true;
+ if (((Movement *)_movements[i])->_id == movementId) {
+ mov = (Movement *)_movements[i];
break;
}
}
- if (!found) {
+ if (!mov) {
updateGlobalMessageQueue(messageQueueId, _id);
return false;
}
@@ -935,7 +933,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
_flags |= 1;
_messageQueueId = messageQueueId;
- return 1;
+ return true;
}
int newx = _ox;
@@ -944,6 +942,9 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
if (_movement) {
_movement->getCurrDynamicPhaseXY(point);
+
+ newx -= point.x;
+ newy -= point.y;
} else if (_statics) {
_statics->getSomeXY(point);