aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-10 00:20:38 +0200
committerEugene Sandulenko2014-01-10 00:42:21 +0200
commit5114398e979bdb7145932be854eb770c66bd1dd7 (patch)
tree52ae0ed155a0691871a4452e0d2643816c9209dc /engines
parent9cddc195ce10eecbc45f7041897412450b1631f1 (diff)
downloadscummvm-rg350-5114398e979bdb7145932be854eb770c66bd1dd7.tar.gz
scummvm-rg350-5114398e979bdb7145932be854eb770c66bd1dd7.tar.bz2
scummvm-rg350-5114398e979bdb7145932be854eb770c66bd1dd7.zip
FULLPIPE: Implement sceneHandler33_pour()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h5
-rw-r--r--engines/fullpipe/scenes.cpp1
-rw-r--r--engines/fullpipe/scenes.h1
-rw-r--r--engines/fullpipe/scenes/scene33.cpp28
4 files changed, 34 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 5381d0a8bf..93d8fda6df 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -1115,6 +1115,9 @@ namespace Fullpipe {
#define MSG_SC33_TESTMUG 5185
#define MSG_SC33_TRYKUBIK 4980
#define MSG_SC33_UPDATEKUBIK 5346
+#define MV_JTI33_FLOW 2628
+#define MV_JTI33_POUR 2630
+#define MV_JTI33_POURFULL 4455
#define MV_VNT33_TURND 2638
#define MV_VNT33_TURNR 2641
#define PIC_SC33_LTRUBA 2618
@@ -1122,6 +1125,8 @@ namespace Fullpipe {
#define QU_KBK33_GO 4978
#define QU_KBK33_START 4983
#define QU_SC33_STARTWATER 2644
+#define ST_MUG33_EMPTY 2625
+#define ST_MUG33_FULL 2626
#define ST_VNT33_DOWN 2640
#define ST_VNT33_RIGHT 2639
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 67e51cc47d..db43909f55 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -337,6 +337,7 @@ Vars::Vars() {
scene33_var09 = 0;
for (int i = 0; i < 9; i++) {
+ scene33_var06[i] = 0;
scene33_ventsX[i] = 0;
scene33_ventsState[i] = 0;
}
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index d32af4aae9..7ed5338699 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -471,6 +471,7 @@ public:
StaticANIObject *scene33_mug;
StaticANIObject *scene33_jettie;
StaticANIObject *scene33_var07;
+ int scene33_var06[9];
int scene33_var08;
int scene33_var09;
int scene33_ventsX[9];
diff --git a/engines/fullpipe/scenes/scene33.cpp b/engines/fullpipe/scenes/scene33.cpp
index e6b526ea14..ed9d9c67ef 100644
--- a/engines/fullpipe/scenes/scene33.cpp
+++ b/engines/fullpipe/scenes/scene33.cpp
@@ -108,7 +108,33 @@ void sceneHandler33_tryCube() {
}
void sceneHandler33_pour() {
- warning("STUB: sceneHandler33_pour(");
+ bool solved = true;
+
+ for (int i = 0; i < 9; i++)
+ if (g_vars->scene33_ventsState[i] != g_vars->scene33_var06[i])
+ solved = false;
+
+ if (solved) {
+ if ((g_vars->scene33_mug->_flags & 4) && g_vars->scene33_mug->_statics->_staticsId == ST_MUG33_EMPTY) {
+ g_vars->scene33_jettie->startAnim(MV_JTI33_POUR, 0, -1);
+
+ g_vars->scene33_var09 = 0;
+
+ return;
+ }
+
+ if ((g_vars->scene33_mug->_flags & 4) && g_vars->scene33_mug->_statics->_staticsId == ST_MUG33_FULL) {
+ g_vars->scene33_jettie->startAnim(MV_JTI33_POURFULL, 0, -1);
+
+ g_vars->scene33_var09 = 0;
+
+ return;
+ }
+
+ g_vars->scene33_jettie->startAnim(MV_JTI33_FLOW, 0, -1);
+ }
+
+ g_vars->scene33_var09 = 0;
}
void sceneHandler33_handleDown() {