diff options
author | Eugene Sandulenko | 2013-12-14 01:18:35 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-14 01:19:02 +0200 |
commit | c111eff575a979bcf43c80e5fffc1c303b5892fc (patch) | |
tree | ae2133e76eb7865c30e62ed6033a1f1f77aee63b | |
parent | 56cf0ccabb56fcea3e6633e17765d617ac227505 (diff) | |
download | scummvm-rg350-c111eff575a979bcf43c80e5fffc1c303b5892fc.tar.gz scummvm-rg350-c111eff575a979bcf43c80e5fffc1c303b5892fc.tar.bz2 scummvm-rg350-c111eff575a979bcf43c80e5fffc1c303b5892fc.zip |
FULLPIPE: Implement sceneHandler04_shootKozyawka()
-rw-r--r-- | engines/fullpipe/constants.h | 3 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 114 |
2 files changed, 116 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 31ca2d3d33..6e9f117fb9 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -277,6 +277,7 @@ namespace Fullpipe { #define ST_HND_EMPTY 603 #define ST_IN1MAN_SLEEP 5112 #define ST_KZW_EMPTY 498 +#define ST_KZW_RIGHT 559 #define ST_LBN_0N 2832 #define ST_LBN_0P 2833 #define ST_LBN_1N 2753 @@ -301,12 +302,14 @@ namespace Fullpipe { #define ST_MAN_GOLADDER2 2843 #define ST_MAN_EMPTY 476 #define ST_MAN_LADDERDOWN 521 +#define ST_MAN_LOOKPLANK 555 #define ST_MAN_ONPLANK 552 #define ST_MAN_RIGHT 325 #define ST_MAN_SIT 1164 #define ST_MAN_STANDLADDER 453 #define ST_MAN_UP 449 #define ST_PNK_WEIGHTLEFT 503 +#define ST_PNK_WEIGHTRIGHT 504 #define ST_SPR_UP 544 #define TrubaDown 697 #define TrubaLeft 474 diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index d0cab72fa3..f5b376e002 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -549,8 +549,120 @@ void sceneHandler04_raisePlank() { g_vars->scene04_plank->startAnim(MV_PNK_WEIGHTLEFT, 0, -1); } +MessageQueue *sceneHandler04_kozFly3(StaticANIObject *ani, double phase) { + warning("STUB: sceneHandler04_kozFly3()"); + + return 0; +} + +MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) { + warning("STUB: sceneHandler04_kozFly5()"); + + return 0; +} + +MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) { + warning("STUB: sceneHandler04_kozFly6()"); + + return 0; +} + +MessageQueue *sceneHandler04_kozFly7(StaticANIObject *ani, double phase) { + warning("STUB: sceneHandler04_kozFly7()"); + + return 0; +} + +static const int kozTrajectory3[] = { + 3, 2, 0, + 3, 2, 0, + 3, 2, 0 +}; + +static const int kozTrajectory4[] = { + 5, 3, 1, + 5, 4, 1, + 5, 3, 1 +}; + +static const int kozTrajectory5[] = { + 6, 5, 4, + 6, 5, 4, + 6, 5, 4 +}; + +static const int kozTrajectory6[] = { + 7, 6, 5, + 7, 6, 5, + 7, 6, 5 +}; + void sceneHandler04_shootKozyawka() { - warning("STUB: sceneHandler04_shootKozyawka()"); + g_vars->scene04_plank->changeStatics2(ST_PNK_WEIGHTRIGHT); + + if (!g_vars->scene04_walkingKozyawka) + return; + + if (g_vars->scene04_walkingKozyawka->_movement) { + if (g_vars->scene04_walkingKozyawka->_movement->_id == MV_KZW_WALKPLANK) { + int dphase = g_vars->scene04_walkingKozyawka->_movement->_currDynamicPhaseIndex; + + if (dphase < 41) { + int col = 3 * dphase / 15; + if (col > 2) + col = 2; + + int row = g_vars->scene04_kozyawkiAni.size(); + if (row > 2) + row = 2; + + int idx = 3 * row + col; + int phase; + + if (g_vars->scene04_ladderOffset == 3) { + phase = kozTrajectory3[idx]; + } else if (g_vars->scene04_ladderOffset == 4) { + phase = kozTrajectory4[idx]; + } else { + if (g_vars->scene04_ladderOffset == 5) + phase = kozTrajectory5[idx]; + else + phase = kozTrajectory6[idx]; + } + + g_vars->scene04_walkingKozyawka->queueMessageQueue(0); + g_vars->scene04_walkingKozyawka->_movement = 0; + g_vars->scene04_walkingKozyawka->_statics = g_vars->scene04_walkingKozyawka->getStaticsById(ST_KZW_RIGHT); + + MessageQueue *mq; + + if (phase > 2) { + if (phase > 5) { + if (phase == 6) + mq = sceneHandler04_kozFly6(g_vars->scene04_walkingKozyawka); + else + mq = sceneHandler04_kozFly7(g_vars->scene04_walkingKozyawka, (double)(phase - 6) * 0.3333333333333333); + } else { + mq = sceneHandler04_kozFly5(g_vars->scene04_walkingKozyawka, (double)(phase - 2) * 0.3333333333333333); + } + } else { + mq = sceneHandler04_kozFly3(g_vars->scene04_walkingKozyawka, (double)phase * 0.5); + } + + if (mq) { + g_vars->scene04_var24 = g_vars->scene04_walkingKozyawka; + + if (!mq->chain(g_vars->scene04_walkingKozyawka) ) + delete mq; + } + } + } + } + + if (g_vars->scene04_ladderOffset > 3) + g_fullpipe->_aniMan->changeStatics1(ST_MAN_LOOKPLANK); + + g_vars->scene04_var04 = 1; } void sceneHandler04_showCoin() { |