mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 12:44:02 +00:00
FULLPIPE: Implement MotionController::getLinkByName()
This commit is contained in:
parent
b10bc540a3
commit
ec6da5a450
engines/fullpipe
@ -47,7 +47,39 @@ void MotionController::enableLinks(const char *linkName, bool enable) {
|
||||
}
|
||||
|
||||
MovGraphLink *MotionController::getLinkByName(const char *name) {
|
||||
warning("STUB: MotionController::getLinkByName()");
|
||||
if (_objtype == kObjTypeMctlCompound) {
|
||||
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, name))
|
||||
return lnk;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_objtype == kObjTypeMovGraph) {
|
||||
MovGraph *gr = (MovGraph *)this;
|
||||
|
||||
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, name))
|
||||
return lnk;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -115,6 +115,9 @@ public:
|
||||
void initMovGraph2();
|
||||
MctlConnectionPoint *findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr);
|
||||
void replaceNodeX(int from, int to);
|
||||
|
||||
uint getMotionControllerCount() { return _motionControllers.size(); }
|
||||
MotionController *getMotionController(int num) { return _motionControllers[num]->_motionControllerObj; }
|
||||
};
|
||||
|
||||
struct MGMSubItem {
|
||||
|
Loading…
x
Reference in New Issue
Block a user