[Scummvm-git-logs] scummvm master -> ed62aca66c33272787d8b70727335c10790a8133
sev-
sev at scummvm.org
Sun Oct 2 15:47:18 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ed62aca66c FULLPIPE: Implement MotionController::enableLinks()
Commit: ed62aca66c33272787d8b70727335c10790a8133
https://github.com/scummvm/scummvm/commit/ed62aca66c33272787d8b70727335c10790a8133
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-10-02T15:46:19+02:00
Commit Message:
FULLPIPE: Implement MotionController::enableLinks()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 331799f..e5eb972 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) {
More information about the Scummvm-git-logs
mailing list