diff options
author | Eugene Sandulenko | 2016-10-01 22:56:23 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-10-01 23:13:54 +0200 |
commit | e16725a763e560bb4b36c5e19980bf5a1391cb94 (patch) | |
tree | 9fca2d751eb19101aefb929a11bd9c12c52371dc /engines/fullpipe | |
parent | 7da5d48d5ea1300b4a07eefccfd57b6a6c299f98 (diff) | |
download | scummvm-rg350-e16725a763e560bb4b36c5e19980bf5a1391cb94.tar.gz scummvm-rg350-e16725a763e560bb4b36c5e19980bf5a1391cb94.tar.bz2 scummvm-rg350-e16725a763e560bb4b36c5e19980bf5a1391cb94.zip |
FULLPIPE: Rebames in scene37
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 2 | ||||
-rw-r--r-- | 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 d37f5dba39..71e9126a9d 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 fc593a6088..918fb72b37 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -636,7 +636,7 @@ public: Common::Array<Ring *> 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 0e5685f4a9..31b38c24ce 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); |