aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-11 21:40:25 +0200
committerEugene Sandulenko2013-12-11 21:40:25 +0200
commitd39b2280f2bd4bc5b1dccb9f77b10b82479154e5 (patch)
tree2c1f4786ba3232deeab19bf038d7e63a3e5f7f12 /engines/fullpipe/scenes
parent2dac2599fe222751595b2c99e15ee297432f7704 (diff)
downloadscummvm-rg350-d39b2280f2bd4bc5b1dccb9f77b10b82479154e5.tar.gz
scummvm-rg350-d39b2280f2bd4bc5b1dccb9f77b10b82479154e5.tar.bz2
scummvm-rg350-d39b2280f2bd4bc5b1dccb9f77b10b82479154e5.zip
FULLPIPE: Simplify scene04_springWobble()
Diffstat (limited to 'engines/fullpipe/scenes')
-rw-r--r--engines/fullpipe/scenes/scene04.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index a797939a38..50061216a7 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -473,20 +473,14 @@ void sceneHandler04_springWobble() {
if (g_vars->scene04_bottleWeight < newdelta)
g_vars->scene04_var20--;
- if (oldDynIndex <= g_vars->scene04_bottleWeight) {
- if (newdelta <= g_vars->scene04_bottleWeight)
- goto LABEL_16;
- } else if (newdelta > g_vars->scene04_bottleWeight) {
- goto LABEL_16;
- }
-
- g_vars->scene04_var25++;
+ if ((oldDynIndex > g_vars->scene04_bottleWeight && newdelta > g_vars->scene04_bottleWeight) || newdelta <= g_vars->scene04_bottleWeight) {
+ g_vars->scene04_var25++;
- 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 / abs(g_vars->scene04_var20);
+ 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 / abs(g_vars->scene04_var20);
+ }
}
- LABEL_16:
Common::Point point;