diff options
author | Eugene Sandulenko | 2014-01-02 00:46:19 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-02 00:48:34 +0200 |
commit | 7873f59ad5d12ca7d127925e4a1173fc473e1793 (patch) | |
tree | b59a1a72e3ae00db4eb8f0ba8af93f688e0d1e9b /engines/fullpipe | |
parent | dd143adbaaf21dfc19b7ad20a2e6243164ddfc39 (diff) | |
download | scummvm-rg350-7873f59ad5d12ca7d127925e4a1173fc473e1793.tar.gz scummvm-rg350-7873f59ad5d12ca7d127925e4a1173fc473e1793.tar.bz2 scummvm-rg350-7873f59ad5d12ca7d127925e4a1173fc473e1793.zip |
FULLPIPE: Implement scene17_updateCursor()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/scenes/scene17.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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); |