diff options
author | Eugene Sandulenko | 2013-11-19 13:42:26 -0800 |
---|---|---|
committer | Eugene Sandulenko | 2013-11-19 13:42:26 -0800 |
commit | a7a54c5d60ebdbda600f7aa12a4a0ffb28a53bbe (patch) | |
tree | d7a71582084e8f9368c15a3095a54b2dd421a75d /engines | |
parent | eb9d53b999ddaa19634e0b099fa96e32d04b4eec (diff) | |
download | scummvm-rg350-a7a54c5d60ebdbda600f7aa12a4a0ffb28a53bbe.tar.gz scummvm-rg350-a7a54c5d60ebdbda600f7aa12a4a0ffb28a53bbe.tar.bz2 scummvm-rg350-a7a54c5d60ebdbda600f7aa12a4a0ffb28a53bbe.zip |
FULLPIPE: More work on scene02
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 1748662ab7..2d937510cf 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1590,7 +1590,7 @@ void scene02_initScene(Scene *sc) { g_vars->scene02_boxOpen = false; } else { g_vars->scene02_boxOpen = true; - g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) / 0x7FFF + 150; + g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) + 150; } //g_fullpipe->_floaters->init(g_fullpipe->_gameLoader->_gameVar->getSubVarByName("SC_2")); @@ -1599,9 +1599,67 @@ void scene02_initScene(Scene *sc) { } int sceneHandler02(ExCommand *ex) { + int res = 0; + +#if 0 + if (cmd->_messageKind != 17) + return 0; + + switch(cmd->_messageNum) { + case MSG_SC2_LADDERCLICK: + sceneHandler02_ladderClick(); + return 0; + + case MSG_SC2_SHOWLADDER: + sceneHandler02_showLadder(); + return 0; + + case MSG_SC2_PUTMANUP: + g_aniMan2->_priority = 0; + return 0; + + case MSG_SC2_HIDELADDER: + sceneHandler02_hideLadder(); + return 0; + + case 33: + if (g_fullpipe->_aniMan2) { + if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200) { + g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300; + + if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200 ) + g_currentScene->bg.x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300; + + res = 1; + } + + if (g_vars->scene02_boxOpen) { + if (g_vars->scene02_boxDelay >= 1) { + --g_vars->scene02_boxDelay; + } else if (g_fullpipe->_floaters.size() >= 1) { + if (g_fullpipe->_floaters->array2[0]->val5 == -50) { + g_fullpipe->_floaters->stopAll(); + g_vars->scene02_boxOpen = false; + g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) + 150; + } else { + g_floaters.array2[0]->val3 = -50; + } + } else { + g_fullpipe->_floaters->genFlies(g_fullpipe->_currentScene, g_fullpipe->_rnd->getRandomNumber(700) + 100, -50, 0, 0); + g_vars_scene02_boxDelay = 500 * g_fullpipe->_rnd->getRandomNumber(32767) + 1000; + } + } + + g_fullpipe->_floaters->update(); + g_fullpipe->_behaviorManager->updateBehaviors(); + + startSceneTrack(); + } + +#endif warning("STUB: sceneHandler02()"); - return 0; + return res; } void scene03_initScene(Scene *sc) { |