diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 433866fbe46e..f7e6f8480536 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -127,6 +127,12 @@ namespace Fullpipe { #define MSG_SC6_TAKEBALL 682 #define MSG_SC6_TESTNUMBALLS 2904 #define MSG_SC6_UTRUBACLICK 1105 +#define MSG_SC7_CLOSELUKE 822 +#define MSG_SC7_HIDEBOX 817 +#define MSG_SC7_HIDELUKE 821 +#define MSG_SC7_OPENLUKE 823 +#define MSG_SC7_PULL 2943 +#define MSG_SC7_SHOWBOX 816 #define MSG_GOTOLADDER 618 #define MSG_SHAKEBOTTLE 584 #define MSG_SHOOTKOZAW 557 diff --git a/engines/fullpipe/scenes/scene07.cpp b/engines/fullpipe/scenes/scene07.cpp index 037a2012495c..a5c83d1c67bc 100644 --- a/engines/fullpipe/scenes/scene07.cpp +++ b/engines/fullpipe/scenes/scene07.cpp @@ -28,6 +28,8 @@ #include "fullpipe/scenes.h" #include "fullpipe/scene.h" #include "fullpipe/statics.h" +#include "fullpipe/messages.h" +#include "fullpipe/behavior.h" namespace Fullpipe { @@ -52,4 +54,80 @@ void scene07_initScene(Scene *sc) { } } +void sceneHandler07_openLuke() { + warning("STUB: sceneHandler07_openLuke()"); +} + +void sceneHandler07_closeLuke() { + warning("STUB: sceneHandler07_closeLuke()"); +} + +void sceneHandler07_hideLuke() { + warning("STUB: sceneHandler07_hideLuke()"); +} + +void sceneHandler07_showBox() { + warning("STUB: sceneHandler07_showBox()"); +} + +void sceneHandler07_hideBox() { + warning("STUB: sceneHandler07_hideBox()"); +} + +int sceneHandler07(ExCommand *ex) { + if (ex->_messageKind != 17) + return 0; + + switch(ex->_messageNum) { + case MSG_SC7_OPENLUKE: + sceneHandler07_openLuke(); + break; + + case MSG_SC7_PULL: + if (g_vars->scene07_plusMinus->_statics->_staticsId == ST_PMS_MINUS) + g_vars->scene07_plusMinus->_statics = g_vars->scene07_plusMinus->getStaticsById(ST_PMS_PLUS); + else + g_vars->scene07_plusMinus->_statics = g_vars->scene07_plusMinus->getStaticsById(ST_PMS_MINUS); + + break; + + case MSG_SC7_CLOSELUKE: + sceneHandler07_closeLuke(); + break; + + case MSG_SC7_HIDELUKE: + sceneHandler07_hideLuke(); + break; + + case MSG_SC7_SHOWBOX: + sceneHandler07_showBox(); + break; + + case MSG_SC7_HIDEBOX: + sceneHandler07_hideBox(); + break; + + case 33: + { + int res = 0; + + if (g_fullpipe->_aniMan2) { + if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200) + g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300; + + if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200) + g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300; + + res = 1; + } + + g_fullpipe->_behaviorManager->updateBehaviors(); + + return res; + } + } + + return 0; +} + } // End of namespace Fullpipe