aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/lift.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-01 13:40:36 +0200
committerEugene Sandulenko2014-02-01 16:55:44 +0200
commit3b1f60943990ee8ee0ff8f447287a72bdc014fe8 (patch)
treeb070c3a3713033c78c746d1cab6af69c7e473e3c /engines/fullpipe/lift.cpp
parent26960936b5be75a8a77cea8449bceadfb6687a15 (diff)
downloadscummvm-rg350-3b1f60943990ee8ee0ff8f447287a72bdc014fe8.tar.gz
scummvm-rg350-3b1f60943990ee8ee0ff8f447287a72bdc014fe8.tar.bz2
scummvm-rg350-3b1f60943990ee8ee0ff8f447287a72bdc014fe8.zip
FULLPIPE: Implement lift_openLift()
Diffstat (limited to 'engines/fullpipe/lift.cpp')
-rw-r--r--engines/fullpipe/lift.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index d4aeef2a42..54d3bb65c5 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -359,7 +359,28 @@ void FullpipeEngine::lift_walkAndGo() {
}
void FullpipeEngine::lift_openLift() {
- warning("STUB: FullpipeEngine::lift_openLift()");
+ if (_lift->_movement) {
+ if (_lift->_movement->_id == MV_LFT_OPEN) {
+ _lift->queueMessageQueue(0);
+ } else if (_lift->_movement->_id == MV_LFT_CLOSE) {
+ int idx = _lift->_movement->_currDynamicPhaseIndex;
+
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+
+ if (_lift->_movement->_currMovement)
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_currMovement->_dynamicPhases.size() - idx);
+ else
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_dynamicPhases.size() - idx);
+ } else {
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+ }
+ } else if (_lift->_statics->_staticsId == ST_LFT_OPEN_NEW) {
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+ } else {
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+ }
}
void FullpipeEngine::lift_clickButton() {