aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/motion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r--engines/fullpipe/motion.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index aa7d02a405..8fecd8304e 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -113,7 +113,8 @@ void MctlCompound::initMovGraph2() {
}
void MctlCompound::freeItems() {
- warning("STUB: MctlCompound::freeItems()");
+ for (uint i = 0; i < _motionControllers.size(); i++)
+ _motionControllers[i]->_motionControllerObj->freeItems();
}
MessageQueue *MctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
@@ -850,7 +851,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
Common::Array<MovGraphLink *> tempLinkList;
double minPath = findMinPath(&linkInfoSource, &linkInfoDest, &tempLinkList);
- debug(0, "MovGraph2::doWalkTo(): path: %lf parts: %d", minPath, tempLinkList.size());
+ debug(0, "MovGraph2::doWalkTo(): path: %g parts: %d", minPath, tempLinkList.size());
if (minPath < 0.0 || ((linkInfoSource.node != linkInfoDest.node || !linkInfoSource.node) && !tempLinkList.size()))
return 0;
@@ -1002,7 +1003,7 @@ int MovGraph2::findLink(Common::Array<MovGraphLink *> *linkList, int idx, Common
}
}
node3 = node1;
- } else if (idx != linkList->size() - 1) {
+ } else if (idx != (int)(linkList->size() - 1)) {
MovGraphLink *lnk = (*linkList)[idx + 1];
if (lnk->_movGraphNode1 == node1 || lnk->_movGraphNode1 == node1) {
@@ -1067,7 +1068,7 @@ MovGraphLink *MovGraph2::findLink1(int x, int y, int idx, int fuzzyMatch) {
MovGraphLink *MovGraph2::findLink2(int x, int y) {
double mindist = 1.0e20;
- MovGraphLink *res;
+ MovGraphLink *res = 0;
for (ObList::iterator i = _links.begin(); i != _links.end(); ++i) {
assert(((CObject *)*i)->_objtype == kObjTypeMovGraphLink);