diff options
author | Eugene Sandulenko | 2014-01-02 00:30:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-02 00:48:34 +0200 |
commit | 0072cf1ce61638ea65380fbcb3a513e99f710bbf (patch) | |
tree | 983abb1784ea921b023ba55c3eb5ed032d67f944 | |
parent | 17d0be2fd1a635ca09b7b4bb7713e19b9c2dc099 (diff) | |
download | scummvm-rg350-0072cf1ce61638ea65380fbcb3a513e99f710bbf.tar.gz scummvm-rg350-0072cf1ce61638ea65380fbcb3a513e99f710bbf.tar.bz2 scummvm-rg350-0072cf1ce61638ea65380fbcb3a513e99f710bbf.zip |
FULLPIPE: Rename vars in scene17
-rw-r--r-- | engines/fullpipe/scenes.cpp | 14 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 14 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene17.cpp | 48 |
3 files changed, 32 insertions, 44 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 5a21543173..3d81e1b2a9 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -239,17 +239,13 @@ Vars::Vars() { scene16_sound = 0; scene16_placeIsOccupied = false; - scene17_var01 = 0; - scene17_var02 = 0; - scene17_var03 = 0; - scene17_var04 = 0; - scene17_var05 = 0; - scene17_var06 = 0; + scene17_flyState = 0; + scene17_sugarIsShown = false; scene17_var07 = 0; - scene17_var08 = 0; + scene17_flyCountdown = 0; scene17_hand = 0; - scene17_var09 = 0; - scene17_var10 = 0; + scene17_handPhase = false; + scene17_sceneEdgeX = 0; scene24_jetIsOn = false; scene24_flowIsLow = false; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 012cd209ee..0560813505 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -320,17 +320,13 @@ public: int scene16_sound; bool scene16_placeIsOccupied; - int scene17_var01; - int scene17_var02; - int scene17_var03; - int scene17_var04; - int scene17_var05; - int scene17_var06; + int scene17_flyState; + bool scene17_sugarIsShown; int scene17_var07; - int scene17_var08; + int scene17_flyCountdown; StaticANIObject *scene17_hand; - int scene17_var09; - int scene17_var10; + bool scene17_handPhase; + int scene17_sceneEdgeX; bool scene24_jetIsOn; bool scene24_flowIsLow; diff --git a/engines/fullpipe/scenes/scene17.cpp b/engines/fullpipe/scenes/scene17.cpp index 749d0d848d..11bf7f2875 100644 --- a/engines/fullpipe/scenes/scene17.cpp +++ b/engines/fullpipe/scenes/scene17.cpp @@ -37,14 +37,10 @@ namespace Fullpipe { void scene17_initScene(Scene *sc) { - g_vars->scene17_var01 = 200; - g_vars->scene17_var02 = 200; - g_vars->scene17_var03 = 300; - g_vars->scene17_var04 = 300; - g_vars->scene17_var05 = 1; - g_vars->scene17_var06 = 0; + g_vars->scene17_flyState = 1; + g_vars->scene17_sugarIsShown = false; g_vars->scene17_var07 = 0; - g_vars->scene17_var08 = 0; + g_vars->scene17_flyCountdown = 0; g_vars->scene17_hand = sc->getStaticANIObject1ById(ANI_HAND17, -1); } @@ -99,7 +95,7 @@ void sceneHandler17_hideSugar() { void sceneHandler17_showSugar() { chainQueue(QU_SC17_SHOWSUGAR, 0); - g_vars->scene17_var06 = 1; + g_vars->scene17_sugarIsShown = true; } void sceneHandler17_moonshineFill() { @@ -109,7 +105,7 @@ void sceneHandler17_moonshineFill() { moonshiner->changeStatics2(ST_SMG_SIT); chainObjQueue(moonshiner, QU_SMG_FILLBOTTLE, 1); - g_vars->scene17_var06 = 0; + g_vars->scene17_sugarIsShown = false; } } @@ -136,12 +132,12 @@ int sceneHandler17(ExCommand *cmd) { g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0); g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 0); - g_vars->scene17_var09 = 0; + g_vars->scene17_handPhase = false; } else { g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_ASK, 0); g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 1); - g_vars->scene17_var09 = 1; + g_vars->scene17_handPhase = true; } break; @@ -171,7 +167,7 @@ int sceneHandler17(ExCommand *cmd) { if (pic == PIC_SC17_RTRUBA2 || pic == PIC_SC17_RTRUBA) { if (cmd->_keyCode == ANI_INV_COIN || cmd->_keyCode == ANI_INV_BOOT || cmd->_keyCode == ANI_INV_HAMMER) { - if (g_vars->scene17_var09) { + if (g_vars->scene17_handPhase) { if (g_fp->_aniMan->isIdle()) { if (!(g_fp->_aniMan->_flags & 0x100)) { handleObjectInteraction(g_fp->_aniMan, g_vars->scene17_hand, cmd->_keyCode); @@ -186,32 +182,32 @@ int sceneHandler17(ExCommand *cmd) { case 33: { - int x = g_vars->scene17_var10; - g_vars->scene17_var07 = g_vars->scene17_var10; + int x = g_vars->scene17_sceneEdgeX; + g_vars->scene17_var07 = g_vars->scene17_sceneEdgeX; if (g_fp->_aniMan2) { x = g_fp->_aniMan2->_ox; - g_vars->scene17_var10 = x; + g_vars->scene17_sceneEdgeX = x; - if (x < g_fp->_sceneRect.left + g_vars->scene17_var01) { - g_fp->_currentScene->_x = x - g_vars->scene17_var03 - g_fp->_sceneRect.left; + if (x < g_fp->_sceneRect.left + 200) { + g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left; - x = g_vars->scene17_var10; + x = g_vars->scene17_sceneEdgeX; } - if (x > g_fp->_sceneRect.right - g_vars->scene17_var01) { - g_fp->_currentScene->_x = x + g_vars->scene17_var03 - g_fp->_sceneRect.right; - x = g_vars->scene17_var10; + if (x > g_fp->_sceneRect.right - 200) { + g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right; + x = g_vars->scene17_sceneEdgeX; } } - if (g_vars->scene17_var06) { + if (g_vars->scene17_sugarIsShown) { sceneHandler17_moonshineFill(); - x = g_vars->scene17_var10; + x = g_vars->scene17_sceneEdgeX; } - if (g_vars->scene17_var09) { + if (g_vars->scene17_handPhase) { if (g_vars->scene17_var07 < 410 && x >= 410) { g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_EMPTY, QU_HND17_TOCYCLE, 0); g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene17_hand, ST_HND17_ATTRACT, QU_HND17_ATTRACT, 0); @@ -223,9 +219,9 @@ int sceneHandler17(ExCommand *cmd) { } } - --g_vars->scene17_var08; + --g_vars->scene17_flyCountdown; - if (!g_vars->scene17_var08) + if (!g_vars->scene17_flyCountdown) sceneHandler17_updateFlies(); g_fp->_floaters->update(); |