aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-30 00:12:43 +0200
committerEugene Sandulenko2013-12-30 00:12:43 +0200
commita57e2428ecae767ac805e2264d54f0a74213fee5 (patch)
tree1c581ac96f5290997a339b9898b80aa3fd583467 /engines/fullpipe
parentec6da5a4503ea4bc773bdc2643578d5555d13c18 (diff)
downloadscummvm-rg350-a57e2428ecae767ac805e2264d54f0a74213fee5.tar.gz
scummvm-rg350-a57e2428ecae767ac805e2264d54f0a74213fee5.tar.bz2
scummvm-rg350-a57e2428ecae767ac805e2264d54f0a74213fee5.zip
FULLPIPE: Implement sceneHandler13_closeBridge()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/constants.h2
-rw-r--r--engines/fullpipe/scenes/scene13.cpp18
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() {