aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-02 22:56:24 +0200
committerEugene Sandulenko2014-01-02 22:56:24 +0200
commitfdad3971e5092e79794900ecc3e89d90a51a4b83 (patch)
treee6ace650507650e9b16760f2fe438bb67b91d521 /engines
parent9ee4cf899b26e3bc757bf77c4cda3dd3c67f0fd0 (diff)
downloadscummvm-rg350-fdad3971e5092e79794900ecc3e89d90a51a4b83.tar.gz
scummvm-rg350-fdad3971e5092e79794900ecc3e89d90a51a4b83.tar.bz2
scummvm-rg350-fdad3971e5092e79794900ecc3e89d90a51a4b83.zip
FULLPIPE: Implement sceneHandler22_fromStool()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h1
-rw-r--r--engines/fullpipe/scenes/scene22.cpp16
2 files changed, 13 insertions, 4 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index dc586823e0..96abc3a523 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -755,6 +755,7 @@ namespace Fullpipe {
#define QU_SC22_FALLBROOM 1786
#define QU_SC22_FALLSACK 1791
#define QU_SC22_FALLSACK_GMA 2613
+#define QU_SC22_FROMSTOOL 1800
#define QU_SC22_SHOWSTOOL 1793
#define QU_MSH_MOVE 1812
#define ST_GRFM_AFTER 3472
diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp
index 8e1cd9e9df..f4c6009223 100644
--- a/engines/fullpipe/scenes/scene22.cpp
+++ b/engines/fullpipe/scenes/scene22.cpp
@@ -153,15 +153,20 @@ void sceneHandler22_handleDown() {
g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_MOVE, 0);
}
-void sceneHandler22_sub01(ExCommand *cmd) {
- warning("STUB: sceneHandler22_sub01(cmd)");
+void sceneHandler22_fromStool(ExCommand *cmd) {
+ if (g_fp->_aniMan->isIdle() && !(g_fp->_aniMan->_flags & 0x100)) {
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC22_FROMSTOOL), 0, 0);
+
+ mq->addExCommandToEnd(new ExCommand(cmd));
+ mq->setFlags(mq->getFlags() | 1);
+ mq->chain(0);
+ }
}
void sceneHandler22_sub02(ExCommand *cmd) {
warning("STUB: sceneHandler22_sub02(cmd)");
}
-
int sceneHandler22(ExCommand *cmd) {
if (cmd->_messageKind != 17)
return 0;
@@ -206,10 +211,12 @@ int sceneHandler22(ExCommand *cmd) {
case 29:
if (!g_vars->scene22_var08) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+
if (ani && ani->_id == ANI_HANDLE_L) {
sceneHandler22_sub02(cmd);
return 0;
}
+
if (!g_vars->scene22_var07) {
if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_keyCode)) {
int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
@@ -225,8 +232,9 @@ int sceneHandler22(ExCommand *cmd) {
}
return 0;
}
+
if (g_fp->_aniMan->_statics->_staticsId == ST_MAN_RIGHT && !g_fp->_aniMan->_movement) {
- sceneHandler22_sub01(cmd);
+ sceneHandler22_fromStool(cmd);
return 0;
}