[Scummvm-cvs-logs] scummvm master -> 7e782dd5e9c1729064c90abeea2f99ee613a3b99

sev- sev at scummvm.org
Tue Oct 1 21:57:30 CEST 2013


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:
50f2bc660b FULLPIPE: Unk2 -> MGM
7e782dd5e9 FULLPIPE: Implement MovGraph::addObject()


Commit: 50f2bc660be245cd7ec5c8b78ea40c39197e938c
    https://github.com/scummvm/scummvm/commit/50f2bc660be245cd7ec5c8b78ea40c39197e938c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-01T12:22:24-07:00

Commit Message:
FULLPIPE: Unk2 -> MGM

Changed paths:
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 99d8d3e..00c6404 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -100,13 +100,13 @@ class MctlCompound : public MotionController {
 	void initMovGraph2();
 };
 
-class Unk2 : public CObject {
+class MGM : public CObject {
 public:
 	int _items;
 	int _count;
 
 public:
-	Unk2() : _items(0), _count(0) {}
+	MGM() : _items(0), _count(0) {}
 };
 
 class MovGraphNode : public CObject {
@@ -178,7 +178,7 @@ class MovGraph : public MotionController {
 	int _items;
 	int _itemsCount;
 	int (*_callback1)(int, int, int);
-	Unk2 _unk2;
+	MGM _mgm;
 
  public:
 	MovGraph();


Commit: 7e782dd5e9c1729064c90abeea2f99ee613a3b99
    https://github.com/scummvm/scummvm/commit/7e782dd5e9c1729064c90abeea2f99ee613a3b99
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-01T12:56:50-07:00

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

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index da0c614..2837770 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -140,6 +140,25 @@ bool MctlCompoundArray::load(MfcArchive &file) {
 	return true;
 }
 
+MovGraphItem::MovGraphItem() {
+	ani = 0;
+	field_4 = 0;
+	field_8 = 0;
+	field_C = 0;
+	field_10 = 0;
+	field_14 = 0;
+	field_18 = 0;
+	field_1C = 0;
+	field_20 = 0;
+	field_24 = 0;
+	items = 0;
+	count = 0;
+	field_30 = 0;
+	field_34 = 0;
+	field_38 = 0;
+	field_3C = 0;
+}
+
 int MovGraph_messageHandler(ExCommand *cmd);
 
 int MovGraphCallback(int a1, int a2, int a3) {
@@ -149,8 +168,6 @@ int MovGraphCallback(int a1, int a2, int a3) {
 }
 
 MovGraph::MovGraph() {
-	_itemsCount = 0;
-	_items = 0;
 	_callback1 = MovGraphCallback;
 	_field_44 = 0;
 	insertMessageHandler(MovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
@@ -168,7 +185,20 @@ bool MovGraph::load(MfcArchive &file) {
 }
 
 void MovGraph::addObject(StaticANIObject *obj) {
-	warning("STUB: MovGraph::addObject()");
+	_mgm.clear();
+	_mgm.addItem(obj->_id);
+
+	for (uint i = 0; i < _items.size(); i++)
+		if (_items[i]->ani == obj)
+			return;
+
+	MovGraphItem *item = new MovGraphItem();
+
+	item->ani = obj;
+
+	_items.push_back(item);
+
+	_mgm.addItem(obj->_id); // FIXME: Is it really needed?
 }
 
 int MovGraph::removeObject(StaticANIObject *obj) {
@@ -448,6 +478,14 @@ MovGraphNode *MovGraph::calcOffset(int ox, int oy) {
 	return 0;
 }
 
+void MGM::clear() {
+	warning("STUB: MGM:clear()");
+}
+
+void MGM::addItem(int objId) {
+	warning("STUB: MGM:addItem(%d)", objId);
+}
+
 MovGraphLink::MovGraphLink() {
 	_distance = 0;
 	_angle = 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 00c6404..2347229 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -107,6 +107,8 @@ public:
 
 public:
 	MGM() : _items(0), _count(0) {}
+	void clear();
+	void addItem(int objId);
 };
 
 class MovGraphNode : public CObject {
@@ -170,13 +172,33 @@ class MovGraphLink : public CObject {
 	virtual bool load(MfcArchive &file);
 };
 
+struct MovGraphItem {
+	StaticANIObject *ani;
+	int field_4;
+	int field_8;
+	int field_C;
+	int field_10;
+	int field_14;
+	int field_18;
+	int field_1C;
+	int field_20;
+	int field_24;
+	int items;
+	int count;
+	int field_30;
+	int field_34;
+	int field_38;
+	int field_3C;
+
+	MovGraphItem();
+};
+
 class MovGraph : public MotionController {
  public:
 	ObList _nodes;
 	ObList _links;
 	int _field_44;
-	int _items;
-	int _itemsCount;
+	Common::Array<MovGraphItem *> _items;
 	int (*_callback1)(int, int, int);
 	MGM _mgm;
 






More information about the Scummvm-git-logs mailing list