[Scummvm-cvs-logs] scummvm master -> 5b54a546e0de7a3e2e103667320459695a243d9c
sev-
sev at scummvm.org
Thu Oct 10 23:00:01 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:
4b3cfa1c57 FULLPIPE: More work on MovGraph2::method4C()
5b54a546e0 FULLPIPE: Made setting rooms via bootparams easier
Commit: 4b3cfa1c572e3e0e196b0ed2d89dd570a7404a67
https://github.com/scummvm/scummvm/commit/4b3cfa1c572e3e0e196b0ed2d89dd570a7404a67
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-10T13:42:31-07:00
Commit Message:
FULLPIPE: More work on MovGraph2::method4C()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 93513ee..325d366 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -571,51 +571,38 @@ MessageQueue *MovGraph2::method4C(StaticANIObject *obj, int xpos, int ypos, int
}
if (obj->_movement) {
+ int newx, newy;
+
if (subMgm) {
obj->_messageQueueId = 0;
obj->changeStatics2(_items[idx]->_subItems[idxsub]->_staticsId1);
- v19 = obj->_ox;
- v20 = obj->_oy;
+ newx = obj->_ox;
+ newy = obj->_oy;
} else {
- v16 = obj->_movement->calcSomeXY(point, 0);
- v63 = v16->x;
- y = v16->y;
- v17 = obj->movement;
- v18 = v17->GameObject.ox;
- point.x = v17->GameObject.oy - y;
- v19 = v18 - (_DWORD)v63;
- v20 = point.x;
+ obj->_movement->calcSomeXY(point, 0);
+ newx = obj->_movement->_ox - point.x;
+ newy = obj->_movement->_oy - point.y;
if (idxsub != 1 && idxsub) {
if (idxsub == 2 || idxsub == 3) {
- v63 = (ExCommand *)v17->GameObject.ox;
- v20 = v17->GameObject.oy;
+ newy = obj->_movement->_oy;
}
} else {
- v19 = v17->GameObject.ox;
- y = v17->GameObject.oy;
+ newx = obj->_movement->_ox;
}
}
- v24 = obj->GameObject.CObject.vmt;
- obj->movement = 0;
- (*(void (__thiscall **)(GameObject *, int, int))(v24 + offsetof(GameObjectVmt, setOXY)))(&obj->GameObject, v19, v20);
+
+ obj->_movement = 0;
+ obj->setOXY(newx, newy);
}
- v25 = obj->GameObject.oy;
- point.x = obj->GameObject.ox;
- v63 = (ExCommand *)point.x;
- v61 = v25;
+
+ v25 = obj->_oy;
y = v25;
- if (point.x == xpos && v25 == ypos) {
- point.x = (int)operator new(sizeof(MessageQueue));
- v71.state = 0;
- if (point.x) {
- v26 = GlobalMessageQueueList_compact(&g_globalMessageQueueList);
- v62 = MessageQueue_ctor1((MessageQueue *)point, v26);
- } else {
- v62 = 0;
- }
- v71.state = -1;
- if (staticsId && obj->statics->staticsId != staticsId) {
- point.x = MovGraph2_getItem1IndexByStaticsId(this, idx, staticsId);
+
+ if (obj->_ox == xpos && obj->_oy == ypos) {
+ MessageQueue *mq = new MessageQueue(g_globalMessageQueueList->compact());
+
+ if (staticsId && obj->_statics->_staticsId != staticsId) {
+ point.x = getItem1IndexByStaticsId(idx, staticsId);
if (point.x == -1) {
GameObject_setPicAniInfo(obj, &picAniInfo);
return 0;
@@ -678,31 +665,37 @@ MessageQueue *MovGraph2::method4C(StaticANIObject *obj, int xpos, int ypos, int
GameObject_setPicAniInfo(obj, &picAniInfo);
return v62;
}
- linkInfoSource.node = MovGraph2_findNode(this, point.x, v25, 0);
+ linkInfoSource.node = findNode(obj->_ox, obj->_oy, 0);
+
if (!linkInfoSource.node) {
- v38 = point.x;
- linkInfoSource.link = MovGraph2_findLink1(this, point.x, y, idxsub, 0);
- if (!(_DWORD)linkInfoSource.link) {
- linkInfoSource.link = MovGraph2_findLink2(this, v38, y);
- if (!(_DWORD)linkInfoSource.link) {
- GameObject_setPicAniInfo(obj, &picAniInfo);
+ linkInfoSource.link = findLink1(obj->_ox, obj->_oy, idxsub, 0);
+
+ if (!linkInfoSource.link) {
+ linkInfoSource.link = findLink2(obj->_ox, obj->_oy);
+
+ if (!linkInfoSource.link) {
+ obj->setPicAniInfo(picAniInfo);
+
return 0;
}
}
}
- linkInfoDest.node = MovGraph2_findNode(this, xpos, ypos, fuzzyMatch);
+
+ linkInfoDest.node = findNode(xpos, ypos, fuzzyMatch);
+
if (!linkInfoDest.node) {
- linkInfoDest.link = MovGraph2_findLink1(this, xpos, ypos, idxsub, fuzzyMatch);
- if (!(_DWORD)linkInfoDest.link) {
- GameObject_setPicAniInfo(obj, &picAniInfo);
+ linkInfoDest.link = findLink1(xpos, ypos, idxsub, fuzzyMatch);
+ if (!linkInfoDest.link) {
+ obj->setPicAniInfo(picAniInfo);
+
return 0;
}
}
+
ObList_ctor(&tempLinkList, 10);
- v71.state = 4;
+
MovGraph2_findLinks(this, &linkInfoSource, &linkInfoDest, (int)&tempLinkList);
if (v6 < 0.0 || (linkInfoSource.node != linkInfoDest.node || !linkInfoSource.node) && !tempLinkList.m_nCount) {
- v71.state = -1;
ObList_dtor(&tempLinkList);
return 0;
}
@@ -712,11 +705,14 @@ MessageQueue *MovGraph2::method4C(StaticANIObject *obj, int xpos, int ypos, int
v40 = point.x;
movInfo1.pt1.y = y;
movInfo1.pt1.x = point.x;
+
if (linkInfoSource.node)
v41 = linkInfoSource.node->distance;
else
v41 = linkInfoSource.link->movGraphNode1->distance;
+
movInfo1.distance1 = v41;
+
if (linkInfoDest.node) {
v42 = linkInfoDest.node->x;
movInfo1.pt2.x = linkInfoDest.node->x;
@@ -738,6 +734,7 @@ MessageQueue *MovGraph2::method4C(StaticANIObject *obj, int xpos, int ypos, int
v39 = movInfo1.pt1.y;
v40 = movInfo1.pt1.x;
}
+
if (staticsId) {
v47 = MovGraph2_getItem1IndexByStaticsId(this, ex, staticsId);
} else if (tempLinkList.m_nCount <= 1) {
Commit: 5b54a546e0de7a3e2e103667320459695a243d9c
https://github.com/scummvm/scummvm/commit/5b54a546e0de7a3e2e103667320459695a243d9c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-10T13:58:44-07:00
Commit Message:
FULLPIPE: Made setting rooms via bootparams easier
Changed paths:
engines/fullpipe/fullpipe.cpp
engines/fullpipe/fullpipe.h
engines/fullpipe/scenes.cpp
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 5e1af12..a0db6aa 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -176,7 +176,7 @@ Common::Error FullpipeEngine::run() {
int scene = 0;
if (ConfMan.hasKey("boot_param"))
- scene = ConfMan.getInt("boot_param");
+ scene = convertScene(ConfMan.getInt("boot_param"));
if (!loadGam("fullpipe.gam", scene))
return Common::kNoGameDataFoundError;
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 6872dd8..22e4f1d 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -219,6 +219,7 @@ public:
bool sceneSwitcher(EntranceInfo *entrance);
Scene *accessScene(int sceneId);
void setSceneMusicParameters(GameVar *var);
+ int convertScene(int scene);
NGIArchive *_currArchive;
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 9fb8a95..40d9f21 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -74,6 +74,23 @@ Vars::Vars() {
selector = 0;
}
+static int scenes[] = {
+ SC_1, SC_2, SC_3, SC_4, SC_5, SC_6, SC_7, SC_8, SC_9, SC_10,
+ SC_11, SC_12, SC_13, SC_14, SC_15, SC_16, SC_17, SC_18, SC_19, SC_20,
+ SC_21, SC_22, SC_23, SC_24, SC_25, SC_26, SC_27, SC_28, SC_29, SC_30,
+ SC_31, SC_32, SC_33, SC_34, SC_35, SC_36, SC_37, SC_38, SC_DBGMENU
+};
+
+int FullpipeEngine::convertScene(int scene) {
+ if (!scene || scene >= SC_1)
+ return scene;
+
+ if (scene < 1 || scene > 39)
+ return SC_1;
+
+ return scenes[scene - 1];
+}
+
bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
GameVar *sceneVar;
Common::Point sceneDim;
More information about the Scummvm-git-logs
mailing list