diff options
author | Eugene Sandulenko | 2013-12-23 15:06:44 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-23 15:06:44 +0200 |
commit | fec15ed2ccec8917c63728b44f40417ed983a73b (patch) | |
tree | 87cdc37c7a4b6371504435f66a05fabc6ab53696 /engines/fullpipe/scenes/scene10.cpp | |
parent | eaa9d8a2e0af9214d48110d988c18ca2d9600859 (diff) | |
download | scummvm-rg350-fec15ed2ccec8917c63728b44f40417ed983a73b.tar.gz scummvm-rg350-fec15ed2ccec8917c63728b44f40417ed983a73b.tar.bz2 scummvm-rg350-fec15ed2ccec8917c63728b44f40417ed983a73b.zip |
FULLPIPE: Implement sceneHandler10_clickGum(). This completes scene10
Diffstat (limited to 'engines/fullpipe/scenes/scene10.cpp')
-rw-r--r-- | engines/fullpipe/scenes/scene10.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/engines/fullpipe/scenes/scene10.cpp b/engines/fullpipe/scenes/scene10.cpp index 3977337f45..78f3fcdcff 100644 --- a/engines/fullpipe/scenes/scene10.cpp +++ b/engines/fullpipe/scenes/scene10.cpp @@ -31,6 +31,7 @@ #include "fullpipe/behavior.h" #include "fullpipe/interaction.h" +#include "fullpipe/motion.h" namespace Fullpipe { @@ -74,7 +75,36 @@ int scene10_updateCursor() { } void sceneHandler10_clickGum() { - warning("STUB: sceneHandler10_clickGum()"); + if (g_vars->scene10_hasGum) { + if (sceneHandler10_inflaterIsBlind()) { + if (g_vars->scene10_hasGum) { + int x = g_vars->scene10_gum->_ox - 139; + int y = g_vars->scene10_gum->_oy - 48; + + if (abs(x - g_fp->_aniMan->_ox) > 1 || abs(y - g_fp->_aniMan->_oy) > 1) { + MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, x, y, 1, ST_MAN_RIGHT); + if (mq) { + ExCommand *ex = new ExCommand(0, 17, MSG_SC10_CLICKGUM, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags = 2; + mq->addExCommandToEnd(ex); + + postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1); + } + } else { + g_vars->scene10_hasGum = 0; + + chainQueue(QU_SC10_TAKEGUM, 1); + } + } + } else { + g_vars->scene10_inflater->changeStatics2(ST_NDV_SIT); + + if (g_fp->getObjectState(sO_Inflater) == g_fp->getObjectEnumState(sO_Inflater, sO_WithGum)) + g_vars->scene10_inflater->startAnim(MV_NDV_DENIES, 0, -1); + else + g_vars->scene10_inflater->startAnim(MV_NDV_DENY_NOGUM, 0, -1); + } + } } void sceneHandler10_hideGum() { |