diff options
author | Eugene Sandulenko | 2013-12-14 13:14:00 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-14 15:15:09 +0200 |
commit | f57ce931fd9c0862251ce4e39fe3170446021166 (patch) | |
tree | 2e2fddf1adfa7f84fa4ba4076798f97379eb1368 | |
parent | 2ab8287f202995fd635f86813163cef12cf1b5f6 (diff) | |
download | scummvm-rg350-f57ce931fd9c0862251ce4e39fe3170446021166.tar.gz scummvm-rg350-f57ce931fd9c0862251ce4e39fe3170446021166.tar.bz2 scummvm-rg350-f57ce931fd9c0862251ce4e39fe3170446021166.zip |
FULLPIPE: Implement sceneHandler04_kozFly5()
-rw-r--r-- | engines/fullpipe/constants.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/motion.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 65 |
3 files changed, 68 insertions, 2 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index dcc9974af9..b0b6202caa 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -115,6 +115,8 @@ namespace Fullpipe { #define MV_BTN_CLICK 599 #define MV_CLK_GO 589 #define MV_HND_POINT 602 +#define MV_KZW_JUMPHIT 2857 +#define MV_KZW_JUMPOUT 586 #define MV_KZW_STANDUP 563 #define MV_KZW_TURN 562 #define MV_MAN_GOD 481 @@ -279,6 +281,7 @@ namespace Fullpipe { #define ST_HND_EMPTY 603 #define ST_IN1MAN_SLEEP 5112 #define ST_KZW_EMPTY 498 +#define ST_KZW_JUMPOUT 587 #define ST_KZW_RIGHT 559 #define ST_KZW_SIT 560 #define ST_LBN_0N 2832 diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index b49fea55bc..21841af134 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -146,6 +146,8 @@ struct MGMInfo { int x2; int y2; int flags; + + MGMInfo() { memset(this, 0, sizeof(MGMInfo)); } }; class MGM : public CObject { diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index d3abe32a8b..a75d98d9cd 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -599,9 +599,70 @@ MessageQueue *sceneHandler04_kozFly3(StaticANIObject *ani, double phase) { } MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) { - warning("STUB: sceneHandler04_kozFly5()"); + MGM mgm; + MGMInfo mgminfo; - return 0; + mgm.addItem(ANI_KOZAWKA); + + mgminfo.ani = ani; + mgminfo.staticsId2 = ST_KZW_JUMPOUT; + mgminfo.x1 = 525; + mgminfo.y1 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase); + mgminfo.field_1C = 10; + mgminfo.field_10 = 1; + mgminfo.flags = 78; + mgminfo.movementId = MV_KZW_JUMPHIT; + + MessageQueue *mq1 = mgm.genMovement(&mgminfo); + + memset(&mgminfo, 0, sizeof(mgminfo)); + mgminfo.ani = ani; + mgminfo.staticsId1 = ST_KZW_JUMPOUT; + mgminfo.staticsId2 = ST_KZW_SIT; + mgminfo.x2 = 525; + mgminfo.y2 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase); + mgminfo.y1 = 486; + mgminfo.field_1C = 10; + mgminfo.field_10 = 1; + mgminfo.flags = 117; + mgminfo.movementId = MV_KZW_JUMPOUT; + + MessageQueue *mq2 = mgm.genMovement(&mgminfo); + + if (mq1 && mq2) { + mq1->addExCommandToEnd(new ExCommand(mq2->getExCommandByIndex(0))); + + delete mq2; + + ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 2; + ex->_keyCode = ani->_okeyCode; + mq1->addExCommandToEnd(ex); + + ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_TURN, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 2; + ex->_keyCode = ani->_okeyCode; + mq1->addExCommandToEnd(ex); + + for (int i = 0; i < 5; i++) { + ex = new ExCommand(ANI_KOZAWKA, 1, rMV_KZW_GOR, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 2; + ex->_keyCode = ani->_okeyCode; + mq1->addExCommandToEnd(ex); + } + + ex = new ExCommand(ANI_KOZAWKA, 6, 0, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + ex->_keyCode = ani->_okeyCode; + mq1->addExCommandToEnd(ex); + + ex = new ExCommand(ANI_KOZAWKA, 17, MSG_KOZAWRESTART, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + ex->_keyCode = ani->_okeyCode; + mq1->addExCommandToEnd(ex); + } + + return mq1; } MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) { |