diff options
author | Eugene Sandulenko | 2013-12-13 15:59:29 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-13 15:59:29 +0200 |
commit | e136183a35c6fc8927883ba94a0554b06d69c90b (patch) | |
tree | 54046f6dd283555898a3649be7bfc46e9f1629b3 | |
parent | e79022bf3428354c8c7bcde4fa0406636bc8ded4 (diff) | |
download | scummvm-rg350-e136183a35c6fc8927883ba94a0554b06d69c90b.tar.gz scummvm-rg350-e136183a35c6fc8927883ba94a0554b06d69c90b.tar.bz2 scummvm-rg350-e136183a35c6fc8927883ba94a0554b06d69c90b.zip |
FULLPIPE: Implement sceneHandler04_leaveScene()
-rw-r--r-- | engines/fullpipe/constants.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 27 |
2 files changed, 26 insertions, 3 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 1a59cce787..31ca2d3d33 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -173,6 +173,7 @@ namespace Fullpipe { #define PIC_IN1_PIPETITLE 5167 #define PIC_INV_MENU 991 #define PIC_MAP_A13 5275 +#define PIC_MAP_P03 5279 #define PIC_MAP_S01 5223 #define PIC_SC1_KUCHKA 1321 #define PIC_SC1_LADDER 1091 @@ -209,6 +210,7 @@ namespace Fullpipe { #define QU_SC3_EXITLIFT 2808 #define QU_SC4_GOCLOCK 595 #define QU_SC4_MANFROMBOTTLE 2851 +#define QU_SC4_MANTOBOTTLE 2850 #define SC_1 301 #define SC_10 653 #define SC_11 654 diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 07ac109477..d0cab72fa3 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -652,8 +652,29 @@ void sceneHandler04_springWobble() { sceneHandler04_bottleUpdateObjects(oldDynIndex - g_vars->scene04_dynamicPhaseIndex); } -void sceneHandler04_sub5() { - warning("STUB: sceneHandler04_sub5()"); +void sceneHandler04_leaveScene() { + g_fullpipe->_aniMan2 = 0; + + MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC4_MANTOBOTTLE), 0, 0); + ExCommand *ex = 0; + + for (uint i = 0; i < mq->getCount(); i++) { + if (mq->getExCommandByIndex(i)->_messageKind == 27) { + ex = mq->getExCommandByIndex(i); + break; + } + } + + ex->_y = g_vars->scene04_bottle->_oy - 304; + + mq->chain(0); + + g_vars->scene04_var07 = 0; + g_vars->scene04_dudeOnLadder = 0; + + g_fullpipe->_behaviorManager->setFlagByStaticAniObject(g_fullpipe->_aniMan, 0); + + g_fullpipe->updateMapPiece(PIC_MAP_P03, 1); } void sceneHandler04_liftBottle() { @@ -963,7 +984,7 @@ int sceneHandler04(ExCommand *ex) { sceneHandler04_springWobble(); if (g_vars->scene04_var07 && !g_vars->scene04_var09) - sceneHandler04_sub5(); + sceneHandler04_leaveScene(); if (g_vars->scene04_var12) sceneHandler04_liftBottle(); |