aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/lift.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-01 13:20:30 +0200
committerEugene Sandulenko2014-02-01 16:55:43 +0200
commitd8367d63cbbe4f8244db2809e0951d35dd06c85b (patch)
tree446164541bbc7019541b1ae448da836edebe1d40 /engines/fullpipe/lift.cpp
parent3dbd8817c35e155229888d9be81e241f8e99ad10 (diff)
downloadscummvm-rg350-d8367d63cbbe4f8244db2809e0951d35dd06c85b.tar.gz
scummvm-rg350-d8367d63cbbe4f8244db2809e0951d35dd06c85b.tar.bz2
scummvm-rg350-d8367d63cbbe4f8244db2809e0951d35dd06c85b.zip
FULLPIPE: Implement lift_closedoorSeq()
Diffstat (limited to 'engines/fullpipe/lift.cpp')
-rw-r--r--engines/fullpipe/lift.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index cb8be5ffa1..068e9c3fd7 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -278,7 +278,40 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
}
void FullpipeEngine::lift_closedoorSeq() {
- warning("STUB: FullpipeEngine::lift_closedoorSeq()");
+ if (_lift->_movement) {
+ if (_lift->_movement->_id == MV_LFT_CLOSE) {
+ _lift->queueMessageQueue(0);
+ } else if (_lift->_movement->_id == MV_LFT_OPEN) {
+ int ph = _lift->_movement->_currDynamicPhaseIndex;
+
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+
+ if (_lift->_movement->_currMovement)
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_currMovement->_dynamicPhases.size() - ph);
+ else
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_dynamicPhases.size() - ph);
+ } else {
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+ }
+ } else {
+ if (_lift->_statics->_staticsId == ST_LFT_CLOSED ) {
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ } else {
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+ }
+ }
+
+ MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+ ExCommand *ex = new ExCommand(0, 17, MSG_LIFT_GO, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ if (!mq->chain(_lift))
+ delete mq;
}
void FullpipeEngine::lift_walkAndGo() {