aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-25 12:50:09 +0300
committerEugene Sandulenko2014-05-26 08:44:28 +0300
commit82f4e71d5604202ef364fb225f0dc7b527bd39c2 (patch)
treeebb138db08959786a587e889e0ef636c26808ff5 /engines/fullpipe
parent120edd94349b4a9f7a5a294b37504edee4a39c41 (diff)
downloadscummvm-rg350-82f4e71d5604202ef364fb225f0dc7b527bd39c2.tar.gz
scummvm-rg350-82f4e71d5604202ef364fb225f0dc7b527bd39c2.tar.bz2
scummvm-rg350-82f4e71d5604202ef364fb225f0dc7b527bd39c2.zip
FULLPIPE: Implement MovGraph::setEnds()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/motion.cpp22
-rw-r--r--engines/fullpipe/motion.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 2564096c04..9f34c8fab8 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1296,6 +1296,28 @@ bool MovGraph::calcChunk(int idx, int x, int y, MovArr *arr, int a6) {
return res;
}
+void MovGraph::setEnds(MovStep *step1, MovStep *step2) {
+ if (step1->link->_movGraphNode1 == step2->link->_movGraphNode2) {
+ step1->sfield_0 = 1;
+ step2->sfield_0 = 1;
+
+ return;
+ }
+
+ if (step1->link->_movGraphNode1 == step2->link->_movGraphNode1) {
+ step1->sfield_0 = 1;
+ step2->sfield_0 = 0;
+ } else {
+ step1->sfield_0 = 0;
+
+ if (step1->link->_movGraphNode2 != step2->link->_movGraphNode1) {
+ step2->sfield_0 = 1;
+ } else {
+ step2->sfield_0 = 0;
+ }
+ }
+}
+
int MovGraph2::getItemIndexByGameObjectId(int objectId) {
for (uint i = 0; i < _items2.size(); i++)
if (_items2[i]->_objectId == objectId)
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 2765cc3118..b72883174f 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -376,6 +376,7 @@ public:
bool calcChunk(int idx, int x, int y, MovArr *arr, int a6);
MessageQueue *sub1(StaticANIObject *ani, int x, int y, int a5, int x1, int y1, int a8, int a9);
MessageQueue *fillMGMinfo(StaticANIObject *ani, MovArr *movarr, int staticsId);
+ void setEnds(MovStep *step1, MovStep *step2);
};
class Movement;