aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-14 23:47:35 +0200
committerEugene Sandulenko2014-02-14 23:47:57 +0200
commit61e4e14012bcdc6918eb11d3a13b34207c318d0b (patch)
treed63c419d6d5d91772172edf0e83003749cee0e7e /engines
parent94f7d01882543c5e173a456f7a865c05ce81dd81 (diff)
downloadscummvm-rg350-61e4e14012bcdc6918eb11d3a13b34207c318d0b.tar.gz
scummvm-rg350-61e4e14012bcdc6918eb11d3a13b34207c318d0b.tar.bz2
scummvm-rg350-61e4e14012bcdc6918eb11d3a13b34207c318d0b.zip
FULLPIPE: Implement sceneHandler09_spitterClick()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h2
-rw-r--r--engines/fullpipe/scenes/scene09.cpp39
2 files changed, 40 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 6fb8e65593..7afd3ea455 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -603,10 +603,12 @@ namespace Fullpipe {
#define MV_MAN9_SHOOT 922
#define MV_VSN_CYCLE2 2987
#define PIC_SC9_LADDER_R 2700
+#define SND_9_006 3650
#define SND_9_018 4200
#define ST_GLT_SIT 926
#define ST_GRT9_GRIT 2722
#define ST_GRT9_NORM 2721
+#define ST_PLV_SIT 921
#define ST_VSN_NORMAL 906
// Scene 10
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 99086b8fd4..a33fe11cfc 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -257,7 +257,44 @@ void sceneHandler09_startAuntie() {
}
void sceneHandler09_spitterClick() {
- warning("STUB: sceneHandler09_spitterClick()");
+ if (g_vars->scene09_spitter->_flags & 4) {
+ PicAniInfo info;
+
+ g_vars->scene09_spitter->getPicAniInfo(&info);
+ g_vars->scene09_spitter->_messageQueueId = 0;
+ g_vars->scene09_spitter->changeStatics2(ST_PLV_SIT);
+
+ int x = g_vars->scene09_spitter->_ox - 10;
+ int y = g_vars->scene09_spitter->_oy + 145;
+
+ g_vars->scene09_spitter->setPicAniInfo(&info);
+
+ 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_UP);
+
+ if (mq) {
+ ExCommand *ex = new ExCommand(0, 17, MSG_SC9_PLVCLICK, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags = 2;
+ mq->addExCommandToEnd(ex);
+
+ postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1);
+ }
+ } else {
+ if (!g_fp->_aniMan->_movement) {
+ g_vars->scene09_spitter->changeStatics2(ST_PLV_SIT);
+ g_vars->scene09_spitter->hide();
+
+ g_fp->_aniMan->startAnim(MV_MAN9_SHOOT, 0, -1);
+
+ g_fp->stopAllSoundInstances(SND_9_006);
+ }
+
+ g_fp->_aniMan2 = 0;
+
+ if (g_fp->_sceneRect.left < 800)
+ g_fp->_currentScene->_x = 800 - g_fp->_sceneRect.left;
+ }
+ }
}
void sceneHandler09_eatBall() {