From e16725a763e560bb4b36c5e19980bf5a1391cb94 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 1 Oct 2016 22:56:23 +0200 Subject: [PATCH] FULLPIPE: Rebames in scene37 --- engines/fullpipe/scenes.cpp | 2 +- engines/fullpipe/scenes.h | 2 +- engines/fullpipe/scenes/scene37.cpp | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index d37f5dba390..71e9126a9d6 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -445,7 +445,7 @@ Vars::Vars() { scene37_rings.clear(); scene37_lastDudeX = -1; - scene37_cursorIsLocked = 0; + scene37_pipeIsOpen = 0; scene37_plusMinus1 = 0; scene37_plusMinus2 = 0; scene37_plusMinus3 = 0; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index fc593a60889..918fb72b376 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -636,7 +636,7 @@ public: Common::Array scene37_rings; int scene37_lastDudeX; - bool scene37_cursorIsLocked; + bool scene37_pipeIsOpen; StaticANIObject *scene37_plusMinus1; StaticANIObject *scene37_plusMinus2; StaticANIObject *scene37_plusMinus3; diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp index 0e5685f4a99..31b38c24cef 100644 --- a/engines/fullpipe/scenes/scene37.cpp +++ b/engines/fullpipe/scenes/scene37.cpp @@ -96,7 +96,7 @@ void scene37_initScene(Scene *sc) { g_fp->_currentScene = sc; - g_vars->scene37_cursorIsLocked = false; + g_vars->scene37_pipeIsOpen = false; g_vars->scene37_plusMinus1 = sc->getStaticANIObject1ById(ANI_PLUSMINUS, 1); @@ -149,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_cursorIsLocked) + if (g_vars->scene37_pipeIsOpen) g_fp->_cursorId = PIC_CSR_GOL; } @@ -175,20 +175,22 @@ void sceneHandler37_updateRing(int ringNum) { } } - g_vars->scene37_cursorIsLocked = true; + g_vars->scene37_pipeIsOpen = true; for (uint j = 0; j < g_vars->scene37_rings.size(); j++) { - for (int i = 0; i < g_vars->scene37_rings[ringNum]->numSubRings; i++) { + for (int i = 0; i < g_vars->scene37_rings[j]->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_cursorIsLocked = false; + if ((ani->_movement && ani->_movement->_id == MV_RNG_CLOSE) || ani->_statics->_staticsId == ST_RNG_CLOSED2) + g_vars->scene37_pipeIsOpen = false; } } + debugC(1, kDebugSceneLogic, "Pipe is: %s", g_vars->scene37_pipeIsOpen ? "open" : "closed"); + int state; - if (g_vars->scene37_cursorIsLocked) + if (g_vars->scene37_pipeIsOpen) state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsOpened); else state = g_fp->getObjectEnumState(sO_LeftPipe_37, sO_IsClosed);