aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-02 10:40:36 +0200
committerEugene Sandulenko2014-01-02 10:45:52 +0200
commite19530ce37abfefc91bbbe7182d38171b3e5b909 (patch)
treee3c2683ab92d43ec332399e86dccf33420711ad7 /engines/fullpipe
parentada85fbfcdf3013ef371b9f7df0b9ebe6cfaac8b (diff)
downloadscummvm-rg350-e19530ce37abfefc91bbbe7182d38171b3e5b909.tar.gz
scummvm-rg350-e19530ce37abfefc91bbbe7182d38171b3e5b909.tar.bz2
scummvm-rg350-e19530ce37abfefc91bbbe7182d38171b3e5b909.zip
FULLPIPE: Rename vars in scene21
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/scenes.cpp10
-rw-r--r--engines/fullpipe/scenes.h10
-rw-r--r--engines/fullpipe/scenes/scene21.cpp35
3 files changed, 21 insertions, 34 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index fcacb044c5..36ee8cc3e6 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -247,16 +247,12 @@ Vars::Vars() {
scene17_handPhase = false;
scene17_sceneEdgeX = 0;
- scene21_var01 = 0;
- scene21_var02 = 0;
- scene21_var03 = 0;
- scene21_var04 = 0;
scene21_giraffeBottom = 0;
scene21_giraffeBottomX = 0;
scene21_giraffeBottomY = 0;
- scene21_var05 = 0;
- scene21_var06 = 0.0;
- scene21_var07 = 0;
+ scene21_pipeIsOpen = false;
+ scene21_wigglePos = 0.0;
+ scene21_wiggleTrigger = 0;
scene24_jetIsOn = false;
scene24_flowIsLow = false;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index ee52f8c8d6..9313bf019c 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -333,16 +333,12 @@ public:
bool scene17_handPhase;
int scene17_sceneEdgeX;
- int scene21_var01;
- int scene21_var02;
- int scene21_var03;
- int scene21_var04;
StaticANIObject *scene21_giraffeBottom;
int scene21_giraffeBottomX;
int scene21_giraffeBottomY;
- int scene21_var05;
- double scene21_var06;
- int scene21_var07;
+ int scene21_pipeIsOpen;
+ double scene21_wigglePos;
+ bool scene21_wiggleTrigger;
bool scene24_jetIsOn;
bool scene24_flowIsLow;
diff --git a/engines/fullpipe/scenes/scene21.cpp b/engines/fullpipe/scenes/scene21.cpp
index 9b47fc5126..a915d76e53 100644
--- a/engines/fullpipe/scenes/scene21.cpp
+++ b/engines/fullpipe/scenes/scene21.cpp
@@ -37,11 +37,6 @@
namespace Fullpipe {
void scene21_initScene(Scene *sc) {
- g_vars->scene21_var01 = 200;
- g_vars->scene21_var02 = 200;
- g_vars->scene21_var03 = 300;
- g_vars->scene21_var04 = 300;
-
Scene *oldsc = g_fp->_currentScene;
g_vars->scene21_giraffeBottom = sc->getStaticANIObject1ById(ANI_GIRAFFE_BOTTOM, -1);
@@ -49,26 +44,26 @@ void scene21_initScene(Scene *sc) {
if (g_fp->getObjectState(sO_LowerPipe_21) == g_fp->getObjectEnumState(sO_LowerPipe_21, sO_IsOpened)) {
g_vars->scene21_giraffeBottom->changeStatics2(ST_GRFB_HANG);
- g_vars->scene21_var05 = 1;
- g_vars->scene21_var06 = 0.0;
+ g_vars->scene21_pipeIsOpen = true;
+ g_vars->scene21_wigglePos = 0.0;
g_vars->scene21_giraffeBottomX = g_vars->scene21_giraffeBottom->_ox;
g_vars->scene21_giraffeBottomY = g_vars->scene21_giraffeBottom->_oy;
- g_vars->scene21_var07 = 0;
+ g_vars->scene21_wiggleTrigger = false;
} else {
- g_vars->scene21_var05 = 0;
+ g_vars->scene21_pipeIsOpen = false;
}
g_fp->_currentScene = oldsc;
g_fp->initArcadeKeys("SC_21");
}
void sceneHandler21_doWiggle() {
- g_vars->scene21_giraffeBottom->setOXY((int)(cos(g_vars->scene21_var06) * 4.0) + g_vars->scene21_giraffeBottom->_ox,
+ g_vars->scene21_giraffeBottom->setOXY((int)(cos(g_vars->scene21_wigglePos) * 4.0) + g_vars->scene21_giraffeBottom->_ox,
g_vars->scene21_giraffeBottom->_oy);
- g_vars->scene21_var06 += 0.19635;
+ g_vars->scene21_wigglePos += 0.19635;
- if (g_vars->scene21_var06 > 6.2831853) {
- g_vars->scene21_var06 = 0;
+ if (g_vars->scene21_wigglePos > 6.2831853) {
+ g_vars->scene21_wigglePos = 0;
if (!g_vars->scene21_giraffeBottom->_movement)
g_vars->scene21_giraffeBottom->setOXY(g_vars->scene21_giraffeBottomX, g_vars->scene21_giraffeBottomY);
@@ -86,7 +81,7 @@ int sceneHandler21(ExCommand *cmd) {
g_vars->scene21_giraffeBottom->setOXY(g_vars->scene21_giraffeBottomX, g_vars->scene21_giraffeBottomY);
g_vars->scene21_giraffeBottom->changeStatics2(ST_GRFB_SIT);
- g_vars->scene21_var05 = 0;
+ g_vars->scene21_pipeIsOpen = false;
g_fp->setObjectState(sO_LowerPipe_21, g_fp->getObjectEnumState(sO_LowerPipe_21, sO_IsClosed));
}
@@ -116,20 +111,20 @@ int sceneHandler21(ExCommand *cmd) {
int x = g_fp->_aniMan2->_ox;
if (x <= g_fp->_sceneWidth - 460) {
- if (x < g_fp->_sceneRect.left + g_vars->scene21_var01)
- g_fp->_currentScene->_x = x - g_vars->scene21_var03 - g_fp->_sceneRect.left;
+ if (x < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left;
} else {
g_fp->_currentScene->_x = g_fp->_sceneWidth - x;
}
- if (x > g_fp->_sceneRect.right - g_vars->scene21_var01)
- g_fp->_currentScene->_x = x + g_vars->scene21_var03 - g_fp->_sceneRect.right;
+ if (x > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right;
}
- if (g_vars->scene21_var05 && !g_vars->scene21_var07)
+ if (g_vars->scene21_pipeIsOpen && !g_vars->scene21_wiggleTrigger)
sceneHandler21_doWiggle();
- g_vars->scene21_var07 = g_vars->scene21_var07 == 0;
+ g_vars->scene21_wiggleTrigger = !g_vars->scene21_wiggleTrigger;
g_fp->_behaviorManager->updateBehaviors();
g_fp->startSceneTrack();