aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h4
-rw-r--r--engines/fullpipe/scenes/scene10.cpp32
2 files changed, 35 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index c4ea3dd3f7..0b53e27f63 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -229,6 +229,8 @@ namespace Fullpipe {
#define MV_MOM_TAKE4 2888
#define MV_MOM_TAKE5 2889
#define MV_NDV_BLOW2 2855
+#define MV_NDV_DENIES 952
+#define MV_NDV_DENY_NOGUM 3022
#define MV_OTM_BOXHANDLEDOWN 626
#define MV_OTM_BOXHANDLEUP 627
#define MV_OTM_HANDLEDOWN 620
@@ -345,6 +347,7 @@ namespace Fullpipe {
#define QU_SC8_STANDUP 2975
#define QU_SC10_ENTERLIFT 1067
#define QU_SC10_EXITLIFT 2809
+#define QU_SC10_TAKEGUM 3026
#define SC_1 301
#define SC_10 653
#define SC_11 654
@@ -469,6 +472,7 @@ namespace Fullpipe {
#define ST_MOM_SITS 659
#define ST_MOM_STANDS 658
#define ST_NBL_NORM 1076
+#define ST_NDV_SIT 946
#define ST_OTM_BOX_LEFT 429
#define ST_OTM_GLS_LEFT 421
#define ST_OTM_VNT_LEFT 434
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() {