Skip to content

Commit

Permalink
FULLPIPE: Implement sceneHandler07()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Dec 19, 2013
1 parent 10763d0 commit db51567
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engines/fullpipe/constants.h
Expand Up @@ -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
Expand Down
78 changes: 78 additions & 0 deletions engines/fullpipe/scenes/scene07.cpp
Expand Up @@ -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 {

Expand All @@ -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

0 comments on commit db51567

Please sign in to comment.