aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-05-16 20:57:03 +0300
committerEugene Sandulenko2014-05-16 20:57:03 +0300
commit17b29e109d229f75069f9898b954fad493199496 (patch)
treeab59d2aedc874110ed1e150d428019efd8dfc452 /engines
parent230e7713217603de711cf098977daba108cb3087 (diff)
downloadscummvm-rg350-17b29e109d229f75069f9898b954fad493199496.tar.gz
scummvm-rg350-17b29e109d229f75069f9898b954fad493199496.tar.bz2
scummvm-rg350-17b29e109d229f75069f9898b954fad493199496.zip
FULLPIPE: Implement MovGraph::method44()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/motion.cpp29
-rw-r--r--engines/fullpipe/motion.h4
2 files changed, 26 insertions, 7 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index b5e0f67a58..1712c88684 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -621,10 +621,31 @@ int MovGraph::method3C(StaticANIObject *ani, int flag) {
return 0;
}
-int MovGraph::method44() {
- warning("STUB: MovGraph::method44()");
+bool MovGraph::method44(StaticANIObject *ani, int x, int y) {
+ int idx = getItemIndexByStaticAni(ani);
+ MovArr m;
- return 0;
+ if (idx != -1) {
+ if (x != -1 || y != -1) {
+ int counter;
+
+ MovItem *movitem = method28(ani, x, y, 0, &counter);
+
+ if (movitem) {
+ MovArr *movarr = _callback1(ani, movitem, counter);
+ int cnt = movarr->_movStepCount;
+
+ if (cnt > 0) {
+ if (movarr->_movSteps[cnt - 1].link->_flags & 0x4000000)
+ return true;
+ }
+ }
+ } else if (calcChunk(idx, ani->_ox, ani->_oy, &m, 0) && m._link && (m._link->_flags & 0x4000000)) {
+ return true;
+ }
+ }
+
+ return false;
}
MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
@@ -1512,8 +1533,6 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
obj->getPicAniInfo(&picAniInfo);
- warning("p: %d %d", picAniInfo.movementId, picAniInfo.objectId);
-
int idxsub;
if (obj->_movement)
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 1b49839e0d..febcf17574 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -60,7 +60,7 @@ public:
virtual int changeCallback() { return 0; }
virtual int method3C(StaticANIObject *ani, int flag) { return 0; }
virtual int method40() { return 0; }
- virtual int method44() { return 0; }
+ virtual bool method44(StaticANIObject *ani, int x, int y) { return false; }
virtual int method48() { return -1; }
virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { return 0; }
@@ -366,7 +366,7 @@ public:
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
virtual int changeCallback();
virtual int method3C(StaticANIObject *ani, int flag);
- virtual int method44();
+ virtual bool method44(StaticANIObject *ani, int x, int y);
virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
virtual int method50();