aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-26 00:20:58 +0300
committerEugene Sandulenko2013-10-27 00:50:49 +0300
commit7089444e0b862fdfab5dc63a3058374cdd55c9cb (patch)
tree2a23ab33604832ffdcafbe6a8c93359c263d1d3a
parent1828f5edc8fadec79f639537492856fee9bfe7a6 (diff)
downloadscummvm-rg350-7089444e0b862fdfab5dc63a3058374cdd55c9cb.tar.gz
scummvm-rg350-7089444e0b862fdfab5dc63a3058374cdd55c9cb.tar.bz2
scummvm-rg350-7089444e0b862fdfab5dc63a3058374cdd55c9cb.zip
FULLPIPE: Implement MovGraph2::method34()
-rw-r--r--engines/fullpipe/motion.cpp41
1 files changed, 38 insertions, 3 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 750c2de5ea..aa7d02a405 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -672,10 +672,45 @@ void MovGraph2::freeItems() {
warning("STUB: MovGraph2::freeItems()");
}
-MessageQueue *MovGraph2::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
- warning("STUB: MovGraph2::method34()");
+MessageQueue *MovGraph2::method34(StaticANIObject *ani, int xpos, int ypos, int fuzzyMatch, int staticsId) {
+ if (!ani->isIdle())
+ return 0;
- return 0;
+ if (ani->_flags & 0x100)
+ return 0;
+
+ MessageQueue *mq = doWalkTo(ani, xpos, ypos, fuzzyMatch, staticsId);
+
+ if (!mq)
+ return 0;
+
+ if (ani->_movement) {
+ if (mq->getCount() <= 1 || mq->getExCommandByIndex(0)->_messageKind != 22) {
+ PicAniInfo picAniInfo;
+
+ ani->getPicAniInfo(&picAniInfo);
+ ani->updateStepPos();
+ MessageQueue *mq1 = doWalkTo(ani, xpos, ypos, fuzzyMatch, staticsId);
+
+ ani->setPicAniInfo(&picAniInfo);
+
+ if (mq1) {
+ delete mq;
+
+ mq = mq1;
+ }
+ } else {
+ ani->_movement = 0;
+ }
+ }
+
+ if (!mq->chain(ani)) {
+ delete mq;
+
+ return 0;
+ }
+
+ return mq;
}
MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int fuzzyMatch, int staticsId) {