aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-05 12:11:29 +0200
committerEugene Sandulenko2014-01-05 13:20:47 +0200
commita7b03000f5ff1e97348725a6db062954ab19e436 (patch)
treefc1fb801c4f8557a40c74ff0676f441c8c04d28e
parent68fea7ef51b48a41ed057aefdcb1bc5f1f35fd90 (diff)
downloadscummvm-rg350-a7b03000f5ff1e97348725a6db062954ab19e436.tar.gz
scummvm-rg350-a7b03000f5ff1e97348725a6db062954ab19e436.tar.bz2
scummvm-rg350-a7b03000f5ff1e97348725a6db062954ab19e436.zip
FULLPIPE: Implement scene25_updateCursor() and setupWater()
-rw-r--r--engines/fullpipe/constants.h8
-rw-r--r--engines/fullpipe/scenes/scene25.cpp36
2 files changed, 42 insertions, 2 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index cd51fea186..906f5b48a1 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -865,9 +865,17 @@ namespace Fullpipe {
#define ANI_BOARD25 1898
#define ANI_DROP_25 3499
#define ANI_INV_BOARD 1872
+#define ANI_INV_BROOM 1774
+#define ANI_INV_LOPAT 1920
+#define ANI_INV_SWAB 1917
#define ANI_WATER25 1856
+#define MV_BRD25_RIGHT 1899
+#define rMV_BRD25_RIGHT 1903
+#define QU_DRP25_TOFLOOR 3502
+#define QU_DRP25_TOWATER 3504
#define SND_25_006 4059
#define SND_25_029 5174
+#define ST_DRP25_EMPTY 3501
// Scene 30
#define ANI_LEG 2322
diff --git a/engines/fullpipe/scenes/scene25.cpp b/engines/fullpipe/scenes/scene25.cpp
index a38c104835..7f747d7541 100644
--- a/engines/fullpipe/scenes/scene25.cpp
+++ b/engines/fullpipe/scenes/scene25.cpp
@@ -37,11 +37,13 @@
namespace Fullpipe {
void scene25_showBoardOnRightFar() {
- warning("STUB: scene25_showBoardOnRightFar()");
+ g_vars->scene25_board->show1(453, 557, MV_BRD25_RIGHT, 0);
+ g_vars->scene25_board->_priority = 28;
}
void scene25_showBoardOnRightClose() {
- warning("STUB: scene25_showBoardOnRightClose()");
+ g_vars->scene25_board->show1(632, 557, rMV_BRD25_RIGHT, 0);
+ g_vars->scene25_board->_priority = 28;
}
void scene25_initScene(Scene *sc, int entranceId) {
@@ -96,4 +98,34 @@ void scene25_initScene(Scene *sc, int entranceId) {
g_vars->scene25_var09 = 0;
}
+int scene25_updateCursor() {
+ g_fp->updateCursorCommon();
+
+ if (g_vars->scene25_var06) {
+ int inv = getGameLoaderInventory()->getSelectedItemId();
+
+ if (g_fp->_objectIdAtCursor == ANI_WATER25) {
+ if ((g_vars->scene25_var07 && (!inv || inv == ANI_INV_BOARD)) || (g_vars->scene25_var05 && (inv == ANI_INV_LOPAT || !inv)))
+ g_fp->_cursorId = (g_fp->_cursorId != PIC_CSR_DEFAULT) ? PIC_CSR_ITN : PIC_CSR_ITN_INV; // FIXME check
+ } else if (g_fp->_objectIdAtCursor == ANI_BOARD25 && (!inv || inv == ANI_INV_SWAB || inv == ANI_INV_BROOM || inv == ANI_INV_LOPAT)) {
+ g_fp->_cursorId = (g_fp->_cursorId != PIC_CSR_DEFAULT) ? PIC_CSR_ITN : PIC_CSR_ITN_INV;
+ }
+ }
+
+ return g_fp->_cursorId;
+}
+
+void scene25_setupWater(Scene *a1, int entranceId) {
+ if (g_vars->scene25_var06) {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene25_drop, ST_DRP25_EMPTY, QU_DRP25_TOFLOOR, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene25_drop, ST_DRP25_EMPTY, QU_DRP25_TOWATER, 1);
+
+ if (entranceId != TrubaRight)
+ g_fp->playTrack(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_25"), "MUSIC2", 0);
+ } else {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene25_drop, ST_DRP25_EMPTY, QU_DRP25_TOFLOOR, 1);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene25_drop, ST_DRP25_EMPTY, QU_DRP25_TOWATER, 0);
+ }
+}
+
} // End of namespace Fullpipe