From 7873f59ad5d12ca7d127925e4a1173fc473e1793 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 2 Jan 2014 00:46:19 +0200 Subject: FULLPIPE: Implement scene17_updateCursor() --- engines/fullpipe/scenes/scene17.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes/scene17.cpp b/engines/fullpipe/scenes/scene17.cpp index ef9c0d2c0a..231934d966 100644 --- a/engines/fullpipe/scenes/scene17.cpp +++ b/engines/fullpipe/scenes/scene17.cpp @@ -70,6 +70,25 @@ void scene17_restoreState() { g_fp->setObjectState(sO_Fly_17, g_vars->scene17_flyState - 1); } +int scene17_updateCursor() { + g_fp->updateCursorCommon(); + + if (g_fp->_objectIdAtCursor != PIC_SC17_RTRUBA2 && g_fp->_objectIdAtCursor != PIC_SC17_RTRUBA) + return g_fp->_cursorId; + + if (!g_vars->scene17_handPhase) + return g_fp->_cursorId; + + int item = g_fp->_inventory->getSelectedItemId(); + + if ((g_fp->_cursorId != PIC_CSR_DEFAULT_INV || item != ANI_INV_COIN) && item != ANI_INV_BOOT && item != ANI_INV_HAMMER) + ; // empty + else + g_fp->_cursorId = PIC_CSR_ITN_INV; + + return g_fp->_cursorId; +} + void sceneHandler17_drop() { StaticANIObject *mug = g_fp->_currentScene->getStaticANIObject1ById(ANI_MUG_17, -1); StaticANIObject *jet = g_fp->_currentScene->getStaticANIObject1ById(ANI_JET_17, -1); -- cgit v1.2.3