aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes/scene26.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-06 00:23:07 +0200
committerEugene Sandulenko2014-01-06 00:23:07 +0200
commit07448e89f70bbd2e210f5f80f36c634affe40c6c (patch)
tree9d27362931679e2da11d6c78db68e83f7a7030dc /engines/fullpipe/scenes/scene26.cpp
parent86e244bbe5581cdf04d093dcd894f5aa646a0bca (diff)
downloadscummvm-rg350-07448e89f70bbd2e210f5f80f36c634affe40c6c.tar.gz
scummvm-rg350-07448e89f70bbd2e210f5f80f36c634affe40c6c.tar.bz2
scummvm-rg350-07448e89f70bbd2e210f5f80f36c634affe40c6c.zip
FULLPIPE: Implement sceneHandler26_clickVent()
Diffstat (limited to 'engines/fullpipe/scenes/scene26.cpp')
-rw-r--r--engines/fullpipe/scenes/scene26.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/engines/fullpipe/scenes/scene26.cpp b/engines/fullpipe/scenes/scene26.cpp
index 0c53130e3e..4fbcbf35db 100644
--- a/engines/fullpipe/scenes/scene26.cpp
+++ b/engines/fullpipe/scenes/scene26.cpp
@@ -120,12 +120,38 @@ void sceneHandler26_hideVent() {
g_vars->scene26_var05->hide();
}
-void sceneHandler26_clickVent(StaticANIObject *ani, ExCommand *cmd) {
- warning("STUB: sceneHandler26_clickVent(ani, cmd)");
+void sceneHandler26_sub01(StaticANIObject *ani) {
+ warning("STUB: sceneHandler26_sub01()");
}
-void sceneHandler26_sub01() {
- warning("STUB: sceneHandler26_sub01()");
+void sceneHandler26_clickVent(StaticANIObject *ani, ExCommand *cmd) {
+ if (ani->_okeyCode || g_fp->getObjectState(sO_Hatch_26) == g_fp->getObjectEnumState(sO_Hatch_26, sO_Opened)) {
+ if (g_fp->_aniMan->isIdle() && !(g_fp->_aniMan->_flags & 0x100)) {
+ g_vars->scene26_var05 = ani;
+
+ int x = ani->_ox - 20;
+ int y = ani->_oy + 61;
+
+ if (abs(x - g_fp->_aniMan->_ox) > 1 || abs(y - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_UP) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, x, y, 1, ST_MAN_UP);
+
+ if (mq) {
+ ExCommand *ex = new ExCommand(0, 17, MSG_SC26_CLICKVENT, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 3;
+ ex->_keyCode = ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex);
+
+ postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1);
+ }
+ } else {
+ sceneHandler26_sub01(ani);
+ }
+ }
+ }
+
+ cmd->_messageKind = 0;
}
int sceneHandler26(ExCommand *cmd) {