aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-11-13 23:37:50 +0200
committerEugene Sandulenko2013-11-13 23:38:14 +0200
commitdf0e33a09c42980f397ed9869241c24d7e239487 (patch)
tree813252826a890ad522c649f9dfed32ade0b0740f /engines
parent601e18023c0ea2c0b7829421bc361362d5945875 (diff)
downloadscummvm-rg350-df0e33a09c42980f397ed9869241c24d7e239487.tar.gz
scummvm-rg350-df0e33a09c42980f397ed9869241c24d7e239487.tar.bz2
scummvm-rg350-df0e33a09c42980f397ed9869241c24d7e239487.zip
FULLPIPE: MovGraph2::buildMovInfo1MessageQueue() implementation con't
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/motion.cpp88
-rw-r--r--engines/fullpipe/motion.h2
2 files changed, 43 insertions, 47 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 256d48afb6..ebb838e2fb 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -670,34 +670,29 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
mq = new MessageQueue(g_fullpipe->globalMessageQueueList->compact());
for (int i = 0; i < movInfo->_itemsCount - 1; i++) {
- v9 = (MovInfo1Sub *)movInfo->items;
- v10 = v9[i + 1].subIndex;
+ v10 = movInfo->items[i + 1].subIndex;
if (v10 != 10) {
- if (i >= movInfo->_itemsCount - 2 || v9[i + 2].subIndex != 10) {
- v16 = v9[i].subIndex;
+ if (i >= movInfo->itemsCount - 2 || movInfo->items[i + 2].subIndex != 10) {
v17 = (char *)_items[1] + 16 * (v10 + 8);
- subidx = 93 * movInfo->field_0;
movinfo.flags = 0;
- v14 = 8 * subidx;
- v15 = (MovGraph2Item *)(&v17[184 * v16] + v14);
+ subidx = 8 * 93 * movInfo->field_0;
+ v15 = (MovGraph2Item *)(&v17[184 * movInfo->items[i].subIndex] + subidx);
} else {
- v11 = v9[i].subIndex;
v12 = (char *)_items[1] + 16 * (v10 + 4);
- v13 = 93 * movInfo->field_0;
movinfo.flags = 2;
- v14 = 8 * v13;
- v15 = (MovGraph2Item *)(&v12[184 * v11] + v14);
+ subidx = 8 * 93 * movInfo->field_0;
+ v15 = (MovGraph2Item *)(&v12[184 * movInfo->items[i].subIndex] + subidx);
}
- if (i < movInfo->_itemsCount - 2
- || (v19 = v9[i + 1].x, v20 = (char *)&v9[i].x, v47 = (int *)v20, v21 = *(_DWORD *)v20, v21 == v19)
- && v9[i].y == v9[i + 1].y
+ if (i < movInfo->itemsCount - 2
+ || (v19 = movInfo->items[i + 1].x, v20 = (char *)&movInfo->items[i].x, v47 = (int *)v20, v21 = *(_DWORD *)v20, v21 == v19)
+ && movInfo->items[i].y == movInfo->items[i + 1].y
|| v21 == -1
- || v9[i].y == -1
+ || movInfo->items[i].y == -1
|| v19 == -1
- || v9[i + 1].y == -1) {
+ || movInfo->items[i + 1].y == -1) {
- ExCommand *ex = new ExCommand(_items[1][movInfo->field_0].objectId, 1, v15->objectId, 0, 0, 0, 1, 0, 0, 0);
+ ExCommand *ex = new ExCommand(_items[1][movInfo->field_0].objectId, 1, v15->_objectId, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2u;
ex->_keyCode = _items[1][movInfo->field_0].obj->GameObject.okeyCode;
@@ -705,29 +700,29 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
ex->_field_14 = -1;
mq->_exCommands.push_back(ex);
- curX += v15->subItems[0].staticsId2;
- curY += v15->subItems[0].staticsId1;
+ curX += v15->_subItems[0].staticsId2;
+ curY += v15->_subItems[0].staticsId1;
} else {
memset(mgminfo, 0, sizeof(mgminfo));
- HIWORD(v22) = 0a;
- v23 = v15->obj;
+ HIWORD(v22) = 0;
+ v23 = (Movement *)v15->obj;
mgminfo.ani = *(StaticANIObject **)((char *)&this->items[1]->obj + v14);
- LOWORD(v22) = *(_WORD *)(v23->callback1 + 132);
+ LOWORD(v22) = v23->staticsObj2->staticsId;
mgminfo.staticsId2 = v22;
- mgminfo.x1 = v9[i + 1].x;
- mgminfo.y1 = v9[i + 1].y;
- mgminfo.field_1C = v9[i + 1].field_C;
- mgminfo.staticsId1 = *(_WORD *)(v23->initialCounter + 132);
+ mgminfo.x1 = movInfo->items[i + 1].x;
+ mgminfo.y1 = movInfo->items[i + 1].y;
+ mgminfo.field_1C = movInfo->items[i + 1].field_C;
+ mgminfo.staticsId1 = v23->staticsObj1->staticsId;
+
mgminfo.x2 = *v47;
- v24 = v15->objectId;
- mgminfo.y2 = v9[i].y;
+ mgminfo.y2 = movInfo->items[i].y;
mgminfo.field_10 = 1;
- mgminfo.flags = 127;
- mgminfo.movementId = v24;
+ mgminfo.flags = 0x7f;
+ mgminfo.movementId = v15->_objectId;
v25 = (MessageQueue *)MGM_sub_445330((MGM *)&this->movGraph.mgm, &mgminfo);
- MessageQueue_transferExCommands(mq, v25);
+ mq->transferExCommands(v25);
if (v25)
(*(void (__thiscall **)(MessageQueue *, signed int))(v25->CObject.vmt + 4))(v25, 1);
@@ -737,33 +732,34 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
curY = v26[i + 1].y;
}
} else {
- movinfo.item1Index = v9[i].subIndex;
+ movinfo.item1Index = movInfo->items[i].subIndex;
movinfo.subIndex = movinfo.item1Index;
movinfo.pt1.y = curY;
movinfo.pt1.x = curX;
+
movinfo.distance1 = curDistance;
- movinfo.pt2.x = v9[i + 2].x;
- movinfo.pt2.y = v9[i + 2].y;
- movinfo.distance2 = v9[i + 2].field_C;
-
- if (i >= movInfo->_itemsCount - 4
- || v9[i + 2].subIndex == 10
- || v9[i + 3].subIndex == 10
- || v9[i + 2].subIndex == v9[i + 3].subIndex
- || v9[i + 4].subIndex != 10) {
+ movinfo.pt2.x = movInfo->items[i + 2].x;
+ movinfo.pt2.y = movInfo->items[i + 2].y;
+ movinfo.distance2 = movInfo->items[i + 2].field_C;
+
+ if (i >= movInfo->itemsCount - 4
+ || movInfo->items[i + 2].subIndex == 10
+ || movInfo->items[i + 3].subIndex == 10
+ || movInfo->items[i + 2].subIndex == movInfo->items[i + 3].subIndex
+ || movInfo->items[i + 4].subIndex != 10) {
if (i >= movInfo->itemsCount - 3
- || v9[i + 2].subIndex == 10
- || v9[i + 3].subIndex == 10
- || v9[i + 2].subIndex == v9[i + 3].subIndex) {
+ || movInfo->items[i + 2].subIndex == 10
+ || movInfo->items[i + 3].subIndex == 10
+ || movInfo->items[i + 2].subIndex == movInfo->items[i + 3].subIndex) {
movinfo.flags &= 3;
} else {
- v35 = (MovInfo1 *)((char *)&_items[1][movInfo->field_0] + 184 * v9[i + 2].subIndex + 16 * (v9[i + 3].subIndex + 8));
+ v35 = (MovInfo1 *)((char *)&_items[1][movInfo->field_0] + 184 * movInfo->items[i + 2].subIndex + 16 * (movInfo->items[i + 3].subIndex + 8));
movinfo.pt2.x -= v35->pt1.y;
movinfo.pt2.y -= v35->pt2.x;
movinfo.flags &= 3;
}
} else {
- v32 = (MovInfo1 *)((char *)&_items[1][movInfo->field_0] + 184 * v9[i + 2].subIndex + 16 * (v9[i + 3].subIndex + 4));
+ v32 = (MovInfo1 *)((char *)&_items[1][movInfo->field_0] + 184 * movInfo->items[i + 2].subIndex + 16 * (movInfo->items[i + 3].subIndex + 4));
if (movinfo.item1Index && movinfo.item1Index != 1) {
movinfo.pt2.y -= v32->pt2.x;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index b79e66decb..0df520ce4a 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -306,7 +306,7 @@ struct MovInfo1 {
struct MovGraph2Item {
int _objectId;
StaticANIObject *_obj;
- MovGraph2ItemSub _subItems[4];
+ MovGraph2ItemSub _subItems[4]; // 184
};
class MovGraph2 : public MovGraph {