aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/lift.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-01 13:34:31 +0200
committerEugene Sandulenko2014-02-01 16:55:44 +0200
commit26960936b5be75a8a77cea8449bceadfb6687a15 (patch)
treeb02d34d06c024a4dc9224ce43aa173db5a077d83 /engines/fullpipe/lift.cpp
parentd8367d63cbbe4f8244db2809e0951d35dd06c85b (diff)
downloadscummvm-rg350-26960936b5be75a8a77cea8449bceadfb6687a15.tar.gz
scummvm-rg350-26960936b5be75a8a77cea8449bceadfb6687a15.tar.bz2
scummvm-rg350-26960936b5be75a8a77cea8449bceadfb6687a15.zip
FULLPIPE: Implement lift_walkAndGo()
Diffstat (limited to 'engines/fullpipe/lift.cpp')
-rw-r--r--engines/fullpipe/lift.cpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 068e9c3fd7..d4aeef2a42 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -30,6 +30,7 @@
#include "fullpipe/statics.h"
#include "fullpipe/messages.h"
#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
namespace Fullpipe {
@@ -315,7 +316,50 @@ void FullpipeEngine::lift_closedoorSeq() {
}
void FullpipeEngine::lift_walkAndGo() {
- warning("STUB: FullpipeEngine::lift_walkAndGo()");
+ MessageQueue *mq;
+ ExCommand *ex;
+
+ if (abs(_liftX - _aniMan->_ox) > 1 || abs(_liftY - _aniMan->_oy) > 1 || _aniMan->_movement || _aniMan->_statics->_staticsId != ST_MAN_UP) {
+ mq = getCurrSceneSc2MotionController()->method34(_aniMan, _liftX, _liftY, 1, ST_MAN_UP);
+
+ if (mq) {
+ ex = new ExCommand(0, 17, MSG_LIFT_CLICKBUTTON, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+
+ mq->addExCommandToEnd(ex);
+ }
+ } else {
+ lift_openLift();
+
+ mq = new MessageQueue(_liftEnterMQ, 0, 0);
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ ex = new ExCommand(_aniMan->_id, 2, 15, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommand(ex);
+
+ ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_field_14 = _lift->_priority + 1;
+ ex->_x = -1;
+ ex->_y = -1;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_LIFT_CLOSEDOOR, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ mq->chain(0);
+
+ _aniMan->_flags |= 1;
+ }
+}
+
+void FullpipeEngine::lift_openLift() {
+ warning("STUB: FullpipeEngine::lift_openLift()");
}
void FullpipeEngine::lift_clickButton() {