From 3b1f60943990ee8ee0ff8f447287a72bdc014fe8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 1 Feb 2014 13:40:36 +0200 Subject: FULLPIPE: Implement lift_openLift() --- engines/fullpipe/lift.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe/lift.cpp') 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() { -- cgit v1.2.3