diff options
-rw-r--r-- | engines/fullpipe/constants.h | 5 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene23.cpp | 60 |
2 files changed, 64 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 0d40f2981f..9eb3147903 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -805,6 +805,10 @@ namespace Fullpipe { #define MV_CND_7_8 1718 #define MV_CND_8_9 1720 #define MV_CND_9_0 1722 +#define MV_MAN23_PUSH1 1724 +#define MV_MAN23_PUSH2 1725 +#define MV_MAN23_PUSH3 1726 +#define MV_MAN23_PUSH4 1727 #define PIC_SC23_BOXCLOSED 1728 #define PIC_SC23_BOXOPEN 1723 #define PIC_SC23_BTN1 1729 @@ -820,6 +824,7 @@ namespace Fullpipe { #define QU_SC23_FROMSTOOL 3338 #define QU_SC23_SHOWSTOOL 3335 #define QU_SC23_STARTKISS 1822 +#define QU_SC23_TOCALENDAR 1733 #define ST_CND_0 1704 #define ST_CND_1 1705 #define ST_CND_2 1707 diff --git a/engines/fullpipe/scenes/scene23.cpp b/engines/fullpipe/scenes/scene23.cpp index e703588e9d..d4cbb5e2f9 100644 --- a/engines/fullpipe/scenes/scene23.cpp +++ b/engines/fullpipe/scenes/scene23.cpp @@ -292,7 +292,65 @@ void sceneHandler23_spinWheel3() { } void sceneHandler23_pushButton(ExCommand *cmd) { - warning("STUB: sceneHandler23_pushButton(cmd)"); + if (g_fp->_aniMan->isIdle() || !(g_fp->_aniMan->_flags & 0x100)) { + if (!g_vars->scene23_var05) { + if (g_fp->_aniMan->_ox != 405 || g_fp->_aniMan->_oy != 220) { + if (g_fp->_aniMan->_ox != 276 || g_fp->_aniMan->_oy != 438 + || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) { + if (g_fp->_msgX == 276 && g_fp->_msgY == 438 ) + return; + + MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 276, 438, 1, ST_MAN_RIGHT); + + if (mq) { + mq->addExCommandToEnd(cmd->createClone());; + + postExCommand(g_fp->_aniMan->_id, 2, 276, 438, 0, -1); + } + } else { + MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC23_TOCALENDAR), 0, 0); + + mq->addExCommandToEnd(cmd->createClone());; + mq->setFlags(mq->getFlags() | 1); + mq->chain(0); + } + + if (!g_vars->scene23_var05) + return; + } else { + g_vars->scene23_var05 = 1; + } + } + + if (!g_fp->_aniMan->_movement && g_fp->_aniMan->_statics->_staticsId == ST_MAN_STANDLADDER) { + int mv = 0; + + switch (cmd->_messageNum) { + case MSG_SC23_CLICKBTN1: + mv = MV_MAN23_PUSH1; + break; + + case MSG_SC23_CLICKBTN2: + mv = MV_MAN23_PUSH2; + break; + + case MSG_SC23_CLICKBTN3: + mv = MV_MAN23_PUSH3; + break; + + case MSG_SC23_CLICKBTN4: + mv = MV_MAN23_PUSH4; + break; + + default: + return; + } + + if (mv) + g_fp->_aniMan->startAnim(mv, 0, -1); + + } + } } void sceneHandler23_sendClick(StaticANIObject *ani) { |