diff options
author | Eugene Sandulenko | 2013-10-04 01:25:22 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-04 01:25:44 +0300 |
commit | e04744fc266ab7d59bf864f11903616c89f65792 (patch) | |
tree | 85f664179d573ac67f6efbbc8bf570b4974912f2 | |
parent | 25bff46fe6672f79ec81ede2e87cabf1156e84cd (diff) | |
download | scummvm-rg350-e04744fc266ab7d59bf864f11903616c89f65792.tar.gz scummvm-rg350-e04744fc266ab7d59bf864f11903616c89f65792.tar.bz2 scummvm-rg350-e04744fc266ab7d59bf864f11903616c89f65792.zip |
FULLPIPE: Started implementation MctlCompound::method4C()
-rw-r--r-- | engines/fullpipe/motion.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index f06125e9dc..69083445ac 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -126,6 +126,68 @@ MessageQueue *MctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, warning("STUB: MctlCompound::method4C()"); return 0; + +#if 0 + int match1 = -1; + int match2 = -1; + + if (!subj) + return 0; + + for (uint i = 0; i < _motionControllers.size(); i++) { + if (_motionControllers[i]->_movGraphReactObj) { + if (_motionControllers[i]->_movGraphReactObj->pointInRegion(subj->_ox, subj->_oy)) { + match1 = i; + break; + } + } + } + + if (match1 == -1) + return 0; + + for (uint i = 0; i < _motionControllers.size(); i++) { + if (_motionControllers[i]->_movGraphReactObj) { + if (_motionControllers[i]->_movGraphReactObj->pointInRegion(xpos, ypos)) { + match2 = i; + break; + } + } + } + + if (match2 == -1) + return 0; + + if (match1 == match2) + return _motionControllers[match1]->_motionControllerObj->method4C(subj, xpos, ypos, flag, staticsId); + + MctlConnectionPoint *closestP = findClosestConnectionPoint(subj->_ox, subj->_oy, match1, xpos, ypos, match2, &match2); + + if (!closestP) + return 0; + + MctlConnectionPoint *nextP = _motionControllers[match1]->_motionControllerObj->method4C(subj, closestP->connectionX, closestP->connectionY, 1, closestP->field_14); + + ExCommand *ex; + + if (nextP) { + for (uint i = 0; i < closestP->_messageQueueObj->getCount(); i++) { + ex = new ExCommand(closestP->_messageQueueObj->getExCommandByIndex(i)); + ex->excFlags |= 2; + nextP->messageQueueObj->CPtrList::AddTail(ex); + } + + ex = new ExCommand(subj->_id, 51, 0, xpos, ypos, 0, 1, 0, 0, 0); + + ex->_field_20 = flag; + ex->_keyCode = subj->_okeyCode; + ex->_excFlags |= 2; + + nextP->messageQueueObj->CPtrList::AddTail(ex); + } + + return nextP; +#endif } bool MctlCompoundArray::load(MfcArchive &file) { |