aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-07 17:14:57 +0200
committerEugene Sandulenko2014-01-07 17:14:57 +0200
commitb495a16812ead9bae573dbf1c31aea7fe9e1b134 (patch)
treeead0a5d73e0df2f949acfa83669a1e2cfc8a5343 /engines/fullpipe
parent929c868c5e1123a2e364e0c473b6a162dd122d80 (diff)
downloadscummvm-rg350-b495a16812ead9bae573dbf1c31aea7fe9e1b134.tar.gz
scummvm-rg350-b495a16812ead9bae573dbf1c31aea7fe9e1b134.tar.bz2
scummvm-rg350-b495a16812ead9bae573dbf1c31aea7fe9e1b134.zip
FULLPIPE: Implement sceneHandler32_trySit()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/constants.h1
-rw-r--r--engines/fullpipe/scenes/scene32.cpp24
2 files changed, 24 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 3df6ab33f3..aba3c613ee 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -1078,6 +1078,7 @@ namespace Fullpipe {
#define MV_FLG_STARTR 2263
#define MV_FLG_STOPL 2261
#define MV_FLG_STOPR 2265
+#define MV_MAN32_SITDOWN 2276
#define MV_MAN32_STANDUP 2313
#define MV_TSTG_FLOW 2663
#define MV_TSTO_FLOW 2657
diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp
index b73dd99d7c..4b463c4d55 100644
--- a/engines/fullpipe/scenes/scene32.cpp
+++ b/engines/fullpipe/scenes/scene32.cpp
@@ -173,7 +173,29 @@ void sceneHandler32_startFlagRight() {
}
void sceneHandler32_trySit(ExCommand *cmd) {
- warning("STUB: sceneHandler32_trySit(cmd)");
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(cmd->_parId);
+
+ if (!mq || !mq->getCount() <= 0)
+ return;
+
+ ExCommand *ex = mq->getExCommandByIndex(0);
+
+ if (g_vars->scene32_var10 || g_vars->scene32_cactus->_movement
+ || g_vars->scene32_cactus->_statics->_staticsId != ST_CTS_EMPTY
+ || (g_vars->scene32_var08 >= 0 && g_vars->scene32_var08 <= 20)) {
+ ex->_messageKind = 0;
+ ex->_excFlags |= 1;
+ } else {
+ ex->_parentId = ANI_MAN;
+ ex->_messageKind = 1;
+ ex->_messageNum = MV_MAN32_SITDOWN;
+ ex->_keyCode = g_fp->_aniMan->_okeyCode;
+
+ g_vars->scene32_var07 = 1;
+
+ getCurrSceneSc2MotionController()->clearEnabled();
+ getGameLoaderInteractionController()->disableFlag24();
+ }
}
void sceneHandler32_buttonPush() {