diff options
author | Eugene Sandulenko | 2013-12-31 00:15:48 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-31 00:15:48 +0200 |
commit | bfc5e7aa9f236da7fc7ca4b53030fe28b6b7486f (patch) | |
tree | 17b7c51334a922f5c4541c9001c91a81693cd555 /engines/fullpipe | |
parent | 574707f9dd65870e07daff42b015da8aa38f6b39 (diff) | |
download | scummvm-rg350-bfc5e7aa9f236da7fc7ca4b53030fe28b6b7486f.tar.gz scummvm-rg350-bfc5e7aa9f236da7fc7ca4b53030fe28b6b7486f.tar.bz2 scummvm-rg350-bfc5e7aa9f236da7fc7ca4b53030fe28b6b7486f.zip |
FULLPIPE: Implement sceneHandler14()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/constants.h | 16 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 6 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 6 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene14.cpp | 298 |
4 files changed, 326 insertions, 0 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index d6e97ab79a..1b0808eccc 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -581,6 +581,22 @@ namespace Fullpipe { // Scene 14 #define ANI_BALL14 1246 #define ANI_GRANDMA 1227 +#define MSG_SC14_ENDARCADE 3250 +#define MSG_SC14_GMAJUMP 1250 +#define MSG_SC14_GMATOTRUBA 3249 +#define MSG_SC14_HIDEBALLLAST 3251 +#define MSG_SC14_HIDEPINK 3248 +#define MSG_SC14_MANKICKBALL 1257 +#define MSG_SC14_RESTORESCROLL 4769 +#define MSG_SC14_SCROLLLEFT 4768 +#define MSG_SC14_SHOWBALLFLY 1253 +#define MSG_SC14_SHOWBALLGMADIVE 1260 +#define MSG_SC14_SHOWBALLGMAHIT 1259 +#define MSG_SC14_SHOWBALLGMAHIT2 3245 +#define MSG_SC14_SHOWBALLLAST 3246 +#define MSG_SC14_SHOWBALLMAN 1254 +#define MSG_SC14_STARTARCADE 3252 +#define MV_MAN14_KICK 1237 #define QU_SC14_ENTERLIFT 1225 #define QU_SC14_EXITLIFT 1226 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index b06d78c767..3c27e08e96 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -212,6 +212,12 @@ Vars::Vars() { scene14_var11.clear(); scene14_var12.clear(); scene14_var13 = 0; + scene14_var14 = 0; + scene14_var15 = 0; + scene14_var16 = 0; + scene14_var17 = 0; + scene14_var18 = 0; + scene14_var19 = 0; scene15_chantingCountdown = 0; scene15_plusminus = 0; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index ea0c8e2dad..71d98ae3e5 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -283,6 +283,12 @@ public: Common::List<StaticANIObject *> scene14_var11; Common::List<StaticANIObject *> scene14_var12; int scene14_var13; + int scene14_var14; + int scene14_var15; + int scene14_var16; + int scene14_var17; + int scene14_var18; + int scene14_var19; int scene15_chantingCountdown; StaticANIObject *scene15_plusminus; diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp index b0ad307917..6bdf4d7fd6 100644 --- a/engines/fullpipe/scenes/scene14.cpp +++ b/engines/fullpipe/scenes/scene14.cpp @@ -106,4 +106,302 @@ int scene14_updateCursor() { return g_fp->_cursorId; } +void sceneHandler14_showBallGrandmaHit2() { + warning("STUB: sceneHandler14_showBallGrandmaHit2()"); +} + +void sceneHandler14_showBallGrandmaDive() { + warning("STUB: sceneHandler14_showBallGrandmaDive()"); +} + +void sceneHandler14_showBallGrandmaHit() { + warning("STUB: sceneHandler14_showBallGrandmaHit()"); +} + +void sceneHandler14_showBallMan() { + warning("STUB: sceneHandler14_showBallMan()"); +} + +void sceneHandler14_manKickBall() { + warning("STUB: sceneHandler14_manKickBall()"); +} + +void sceneHandler14_showBallFly() { + warning("STUB: sceneHandler14_showBallFly()"); +} + +void sceneHandler14_grandmaJump() { + warning("STUB: sceneHandler14_grandmaJump()"); +} + +void sceneHandler14_winArcade() { + warning("STUB: sceneHandler14_winArcade()"); +} + +void sceneHandler14_showBallLast() { + warning("STUB: sceneHandler14_showBallLast()"); +} + +void sceneHandler14_hideBallLast() { + warning("STUB: sceneHandler14_hideBallLast()"); +} + +void sceneHandler14_startArcade() { + warning("STUB: sceneHandler14_startArcade()"); +} + +void sceneHandler14_endArcade() { + warning("STUB: sceneHandler14_endArcade()"); +} + +void sceneHandler14_sub01() { + warning("STUB: sceneHandler14_sub01()"); +} + +void sceneHandler14_sub02() { + warning("STUB: sceneHandler14_sub02()"); +} + +void sceneHandler14_sub03() { + warning("STUB: sceneHandler14_sub03()"); +} + +bool sceneHandler14_sub04(ExCommand *cmd) { + warning("STUB: sceneHandler14_sub04()"); + + return false; +} + +void sceneHandler14_sub05() { + warning("STUB: sceneHandler14_sub05()"); +} + +void sceneHandler14_sub06() { + warning("STUB: sceneHandler14_sub06()"); +} + +void sceneHandler14_sub07() { + warning("STUB: sceneHandler14_sub07()"); +} + +void sceneHandler14_sub08() { + warning("STUB: sceneHandler14_sub08()"); +} + +void sceneHandler14_sub09() { + warning("STUB: sceneHandler14_sub09()"); +} + +void sceneHandler14_sub10() { + warning("STUB: sceneHandler14_sub10()"); +} + +void sceneHandler14_sub11() { + warning("STUB: sceneHandler14_sub11()"); +} + +void sceneHandler14_sub12() { + warning("STUB: sceneHandler14_sub12()"); +} + +void sceneHandler14_sub13() { + warning("STUB: sceneHandler14_sub13()"); +} + +int sceneHandler14(ExCommand *cmd) { + if (cmd->_messageKind != 17) + return 0; + + switch(cmd->_messageNum) { + case MSG_SC14_SHOWBALLGMAHIT2: + sceneHandler14_showBallGrandmaHit2(); + break; + + case MSG_SC14_SHOWBALLGMADIVE: + sceneHandler14_showBallGrandmaDive(); + break; + + case MSG_LIFT_CLICKBUTTON: + g_fp->lift_animation3(); + break; + + case MSG_SC14_SHOWBALLGMAHIT: + sceneHandler14_showBallGrandmaHit(); + break; + + case MSG_SC14_SHOWBALLMAN: + sceneHandler14_showBallMan(); + break; + + case MSG_SC14_MANKICKBALL: + sceneHandler14_manKickBall(); + break; + + case MSG_SC14_SHOWBALLFLY: + sceneHandler14_showBallFly(); + break; + + case MSG_LIFT_GO: + g_fp->lift_goAnimation(); + break; + + case MSG_SC14_GMAJUMP: + sceneHandler14_grandmaJump(); + break; + + case MSG_LIFT_CLOSEDOOR: + g_fp->lift_closedoorSeq(); + break; + + case MSG_LIFT_EXITLIFT: + g_fp->lift_exitSeq(cmd); + break; + + case MSG_LIFT_STARTEXITQUEUE: + g_fp->lift_startExitQueue(); + break; + + case MSG_SC14_RESTORESCROLL: + g_fp->_aniMan2 = g_fp->_aniMan; + g_fp->_scrollSpeed = 8; + break; + + case MSG_CMN_WINARCADE: + sceneHandler14_winArcade(); + break; + + case MSG_SC14_SCROLLLEFT: + g_fp->_aniMan2 = 0; + g_fp->_currentScene->_x = -g_fp->_sceneRect.left; + g_fp->_scrollSpeed = 24; + break; + + case MSG_SC14_SHOWBALLLAST: + sceneHandler14_showBallLast(); + break; + + case MSG_SC14_HIDEBALLLAST: + sceneHandler14_hideBallLast(); + break; + + case MSG_SC14_HIDEPINK: + if (!g_vars->scene14_pink) + break; + + g_vars->scene14_pink->hide(); + break; + + case MSG_SC14_GMATOTRUBA: + g_fp->_currentScene->_x = -g_fp->_sceneRect.left; + break; + + case MSG_SC14_STARTARCADE: + sceneHandler14_startArcade(); + break; + + case MSG_SC14_ENDARCADE: + sceneHandler14_endArcade(); + + g_vars->scene14_var13 = 0; + break; + + case 64: + g_fp->lift_sub05(cmd); + break; + + case 33: + { + Movement *mov = g_fp->_aniMan->_movement; + + if (mov) { + g_vars->scene14_var14 = mov->_ox; + g_vars->scene14_var15 = mov->_oy; + + if (mov->_id == MV_MAN14_KICK) + g_vars->scene14_var14 = mov->_ox + 2 * g_fp->_aniMan->_movement->_currDynamicPhaseIndex; + } else { + g_vars->scene14_var14 = g_fp->_aniMan->_ox; + g_vars->scene14_var15 = g_fp->_aniMan->_oy; + } + + mov = g_vars->scene14_grandma->_movement; + if (mov) { + g_vars->scene14_var16 = mov->_ox; + g_vars->scene14_var17 = mov->_oy; + } else { + g_vars->scene14_var16 = g_vars->scene14_grandma->_ox; + g_vars->scene14_var17 = g_vars->scene14_grandma->_oy; + } + + if (g_fp->_aniMan2) { + int x = g_fp->_aniMan2->_ox; + g_vars->scene14_var18 = x; + g_vars->scene14_var19 = g_fp->_aniMan2->_oy; + + if (x < g_fp->_sceneRect.left + g_vars->scene14_var01) { + g_fp->_currentScene->_x = x - g_vars->scene14_var07 - g_fp->_sceneRect.left; + x = g_vars->scene14_var18; + } + + if (x > g_fp->_sceneRect.right - g_vars->scene14_var01) + g_fp->_currentScene->_x = x + g_vars->scene14_var07 - g_fp->_sceneRect.right; + } + + if (g_vars->scene14_var05) + sceneHandler14_sub01(); + + g_fp->_behaviorManager->updateBehaviors(); + g_fp->startSceneTrack(); + break; + } + + case 30: + if (g_vars->scene14_var04) { + sceneHandler14_sub02(); + break; + } + + if (!g_vars->scene14_var03) { + break; + } + break; + + case 29: + if (g_vars->scene14_var03) { + int pixel; + + if (g_vars->scene14_var06 && g_fp->_aniMan->getPixelAtPos(cmd->_sceneClickX, cmd->_sceneClickY, &pixel) && !g_fp->_aniMan->_movement) { + sceneHandler14_sub03(); + break; + } + } else { + StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + + if (ani && ani->_id == ANI_LIFTBUTTON) { + g_fp->lift_sub1(ani); + cmd->_messageKind = 0; + break; + } + + if (!sceneHandler14_sub04(cmd) && (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_keyCode))) { + int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + + PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0); + + if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_keyCode)) { + if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1) + || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) { + g_fp->processArcade(cmd); + sceneHandler14_sub04(cmd); + break; + } + } + } + } + break; + } + + return 0; +} + } // End of namespace Fullpipe |