aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/motion.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-10-02 15:46:19 +0200
committerEugene Sandulenko2016-10-02 15:46:19 +0200
commited62aca66c33272787d8b70727335c10790a8133 (patch)
tree4fb32960f8400bd4af62d1e1c708f658fe7259b4 /engines/fullpipe/motion.cpp
parent5a76ae7ceb61307adb987da10b3df3973ff07594 (diff)
downloadscummvm-rg350-ed62aca66c33272787d8b70727335c10790a8133.tar.gz
scummvm-rg350-ed62aca66c33272787d8b70727335c10790a8133.tar.bz2
scummvm-rg350-ed62aca66c33272787d8b70727335c10790a8133.zip
FULLPIPE: Implement MotionController::enableLinks()
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r--engines/fullpipe/motion.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 331799f9b5..e5eb9721f4 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -38,7 +38,31 @@ bool MotionController::load(MfcArchive &file) {
}
void MotionController::enableLinks(const char *linkName, bool enable) {
- warning("STUB: MotionController::enableLinks()");
+ if (_objtype != kObjTypeMctlCompound)
+ return;
+
+ MctlCompound *obj = (MctlCompound *)this;
+
+ for (uint i = 0; i < obj->getMotionControllerCount(); i++) {
+ MotionController *con = obj->getMotionController(i);
+
+ if (con->_objtype == kObjTypeMovGraph) {
+ MovGraph *gr = (MovGraph *)con;
+
+ for (ObList::iterator l = gr->_links.begin(); l != gr->_links.end(); ++l) {
+ assert(((CObject *)*l)->_objtype == kObjTypeMovGraphLink);
+
+ MovGraphLink *lnk = (MovGraphLink *)*l;
+
+ if (!strcmp(lnk->_name, linkName)) {
+ if (enable)
+ lnk->_flags |= 0x20000000;
+ else
+ lnk->_flags &= 0xDFFFFFFF;
+ }
+ }
+ }
+ }
}
MovGraphLink *MotionController::getLinkByName(const char *name) {