diff options
author | Eugene Sandulenko | 2014-01-07 11:53:54 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-07 11:53:54 +0200 |
commit | f660c394a5e2da4bfe15596461714007f00a01e9 (patch) | |
tree | a446e520817b0cb07907bed954ef3801f5717b84 /engines | |
parent | 5ac706faffa5f25a8b6af1c24179b2a25492bb83 (diff) | |
download | scummvm-rg350-f660c394a5e2da4bfe15596461714007f00a01e9.tar.gz scummvm-rg350-f660c394a5e2da4bfe15596461714007f00a01e9.tar.bz2 scummvm-rg350-f660c394a5e2da4bfe15596461714007f00a01e9.zip |
FULLPIPE: Implement sceneHandler28_trySecondaryPers()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/constants.h | 4 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene28.cpp | 70 |
2 files changed, 73 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 6d05ecc352..79f6a7f9e5 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -1017,6 +1017,10 @@ namespace Fullpipe { #define PIC_SC28_DARK4 4269 #define PIC_SC28_DARK5 4270 #define PIC_SC28_DARK6 4271 +#define QU_BRD28_GOL 4960 +#define QU_BRD28_GOR 4959 +#define QU_GLV28_GOL 4958 +#define QU_GLV28_GOR 4957 #define QU_SC28_LIFT0_START 4676 #define QU_SC28_LIFT1_START 4254 #define QU_SC28_LIFT1_WORK 4256 diff --git a/engines/fullpipe/scenes/scene28.cpp b/engines/fullpipe/scenes/scene28.cpp index 176b75e399..244d17cf09 100644 --- a/engines/fullpipe/scenes/scene28.cpp +++ b/engines/fullpipe/scenes/scene28.cpp @@ -101,7 +101,75 @@ void sceneHandler28_makeFaces(ExCommand *cmd) { } void sceneHandler28_trySecondaryPers() { - warning("STUB: sceneHandler28_trySecondaryPers()"); + MessageQueue *mq; + int x; + + if (g_vars->scene28_var10) { + if (g_vars->scene28_var06) { + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOR), 0, 1); + + mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.left - 20; + mq->getExCommandByIndex(0)->_keyCode = 1; + mq->replaceKeyCode(-1, 1); + mq->chain(0); + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOR), 0, 1); + + mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.left - 40; + mq->getExCommandByIndex(0)->_y += 20; + mq->getExCommandByIndex(0)->_keyCode = 2; + mq->replaceKeyCode(-1, 2); + mq->chain(0); + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOR), 0, 1); + + x = g_fp->_sceneRect.left - 60; + } else { + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOL), 0, 1); + + mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.right + 20; + mq->getExCommandByIndex(0)->_keyCode = 1; + mq->replaceKeyCode(-1, 1); + mq->chain(0); + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOL), 0, 1); + + mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.right + 40; + mq->getExCommandByIndex(0)->_y += 20; + mq->getExCommandByIndex(0)->_keyCode = 2; + mq->replaceKeyCode(-1, 2); + mq->chain(0); + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOL), 0, 1); + + x = g_fp->_sceneRect.right + 60; + } + + mq->getExCommandByIndex(0)->_x = x; + mq->getExCommandByIndex(0)->_y += 40; + mq->getExCommandByIndex(0)->_keyCode = 3; + mq->replaceKeyCode(-1, 3); + mq->chain( 0); + + g_vars->scene28_var06 = !g_vars->scene28_var06; + } else { + if (g_vars->scene28_var09) { + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_GLV28_GOR), 0, 1); + + x = g_fp->_sceneRect.left - 40; + } else { + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_GLV28_GOL), 0, 1); + + x = g_fp->_sceneRect.right + 40; + } + + mq->getExCommandByIndex(0)->_x = x; + mq->chain(0); + + g_vars->scene28_var09 = !g_vars->scene28_var09; + } + + g_vars->scene28_var10 = !g_vars->scene28_var10; } void sceneHandler28_turnOn2() { |