aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-28 22:14:38 +0200
committerEugene Sandulenko2013-12-28 22:14:38 +0200
commitd751e719acfadfda42cba096bbcec8ff73030823 (patch)
treedf6d2eac5b50cdd10ff3d9513355f408b0c54610
parent0af0d2bc6a28d312f2f284c4ebc3963e0e3be93e (diff)
downloadscummvm-rg350-d751e719acfadfda42cba096bbcec8ff73030823.tar.gz
scummvm-rg350-d751e719acfadfda42cba096bbcec8ff73030823.tar.bz2
scummvm-rg350-d751e719acfadfda42cba096bbcec8ff73030823.zip
FULLPIPE: Implement scene24_setPoolState()
-rw-r--r--engines/fullpipe/constants.h6
-rw-r--r--engines/fullpipe/scenes.cpp2
-rw-r--r--engines/fullpipe/scenes/scene24.cpp22
3 files changed, 29 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 230d2d4c41..53af8c6ff3 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -555,6 +555,12 @@ namespace Fullpipe {
#define ANI_DROP_24 3505
#define ANI_JET24 1837
#define ANI_WATER24 1834
+#define QU_DRP24_TOFLOOR 3510
+#define QU_DRP24_TOWATER 3509
+#define QU_DRP24_TOWATER2 4046
+#define SND_24_006 4041
+#define SND_24_007 4042
+#define ST_DRP24_EMPTY 3507
#define ST_WTR24_FLOWLOWER 1843
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 3bac1dbf86..c3bddf5570 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -625,7 +625,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
scene->initObjectCursors("SC_24");
setSceneMusicParameters(sceneVar);
addMessageHandler(sceneHandler24, 2);
- scene24_sub_423DD0();
+ scene24_setPoolState();
_updateCursorCallback = defaultUpdateCursor;
break;
diff --git a/engines/fullpipe/scenes/scene24.cpp b/engines/fullpipe/scenes/scene24.cpp
index 1bf8edbc7e..dc92044077 100644
--- a/engines/fullpipe/scenes/scene24.cpp
+++ b/engines/fullpipe/scenes/scene24.cpp
@@ -81,4 +81,26 @@ void scene24_initScene(Scene *sc) {
g_fp->_currentScene = oldsc;
}
+void scene24_setPoolState() {
+ if (g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Overfull)) {
+ g_fp->_behaviorManager->setFlagByStaticAniObject(g_vars->scene24_drop, 0);
+
+ g_fp->playSound(SND_24_007, 1);
+ } else if (g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_Full)) {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOFLOOR, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOWATER, 1);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOWATER2, 0);
+
+ g_fp->playSound(SND_24_006, 1);
+ } else if (g_fp->getObjectState(sO_Pool) == g_fp->getObjectEnumState(sO_Pool, sO_HalfFull)) {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOFLOOR, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOWATER, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOWATER2, 1);
+ } else {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOFLOOR, 1);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOWATER, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene24_drop, ST_DRP24_EMPTY, QU_DRP24_TOWATER2, 0);
+ }
+}
+
} // End of namespace Fullpipe