[Scummvm-cvs-logs] scummvm master -> 19bf71e1e0e97232277e5698cb230fc85eb86dd9
sev-
sev at scummvm.org
Wed Oct 2 20:00:33 CEST 2013
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9e179fc429 FULLPIPE: Implement MGM::addItem()
98a3099076 FULLPIPE: Implement MGM::getItemIndexById()
d179d0fb9d FULLPIPE: Implement MGM::clear()
19bf71e1e0 FULLPIPE: Started implementing MGM::rebuildTables()
Commit: 9e179fc42950dcf695546ef55175ec67e3205fd5
https://github.com/scummvm/scummvm/commit/9e179fc42950dcf695546ef55175ec67e3205fd5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-02T10:59:57-07:00
Commit Message:
FULLPIPE: Implement MGM::addItem()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 2837770..607cc3a 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -482,8 +482,34 @@ void MGM::clear() {
warning("STUB: MGM:clear()");
}
+MGMItem::MGMItem() {
+ objId = 0;
+ subItems = 0;
+ staticsListCount = 0;
+ movementListCount = 0;
+ statics = 0;
+ movements1 = 0;
+ movements2 = 0;
+}
+
void MGM::addItem(int objId) {
- warning("STUB: MGM:addItem(%d)", objId);
+ if (getItemIndexById(objId) == -1) {
+ MGMItem *item = new MGMItem();
+
+ item->objId = objId;
+ _items.push_back(item);
+ }
+ rebuildTables(objId);
+}
+
+void MGM::rebuildTables(int objId) {
+ warning("STUB: MGM:rebuildTables()");
+}
+
+int MGM::getItemIndexById(int objId) {
+ warning("STUB: MGM:getItemIndexById()");
+
+ return -1;
}
MovGraphLink::MovGraphLink() {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 2347229..0948550 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -100,15 +100,28 @@ class MctlCompound : public MotionController {
void initMovGraph2();
};
+struct MGMItem {
+ int16 objId;
+ int subItems;
+ int staticsListCount;
+ int movementListCount;
+ int statics;
+ int movements1;
+ int movements2;
+
+ MGMItem();
+};
+
+
class MGM : public CObject {
public:
- int _items;
- int _count;
+ Common::Array<MGMItem *> _items;
public:
- MGM() : _items(0), _count(0) {}
void clear();
void addItem(int objId);
+ void rebuildTables(int objId);
+ int getItemIndexById(int objId);
};
class MovGraphNode : public CObject {
Commit: 98a30990760c9135b72adab643ddbd4d06aa233d
https://github.com/scummvm/scummvm/commit/98a30990760c9135b72adab643ddbd4d06aa233d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-02T10:59:57-07:00
Commit Message:
FULLPIPE: Implement MGM::getItemIndexById()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 607cc3a..ad24514 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -507,7 +507,9 @@ void MGM::rebuildTables(int objId) {
}
int MGM::getItemIndexById(int objId) {
- warning("STUB: MGM:getItemIndexById()");
+ for (uint i = 0; i < _items.size(); i++)
+ if (_items[i]->objId == objId)
+ return i;
return -1;
}
Commit: d179d0fb9d26e8fe31b340e2af420eb7cbf72be8
https://github.com/scummvm/scummvm/commit/d179d0fb9d26e8fe31b340e2af420eb7cbf72be8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-02T10:59:57-07:00
Commit Message:
FULLPIPE: Implement MGM::clear()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index ad24514..6a39b9f 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -479,17 +479,11 @@ MovGraphNode *MovGraph::calcOffset(int ox, int oy) {
}
void MGM::clear() {
- warning("STUB: MGM:clear()");
+ _items.clear();
}
MGMItem::MGMItem() {
objId = 0;
- subItems = 0;
- staticsListCount = 0;
- movementListCount = 0;
- statics = 0;
- movements1 = 0;
- movements2 = 0;
}
void MGM::addItem(int objId) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 0948550..bf0b1be 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -25,6 +25,9 @@
namespace Fullpipe {
+class Statics;
+class Movement;
+
int startWalkTo(int objId, int objKey, int x, int y, int a5);
int doSomeAnimation(int objId, int objKey, int a3);
int doSomeAnimation2(int objId, int objKey);
@@ -102,12 +105,10 @@ class MctlCompound : public MotionController {
struct MGMItem {
int16 objId;
- int subItems;
- int staticsListCount;
- int movementListCount;
- int statics;
- int movements1;
- int movements2;
+ Common::Array<int> subItems;
+ Common::Array<Statics *> statics;
+ Common::Array<Movement *> movements1;
+ Common::Array<Movement *> movements2;
MGMItem();
};
Commit: 19bf71e1e0e97232277e5698cb230fc85eb86dd9
https://github.com/scummvm/scummvm/commit/19bf71e1e0e97232277e5698cb230fc85eb86dd9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-02T10:59:58-07:00
Commit Message:
FULLPIPE: Started implementing MGM::rebuildTables()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 6a39b9f..c86f956 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -486,6 +486,15 @@ MGMItem::MGMItem() {
objId = 0;
}
+MGMSubItem::MGMSubItem() {
+ movement = 0;
+ staticsIndex = 0;
+ field_8 = 0;
+ field_C = 0;
+ x = 0;
+ y = 0;
+}
+
void MGM::addItem(int objId) {
if (getItemIndexById(objId) == -1) {
MGMItem *item = new MGMItem();
@@ -497,7 +506,63 @@ void MGM::addItem(int objId) {
}
void MGM::rebuildTables(int objId) {
- warning("STUB: MGM:rebuildTables()");
+ int idx = getItemIndexById(objId);
+
+ if (idx == -1)
+ return;
+
+ _items[idx]->subItems.clear();
+ _items[idx]->statics.clear();
+ _items[idx]->movements1.clear();
+ _items[idx]->movements2.clear();
+
+ StaticANIObject *obj = g_fullpipe->_currentScene->getStaticANIObject1ById(objId, -1);
+
+ if (!obj)
+ return;
+
+#if 0
+ this_->items[idx].staticsListCount = obj->staticsList.m_nCount;
+ this_->items[idx].movementListCount = obj->movements.m_nCount;
+ this_->items[idx].statics = (Statics *)operator new(4 * this_->items[idx].staticsListCount);
+ this_->items[idx].movements1 = (Movement *)operator new(4 * this_->items[idx].movementListCount);
+ this_->items[idx].movements2 = (Movement *)operator new(4 * this_->items[idx].movementListCount);
+ v10 = this_->items;
+ v11 = v10[idx].movements2;
+ v12 = 4 * LOBYTE(v10[idx].movementListCount);
+ v13 = (unsigned int)(4 * v10[idx].movementListCount) >> 2;
+ memset(v11, 0, 4 * v13);
+ v14 = (char *)v11 + 4 * v13;
+ LOBYTE(v13) = v12;
+ v15 = 0;
+ memset(v14, 0, v13 & 3);
+ v16 = obj->staticsList.m_pNodeHead;
+ v17 = &this_->items[idx];
+ if (v17->staticsListCount > 0) {
+ do {
+ v18 = v16;
+ v16 = v16->pNext;
+ ++v15;
+ *((_DWORD *)&v17->statics[-1].picture + v15) = v18->data;
+ v17 = &this_->items[idx];
+ } while (v15 < v17->staticsListCount);
+ }
+ v19 = obj->movements.m_pNodeHead;
+ v20 = &this_->items[idx];
+ for (i = 0; i < v20->movementListCount; v20 = &this_->items[idx]) {
+ v22 = v19;
+ v19 = v19->pNext;
+ ++i;
+ *(&v20->movements1[-1].field_94 + i) = (int)v22->data;
+ }
+ this_->items[idx].staticsListCount = obj->staticsList.m_nCount;
+ this_->items[idx].subItems = (MGMSubItem *)operator new(0x18 * this_->items[idx].staticsListCount
+ * this_->items[idx].staticsListCount);
+ memset(
+ this_->items[idx].subItems,
+ 0,
+ 24 * this_->items[idx].staticsListCount * this_->items[idx].staticsListCount);
+#endif
}
int MGM::getItemIndexById(int objId) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index bf0b1be..a5bbfbe 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -103,9 +103,20 @@ class MctlCompound : public MotionController {
void initMovGraph2();
};
+struct MGMSubItem {
+ int movement;
+ int staticsIndex;
+ int field_8;
+ int field_C;
+ int x;
+ int y;
+
+ MGMSubItem();
+};
+
struct MGMItem {
int16 objId;
- Common::Array<int> subItems;
+ Common::Array<MGMSubItem *> subItems;
Common::Array<Statics *> statics;
Common::Array<Movement *> movements1;
Common::Array<Movement *> movements2;
More information about the Scummvm-git-logs
mailing list