aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-09-27 22:16:15 +0300
committerEugene Sandulenko2013-09-27 22:16:15 +0300
commit7990300c96eaca97e92ba209f513ddb673cf5d8d (patch)
tree80945f29f249fd729c6fbb5ea6327efab829099b /engines
parentca5804a253c0e654ec6d6210aea9ee2574aad367 (diff)
downloadscummvm-rg350-7990300c96eaca97e92ba209f513ddb673cf5d8d.tar.gz
scummvm-rg350-7990300c96eaca97e92ba209f513ddb673cf5d8d.tar.bz2
scummvm-rg350-7990300c96eaca97e92ba209f513ddb673cf5d8d.zip
FULLPIPE: Implemented MctlCompound::initMovGraph2()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/motion.cpp96
-rw-r--r--engines/fullpipe/motion.h64
2 files changed, 133 insertions, 27 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index b63267c572..5fd8d61263 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -68,7 +68,7 @@ bool MctlCompound::load(MfcArchive &file) {
debug(6, "graphReact");
obj->_movGraphReactObj = (MovGraphReact *)file.readClass();
- _motionControllers.push_back(*obj);
+ _motionControllers.push_back(obj);
}
return true;
@@ -87,7 +87,6 @@ int MctlCompound::removeObject(StaticANIObject *obj) {
}
void MctlCompound::initMovGraph2() {
-#if 0
if (_objtype != kObjTypeMctlCompound)
return;
@@ -97,10 +96,10 @@ void MctlCompound::initMovGraph2() {
MovGraph *gr = (MovGraph *)_motionControllers[i]->_motionControllerObj;
- CMovGraph2 *newgr = new MovGraph2();
+ MovGraph2 *newgr = new MovGraph2();
- newgr->_links.push_back(gr->_links);
- newgr->_nodes.push_back(gr->_nodes);
+ newgr->_links = gr->_links;
+ newgr->_nodes = gr->_nodes;
gr->_links.clear();
gr->_nodes.clear();
@@ -109,7 +108,6 @@ void MctlCompound::initMovGraph2() {
_motionControllers[i]->_motionControllerObj = newgr;
}
-#endif
}
void MctlCompound::freeItems() {
@@ -173,12 +171,98 @@ int MovGraph::addObject(StaticANIObject *obj) {
return 0;
}
+int MovGraph::removeObject(StaticANIObject *obj) {
+ warning("STUB: MovGraph::removeObject()");
+
+ return 0;
+}
+
+void MovGraph::freeItems() {
+ warning("STUB: MovGraph::freeItems()");
+}
+
+int MovGraph::method28() {
+ warning("STUB: MovGraph::method28()");
+
+ return 0;
+}
+
+int MovGraph::method2C() {
+ warning("STUB: MovGraph::method2C()");
+
+ return 0;
+}
+
+MessageQueue *MovGraph::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
+ warning("STUB: MovGraph::method34()");
+
+ return 0;
+}
+
+int MovGraph::changeCallback() {
+ warning("STUB: MovGraph::changeCallback()");
+
+ return 0;
+}
+
+int MovGraph::method3C() {
+ warning("STUB: MovGraph::method3C()");
+
+ return 0;
+}
+
+int MovGraph::method44() {
+ warning("STUB: MovGraph::method44()");
+
+ return 0;
+}
+
+MessageQueue *MovGraph::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
+ warning("STUB: MovGraph::method4C()");
+
+ return 0;
+}
+
+int MovGraph::method50() {
+ warning("STUB: MovGraph::method50()");
+
+ return 0;
+}
+
double MovGraph::calcDistance(Common::Point *point, MovGraphLink *link, int flag) {
warning("STUB: MovGraph::calcDistance()");
return 0;
}
+int MovGraph2::addObject(StaticANIObject *obj) {
+ warning("STUB: MovGraph2::addObject()");
+
+ return 0;
+}
+
+int MovGraph2::removeObject(StaticANIObject *obj) {
+ warning("STUB: MovGraph2::removeObject()");
+
+ return 0;
+}
+
+void MovGraph2::freeItems() {
+ warning("STUB: MovGraph2::freeItems()");
+}
+
+MessageQueue *MovGraph2::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
+ warning("STUB: MovGraph2::method34()");
+
+ return 0;
+}
+
+MessageQueue *MovGraph2::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
+ warning("STUB: MovGraph2::method4C()");
+
+ return 0;
+}
+
MovGraphNode *MovGraph::calcOffset(int ox, int oy) {
warning("STUB: MovGraph::calcOffset()");
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index b0bfe92d1f..2db3db6676 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -57,12 +57,31 @@ public:
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { return 0; }
};
-class MctlCompoundArray : public Common::Array<CObject>, public CObject {
+class MovGraphReact : public CObject {
+ // Empty
+};
+
+class MctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
-class MctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
+class MctlCompoundArrayItem : public CObject {
+ friend class MctlCompound;
+
+ protected:
+ MotionController *_motionControllerObj;
+ MovGraphReact *_movGraphReactObj;
+ MctlConnectionPointsArray _connectionPoints;
+ int _field_20;
+ int _field_24;
+ int _field_28;
+
+ public:
+ MctlCompoundArrayItem() : _movGraphReactObj(0) {}
+};
+
+class MctlCompoundArray : public Common::Array<MctlCompoundArrayItem *>, public CObject {
public:
virtual bool load(MfcArchive &file);
};
@@ -105,25 +124,6 @@ class MovGraphNode : public CObject {
virtual bool load(MfcArchive &file);
};
-class MovGraphReact : public CObject {
- // Empty
-};
-
-class MctlCompoundArrayItem : public CObject {
- friend class MctlCompound;
-
- protected:
- MotionController *_motionControllerObj;
- MovGraphReact *_movGraphReactObj;
- MctlConnectionPointsArray _connectionPoints;
- int _field_20;
- int _field_24;
- int _field_28;
-
- public:
- MctlCompoundArrayItem() : _movGraphReactObj(0) {}
-};
-
class ReactParallel : public MovGraphReact {
//CRgn _rgn;
int _x1;
@@ -187,11 +187,33 @@ class MovGraph : public MotionController {
virtual bool load(MfcArchive &file);
virtual int addObject(StaticANIObject *obj);
+ virtual int removeObject(StaticANIObject *obj);
+ virtual void freeItems();
+ virtual int method28();
+ virtual int method2C();
+ virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
+ virtual int changeCallback();
+ virtual int method3C();
+ virtual int method44();
+ virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
+ virtual int method50();
double calcDistance(Common::Point *point, MovGraphLink *link, int flag);
MovGraphNode *calcOffset(int ox, int oy);
};
+class MovGraph2 : public MovGraph {
+public:
+ ObArray _items;
+
+public:
+ virtual int addObject(StaticANIObject *obj);
+ virtual int removeObject(StaticANIObject *obj);
+ virtual void freeItems();
+ virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
+ virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
+};
+
class MctlConnectionPoint : public CObject {
int _connectionX;
int _connectionY;