diff options
author | Eugene Sandulenko | 2013-11-04 00:28:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-11-04 00:30:00 +0200 |
commit | 6c7c8215e30f4e67e2dbe0922e843201f055cfa0 (patch) | |
tree | 3a152bea03228a8e4682cff806c75b4131ca4a3e /engines/fullpipe/scenes.cpp | |
parent | 7da5c8c514ae0bd62dd96fdd30e9a3db5bc9eca9 (diff) | |
download | scummvm-rg350-6c7c8215e30f4e67e2dbe0922e843201f055cfa0.tar.gz scummvm-rg350-6c7c8215e30f4e67e2dbe0922e843201f055cfa0.tar.bz2 scummvm-rg350-6c7c8215e30f4e67e2dbe0922e843201f055cfa0.zip |
FULLPIPE: Started implementing scene 3
Diffstat (limited to 'engines/fullpipe/scenes.cpp')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 1793ffdc3a..fdc28e8092 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -53,6 +53,11 @@ void scene01_fixEntrance(); void scene01_initScene(Scene *sc, int entrance); int sceneHandler01(ExCommand *cmd); +void scene03_setEaterState(); +int scene03_updateCursor(); +void scene03_initScene(Scene *sc); +int sceneHandler03(ExCommand *cmd); + void sceneDbgMenu_initScene(Scene *sc); int sceneHandlerDbgMenu(ExCommand *cmd); @@ -71,6 +76,9 @@ Vars::Vars() { scene01_picSc01Osk = 0; scene01_picSc01Osk2 = 0; + scene03_eggeater = 0; + scene03_domino = 0; + selector = 0; } @@ -210,6 +218,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { addMessageHandler(sceneHandler02, 2); _updateCursorCallback = defaultUpdateCursor; break; +#endif case SC_3: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_3"); @@ -219,10 +228,11 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_3"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler03, 2); - j_Scene_sc03_sub_40F160(scene); + scene03_setEaterState(); _updateCursorCallback = scene03_updateCursor; break; +#if 0 case SC_4: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_4"); scene->preloadMovements(sceneVar); @@ -1384,7 +1394,7 @@ int MovGraph_messageHandler(ExCommand *cmd) { } int defaultUpdateCursor() { - g_fullpipe->updateCursorsCommon(); + g_fullpipe->updateCursorCommon(); return g_fullpipe->_cursorId; } @@ -1455,7 +1465,7 @@ int sceneHandlerIntro(ExCommand *ex) { return 0; case 33: - // fall trhough + // fall through break; default: @@ -1556,6 +1566,46 @@ int sceneHandler01(ExCommand *cmd) { return res; } +void scene03_initScene(Scene *sc) { + g_vars->scene03_eggeater = sc->getStaticANIObject1ById(ANI_EGGEATER, -1); + g_vars->scene03_domino = sc->getStaticANIObject1ById(ANI_DOMINO_3, -1); + + GameVar *v = g_fullpipe->_gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); + + g_vars->swallowedEgg1 = v->getSubVarByName(sO_Egg1); + g_vars->swallowedEgg2 = v->getSubVarByName(sO_Egg2); + g_vars->swallowedEgg3 = v->getSubVarByName(sO_Egg3); + + setElevatorButton(sO_Level2, ST_LBN_2N); + + g_fullpipe->lift_sub5(sc, QU_SC3_ENTERLIFT, QU_SC3_EXITLIFT); +} + +void scene03_setEaterState() { + if (g_fullpipe->getObjectState(sO_EggGulperGaveCoin) == g_fullpipe->getObjectEnumState(sO_EggGulperGaveCoin, sO_Yes)) { + g_fullpipe->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_SLIM, QU_EGTR_SLIMSHOW, 0); + g_fullpipe->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_MID1, QU_EGTR_MD1_SHOW, 0); + g_fullpipe->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_MID2, QU_EGTR_MD2_SHOW, 0); + } +} + +int scene03_updateCursor() { + g_fullpipe->updateCursorCommon(); + + if (g_fullpipe->_cursorId == PIC_CSR_DEFAULT && g_fullpipe->_objectIdAtCursor == PIC_SC3_DOMIN && g_vars->scene03_domino) { + if (g_vars->scene03_domino->_flags & 4) + g_fullpipe->_cursorId = PIC_CSR_ITN; + } + + return g_fullpipe->_cursorId; +} + +int sceneHandler03(ExCommand *ex) { + warning("STUB: sceneHandler03()"); + + return 0; +} + void sceneDbgMenu_initScene(Scene *sc) { g_vars->selector = sc->getPictureObjectById(PIC_SCD_SEL, 0); getGameLoaderInteractionController()->disableFlag24(); |