aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-18 18:38:08 +0200
committerEugene Sandulenko2013-12-18 18:38:08 +0200
commitdb7b6b3352817990a7a25a6e253ea165074d47ec (patch)
tree0a10cc4ddc837b09897842a02884052f9dc1199e /engines
parent29773ef1c055ce898c89abcc0415b23d8e10e849 (diff)
downloadscummvm-rg350-db7b6b3352817990a7a25a6e253ea165074d47ec.tar.gz
scummvm-rg350-db7b6b3352817990a7a25a6e253ea165074d47ec.tar.bz2
scummvm-rg350-db7b6b3352817990a7a25a6e253ea165074d47ec.zip
FULLPIPE: Implement sceneHandler06_mumsyBallTake()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h12
-rw-r--r--engines/fullpipe/init.cpp2
-rw-r--r--engines/fullpipe/objectnames.h4
-rw-r--r--engines/fullpipe/scenes.h2
-rw-r--r--engines/fullpipe/scenes/scene04.cpp2
-rw-r--r--engines/fullpipe/scenes/scene06.cpp101
6 files changed, 111 insertions, 12 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index b1f005d718..d1e1820c27 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -176,6 +176,16 @@ namespace Fullpipe {
#define MV_MAN6_THROWBALL 2692
#define MV_MANHDL_HANDLEDOWN 630
#define MV_MANHDL_HANDLEUP 631
+#define MV_MOM_CYCLEBK 3012
+#define MV_MOM_JUMPBK 662
+#define MV_MOM_JUMPFW 661
+#define MV_MOM_STARTBK 3010
+#define MV_MOM_STOPBK 3013
+#define MV_MOM_TAKE1 2885
+#define MV_MOM_TAKE2 2886
+#define MV_MOM_TAKE3 2887
+#define MV_MOM_TAKE4 2888
+#define MV_MOM_TAKE5 2889
#define MV_OTM_BOXHANDLEDOWN 626
#define MV_OTM_BOXHANDLEUP 627
#define MV_OTM_HANDLEDOWN 620
@@ -259,7 +269,9 @@ namespace Fullpipe {
#define QU_KOZAW_WALK 505
#define QU_MOM_JUMPBK 671
#define QU_MOM_JUMPFW 670
+#define QU_MOM_SITDOWN 685
#define QU_MOM_STANDUP 2899
+#define QU_MOM_TOLIFT 2902
#define QU_PNK_CLICK 550
#define QU_SC3_ENTERLIFT 2779
#define QU_SC3_EXITLIFT 2808
diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp
index 34d8335fc2..beac854d5b 100644
--- a/engines/fullpipe/init.cpp
+++ b/engines/fullpipe/init.cpp
@@ -50,7 +50,7 @@ void FullpipeEngine::initObjectStates() {
setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle));
setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot));
setObjectState(sO_Fly_12, 0);
- setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable));
+ setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_IsNotAvailable));
setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7));
setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_IsSleeping));
setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty));
diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h
index 2cea77cf2a..b61a5c6f62 100644
--- a/engines/fullpipe/objectnames.h
+++ b/engines/fullpipe/objectnames.h
@@ -135,7 +135,7 @@ namespace Fullpipe {
#define sO_NotGrown "\xcd\xe5 \xe2\xfb\xf0\xee\xf1" // "Не вырос"
#define sO_DidNotCrackEgg "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо"
#define sO_NotFallen "\xcd\xe5 \xef\xe0\xe4\xe0\xeb" // "Не падал"
-#define sO_NotAvailable "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна"
+#define sO_IsNotAvailable "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна"
#define sO_CannotTake "\xcd\xe5\xeb\xfc\xe7\xff \xe2\xe7\xff\xf2\xfc" // "Нельзя взять"
#define sO_No "\xcd\xe5\xf2" // "Нет"
#define sO_LowerHatch_23 "\xcd\xe8\xe6\xed\xe8\xe9 \xeb\xfe\xea_23" // "Нижний люк_23"
@@ -222,7 +222,7 @@ namespace Fullpipe {
#define sO_NearPipe "\xd3 \xf2\xf0\xf3\xe1\xfb" // "У трубы"
#define sO_Janitors "\xd3\xe1\xee\xf0\xf9\xe8\xea\xe8" // "Уборщики"
#define sO_Janitress "\xd3\xe1\xee\xf0\xf9\xe8\xf6\xe0" // "Уборщица"
-#define sO_Gone "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала"
+#define sO_IsGone "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала"
#define sO_FallenOnce "\xd3\xef\xe0\xeb \xf0\xe0\xe7" // "Упал раз"
#define sO_FallenBrush "\xd3\xef\xe0\xeb\xe0 \xf9\xe5\xf2\xea\xe0" // "Упала щетка"
#define sO_NotBroken "\xd6\xe5\xeb\xe0" // "Цела"
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 15f5e7ac92..8f404d223c 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -152,7 +152,7 @@ public:
int scene06_var02;
int scene06_var03;
int scene06_var04;
- int scene06_var06;
+ StaticANIObject *scene06_var06;
StaticANIObject *scene06_invHandle;
StaticANIObject *scene06_liftButton;
StaticANIObject *scene06_ballDrop;
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 8415aee6fd..28b2d77d5b 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -182,7 +182,7 @@ void scene04_initScene(Scene *sc) {
g_vars->scene04_bigBallCounter = 0;
g_vars->scene04_bigBallFromLeft = true;
- if (g_fullpipe->getObjectState(sO_BigMumsy) != g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_Gone))
+ if (g_fullpipe->getObjectState(sO_BigMumsy) != g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsGone))
g_vars->scene04_mamasha->hide();
g_vars->scene04_speaker = sc->getStaticANIObject1ById(ANI_SPEAKER_4, -1);
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 7b765373b2..5a63b6c230 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -73,7 +73,6 @@ void sceneHandler06_setExits(Scene *sc) {
}
void sceneHandler06_winArcade() {
- warning("STUB: sceneHandler06_winArcade()");
}
void sceneHandler06_enableDrops() {
@@ -93,8 +92,96 @@ void sceneHandler06_enableDrops() {
sceneHandler06_setExits(g_fullpipe->_currentScene);
}
-void sceneHandler06_sub01() {
- warning("STUB: sceneHandler06_sub01()");
+void sceneHandler06_mumsyBallTake() {
+ int momAni = 0;
+
+ switch (g_vars->scene06_var13) {
+ case 1:
+ momAni = MV_MOM_TAKE1;
+ break;
+ case 2:
+ momAni = MV_MOM_TAKE2;
+ break;
+ case 3:
+ momAni = MV_MOM_TAKE3;
+ break;
+ case 4:
+ momAni = MV_MOM_TAKE4;
+ break;
+ case 5:
+ momAni = MV_MOM_TAKE5;
+ break;
+ }
+
+ MessageQueue *mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+
+ ExCommand *ex = new ExCommand(ANI_MAMASHA, 2, 50, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags = 2u;
+ mq->addExCommandToEnd(ex);
+
+ if (g_vars->scene06_var13 >= 5) {
+ g_fullpipe->setObjectState(sO_BigMumsy, g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsGone));
+
+ if (g_fullpipe->getObjectState(sO_ClockAxis) == g_fullpipe->getObjectEnumState(sO_ClockAxis, sO_IsNotAvailable))
+ g_fullpipe->setObjectState(sO_ClockAxis, g_fullpipe->getObjectEnumState(sO_ClockAxis, sO_WithoutHandle));
+
+ ex = new ExCommand(ANI_MAMASHA, 1, momAni, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+
+ if (g_vars->scene06_mumsyPos + 3 >= 0) {
+ ex = new ExCommand(ANI_MAMASHA, 1, MV_MOM_STARTBK, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2u;
+ mq->addExCommandToEnd(ex);
+
+ for (int i = 0; i < g_vars->scene06_mumsyPos + 3; i++) {
+ ex = new ExCommand(ANI_MAMASHA, 1, MV_MOM_CYCLEBK, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+
+ ex = new ExCommand(ANI_MAMASHA, 1, MV_MOM_STOPBK, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+
+ ex = new ExCommand(0, 18, QU_MOM_TOLIFT, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+ } else {
+ if (momAni) {
+ ex = new ExCommand(ANI_MAMASHA, 1, momAni, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+
+ if (g_vars->scene06_mumsyPos < 0) {
+ for (int i = 0; i > g_vars->scene06_mumsyPos; i--) {
+ ex = new ExCommand(ANI_MAMASHA, 1, MV_MOM_JUMPFW, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+ } else if (g_vars->scene06_mumsyPos > 0) {
+ for (int i = 0; i < g_vars->scene06_mumsyPos; i++) {
+ ex = new ExCommand(ANI_MAMASHA, 1, MV_MOM_JUMPBK, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 2;
+ mq->addExCommandToEnd(ex);
+ }
+ }
+
+ ex = new ExCommand(0, 18, QU_MOM_SITDOWN, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3u;
+ mq->addExCommandToEnd(ex);
+ }
+
+ mq->setFlags(mq->getFlags() | 1);
+ mq->chain(0);
+
+ g_vars->scene06_var13 = 0;
+ g_vars->scene06_var07 = 0;
+
+ g_fullpipe->_aniMan2 = 0;
}
void sceneHandler06_spinHandle() {
@@ -147,7 +234,7 @@ int sceneHandler06_updateScreenCallback() {
int res;
res = g_fullpipe->drawArcadeOverlay(g_vars->scene06_var07);
- if (!res )
+ if (!res)
g_fullpipe->_updateScreenCallback = 0;
return res;
@@ -263,7 +350,7 @@ void sceneHandler06_sub03() {
}
void sceneHandler06_sub10() {
- if (g_vars->scene06_numBallsGiven >= 15 || g_vars->scene06_var13 >= 5 )
+ if (g_vars->scene06_numBallsGiven >= 15 || g_vars->scene06_var13 >= 5)
g_vars->scene06_ballDrop->hide();
else
chainQueue(QU_SC6_DROPS3, 0);
@@ -398,7 +485,7 @@ int sceneHandler06(ExCommand *ex) {
if (g_vars->scene06_var13 < 5 || !g_vars->scene06_var07)
return 0;
- sceneHandler06_sub01();
+ sceneHandler06_mumsyBallTake();
break;
case MSG_SC6_JUMPFW:
@@ -575,7 +662,7 @@ int sceneHandler06(ExCommand *ex) {
&& !g_vars->scene06_ballDrop->_movement
&& !g_vars->scene06_mumsy->_movement
&& !g_vars->scene06_var16)
- sceneHandler06_sub01();
+ sceneHandler06_mumsyBallTake();
g_fullpipe->_behaviorManager->updateBehaviors();
g_fullpipe->startSceneTrack();