diff options
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 57 |
2 files changed, 56 insertions, 2 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index ec46e39a5c..1a59cce787 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -122,6 +122,7 @@ namespace Fullpipe { #define MV_MAN_JUMPONPLANK 551 #define MV_MAN_LOOKLADDER 520 #define MV_MAN_LOOKUP 4773 +#define MV_MAN_PLANKTOLADDER 553 #define MV_MAN_STARTLADDER 452 #define MV_MAN_STARTLADDER2 2842 #define MV_MAN_STOPLADDER 454 diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 11f14633a8..5e974cc7e7 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -459,8 +459,61 @@ void sceneHandler04_dropBottle() { g_vars->scene04_hand->_priority = 15; } -void sceneHandler04_gotoLadder(int par) { - warning("STUB: sceneHandler04_gotoLadder()"); +void sceneHandler04_gotoLadder(ExCommand *ex) { + MGM mgm; + MGMInfo mgminfo; + + mgm.addItem(ANI_MAN); + + mgminfo.ani = g_fullpipe->_aniMan; + mgminfo.staticsId2 = ST_MAN_UP; + mgminfo.x1 = 1095; + mgminfo.y1 = 434; + mgminfo.field_1C = 12; + mgminfo.field_10 = 1; + mgminfo.flags = 78; + mgminfo.movementId = MV_MAN_PLANKTOLADDER; + + MessageQueue *mq = mgm.genMovement(&mgminfo); + + if (mq) { + mq->deleteExCommandByIndex(mq->getCount() - 1, 1); + + ExCommand *ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_TOLADDER, 0, 0, 0, 1, 0, 0, 0); + ex1->_excFlags = 2; + ex1->_field_24 = 1; + ex1->_keyCode = -1; + mq->addExCommandToEnd(ex1); + + ExCommand *ex2 = new ExCommand(ANI_MAN, 1, MV_MAN_STOPLADDER, 0, 0, 0, 1, 0, 0, 0); + ex2->_excFlags = 2; + ex2->_field_24 = 1; + ex2->_keyCode = -1; + mq->addExCommandToEnd(ex2); + + ExCommand *ex3 = new ExCommand(g_fullpipe->_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0); + ex3->_field_14 = 256; + ex3->_messageNum = 0; + ex3->_excFlags |= 3; + mq->addExCommandToEnd(ex3); + + if (ex) { + ExCommand *ex4 = new ExCommand(ex); + + mq->addExCommandToEnd(ex4); + } + + mq->setFlags(mq->getFlags() | 1); + + if (mq->chain(g_fullpipe->_aniMan)) { + g_fullpipe->_aniMan->_priority = 12; + g_fullpipe->_aniMan->_flags |= 1; + } else { + delete mq; + } + } + + g_vars->scene04_var04 = 0; } void sceneHandler04_lowerPlank() { |