From 81be0e77dd359c62282cf5a7de2a6fb3d2e856e2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 10 Jan 2014 00:27:41 +0200 Subject: FULLPIPE: Implement sceneHandler33_processVents() --- engines/fullpipe/scenes/scene33.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/fullpipe/scenes/scene33.cpp b/engines/fullpipe/scenes/scene33.cpp index 9fe3810e8d..3efe8cccc4 100644 --- a/engines/fullpipe/scenes/scene33.cpp +++ b/engines/fullpipe/scenes/scene33.cpp @@ -99,10 +99,6 @@ void sceneHandler33_processJettie(ExCommand *cmd) { } } -void sceneHandler33_processVents() { - warning("STUB: sceneHandler33_processVents("); -} - void sceneHandler33_switchVent(StaticANIObject *ani) { int mv = 0; @@ -118,6 +114,15 @@ void sceneHandler33_switchVent(StaticANIObject *ani) { g_vars->scene33_ventsState[ani->_okeyCode] = !g_vars->scene33_ventsState[ani->_okeyCode]; } +void sceneHandler33_processVents() { + for (int i = 0; i < 9; i++) + if ((g_vars->scene33_var08 - g_vars->scene33_ventsX[i] < 0 != g_vars->scene33_var07->_ox - g_vars->scene33_ventsX[i] < 0) + && g_vars->scene33_ventsState[i] != g_vars->scene33_var06[i]) + sceneHandler33_switchVent(g_fp->_currentScene->getStaticANIObject1ById(ANI_VENT_33, i)); + + g_vars->scene33_var08 = g_vars->scene33_var07->_ox; +} + void sceneHandler33_tryCube() { if (g_fp->getObjectState(sO_Cube) == g_fp->getObjectEnumState(sO_Cube, sO_In_32)) chainQueue(QU_KBK33_GO, 0); -- cgit v1.2.3