diff options
author | Eugene Sandulenko | 2014-05-01 12:28:17 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-05-01 12:28:17 +0300 |
commit | f18ad22d22cd220a1f1f8ed46d279fc45402b2ff (patch) | |
tree | ed586d1e4be14b27d51f6931937b01f2da938978 /engines | |
parent | b031373ba7fe7515311e1c7528e566ecbe4668cc (diff) | |
download | scummvm-rg350-f18ad22d22cd220a1f1f8ed46d279fc45402b2ff.tar.gz scummvm-rg350-f18ad22d22cd220a1f1f8ed46d279fc45402b2ff.tar.bz2 scummvm-rg350-f18ad22d22cd220a1f1f8ed46d279fc45402b2ff.zip |
FULLPIPE: Implement MctlCompound::replaceNodeX()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/motion.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index d8fa24cbc1..84f09efbeb 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -435,7 +435,20 @@ MctlConnectionPoint *MctlCompound::findClosestConnectionPoint(int ox, int oy, in } void MctlCompound::replaceNodeX(int from, int to) { - warning("STUB: MctlCompound::replaceNodeX()"); + for (uint i = 0; i < _motionControllers.size(); i++) { + if (_motionControllers[i]->_motionControllerObj->_objtype == kObjTypeMovGraph) { + MovGraph *gr = (MovGraph *)_motionControllers[i]->_motionControllerObj; + + for (ObList::iterator n = gr->_nodes.begin(); n != gr->_nodes.end(); ++n) { + MovGraphNode *node = (MovGraphNode *)*n; + + if (node->_x == from) + node->_x = to; + } + + gr->calcNodeDistancesAndAngles(); + } + } } MctlConnectionPoint::MctlConnectionPoint() { |