diff options
author | Eugene Sandulenko | 2014-03-03 00:26:57 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-03-03 00:26:57 +0200 |
commit | 201f7a0f826f054986b4baa427f9ada710b2133e (patch) | |
tree | 67e872bbb6f6b85061d90322c09b8e067969a0f3 /engines | |
parent | 88f8e00773c5b929b5f92e46dd0b4e7e07836d36 (diff) | |
download | scummvm-rg350-201f7a0f826f054986b4baa427f9ada710b2133e.tar.gz scummvm-rg350-201f7a0f826f054986b4baa427f9ada710b2133e.tar.bz2 scummvm-rg350-201f7a0f826f054986b4baa427f9ada710b2133e.zip |
FULLPIPE: Implement true scene19_preload()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/gameloader.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 27 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene18and19.cpp | 12 |
4 files changed, 29 insertions, 14 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index bbcce2ef71..e172b9b0f2 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -282,7 +282,7 @@ bool preloadCallback(PreloadItem &pre, int flag) { g_fp->_scene3 = 0; } } else { - scene19_preload(g_fp->accessScene(pre.preloadId1), pre.keyCode); + scene19_setMovements(g_fp->accessScene(pre.preloadId1), pre.keyCode); g_vars->scene18_var01 = 1; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 352a8795f6..4f0b2bd91f 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -800,11 +800,13 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { sub_40E1B0(); sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_18"); scene->preloadMovements(sceneVar); - sub_4062D0(); - if (dword_476C38) + g_fp->stopAllSounds(); + + if (g_vars->scene18_var01) scene18_initScene1(scene); else scene18_initScene2(scene); + _behaviorManager->initBehavior(scene, sceneVar); scene->initObjectCursors("SC_18"); setSceneMusicParameters(sceneVar); @@ -813,27 +815,30 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { break; case SC_19: - if (!g_scene3) { - g_scene3 = accessScene(SC_18); + if (!g_fp->_scene3) { + g_fp->_scene3 = accessScene(SC_18); getGameLoader()->loadScene(SC_18); scene18_initScene2(g_scene3); - sub_40C5F0(); - scene19_sub_420B10(g_scene3, entrance->field_4); - dword_476C38 = 1; + scene18_preload(); + scene19_setMovements(g_scene3, entrance->field_4); + g_vars->scene18_var01 = 1; } - sub_40C650(); + + scene19_preload(); sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_19"); scene->preloadMovements(sceneVar); - sub_4062D0(); - if (dword_476C38) + g_fp->stopAllSounds(); + + if (g_vars->scene18_var01) scene18_initScene1(scene); else scene19_initScene2(); + _behaviorManager->initBehavior(scene, sceneVar); scene->initObjectCursors("SC_19"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler19, 2); - scene19_sub_4211D0(scene); + scene19_setSugarState(scene); _updateCursorCallback = scene19_updateCursor; break; #endif diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 0a4af9c2ea..6a74538f0c 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -110,7 +110,7 @@ int sceneHandler17(ExCommand *cmd); int scene17_updateCursor(); void scene18_preload(); -void scene19_preload(Scene *sc, int key); +void scene19_setMovements(Scene *sc, int key); void scene20_initScene(Scene *sc); int sceneHandler20(ExCommand *ex); diff --git a/engines/fullpipe/scenes/scene18and19.cpp b/engines/fullpipe/scenes/scene18and19.cpp index d2fb8d43ce..10164933fd 100644 --- a/engines/fullpipe/scenes/scene18and19.cpp +++ b/engines/fullpipe/scenes/scene18and19.cpp @@ -63,7 +63,7 @@ void scene18_preload() { } } -void scene19_preload(Scene *sc, int entranceId) { +void scene19_setMovements(Scene *sc, int entranceId) { if (entranceId == TrubaRight) { g_vars->scene18_var15 = 1; } else { @@ -107,6 +107,16 @@ void scene19_preload(Scene *sc, int entranceId) { sc->stopAllSounds(); } +void scene19_preload() { + for (SceneTagList::iterator s = g_fp->_gameProject->_sceneTagList->begin(); s != g_fp->_gameProject->_sceneTagList->end(); ++s) { + if (s->_sceneId == SC_18) { + s->_scene = g_fp->_scene3; + + break; + } + } +} + void scene18_sub2(StaticANIObject *ani, Scene *sc) { warning("WARNING: scene18_sub2()"); } |