diff options
author | Eugene Sandulenko | 2014-01-18 13:49:19 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-18 13:49:19 +0200 |
commit | dc7fc449299e54a07da4fd0335abb9cdbe1db62d (patch) | |
tree | c9da024c5a79163c38f40f4f2ff1056018380bf7 /engines | |
parent | ce69278a48b5763270d14127bc74963627b3f4eb (diff) | |
download | scummvm-rg350-dc7fc449299e54a07da4fd0335abb9cdbe1db62d.tar.gz scummvm-rg350-dc7fc449299e54a07da4fd0335abb9cdbe1db62d.tar.bz2 scummvm-rg350-dc7fc449299e54a07da4fd0335abb9cdbe1db62d.zip |
FULLPIPE: Renames in scene37. This completes the scene
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 15 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 14 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene37.cpp | 104 |
3 files changed, 60 insertions, 73 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 95c5e985d9..c021a02d74 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -356,19 +356,14 @@ Vars::Vars() { scene36_rotohrust = 0; scene36_scissors = 0; - scene37_var01 = 0; - scene37_var02 = 0; - scene37_var03 = 0; - scene37_var04 = 0; - scene37_var05.clear(); - scene37_var06 = 0; - scene37_var07 = 0; + scene37_rings.clear(); + scene37_lastDudeX = -1; + scene37_cursorIsLocked = 0; scene37_plusMinus1 = 0; scene37_plusMinus2 = 0; scene37_plusMinus3 = 0; - scene37_var07 = 0; - scene37_var09 = 0; - scene37_var10 = 0; + scene37_soundFlipper = 0; + scene37_dudeX = 0; selector = 0; } diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 7c91f31813..61fb5b33ab 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -507,18 +507,14 @@ public: StaticANIObject *scene36_rotohrust; StaticANIObject *scene36_scissors; - int scene37_var01; - int scene37_var02; - int scene37_var03; - int scene37_var04; - Common::Array<Ring *> scene37_var05; - int scene37_var06; - int scene37_var07; + Common::Array<Ring *> scene37_rings; + int scene37_lastDudeX; + bool scene37_cursorIsLocked; StaticANIObject *scene37_plusMinus1; StaticANIObject *scene37_plusMinus2; StaticANIObject *scene37_plusMinus3; - int scene37_var09; - int scene37_var10; + int scene37_soundFlipper; + int scene37_dudeX; PictureObject *selector; }; diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp index 82cf5e4d79..d0135d737b 100644 --- a/engines/fullpipe/scenes/scene37.cpp +++ b/engines/fullpipe/scenes/scene37.cpp @@ -52,11 +52,7 @@ void scene37_initScene(Scene *sc) { Ring *ring; StaticANIObject *ani; - g_vars->scene37_var01 = 200; - g_vars->scene37_var02 = 200; - g_vars->scene37_var03 = 300; - g_vars->scene37_var04 = 300; - g_vars->scene37_var06 = -1; + g_vars->scene37_lastDudeX = -1; ring = new Ring(); ani = sc->getStaticANIObject1ById(ANI_GUARD_37, 0); @@ -68,7 +64,7 @@ void scene37_initScene(Scene *sc) { ring->subRings[1] = 4; ring->subRings[2] = 8; ring->state = false; - g_vars->scene37_var05.push_back(ring); + g_vars->scene37_rings.push_back(ring); ring = new Ring(); ani = sc->getStaticANIObject1ById(ANI_GUARD_37, 1); @@ -80,7 +76,7 @@ void scene37_initScene(Scene *sc) { ring->subRings[1] = 5; ring->subRings[2] = 9; ring->state = false; - g_vars->scene37_var05.push_back(ring); + g_vars->scene37_rings.push_back(ring); ring = new Ring(); ani = sc->getStaticANIObject1ById(ANI_GUARD_37, 2); @@ -92,7 +88,7 @@ void scene37_initScene(Scene *sc) { ring->subRings[1] = 7; ring->subRings[2] = 11; ring->state = false; - g_vars->scene37_var05.push_back(ring); + g_vars->scene37_rings.push_back(ring); g_fp->setObjectState(sO_LeftPipe_37, g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsClosed)); @@ -100,12 +96,12 @@ void scene37_initScene(Scene *sc) { g_fp->_currentScene = sc; - g_vars->scene37_var07 = 0; + g_vars->scene37_cursorIsLocked = false; g_vars->scene37_plusMinus1 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 1); - for (int i = 0; i < g_vars->scene37_var05[0]->numSubRings; i++) { - ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_var05[0]->subRings[i]); + for (int i = 0; i < g_vars->scene37_rings[0]->numSubRings; i++) { + ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[0]->subRings[i]); if (g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_On)) { g_vars->scene37_plusMinus1->_statics = g_vars->scene37_plusMinus1->getStaticsById(ST_PMS_PLUS); @@ -118,8 +114,8 @@ void scene37_initScene(Scene *sc) { g_vars->scene37_plusMinus2 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 2); - for (int i = 0; i < g_vars->scene37_var05[1]->numSubRings; i++) { - ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_var05[1]->subRings[i]); + for (int i = 0; i < g_vars->scene37_rings[1]->numSubRings; i++) { + ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[1]->subRings[i]); if (g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_On)) { g_vars->scene37_plusMinus2->_statics = g_vars->scene37_plusMinus2->getStaticsById(ST_PMS_PLUS); @@ -132,8 +128,8 @@ void scene37_initScene(Scene *sc) { g_vars->scene37_plusMinus3 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 3); - for (int i = 0; i < g_vars->scene37_var05[2]->numSubRings; i++) { - ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_var05[2]->subRings[i]); + for (int i = 0; i < g_vars->scene37_rings[2]->numSubRings; i++) { + ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[2]->subRings[i]); if (g_fp->getObjectState(sO_Guard_3) == g_fp->getObjectEnumState(sO_Guard_3, sO_On)) { g_vars->scene37_plusMinus3->_statics = g_vars->scene37_plusMinus3->getStaticsById(ST_PMS_PLUS); @@ -153,7 +149,7 @@ int scene37_updateCursor() { g_fp->updateCursorCommon(); if (g_fp->_cursorId == PIC_CSR_ITN && g_fp->_objectIdAtCursor == PIC_SC37_MASK) { - if (g_vars->scene37_var07) + if (g_vars->scene37_cursorIsLocked) g_fp->_cursorId = PIC_CSR_GOL; } @@ -161,14 +157,14 @@ int scene37_updateCursor() { } void sceneHandler37_updateRing(int ringNum) { - g_vars->scene37_var05[ringNum]->ani->changeStatics2(ST_GRD37_STAND); - g_vars->scene37_var05[ringNum]->ani->startAnim(MV_GRD37_PULL, 0, -1); - g_vars->scene37_var05[ringNum]->state = !g_vars->scene37_var05[ringNum]->state; + g_vars->scene37_rings[ringNum]->ani->changeStatics2(ST_GRD37_STAND); + g_vars->scene37_rings[ringNum]->ani->startAnim(MV_GRD37_PULL, 0, -1); + g_vars->scene37_rings[ringNum]->state = !g_vars->scene37_rings[ringNum]->state; StaticANIObject *ani; - for (int i = 0; i < g_vars->scene37_var05[ringNum]->numSubRings; i++) { - ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_var05[ringNum]->subRings[i]); + for (int i = 0; i < g_vars->scene37_rings[ringNum]->numSubRings; i++) { + ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[ringNum]->subRings[i]); if ((ani->_movement && ani->_movement->_id != MV_RNG_CLOSE) || ani->_statics->_staticsId != ST_RNG_CLOSED2) { ani->changeStatics2(ST_RNG_OPEN); @@ -179,20 +175,20 @@ void sceneHandler37_updateRing(int ringNum) { } } - g_vars->scene37_var07 = 1; + g_vars->scene37_cursorIsLocked = true; - for (int j = 0; j < g_vars->scene37_var05.size(); j++) { - for (int i = 0; i < g_vars->scene37_var05[ringNum]->numSubRings; i++) { - ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_var05[j]->subRings[i]); + for (int j = 0; j < g_vars->scene37_rings.size(); j++) { + for (int i = 0; i < g_vars->scene37_rings[ringNum]->numSubRings; i++) { + ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[j]->subRings[i]); if ((ani->_movement && ani->_movement->_id != MV_RNG_CLOSE) || ani->_statics->_staticsId != ST_RNG_CLOSED2) - g_vars->scene37_var07 = 0; + g_vars->scene37_cursorIsLocked = false; } } int state; - if (g_vars->scene37_var07) + if (g_vars->scene37_cursorIsLocked) state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsOpened); else state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsClosed); @@ -201,24 +197,24 @@ void sceneHandler37_updateRing(int ringNum) { } void sceneHandler37_setRingsState() { - if (g_vars->scene37_var06 == -1) { - g_vars->scene37_var06 = g_vars->scene37_var10; + if (g_vars->scene37_lastDudeX == -1) { + g_vars->scene37_lastDudeX = g_vars->scene37_dudeX; } else { - for (int i = 0; i < g_vars->scene37_var05.size(); i++) { - int x = g_vars->scene37_var05[i]->x; + for (int i = 0; i < g_vars->scene37_rings.size(); i++) { + int x = g_vars->scene37_rings[i]->x; - if (g_vars->scene37_var06 > x && g_vars->scene37_var10 <= x && !g_vars->scene37_var05[i]->state) + if (g_vars->scene37_lastDudeX > x && g_vars->scene37_dudeX <= x && !g_vars->scene37_rings[i]->state) sceneHandler37_updateRing(i); - x = g_vars->scene37_var05[i]->y; + x = g_vars->scene37_rings[i]->y; - if (g_vars->scene37_var06 < x && g_vars->scene37_var10 >= x) { - if (g_vars->scene37_var05[i]->state) + if (g_vars->scene37_lastDudeX < x && g_vars->scene37_dudeX >= x) { + if (g_vars->scene37_rings[i]->state) sceneHandler37_updateRing(i); } } - g_vars->scene37_var06 = g_vars->scene37_var10; + g_vars->scene37_lastDudeX = g_vars->scene37_dudeX; } } @@ -258,18 +254,18 @@ int sceneHandler37(ExCommand *cmd) { if (g_fp->_aniMan2) { int x = g_fp->_aniMan2->_ox; - g_vars->scene37_var10 = x; + g_vars->scene37_dudeX = x; if (x >= 500) { - if (x < g_fp->_sceneRect.left + g_vars->scene37_var01) - g_fp->_currentScene->_x = x - g_vars->scene37_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->_sceneRect.left; } - x = g_vars->scene37_var10; + x = g_vars->scene37_dudeX; - if (x > g_fp->_sceneRect.right - g_vars->scene37_var01) - g_fp->_currentScene->_x = x + g_vars->scene37_var03 - g_fp->_sceneRect.right; + if (x > g_fp->_sceneRect.right - 200) + g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right; } sceneHandler37_setRingsState(); @@ -277,38 +273,38 @@ int sceneHandler37(ExCommand *cmd) { g_fp->_behaviorManager->updateBehaviors(); g_fp->startSceneTrack(); - ++g_vars->scene37_var09; + ++g_vars->scene37_soundFlipper; break; case MSG_SC37_PULL: - if (g_vars->scene37_var05[0]->ani->_movement && g_vars->scene37_var05[0]->ani->_movement->_id == MV_GRD37_PULL) { - if ((g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_On) && !g_vars->scene37_var05[0]->state) - || (g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_Off) && g_vars->scene37_var05[0]->state)) { + if (g_vars->scene37_rings[0]->ani->_movement && g_vars->scene37_rings[0]->ani->_movement->_id == MV_GRD37_PULL) { + if ((g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_On) && !g_vars->scene37_rings[0]->state) + || (g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_Off) && g_vars->scene37_rings[0]->state)) { g_vars->scene37_plusMinus1->_statics = g_vars->scene37_plusMinus1->getStaticsById(ST_PMS_PLUS); } else { g_vars->scene37_plusMinus1->_statics = g_vars->scene37_plusMinus1->getStaticsById(ST_PMS_MINUS); } - } else if (g_vars->scene37_var05[1]->ani->_movement && g_vars->scene37_var05[1]->ani->_movement->_id == MV_GRD37_PULL) { - if ((g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_On) && !g_vars->scene37_var05[1]->state) - || (g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_Off) && g_vars->scene37_var05[1]->state)) { + } else if (g_vars->scene37_rings[1]->ani->_movement && g_vars->scene37_rings[1]->ani->_movement->_id == MV_GRD37_PULL) { + if ((g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_On) && !g_vars->scene37_rings[1]->state) + || (g_fp->getObjectState(sO_Guard_2) == g_fp->getObjectEnumState(sO_Guard_2, sO_Off) && g_vars->scene37_rings[1]->state)) { g_vars->scene37_plusMinus2->_statics = g_vars->scene37_plusMinus2->getStaticsById(ST_PMS_PLUS); } else { g_vars->scene37_plusMinus2->_statics = g_vars->scene37_plusMinus2->getStaticsById(ST_PMS_MINUS); } - } else if (g_vars->scene37_var05[2]->ani->_movement && g_vars->scene37_var05[2]->ani->_movement->_id == MV_GRD37_PULL) { - if ((g_fp->getObjectState(sO_Guard_3) == g_fp->getObjectEnumState(sO_Guard_3, sO_On) && !g_vars->scene37_var05[2]->state) - || (g_fp->getObjectState(sO_Guard_3) == g_fp->getObjectEnumState(sO_Guard_3, sO_Off) && g_vars->scene37_var05[2]->state)) { + } else if (g_vars->scene37_rings[2]->ani->_movement && g_vars->scene37_rings[2]->ani->_movement->_id == MV_GRD37_PULL) { + if ((g_fp->getObjectState(sO_Guard_3) == g_fp->getObjectEnumState(sO_Guard_3, sO_On) && !g_vars->scene37_rings[2]->state) + || (g_fp->getObjectState(sO_Guard_3) == g_fp->getObjectEnumState(sO_Guard_3, sO_Off) && g_vars->scene37_rings[2]->state)) { g_vars->scene37_plusMinus3->_statics = g_vars->scene37_plusMinus3->getStaticsById(ST_PMS_PLUS); } else { g_vars->scene37_plusMinus3->_statics = g_vars->scene37_plusMinus3->getStaticsById(ST_PMS_MINUS); } } - if (g_vars->scene37_var09) { + if (g_vars->scene37_soundFlipper) { g_fp->playSound(SND_37_007, 0); - g_vars->scene37_var09 = 0; + g_vars->scene37_soundFlipper = 0; } break; |