[Scummvm-cvs-logs] scummvm master -> 6b435616132fc438919549d529aefbccf90819af

sev- sev at scummvm.org
Fri May 23 08:43:28 CEST 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1d46172008 FULLPIPE: Implement MovGraph::changeCallback()
6b43561613 FULLPIPE: Started implementation of MovGraph::method50()


Commit: 1d46172008ce117f078e271054753d7d6be67cba
    https://github.com/scummvm/scummvm/commit/1d46172008ce117f078e271054753d7d6be67cba
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-23T09:41:54+03:00

Commit Message:
FULLPIPE: Implement MovGraph::changeCallback()

Changed paths:
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 3f17c63..2ee3d70 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -684,10 +684,8 @@ MessageQueue *MovGraph::method34(StaticANIObject *ani, int xpos, int ypos, int f
 	return method50(ani, _callback1(ani, movitems, count), staticsId);
 }
 
-int MovGraph::changeCallback() {
-	warning("STUB: MovGraph::changeCallback()");
-
-	return 0;
+void MovGraph::changeCallback(Common::Array<MovArr *> *(*callback1)(StaticANIObject *ani, Common::Array<MovItem *> *items, signed int counter)) {
+	_callback1 = callback1;
 }
 
 bool MovGraph::method3C(StaticANIObject *ani, int flag) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 76eb567..6233174 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -31,6 +31,7 @@ class MctlConnectionPoint;
 class MovGraphLink;
 class MessageQueue;
 class ExCommand2;
+struct MovArr;
 struct MovItem;
 
 int startWalkTo(int objId, int objKey, int x, int y, int a5);
@@ -57,7 +58,7 @@ public:
 	virtual bool method2C(StaticANIObject *obj, int x, int y) { return false; }
 	virtual int method30() { return 0; }
 	virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { return 0; }
-	virtual int changeCallback() { return 0; }
+	virtual void changeCallback(Common::Array<MovArr *> *(*_callback1)(StaticANIObject *ani, Common::Array<MovItem *> *items, signed int counter)) {}
 	virtual bool method3C(StaticANIObject *ani, int flag) { return 0; }
 	virtual int method40() { return 0; }
 	virtual bool method44(StaticANIObject *ani, int x, int y) { return false; }
@@ -364,7 +365,7 @@ public:
 	virtual Common::Array<MovItem *> *method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount);
 	virtual bool method2C(StaticANIObject *obj, int x, int y);
 	virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
-	virtual int changeCallback();
+	virtual void changeCallback(Common::Array<MovArr *> *(*_callback1)(StaticANIObject *ani, Common::Array<MovItem *> *items, signed int counter));
 	virtual bool method3C(StaticANIObject *ani, int flag);
 	virtual bool method44(StaticANIObject *ani, int x, int y);
 	virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);


Commit: 6b435616132fc438919549d529aefbccf90819af
    https://github.com/scummvm/scummvm/commit/6b435616132fc438919549d529aefbccf90819af
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-23T09:43:03+03:00

Commit Message:
FULLPIPE: Started implementation of MovGraph::method50()

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 2ee3d70..ccd246f 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -926,6 +926,67 @@ MessageQueue *MovGraph::fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int st
 }
 
 MessageQueue *MovGraph::method50(StaticANIObject *ani, Common::Array<MovArr *> *movarr, int staticsId) {
+#if 0
+	if (_itemsCount <= 0)
+		return 0;
+
+	int idx;
+	int movidx;
+	bool done = false;
+
+	for (idx = 0; idx <= _itemsCount && !done; idx++) {
+		if (idx == _itemsCount)
+			return 0;
+
+		if (_items[idx]->ani == ani) {
+			if (!_items[idx]->movitems)
+				return 0;
+
+			if (_items[idx]->count < 1)
+				return 0;
+
+			for (movidx = 0; movidx < _items[idx]->count; movidx++)
+				if (_items[idx]->movitems[movidx]->movarr == movarr) {
+					done = true;
+
+					break;
+				}
+			}
+		}
+	}
+
+	v11 = this->_items;
+	v12 = idx << 6;
+	v13 = (*(MovItem **)((char *)&v11->movitems + v12))[movidx].movarr;
+	if ( *(MovArr **)((char *)&v11->movarr + v12) )
+		CObjectFree(*(void **)((char *)&v11->movarr + v12));
+	memcpy((char *)&this->_items->movarr + v12, v13, 0x20u);
+	*(MovArr **)((char *)&this->_items->movarr + v12) = (MovArr *)operator new(8 * v13->_movStepCount);
+	memcpy(*(void **)((char *)&this->_items->movarr + v12), v13->_movSteps, 8 * v13->_movStepCount);
+	*(int *)((char *)&this->_items->field_10 + v12) = -1;
+	*(int *)((char *)&this->_items->field_14 + v12) = 0;
+
+	MessageQueue *mq = fillMGMinfo(*(StaticANIObject **)((char *)&this->_items->ani + v12), (MovArr *)((char *)&this->_items->movarr + v12), 0);
+	if (!mq)
+		return 0;
+
+	ExCommand *ex = new ExCommand();
+
+	ex->_messageKind = 17;
+	ex->_messageNum = 54;
+	ex->_parentId = ani->_id;
+	ex->_field_3C = 1;
+	mq->addExCommandToEnd(ex);
+
+	if (!mq->chain(ani)) {
+		delete mq;
+
+		return 0;
+	}
+
+	return mq;
+#endif
+
 	warning("STUB: MovGraph::method50()");
 
 	return 0;






More information about the Scummvm-git-logs mailing list