diff options
author | Eugene Sandulenko | 2014-02-06 23:31:04 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-06 23:50:37 +0200 |
commit | d492457c34fb13494dfb66786e55dce33d01175c (patch) | |
tree | b18ca746e15f8f8e1b4bbf9154073f6edb9b90e7 /engines/fullpipe/scenes | |
parent | 2d2c9929f6a4ace150219cb803e796a1cdbaedce (diff) | |
download | scummvm-rg350-d492457c34fb13494dfb66786e55dce33d01175c.tar.gz scummvm-rg350-d492457c34fb13494dfb66786e55dce33d01175c.tar.bz2 scummvm-rg350-d492457c34fb13494dfb66786e55dce33d01175c.zip |
FULLPIPE: Implement sceneHandler27_batLogic()
Diffstat (limited to 'engines/fullpipe/scenes')
-rw-r--r-- | engines/fullpipe/scenes/scene27.cpp | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp index c6d945eeab..407cf3820d 100644 --- a/engines/fullpipe/scenes/scene27.cpp +++ b/engines/fullpipe/scenes/scene27.cpp @@ -450,7 +450,68 @@ void sceneHandler27_maidSwitchback() { } void sceneHandler27_batLogic() { - warning("STUB: sceneHandler27_batLogic()"); + if (g_vars->scene27_balls.numBalls) { + g_vars->scene27_bat = g_vars->scene27_balls.pHead->ani; + + g_vars->scene27_balls.pHead = g_vars->scene27_balls.pHead->p0; + + if (g_vars->scene27_balls.pHead) + g_vars->scene27_balls.pHead->p0->p1 = 0; + else + g_vars->scene27_balls.field_8 = 0; + + g_vars->scene27_balls.init(&g_vars->scene27_balls.pHead->p0); + + int mv; + + switch (g_vars->scene27_batHandler->_statics->_staticsId) { + case ST_BTH_5: + mv = MV_BTH_5_4; + break; + + case ST_BTH_4: + mv = MV_BTH_4_3; + break; + + case ST_BTH_3: + mv = MV_BTH_3_2; + break; + + case ST_BTH_2: + mv = MV_BTH_2_1; + break; + + case ST_BTH_1: + mv = MV_BTH_1_0; + break; + + default: + chainQueue(QU_SC27_RESTARTBETS, 1); + + getCurrSceneSc2MotionController()->setEnabled(); + getGameLoaderInteractionController()->enableFlag24(); + + g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1); + + return; + } + + MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact()); + + mq->setFlags(mq->getFlags() | 1); + + ExCommand *ex = new ExCommand(g_vars->scene27_batHandler->_id, 1, mv, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 2; + mq->addExCommandToEnd(ex); + + ex = new ExCommand(0, 17, MSG_SC27_CLICKBET, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + mq->addExCommandToEnd(ex); + + mq->chain(0); + } else { + g_vars->scene27_bat = 0; + } } void sceneHandler27_calcWinArcade() { |