aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-18 20:49:28 +0200
committerEugene Sandulenko2014-02-18 20:52:16 +0200
commitc998e83eb316a8841847e4c80a8d308f51f3d0fe (patch)
tree162a7e933fd44a2cb2fac460a55dae14b4cec9a5 /engines
parent1434940253f66a03d7a305f863efe0614c31aef8 (diff)
downloadscummvm-rg350-c998e83eb316a8841847e4c80a8d308f51f3d0fe.tar.gz
scummvm-rg350-c998e83eb316a8841847e4c80a8d308f51f3d0fe.tar.bz2
scummvm-rg350-c998e83eb316a8841847e4c80a8d308f51f3d0fe.zip
FULLPIPE: Implement sceneHandler09_cycleHangers()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/scenes/scene09.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 7666e87db2..1ad151a2de 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -309,7 +309,26 @@ void sceneHandler09_showBall() {
}
void sceneHandler09_cycleHangers() {
- warning("STUB: sceneHandler09_cycleHangers()");
+ for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {
+ Movement *mov = g_vars->scene09_hangers[i]->ani->_movement;
+
+ if (mov && mov->_id == MV_VSN_CYCLE2) {
+ int idx;
+
+ if (g_vars->scene09_hangers[i]->phase >= 0)
+ idx = 18 - g_vars->scene09_hangers[i]->phase / 5;
+ else
+ idx = 18 - g_vars->scene09_hangers[i]->phase * 10 / 43;
+
+ if (idx > 38)
+ idx = 38;
+
+ if (idx < 1)
+ idx = 1;
+
+ mov->setDynamicPhaseIndex(idx);
+ }
+ }
}
void sceneHandler09_limitHangerPhase() {