aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-09 00:31:41 +0200
committerEugene Sandulenko2013-12-09 00:32:43 +0200
commitfe08d06c8a7c7ff689c12e2bc29c676a5e88505a (patch)
tree6a0c1831200f83a745b7752ab97e918153879d1c
parent21aba3a26e26765d395ddb1ea5e1ef02b0e6f5c7 (diff)
downloadscummvm-rg350-fe08d06c8a7c7ff689c12e2bc29c676a5e88505a.tar.gz
scummvm-rg350-fe08d06c8a7c7ff689c12e2bc29c676a5e88505a.tar.bz2
scummvm-rg350-fe08d06c8a7c7ff689c12e2bc29c676a5e88505a.zip
FULLPIPE: Initial work on sceneHandler04_sub4()
-rw-r--r--engines/fullpipe/scenes/scene04.cpp67
1 files changed, 67 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 21e7b23d33..3c2c02298a 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -442,6 +442,73 @@ void sceneHandler04_walkKozyawka() {
}
void sceneHandler04_sub4() {
+#if 0
+ int var20 = g_vars->scene04_var20;
+ int oldDynIndex = g_vars->scene04_dynamicPhaseIndex;
+ v2 = g_vars->scene04_var20 + g_vars->scene04_dynamicPhaseIndex;
+ g_vars->scene04_dynamicPhaseIndex += g_vars->scene04_var20;
+
+ if (g_vars->scene04_var20 + g_vars->scene04_dynamicPhaseIndex < 0) {
+ v2 = 0;
+ var20 = 0;
+ g_vars->scene04_dynamicPhaseIndex = 0;
+ g_vars->scene04_var20 = 0;
+ }
+
+ if (v2 > 14) {
+ v2 = 14;
+ var20 = 0;
+ g_vars->scene04_dynamicPhaseIndex = 14;
+ g_vars->scene04_var20 = 0;
+ }
+
+ v4 = __OFSUB__(g_vars->scene04_var06, v2);
+ v3 = g_vars->scene04_var06 - v2 < 0;
+
+ if (g_vars->scene04_var06 > v2) {
+ ++var20;
+ v4 = __OFSUB__(g_vars->scene04_var06, v2);
+ v3 = g_vars->scene04_var06 - v2 < 0;
+ g_vars->scene04_var20 = var20;
+ }
+
+ if (v3 ^ v4) {
+ --var20;
+ g_vars->scene04_var20 = var20;
+ }
+
+ if (oldDynIndex <= g_vars->scene04_var06)
+ if (v2 <= g_vars->scene04_var06)
+ goto LABEL_16;
+ } else if (v2 > g_vars->scene04_var06) {
+ goto LABEL_16;
+ }
+
+ g_vars->scene04_var25++;
+
+ if (var20 && g_vars->scene04_var25 > 1) {
+ g_vars->scene04_var25 = 0;
+ g_vars->scene04_var20--;
+ }
+ LABEL_16:
+
+ Common::Point point;
+
+ int curdelta = g_vars->scene04_spring->getCurrDimensions(&point)->y - g_vars->scene04_dynamicPhaseIndex;
+
+ if (g_vars->scene04_dynamicPhaseIndex) {
+ if (!g_vars->scene04_spring->_movement)
+ g_vars->scene04_spring->startAnim(MV_SPR_LOWER, 0, -1);
+
+ g_vars->scene04_spring->_movement->setDynamicPhaseIndex(g_vars->scene04_dynamicPhaseIndex);
+ } else {
+ g_vars->scene04_spring->changeStatics2(ST_SPR_UP);
+ }
+
+ if (g_vars->scene04_dynamicPhaseIndex != oldDynIndex)
+ sceneHandler04_bottleUpdateObjects(curdelta - (g_vars->scene04_spring->getCurrDimensions(&point)->y - g_vars->scene04_dynamicPhaseIndex));
+#endif
+
warning("STUB: sceneHandler04_sub4()");
}