diff options
author | Eugene Sandulenko | 2013-12-11 14:10:04 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-11 14:10:04 +0200 |
commit | 8626ef3d3e854bb1f4e79c3d1413fb9ef7003c51 (patch) | |
tree | 24bd15816c9bda6c8a247f1b05913dd6950be09d | |
parent | 693d5e662595f60eed41feb5254a28bbd318094e (diff) | |
download | scummvm-rg350-8626ef3d3e854bb1f4e79c3d1413fb9ef7003c51.tar.gz scummvm-rg350-8626ef3d3e854bb1f4e79c3d1413fb9ef7003c51.tar.bz2 scummvm-rg350-8626ef3d3e854bb1f4e79c3d1413fb9ef7003c51.zip |
FULLPIPE: Bugfix sceneHandler04_springWobble()
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 5e3429be55..81b9a2000e 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -449,34 +449,34 @@ void sceneHandler04_bottleUpdateObjects(int off) { } } -void sceneHandler04_sub4() { +void sceneHandler04_springWobble() { int oldDynIndex = g_vars->scene04_dynamicPhaseIndex; - int v2 = g_vars->scene04_var20 + g_vars->scene04_dynamicPhaseIndex; + int newdelta = 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; + if (newdelta < 0) { + newdelta = 0; g_vars->scene04_dynamicPhaseIndex = 0; g_vars->scene04_var20 = 0; } - if (v2 > 14) { - v2 = 14; + if (newdelta > 14) { + newdelta = 14; g_vars->scene04_dynamicPhaseIndex = 14; g_vars->scene04_var20 = 0; } - if (g_vars->scene04_var06 > v2) + if (g_vars->scene04_var06 > newdelta) g_vars->scene04_var20++; - if (g_vars->scene04_var06 < v2) + if (g_vars->scene04_var06 < newdelta) g_vars->scene04_var20--; if (oldDynIndex <= g_vars->scene04_var06) { - if (v2 <= g_vars->scene04_var06) + if (newdelta <= g_vars->scene04_var06) goto LABEL_16; - } else if (v2 > g_vars->scene04_var06) { + } else if (newdelta > g_vars->scene04_var06) { goto LABEL_16; } @@ -484,7 +484,7 @@ void sceneHandler04_sub4() { if (g_vars->scene04_var20 && g_vars->scene04_var25 > 1) { g_vars->scene04_var25 = 0; - g_vars->scene04_var20--; + g_vars->scene04_var20 = g_vars->scene04_var20 - g_vars->scene04_var20 / abs(g_vars->scene04_var20); } LABEL_16: @@ -813,7 +813,7 @@ int sceneHandler04(ExCommand *ex) { g_fullpipe->_aniMan2 = g_fullpipe->_aniMan; } - sceneHandler04_sub4(); + sceneHandler04_springWobble(); if (g_vars->scene04_var07 && !g_vars->scene04_var09) sceneHandler04_sub5(); |