From fe08d06c8a7c7ff689c12e2bc29c676a5e88505a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Dec 2013 00:31:41 +0200 Subject: FULLPIPE: Initial work on sceneHandler04_sub4() --- engines/fullpipe/scenes/scene04.cpp | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) 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()"); } -- cgit v1.2.3