Skip to content

Commit

Permalink
FULLPIPE: Implement MotionController::enableLinks()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Oct 2, 2016
1 parent 5a76ae7 commit ed62aca
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion engines/fullpipe/motion.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit ed62aca

Please sign in to comment.