diff options
author | Eugene Sandulenko | 2014-01-05 14:38:07 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-05 17:13:31 +0200 |
commit | 9fad45b7e62cd6c73950e3b15f7c559cea54167b (patch) | |
tree | 60b3f21efbb1627a4795b7b6764a5f94d01a9ef2 /engines | |
parent | 7ca33d1889815a63ace0148d34efe67066fdac87 (diff) | |
download | scummvm-rg350-9fad45b7e62cd6c73950e3b15f7c559cea54167b.tar.gz scummvm-rg350-9fad45b7e62cd6c73950e3b15f7c559cea54167b.tar.bz2 scummvm-rg350-9fad45b7e62cd6c73950e3b15f7c559cea54167b.zip |
FULLPIPE: Implement sceneHandler25_animateBearders()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/constants.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 3 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene25.cpp | 28 |
4 files changed, 32 insertions, 5 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 1dfe6ba77c..aa256a8d2d 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -884,6 +884,9 @@ namespace Fullpipe { #define QU_DRP25_TOFLOOR 3502 #define QU_DRP25_TOWATER 3504 #define QU_SC25_BACKTOTRUBA 2061 +#define QU_SC25_BEARDED 3425 +#define QU_SC25_BEARDED2 3426 +#define QU_SC25_BEARDED3 3427 #define QU_SC25_ENTERUP_FLOOR 1904 #define QU_SC25_ENTERUP_WATER 1895 #define QU_SC25_LADDERUP 1925 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 7d6b2e23fb..2213d1dfa4 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -293,8 +293,7 @@ Vars::Vars() { scene25_var07 = 0; scene25_var08 = 0; scene25_var09 = 0; - scene25_var10 = 0; - scene25_var11 = 0; + scene25_var10.clear(); scene25_var12 = 0; scene30_leg = 0; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index d01fd62fab..72150fc91c 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -407,8 +407,7 @@ public: int scene25_var07; int scene25_var08; int scene25_var09; - int scene25_var10; - int scene25_var11; + Common::Array<StaticANIObject *> scene25_var10; int scene25_var12; StaticANIObject *scene30_leg; diff --git a/engines/fullpipe/scenes/scene25.cpp b/engines/fullpipe/scenes/scene25.cpp index 37f837a759..db58bff651 100644 --- a/engines/fullpipe/scenes/scene25.cpp +++ b/engines/fullpipe/scenes/scene25.cpp @@ -155,7 +155,33 @@ void sceneHandler25_toLadder() { } void sceneHandler25_animateBearders() { - warning("STUB: sceneHandler25_animateBearders()"); + if (g_fp->_rnd->getRandomNumber(32767) < 218) { + MessageQueue *mq; + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC25_BEARDED), 0, 1); + + mq->replaceKeyCode(-1, g_vars->scene25_var10[0]->_okeyCode); + mq->getExCommandByIndex(0)->_x = g_fp->_rnd->getRandomNumber(650) + 100; + mq->chain(0); + + g_vars->scene25_var09 = 0; + + if (g_fp->_rnd->getRandomNumber(32767) < 0x1FFF) { + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC25_BEARDED2), 0, 1); + + mq->replaceKeyCode(-1, g_vars->scene25_var10[1]->_okeyCode); + mq->getExCommandByIndex(0)->_x = g_fp->_rnd->getRandomNumber(650) + 100; + mq->chain(0); + + if (g_fp->_rnd->getRandomNumber(32767) < 8191) { + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC25_BEARDED3), 0, 1); + + mq->replaceKeyCode(-1, g_vars->scene25_var10[2]->_okeyCode); + mq->getExCommandByIndex(0)->_x = g_fp->_rnd->getRandomNumber(650) + 100; + mq->chain(0); + } + } + } } void sceneHandler25_sneeze() { |