diff options
author | Eugene Sandulenko | 2013-11-29 09:29:34 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2013-11-29 09:29:34 +0100 |
commit | be7325c309766721403bd4a21b8df4bbc514f4dd (patch) | |
tree | 15447d73cc29f6b7791a3bc7359c9789bf7d845b | |
parent | ba52b4aca701bdf7bead7a50baccee9868a3406c (diff) | |
download | scummvm-rg350-be7325c309766721403bd4a21b8df4bbc514f4dd.tar.gz scummvm-rg350-be7325c309766721403bd4a21b8df4bbc514f4dd.tar.bz2 scummvm-rg350-be7325c309766721403bd4a21b8df4bbc514f4dd.zip |
FULLPIPE: Implement sceneHandler04_dropBottle()
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 5 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 27 |
4 files changed, 30 insertions, 4 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 91593684e4..e1ec51a947 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -259,6 +259,7 @@ namespace Fullpipe { #define ST_EGTR_MID1 2863 #define ST_EGTR_MID2 2869 #define ST_EGTR_SLIM 336 +#define ST_HND_EMPTY 603 #define ST_IN1MAN_SLEEP 5112 #define ST_KZW_EMPTY 498 #define ST_LBN_0N 2832 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 5b55d40752..9d5d168395 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -96,6 +96,7 @@ Vars::Vars() { scene04_var19 = 0; scene04_var20 = 0; scene04_var24 = 0; + scene04_var26 = 0; selector = 0; } diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 217cfd9a5c..ed0da0a9db 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -90,8 +90,8 @@ public: Common::Point scene04_jumpRotateKozyawki[20]; Common::List<StaticANIObject *> scene04_kozyawkiObjList; - Common::Array<GameObject *> scene04_bottleObjList; - Common::Array<StaticANIObject *> scene04_kozyawkiAni; + Common::List<GameObject *> scene04_bottleObjList; + Common::List<StaticANIObject *> scene04_kozyawkiAni; int scene04_ladder; bool scene04_coinPut; @@ -122,6 +122,7 @@ public: int scene04_var19; int scene04_var20; StaticANIObject *scene04_var24; + int scene04_var26; PictureObject *selector; }; diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 30b5f0a254..f2fbfd3ef4 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -160,7 +160,7 @@ void scene04_initScene(Scene *sc) { } g_vars->scene04_var02 = 0; - g_vars->scene04_soundPlaying = 0; + g_vars->scene04_soundPlaying = false; g_vars->scene04_var04 = 0; g_vars->scene04_walkingKozyawka = 0; g_vars->scene04_var06 = 2; @@ -283,7 +283,30 @@ void sceneHandler04_clickPlank() { } void sceneHandler04_dropBottle() { - warning("sceneHandler04_dropBottle()"); + g_vars->scene04_var12 = 1; + g_vars->scene04_var26 = 10; + g_vars->scene04_var06 = 0; + + while (g_vars->scene04_kozyawkiAni.size()) { + StaticANIObject *koz = g_vars->scene04_kozyawkiAni.front(); + g_vars->scene04_kozyawkiAni.pop_front(); + + for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it) + if (*it == koz) { + g_vars->scene04_bottleObjList.erase(it); + break; + } + + koz->queueMessageQueue(0); + koz->hide(); + + g_vars->scene04_kozyawkiObjList.push_back(koz); + } + + g_vars->scene04_hand->changeStatics2(ST_HND_EMPTY); + + g_vars->scene04_hand->setOXY(429, 21); + g_vars->scene04_hand->_priority = 15; } void sceneHandler04_gotoLadder(int par) { |