Skip to content

Commit

Permalink
FULLPIPE: Implement lift_closedoorSeq()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 1, 2014
1 parent 3dbd881 commit d8367d6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions engines/fullpipe/constants.h
Expand Up @@ -256,6 +256,7 @@ namespace Fullpipe {
#define ST_LBN_8P 2775
#define ST_LBN_9P 2778
#define ST_LFT_CLOSED 1049
#define ST_LFT_OPEN_NEW 1071
#define ST_MAN_EMPTY 476
#define ST_MAN_GOU 459
#define ST_MAN_RIGHT 325
Expand Down
35 changes: 34 additions & 1 deletion engines/fullpipe/lift.cpp
Expand Up @@ -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() {
Expand Down

0 comments on commit d8367d6

Please sign in to comment.