From 2c5e338d3366ad33f09b9f9976907f814b5c7afd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 12 Feb 2014 21:22:15 +0200 Subject: FULLPIPE: Implement scene09_updateCursor() --- engines/fullpipe/constants.h | 1 + engines/fullpipe/scenes.cpp | 1 + engines/fullpipe/scenes.h | 1 + engines/fullpipe/scenes/scene09.cpp | 24 ++++++++++++++++++++++++ 4 files changed, 27 insertions(+) diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index c8400c7280..84ef20d548 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -592,6 +592,7 @@ namespace Fullpipe { #define ANI_PLEVATEL 919 #define ANI_VISUNCHIK 904 #define MV_VSN_CYCLE2 2987 +#define PIC_SC9_LADDER_R 2700 #define ST_GRT9_GRIT 2722 #define ST_GRT9_NORM 2721 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 3d4898ed4c..fe1ac177d8 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -161,6 +161,7 @@ Vars::Vars() { scene09_glotatel = 0; scene09_spitter = 0; scene09_grit = 0; + scene09_var02 = 0; scene09_var08 = 1; scene09_var09 = 0; scene09_var10 = -1; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 1dbad6e67d..a30f058187 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -344,6 +344,7 @@ public: bool scene08_stairsVisible; int scene08_manOffsetY; + int scene09_var02; StaticANIObject *scene09_flyingBall; int scene09_var05; StaticANIObject *scene09_glotatel; diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp index 29305413d4..ce7fecc409 100644 --- a/engines/fullpipe/scenes/scene09.cpp +++ b/engines/fullpipe/scenes/scene09.cpp @@ -210,4 +210,28 @@ void scene09_initScene(Scene *sc) { g_fp->setArcadeOverlay(PIC_CSR_ARCADE4); } +int sceneHandler09_updateScreenCallback() { + warning("STUB: int sceneHandler09_updateScreenCallback()"); + + return 0; +} + +int scene09_updateCursor() { + g_fp->updateCursorCommon(); + + if (g_vars->scene09_var10 < 0) { + if (g_fp->_objectIdAtCursor == ANI_VISUNCHIK) { + if (g_fp->_cursorId == PIC_CSR_ITN) + g_fp->_updateScreenCallback = sceneHandler09_updateScreenCallback; + } else { + if (g_fp->_objectIdAtCursor == PIC_SC9_LADDER_R && g_fp->_cursorId == PIC_CSR_ITN) + g_fp->_cursorId = (g_vars->scene09_var02 < 350) ? PIC_CSR_GOD : PIC_CSR_GOU; + } + } else { + g_fp->_cursorId = PIC_CSR_ITN; + } + + return g_fp->_cursorId; +} + } // End of namespace Fullpipe -- cgit v1.2.3