diff options
-rw-r--r-- | engines/fullpipe/constants.h | 12 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene22.cpp | 4 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene23.cpp | 184 |
3 files changed, 198 insertions, 2 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 4a285e77ef..8d2941e738 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -784,12 +784,24 @@ namespace Fullpipe { #define ANI_INV_LEVERHANDLE 1777 #define ANI_LUK23_D 1813 #define ANI_LUK23_U 1817 +#define MSG_SC23_CLICKBTN1 1736 +#define MSG_SC23_CLICKBTN2 1737 +#define MSG_SC23_CLICKBTN3 1738 +#define MSG_SC23_CLICKBTN4 1739 +#define MSG_SC23_FROMSTOOL 3339 +#define MSG_SC23_HIDEGIRAFFEE 4650 +#define MSG_SC23_ONSTOOL 3334 +#define MSG_SC23_SPINWHEEL1 1740 +#define MSG_SC23_SPINWHEEL2 1741 +#define MSG_SC23_SPINWHEEL3 1742 +#define MSG_SC23_SPINWHEEL4 1743 #define PIC_SC23_BOXCLOSED 1728 #define PIC_SC23_BOXOPEN 1723 #define PIC_SC23_BTN1 1729 #define PIC_SC23_BTN2 1730 #define PIC_SC23_BTN3 1731 #define PIC_SC23_BTN4 1732 +#define PIC_SC23_LADDER 1628 #define PIC_SC23_LADDERU 3411 #define QU_GRFU_TURN_UD 1664 #define QU_GRFU_TURN_UL 1662 diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp index 2f8bb260be..657fe12ce1 100644 --- a/engines/fullpipe/scenes/scene22.cpp +++ b/engines/fullpipe/scenes/scene22.cpp @@ -104,7 +104,7 @@ void sceneHandler22_showStool() { chainQueue(QU_SC22_SHOWSTOOL, 0); } -void sceneHandler22and23_hideStool() { +void sceneHandler22_hideStool() { g_fp->_currentScene->getStaticANIObject1ById(ANI_TABURETTE, -1)->hide(); } @@ -312,7 +312,7 @@ int sceneHandler22(ExCommand *cmd) { break; case MSG_SC22_HIDESTOOL: - sceneHandler22and23_hideStool(); + sceneHandler22_hideStool(); break; case MSG_SC22_FROMSTOOL: diff --git a/engines/fullpipe/scenes/scene23.cpp b/engines/fullpipe/scenes/scene23.cpp index f381e1db39..161b38b2e4 100644 --- a/engines/fullpipe/scenes/scene23.cpp +++ b/engines/fullpipe/scenes/scene23.cpp @@ -159,4 +159,188 @@ int scene23_updateCursor() { return g_fp->_cursorId; } +void sceneHandler23_showStool() { + warning("STUB: sceneHandler23_showStool()"); +} + +void sceneHandler23_hideStool() { + g_fp->_currentScene->getStaticANIObject1ById(ANI_TABURETTE, -1)->hide(); +} + +void sceneHandler23_spinWheel1() { + warning("STUB: sceneHandler23_spinWheel1()"); +} + +void sceneHandler23_spinWheel2() { + warning("STUB: sceneHandler23_spinWheel2()"); +} + +void sceneHandler23_spinWheel3() { + warning("STUB: sceneHandler23_spinWheel3()"); +} + +void sceneHandler23_spinWheel4() { + warning("STUB: sceneHandler23_spinWheel4()"); +} + +void sceneHandler23_pushButton(ExCommand *cmd) { + warning("STUB: sceneHandler23_pushButton(cmd)"); +} + +void sceneHandler23_sendClick(StaticANIObject *ani) { + warning("STUB: sceneHandler23_sendClick(ani)"); +} + +void sceneHandler23_checkReachingTop() { + warning("STUB: sceneHandler23_checkReachingTop()"); +} + +void sceneHandler23_exitCalendar() { + warning("STUB: sceneHandler23_exitCalendar()"); +} + +void sceneHandler23_lowerFromCalendar(ExCommand *cmd) { + warning("STUB: sceneHandler23_lowerFromCalendar(cmd)"); +} + +void sceneHandler23_fromStool(ExCommand *cmd) { + warning("STUB: sceneHandler23_fromStool(cmd)"); +} + +int sceneHandler23(ExCommand *cmd) { + if (cmd->_messageKind != 17) + return 0; + + switch (cmd->_messageNum) { + case MSG_SC23_FROMSTOOL: + g_vars->scene23_var06 = 0; + + getCurrSceneSc2MotionController()->setEnabled(); + getGameLoaderInteractionController()->enableFlag24(); + + g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1); + break; + + case MSG_SC23_HIDEGIRAFFEE: + g_vars->scene23_giraffee->queueMessageQueue(0); + g_vars->scene23_giraffee->_flags &= 0xFFFB; + break; + + case MSG_SC23_ONSTOOL: + g_vars->scene23_var06 = 1; + + getCurrSceneSc2MotionController()->clearEnabled(); + getGameLoaderInteractionController()->disableFlag24(); + + g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 0); + break; + + case MSG_SC22_SHOWSTOOL: + sceneHandler23_showStool(); + break; + + case MSG_SC22_HIDESTOOL: + sceneHandler23_hideStool(); + break; + + case MSG_SC23_SPINWHEEL1: + sceneHandler23_spinWheel1(); + break; + + case MSG_SC23_SPINWHEEL2: + sceneHandler23_spinWheel2(); + break; + + case MSG_SC23_SPINWHEEL3: + sceneHandler23_spinWheel3(); + break; + + case MSG_SC23_SPINWHEEL4: + sceneHandler23_spinWheel4(); + break; + + case MSG_SC23_CLICKBTN1: + case MSG_SC23_CLICKBTN2: + case MSG_SC23_CLICKBTN3: + case MSG_SC23_CLICKBTN4: + sceneHandler23_pushButton(cmd); + break; + + case 33: + if (g_fp->_aniMan2) { + int x = g_fp->_aniMan2->_ox; + + if (x < g_fp->_sceneRect.left + g_vars->scene23_var01) + g_fp->_currentScene->_x = x - g_vars->scene23_var03 - g_fp->_sceneRect.left; + + if (x > g_fp->_sceneRect.right - g_vars->scene23_var01) + g_fp->_currentScene->_x = x + g_vars->scene23_var03 - g_fp->_sceneRect.right; + } + + g_fp->_floaters->update(); + g_fp->_behaviorManager->updateBehaviors(); + + g_fp->startSceneTrack(); + + break; + + case 29: + { + StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + int picId; + + if (ani && ani->_id == ANI_CALENDWHEEL) { + sceneHandler23_sendClick(ani); + cmd->_messageKind = 0; + } + + sceneHandler23_checkReachingTop(); + + if (g_vars->scene23_var05) { + picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + + if (picId == PIC_SC23_LADDER) { + sceneHandler23_exitCalendar(); + + cmd->_messageKind = 0; + break; + } + + if (cmd->_sceneClickY > 450) { + sceneHandler23_lowerFromCalendar(cmd); + + cmd->_messageKind = 0; + break; + } + break; + } + + if (!g_vars->scene23_var06) { + picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + + if (picId == PIC_SC23_LADDERU && !g_vars->scene23_var05) { + sceneHandler23_pushButton(cmd); + + cmd->_messageKind = 0; + break; + } + break; + } + + if (ani && ani->_id == ANI_HANDLE23) { + handleObjectInteraction(g_fp->_aniMan, ani, cmd->_keyCode); + cmd->_messageKind = 0; + } else { + sceneHandler23_fromStool(cmd); + + cmd->_messageKind = 0; + } + + break; + } + } + + return 0; +} + } // End of namespace Fullpipe |