aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-06 01:00:06 +0200
committerEugene Sandulenko2014-01-06 01:00:06 +0200
commit3b5e4afa40cfbe7981beb59dcb3f08309c8c7687 (patch)
tree6bc0f480611d9fdcb71f5eaf1135065412c60f96 /engines
parent9a5fc82afa1635e3055ecda7476f60359affff77 (diff)
downloadscummvm-rg350-3b5e4afa40cfbe7981beb59dcb3f08309c8c7687.tar.gz
scummvm-rg350-3b5e4afa40cfbe7981beb59dcb3f08309c8c7687.tar.bz2
scummvm-rg350-3b5e4afa40cfbe7981beb59dcb3f08309c8c7687.zip
FULLPIPE: Implement sceneHandler26_testVent()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h6
-rw-r--r--engines/fullpipe/scenes/scene26.cpp53
2 files changed, 58 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 5ab328a792..2dab3f46f1 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -945,7 +945,13 @@ namespace Fullpipe {
#define PIC_SC26_SOCK 5312
#define QU_CHI_HIDE 1965
#define QU_CHI_SHOW 1964
+#define QU_SC26_AUTOCLOSE1 1949
+#define QU_SC26_AUTOCLOSE2 1950
+#define QU_SC26_AUTOCLOSE3 1951
+#define SND_26_003 4079
#define SND_26_018 5340
+#define SND_26_019 5341
+#define SND_26_020 5342
#define ST_CHI_EMPTY 1959
#define ST_CHI_NORM 1960
#define ST_VNT26_RIGHT2 3348
diff --git a/engines/fullpipe/scenes/scene26.cpp b/engines/fullpipe/scenes/scene26.cpp
index 9587e5b4dc..3ddd6386a1 100644
--- a/engines/fullpipe/scenes/scene26.cpp
+++ b/engines/fullpipe/scenes/scene26.cpp
@@ -121,7 +121,58 @@ void sceneHandler26_hideChi() {
}
void sceneHandler26_testVent() {
- warning("STUB: sceneHandler26_testVent()");
+ if (!g_vars->scene26_var05)
+ return;
+
+ if (g_vars->scene26_var05->_okeyCode == 0) {
+ if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Opened))
+ g_fp->stopAllSoundInstances(SND_26_018);
+ else
+ g_fp->playSound(SND_26_018, 1);
+
+ if (g_fp->getObjectState(sO_Valve2_26) == g_fp->getObjectEnumState(sO_Valve2_26, sO_Opened)) {
+ chainQueue(QU_SC26_AUTOCLOSE2, 0);
+
+ g_fp->playSound(SND_26_020, 0);
+ }
+
+ if (g_fp->getObjectState(sO_Valve3_26) == g_fp->getObjectEnumState(sO_Valve3_26, sO_Opened)) {
+ chainQueue(QU_SC26_AUTOCLOSE3, 0);
+
+ g_fp->playSound(SND_26_020, 0);
+ }
+ } else if (g_vars->scene26_var05->_okeyCode == 1) {
+ if (g_fp->getObjectState(sO_Valve2_26) == g_fp->getObjectEnumState(sO_Valve2_26, sO_Opened))
+ g_fp->playSound(SND_26_020, 0);
+ else
+ g_fp->playSound(SND_26_019, 0);
+
+ if (g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Overfull)
+ || g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Full))
+ g_fp->playSound(SND_26_003, 0);
+
+ if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Opened)) {
+ g_fp->stopAllSoundInstances(SND_26_018);
+
+ chainQueue(QU_SC26_AUTOCLOSE1, 0);
+ }
+ } else if (g_vars->scene26_var05->_okeyCode == 2) {
+ if (g_fp->getObjectState(sO_Valve3_26) == g_fp->getObjectEnumState(sO_Valve3_26, sO_Opened))
+ g_fp->playSound(SND_26_020, 0);
+ else
+ g_fp->playSound(SND_26_019, 0);
+
+ if (g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Overfull)
+ || g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Full)
+ || g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_HalfFull))
+ g_fp->playSound(SND_26_003, 0);
+
+ if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Opened)) {
+ g_fp->stopAllSoundInstances(SND_26_018);
+
+ chainQueue(QU_SC26_AUTOCLOSE1, 0);
+ }
+ }
}
void sceneHandler26_showVent() {