FULLPIPE: Rebames in scene37

This commit is contained in:
Eugene Sandulenko 2016-10-01 22:56:23 +02:00
parent 7da5d48d5e
commit e16725a763
3 changed files with 11 additions and 9 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);