diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/constants.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene13.cpp | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index c51db8a3a4..6cb507c288 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -549,6 +549,8 @@ namespace Fullpipe { #define MSG_SC13_TESTOPEN 3048 #define MSG_SC13_UNEATGUM 1218 #define MSG_SC13_UPDATEBRIDGE 1217 +#define MV_BDG_CLOSE 1382 +#define MV_BDG_OPEN 1379 #define MV_WHR13_SPIN 1384 #define SND_13_018 3763 #define SND_13_037 5335 diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp index 29e635a815..d46f73b5e5 100644 --- a/engines/fullpipe/scenes/scene13.cpp +++ b/engines/fullpipe/scenes/scene13.cpp @@ -93,7 +93,23 @@ void sceneHandler13_testOpen() { } void sceneHandler13_closeBridge() { - warning("STUB: sceneHandler13_closeBridge()"); + if (g_vars->scene13_bridge->_movement && g_vars->scene13_bridge->_movement->_id == MV_BDG_OPEN) { + int sz; + + if (g_vars->scene13_bridge->_movement->_currMovement) + sz = g_vars->scene13_bridge->_movement->_currMovement->_dynamicPhases.size(); + else + sz = g_vars->scene13_bridge->_movement->_dynamicPhases.size(); + + int curIdx = g_vars->scene13_bridge->_movement->_currDynamicPhaseIndex; + + g_vars->scene13_bridge->changeStatics2(ST_BDG_OPEN2); + g_vars->scene13_bridge->startAnim(MV_BDG_CLOSE, 0, -1); + g_vars->scene13_bridge->_movement->setDynamicPhaseIndex(sz - curIdx); + } else { + g_vars->scene13_bridge->changeStatics2(ST_BDG_OPEN2); + g_vars->scene13_bridge->startAnim(MV_BDG_CLOSE, 0, -1); + } } void sceneHandler13_closeFast() { |