diff options
author | Eugene Sandulenko | 2014-03-27 23:53:19 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-03-27 23:53:36 +0200 |
commit | 19f427f9a510866cecdeed896a4724401e1167bd (patch) | |
tree | 26dd4468e52da2d908a2cdbc00a6d87cd2402b28 /engines/fullpipe | |
parent | 91165bd84135bb3ecd5476d9a2d89b06cca527ef (diff) | |
download | scummvm-rg350-19f427f9a510866cecdeed896a4724401e1167bd.tar.gz scummvm-rg350-19f427f9a510866cecdeed896a4724401e1167bd.tar.bz2 scummvm-rg350-19f427f9a510866cecdeed896a4724401e1167bd.zip |
FULLPIPE: Implement sceneHandler29_clickPorter()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/scenes/scene29.cpp | 47 |
1 files changed, 43 insertions, 4 deletions
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp index 0820f768b5..910868608d 100644 --- a/engines/fullpipe/scenes/scene29.cpp +++ b/engines/fullpipe/scenes/scene29.cpp @@ -183,10 +183,6 @@ void sceneHandler29_shootRed() { warning("STUB: sceneHandler29_shootRed()"); } -void sceneHandler29_clickPorter(ExCommand *cmd) { - warning("STUB: sceneHandler29_clickPorter()"); -} - void sceneHandler29_manJump() { if (!g_fp->_aniMan->_movement || g_fp->_aniMan->_movement->_id == MV_MAN29_RUN || g_fp->_aniMan->_movement->_id == MV_MAN29_STANDUP) { g_vars->scene29_var12 = 0; @@ -286,6 +282,49 @@ void sceneHandler29_manToR() { g_fp->_scrollSpeed = 4; } +void sceneHandler29_clickPorter(ExCommand *cmd) { + if (!g_fp->_aniMan->isIdle() || g_fp->_aniMan->_flags & 0x100) { + cmd->_messageKind = 0; + + return; + } + + if (g_vars->scene29_var20 <= g_vars->scene29_porter->_ox) { + if (ABS(351 - g_vars->scene29_var20) > 1 || ABS(443 - g_vars->scene29_var21) > 1 + || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) { + if (g_fp->_msgX != 351 || g_fp->_msgY != 443) { + MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 351, 443, 1, ST_MAN_RIGHT); + + if (mq) { + mq->addExCommandToEnd(cmd->createClone()); + + postExCommand(g_fp->_aniMan->_id, 2, 351, 443, 0, -1); + } + } + } else { + sceneHandler29_manToL(); + } + } else { + g_vars->scene29_var20 = g_fp->_aniMan->_ox; + g_vars->scene29_var21 = g_fp->_aniMan->_oy; + + if (ABS(1582 - g_vars->scene29_var20) > 1 || ABS(445 - g_fp->_aniMan->_oy) > 1 + || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) { + if (g_fp->_msgX != 1582 || g_fp->_msgY != 445) { + MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 1582, 445, 1, (0x4000 | ST_MAN_RIGHT)); + + if (mq) { + mq->addExCommandToEnd(cmd->createClone()); + + postExCommand(g_fp->_aniMan->_id, 2, 1582, 445, 0, -1); + } + } + } else { + sceneHandler29_manToR(); + } + } +} + void sceneHandler29_sub05() { warning("STUB: sceneHandler29_sub05()"); } |