aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-04 23:14:09 +0300
committerEugene Sandulenko2013-10-04 23:38:29 +0300
commitb90e76f21f6cbbfd11ac266748789c1396383710 (patch)
tree9e5b1993af6f75c401808588a9492c35c21ba469 /engines
parent7139117bb717e2b31f9d270a2706046678844e25 (diff)
downloadscummvm-rg350-b90e76f21f6cbbfd11ac266748789c1396383710.tar.gz
scummvm-rg350-b90e76f21f6cbbfd11ac266748789c1396383710.tar.bz2
scummvm-rg350-b90e76f21f6cbbfd11ac266748789c1396383710.zip
FULLPIPE: Implement MctlCompound::method4C()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/motion.cpp48
-rw-r--r--engines/fullpipe/motion.h23
2 files changed, 51 insertions, 20 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 69083445ac..2ff2c002e0 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -62,7 +62,7 @@ bool MctlCompound::load(MfcArchive &file) {
debug(6, "ConnectionPoint[%d]", j);
MctlConnectionPoint *obj1 = (MctlConnectionPoint *)file.readClass();
- obj->_connectionPoints.push_back(*obj1);
+ obj->_connectionPoints.push_back(obj1);
}
obj->_field_20 = file.readUint32LE();
@@ -123,11 +123,6 @@ MessageQueue *MctlCompound::method34(StaticANIObject *subj, int xpos, int ypos,
}
MessageQueue *MctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) {
- warning("STUB: MctlCompound::method4C()");
-
- return 0;
-
-#if 0
int match1 = -1;
int match2 = -1;
@@ -166,15 +161,15 @@ MessageQueue *MctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos,
if (!closestP)
return 0;
- MctlConnectionPoint *nextP = _motionControllers[match1]->_motionControllerObj->method4C(subj, closestP->connectionX, closestP->connectionY, 1, closestP->field_14);
+ MessageQueue *mq = _motionControllers[match1]->_motionControllerObj->method4C(subj, closestP->_connectionX, closestP->_connectionY, 1, closestP->_field_14);
ExCommand *ex;
- if (nextP) {
+ if (mq) {
for (uint i = 0; i < closestP->_messageQueueObj->getCount(); i++) {
ex = new ExCommand(closestP->_messageQueueObj->getExCommandByIndex(i));
- ex->excFlags |= 2;
- nextP->messageQueueObj->CPtrList::AddTail(ex);
+ ex->_excFlags |= 2;
+ mq->_exCommands.push_back(ex);
}
ex = new ExCommand(subj->_id, 51, 0, xpos, ypos, 0, 1, 0, 0, 0);
@@ -183,11 +178,16 @@ MessageQueue *MctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos,
ex->_keyCode = subj->_okeyCode;
ex->_excFlags |= 2;
- nextP->messageQueueObj->CPtrList::AddTail(ex);
+ mq->_exCommands.push_back(ex);
}
- return nextP;
-#endif
+ return mq;
+}
+
+MctlConnectionPoint *MctlCompound::findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr) {
+ warning("STUB: MctlCompound::findClosestConnectionPoint()");
+
+ return 0;
}
bool MctlCompoundArray::load(MfcArchive &file) {
@@ -697,6 +697,18 @@ void ReactParallel::createRegion() {
// GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2);
}
+void ReactParallel::method14() {
+ warning("STUB: ReactParallel::method14()");
+}
+
+bool ReactParallel::pointInRegion(int x, int y) {
+ warning("STUB: ReactParallel::pointInRegion()");
+
+ warning("%d %d, %d %d, %d %d, %d %d", _points[0]->x, _points[0]->y, _points[1]->x, _points[1]->y, _points[2]->x, _points[2]->y, _points[3]->x, _points[3]->y);
+
+ return false;
+}
+
ReactPolygonal::ReactPolygonal() {
_field_C = 0;
_points = 0;
@@ -735,6 +747,16 @@ void ReactPolygonal::createRegion() {
}
}
+void ReactPolygonal::method14() {
+ warning("STUB: ReactPolygonal::method14()");
+}
+
+bool ReactPolygonal::pointInRegion(int x, int y) {
+ warning("STUB: ReactPolygonal::pointInRegion()");
+
+ return false;
+}
+
int startWalkTo(int objId, int objKey, int x, int y, int a5) {
MctlCompound *mc = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index a5bbfbe075..f94fbc0a26 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -27,6 +27,7 @@ namespace Fullpipe {
class Statics;
class Movement;
+class MctlConnectionPoint;
int startWalkTo(int objId, int objKey, int x, int y, int a5);
int doSomeAnimation(int objId, int objKey, int a3);
@@ -61,18 +62,19 @@ public:
};
class MovGraphReact : public CObject {
- // Empty
+public:
+ virtual void method14() {}
+ virtual void createRegion() {}
+ virtual bool pointInRegion(int x, int y) { return false; }
};
-typedef Common::Array<CObject> MctlConnectionPointsArray;
-
class MctlCompoundArrayItem : public CObject {
friend class MctlCompound;
protected:
MotionController *_motionControllerObj;
MovGraphReact *_movGraphReactObj;
- MctlConnectionPointsArray _connectionPoints;
+ Common::Array<MctlConnectionPoint *> _connectionPoints;
int _field_20;
int _field_24;
int _field_28;
@@ -101,6 +103,7 @@ class MctlCompound : public MotionController {
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
void initMovGraph2();
+ MctlConnectionPoint *findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr);
};
struct MGMSubItem {
@@ -162,7 +165,10 @@ class ReactParallel : public MovGraphReact {
public:
ReactParallel();
virtual bool load(MfcArchive &file);
- void createRegion();
+
+ virtual void method14();
+ virtual void createRegion();
+ virtual bool pointInRegion(int x, int y);
};
class ReactPolygonal : public MovGraphReact {
@@ -175,7 +181,10 @@ class ReactPolygonal : public MovGraphReact {
public:
ReactPolygonal();
virtual bool load(MfcArchive &file);
- void createRegion();
+
+ virtual void method14();
+ virtual void createRegion();
+ virtual bool pointInRegion(int x, int y);
};
class MovGraphLink : public CObject {
@@ -293,7 +302,7 @@ public:
int _field_10;
int16 _field_14;
int16 _field_16;
- int _messageQueueObj;
+ MessageQueue *_messageQueueObj;
int _motionControllerObj;
};