aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-02 21:11:37 +0200
committerEugene Sandulenko2014-01-02 21:11:37 +0200
commit073fe02b38f5aef5b203422c97a6b635c1a9e3c9 (patch)
treed57eed08f4b2f59d5e111da6cccaffa54f4f8969 /engines
parentb3a9832b6f4821092b99defb4b1e5f59a91755d0 (diff)
downloadscummvm-rg350-073fe02b38f5aef5b203422c97a6b635c1a9e3c9.tar.gz
scummvm-rg350-073fe02b38f5aef5b203422c97a6b635c1a9e3c9.tar.bz2
scummvm-rg350-073fe02b38f5aef5b203422c97a6b635c1a9e3c9.zip
FULLPIPE: Implement scene22_setBagState() and updateCursor()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h5
-rw-r--r--engines/fullpipe/scenes/scene22.cpp31
2 files changed, 36 insertions, 0 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index a25e97467e..0ac3cad222 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -732,6 +732,8 @@ namespace Fullpipe {
// Scene 21
#define ANI_GIRAFFE_BOTTOM 1633
+#define ANI_INV_BOX 890
+#define ANI_INV_STOOL 1780
#define MSG_SC21_UPDATEASS 4211
#define PIC_SC21_DTRUBA 1823
#define ST_GRFB_SIT 1687
@@ -740,8 +742,11 @@ namespace Fullpipe {
// Scene 22
#define ANI_GIRAFFE_MIDDLE 1981
#define ANI_MESHOK 1754
+#define QU_MSH_CRANEOUT 1811
+#define QU_MSH_MOVE 1812
#define ST_GRFM_AFTER 3472
#define ST_GRFM_NORM 1983
+#define ST_MSH_SIT 1756
// Scene 24
#define ANI_DROP_24 3505
diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp
index 7b36c63674..d28ea922f3 100644
--- a/engines/fullpipe/scenes/scene22.cpp
+++ b/engines/fullpipe/scenes/scene22.cpp
@@ -74,4 +74,35 @@ void scene22_initScene(Scene *sc) {
g_fp->initArcadeKeys("SC_22");
}
+int scene22_updateCursor() {
+ g_fp->updateCursorCommon();
+
+ if (g_fp->_objectIdAtCursor != ANI_HANDLE_L)
+ return g_fp->_cursorId;
+
+ int sel = g_fp->_inventory->getSelectedItemId();
+
+ if (!sel) {
+ g_fp->_cursorId = PIC_CSR_ITN;
+ return g_fp->_cursorId;
+ }
+
+ if (g_vars->scene22_var07 || (sel != ANI_INV_STOOL && sel != ANI_INV_BOX))
+ ; //empty
+ else
+ g_fp->_cursorId = PIC_CSR_ITN_INV;
+
+ return g_fp->_cursorId;
+}
+
+void scene22_setBagState() {
+ if (g_vars->scene22_var10) {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_CRANEOUT, 1);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_MOVE, 0);
+ } else {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_CRANEOUT, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_MOVE, 1);
+ }
+}
+
} // End of namespace Fullpipe