aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-29 23:48:06 +0200
committerEugene Sandulenko2014-01-29 23:54:11 +0200
commit30123a51d085e84a08e188cbabe4e70008278309 (patch)
treec42d4da15cc1b4a54e6b35eed636be567f2f6b99 /engines
parent462f7c1c24a48b7555316a3afae357bad14cc14b (diff)
downloadscummvm-rg350-30123a51d085e84a08e188cbabe4e70008278309.tar.gz
scummvm-rg350-30123a51d085e84a08e188cbabe4e70008278309.tar.bz2
scummvm-rg350-30123a51d085e84a08e188cbabe4e70008278309.zip
FULLPIPE: Implement lift_exitSeq()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h4
-rw-r--r--engines/fullpipe/lift.cpp59
-rw-r--r--engines/fullpipe/messages.cpp6
-rw-r--r--engines/fullpipe/messages.h2
4 files changed, 69 insertions, 2 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index b2ed962b07..788ff84db7 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -39,6 +39,8 @@ namespace Fullpipe {
#define MSG_MANSHADOWSOFF 5196
#define MSG_MANSHADOWSON 5197
#define MV_FLY_FLY 4917
+#define MV_LFT_CLOSE 1053
+#define MV_LFT_OPEN 1048
#define MV_MAN_GOLADDER 451
#define MV_MAN_GOLADDER2 2844
#define MV_MAN_LIFTDOWN 1052
@@ -47,6 +49,7 @@ namespace Fullpipe {
#define rMV_MAN_LOOKUP 4775
#define MV_MAN_TOLADDER 448
#define MV_MAN_TOLADDER2 2841
+#define MV_MAN_STARTD 478
#define MV_MAN_STARTLADDER 452
#define MV_MAN_STARTLADDER2 2842
#define MV_MAN_STOPLADDER 454
@@ -251,6 +254,7 @@ namespace Fullpipe {
#define ST_LBN_7P 2772
#define ST_LBN_8P 2775
#define ST_LBN_9P 2778
+#define ST_LFT_CLOSED 1049
#define ST_MAN_EMPTY 476
#define ST_MAN_GOU 459
#define ST_MAN_RIGHT 325
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 6484aca30a..a2918c0020 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -218,8 +218,63 @@ void FullpipeEngine::lift_init(Scene *sc, int enterSeq, int exitSeq) {
}
}
-void FullpipeEngine::lift_exitSeq(ExCommand *ex) {
- warning("STUB: FullpipeEngine::lift_exitSeq()");
+void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
+ if (cmd)
+ _globalMessageQueueList->getMessageQueueById(cmd->_parId)->activateExCommandsByKind(34);
+
+ _lift->changeStatics2(ST_LFT_CLOSED);
+
+ MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+
+ ExCommand *ex = new ExCommand(_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_field_14 = 256;
+ ex->_messageNum = 256;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ if (!ex) {
+ ex = new ExCommand(_aniMan->_id, 2, 40, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+
+ ex = new ExCommand(_lift->_id, 1, MV_LFT_OPEN, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _lift->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_aniMan->_id, 1, MV_MAN_STARTD, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_field_14 = 10;
+ ex->_x = -1;
+ ex->_y = -1;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ ex->_field_14 = 256;
+ ex->_messageNum = 0;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_LIFT_STARTEXITQUEUE, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(_lift->_id, 1, MV_LFT_CLOSE, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _lift->_okeyCode;
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+
+ mq->chain(0);
}
void FullpipeEngine::lift_closedoorSeq() {
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 7dfdd06fc8..6906c681ee 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -619,6 +619,12 @@ MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) {
return 0;
}
+int MessageQueue::activateExCommandsByKind(int kind) {
+ warning("STUB: MessageQueue::activateExCommandsByKind()");
+
+ return 0;
+}
+
void GlobalMessageQueueList::deleteQueueById(int id) {
for (uint i = 0; i < size(); i++)
if (_storage[i]->_id == id) {
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index 33bb827888..f8e9d16a73 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -158,6 +158,8 @@ class MessageQueue : public CObject {
int calcDuration(StaticANIObject *obj);
void changeParam28ForObjectId(int objId, int oldParam28, int newParam28);
+
+ int activateExCommandsByKind(int kind);
};
class GlobalMessageQueueList : public Common::Array<MessageQueue *> {