From 7331a7cbefed7be415da170a32a2549b1c18fd12 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 2 Jan 2014 16:14:54 +0200 Subject: FULLPIPE: Implement scene20_setExits() --- engines/fullpipe/scenes/scene20.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/fullpipe/scenes/scene20.cpp b/engines/fullpipe/scenes/scene20.cpp index c10ff2e6b8..45d59718d6 100644 --- a/engines/fullpipe/scenes/scene20.cpp +++ b/engines/fullpipe/scenes/scene20.cpp @@ -37,7 +37,25 @@ namespace Fullpipe { void scene20_setExits(Scene *sc) { - warning("STUB: scene20_setExits()"); + int thingpar; + + if (g_fp->getObjectState(sO_Grandma) == g_fp->getObjectEnumState(sO_Grandma, sO_OnStool) + || g_fp->getObjectState(sO_Grandma) == g_fp->getObjectEnumState(sO_Grandma, sO_OnTheFloor)) + thingpar = 1; + else if (g_fp->getObjectState(sO_Grandma) == g_fp->getObjectEnumState(sO_Grandma, sO_NearPipe) + || g_fp->getObjectState(sO_Grandma) == g_fp->getObjectEnumState(sO_Grandma, sO_NearPipeWithStool)) { + getSc2MctlCompoundBySceneId(sc->_sceneId)->enableLinks(sO_CloseThing, 1); + getSc2MctlCompoundBySceneId(sc->_sceneId)->enableLinks(sO_CloseThing2, 1); + getSc2MctlCompoundBySceneId(sc->_sceneId)->enableLinks(sO_CloseThing3, 0); + + return; + } else { + thingpar = 0; + } + + getSc2MctlCompoundBySceneId(sc->_sceneId)->enableLinks(sO_CloseThing, thingpar); + getSc2MctlCompoundBySceneId(sc->_sceneId)->enableLinks(sO_CloseThing2, 0); + getSc2MctlCompoundBySceneId(sc->_sceneId)->enableLinks(sO_CloseThing3, 1); } void scene20_initScene(Scene *sc) { -- cgit v1.2.3