diff options
author | Eugene Sandulenko | 2014-03-30 17:04:13 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-03-30 17:04:13 +0300 |
commit | 6d51c401be9498d2f36dec0220fe441c54a6b3ee (patch) | |
tree | 23efc73cca55a0c90f417ad070ba4ef3ca52809b /engines/fullpipe | |
parent | 190a656c08914db94d09f1829312e78aa8084a87 (diff) | |
download | scummvm-rg350-6d51c401be9498d2f36dec0220fe441c54a6b3ee.tar.gz scummvm-rg350-6d51c401be9498d2f36dec0220fe441c54a6b3ee.tar.bz2 scummvm-rg350-6d51c401be9498d2f36dec0220fe441c54a6b3ee.zip |
FULLPIPE: Implement sceneHandler29_manHit()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/constants.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene29.cpp | 49 |
2 files changed, 52 insertions, 0 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index e670645431..3f568fd8b5 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -1296,9 +1296,11 @@ namespace Fullpipe { #define MV_ASS_HITGREEN 2138 #define MV_ASS_HITRED 2139 #define MV_MAN29_BEND 2091 +#define MV_MAN29_HIT 2088 #define MV_MAN29_JUMP 2090 #define MV_MAN29_RUN 2095 #define MV_MAN29_STANDUP 2092 +#define MV_MAN29_STANDUP_NORM 2093 #define MV_PTR_MOVEFAST 2102 #define MV_SHG_HITASS 2151 #define MV_SHR_HITASS 2152 @@ -1314,6 +1316,7 @@ namespace Fullpipe { #define SND_29_029 4759 #define ST_ASS_NORM 2122 #define ST_MAN29_RUNR 2140 +#define ST_MAN29_SITR 2141 #define ST_STR1_RIGHT 2143 #define ST_STR2_RIGHT 2144 #define ST_STR1_STAND 2110 diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp index 13da04da38..8d0fb5d6e1 100644 --- a/engines/fullpipe/scenes/scene29.cpp +++ b/engines/fullpipe/scenes/scene29.cpp @@ -265,6 +265,55 @@ bool sceneHandler29_sub16(StaticANIObject *ani, int maxx) { return false; } +void sceneHandler29_manHit() { + MGMInfo mgminfo; + + g_vars->scene29_var15 = 1; + + g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR); + g_fp->_aniMan->setOXY(g_vars->scene29_var20, g_vars->scene29_var21); + + mgminfo.ani = g_fp->_aniMan; + mgminfo.staticsId2 = ST_MAN29_SITR; + mgminfo.y1 = 463; + mgminfo.x1 = g_vars->scene29_var20 <= 638 ? 351 : 0; + mgminfo.field_1C = 10; + mgminfo.field_10 = 1; + mgminfo.flags = (g_vars->scene29_var20 <= 638 ? 2 : 0) | 0x44; + mgminfo.movementId = MV_MAN29_HIT; + + MessageQueue *mq = g_vars->scene29_mgm.genMovement(&mgminfo); + ExCommand *ex; + + if (mq) { + if (g_vars->scene29_var20 <= 638) { + ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP_NORM, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags = 2; + ex->_keyCode = g_fp->_aniMan->_okeyCode; + mq->addExCommandToEnd(ex); + + ex = new ExCommand(0, 17, MSG_SC29_STOPRIDE, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags = 2; + mq->addExCommandToEnd(ex); + + g_vars->scene29_var09 = 0; + g_vars->scene29_var10 = 0; + g_vars->scene29_var11 = 0; + g_vars->scene29_var12 = 0; + } else { + ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags = 2; + ex->_keyCode = g_fp->_aniMan->_okeyCode; + mq->addExCommandToEnd(ex); + } + + mq->setFlags(mq->getFlags() | 1); + + if (!mq->chain(g_fp->_aniMan)) + delete mq; + } +} + void sceneHandler29_sub03() { warning("STUB: sceneHandler29_sub03()"); } |