diff options
author | Eugene Sandulenko | 2014-03-03 00:13:57 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-03-03 00:14:12 +0200 |
commit | 88f8e00773c5b929b5f92e46dd0b4e7e07836d36 (patch) | |
tree | 9f3fba0da49be618568019ca5858fede67694366 | |
parent | 2be4c69939215ed6d2e2cac17eb2d9e341dea317 (diff) | |
download | scummvm-rg350-88f8e00773c5b929b5f92e46dd0b4e7e07836d36.tar.gz scummvm-rg350-88f8e00773c5b929b5f92e46dd0b4e7e07836d36.tar.bz2 scummvm-rg350-88f8e00773c5b929b5f92e46dd0b4e7e07836d36.zip |
FULLPIPE: Implement scene19_preload()
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scene.cpp | 4 | ||||
-rw-r--r-- | engines/fullpipe/scene.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene18and19.cpp | 44 | ||||
-rw-r--r-- | engines/fullpipe/statics.cpp | 1 |
7 files changed, 51 insertions, 3 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index cd0a38ebf3..b825a1dfdf 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -892,6 +892,7 @@ namespace Fullpipe { #define PIC_SC19_RTRUBA3 1515 #define SND_19_015 3928 #define SND_19_016 4995 +#define ST_KSL_NORM 1461 // Scene 20 #define ANI_GRANDMA_20 2427 diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index a0151dd9be..462401b3b2 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -334,6 +334,10 @@ void Scene::setPictureObjectsFlag4() { } } +void Scene::stopAllSounds() { + warning("STUB: Scene:stopAllSounds()"); +} + PictureObject *Scene::getPictureObjectById(int objId, int flags) { for (uint i = 0; i < _picObjList.size(); i++) { if (((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_okeyCode == flags) diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 86a06904e1..8306974f7b 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -78,6 +78,8 @@ class Scene : public Background { void initObjectCursors(const char *name); + void stopAllSounds(); + private: static bool compareObjPriority(const void *p1, const void *p2); void objectList_sortByPriority(PtrList &list, bool skipFirst = false); diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index b7ef569bcc..352a8795f6 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -306,6 +306,7 @@ Vars::Vars() { scene19_var02 = 0; scene19_var03 = 0; scene19_var04 = 0; + scene19_var05 = false; scene20_fliesCountdown = 0; scene20_grandma = 0; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 56aa5019a6..0a4af9c2ea 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -498,6 +498,7 @@ public: int scene19_var02; int scene19_var03; int scene19_var04; + bool scene19_var05; int scene20_fliesCountdown; StaticANIObject *scene20_grandma; diff --git a/engines/fullpipe/scenes/scene18and19.cpp b/engines/fullpipe/scenes/scene18and19.cpp index 0f03a68cad..d2fb8d43ce 100644 --- a/engines/fullpipe/scenes/scene18and19.cpp +++ b/engines/fullpipe/scenes/scene18and19.cpp @@ -63,8 +63,48 @@ void scene18_preload() { } } -void scene19_preload(Scene *sc, int key) { - warning("WARNING: scene19_preload()"); +void scene19_preload(Scene *sc, int entranceId) { + if (entranceId == TrubaRight) { + g_vars->scene18_var15 = 1; + } else { + g_vars->scene18_var15 = 0; + g_vars->scene19_var05 = (entranceId == PIC_SC19_RTRUBA3); + } + + for (uint i = 0; i < g_vars->scene18_var07.size(); i++) { + if (!g_vars->scene18_var15 && (g_vars->scene18_var07[i]->sflags & 0x20)) { + Scene *oldsc = g_fp->_currentScene; + + g_vars->scene18_var07[i]->sflags = 1; + + g_fp->_currentScene = sc; + g_vars->scene18_var07[i]->ani->changeStatics2(ST_KSL_NORM); + g_vars->scene18_var07[i]->ani->_priority = 30; + g_fp->_currentScene = oldsc; + } + + sc->deleteStaticANIObject(g_vars->scene18_var07[i]->ani); + } + + if (g_vars->scene18_whirlgig->_movement) { + g_vars->scene18_var09 = g_vars->scene18_whirlgig->_movement->_currDynamicPhaseIndex + 1; + + int mx; + + if (g_vars->scene18_whirlgig->_movement->_currMovement) + mx = g_vars->scene18_whirlgig->_movement->_currMovement->_dynamicPhases.size(); + else + mx = g_vars->scene18_whirlgig->_movement->_dynamicPhases.size(); + + if (g_vars->scene18_var09 > mx - 1) + g_vars->scene18_var09 = -1; + } else { + g_vars->scene18_var09 = 0; + } + + sc->deleteStaticANIObject(g_vars->scene18_boy); + sc->deleteStaticANIObject(g_vars->scene18_girl); + sc->stopAllSounds(); } void scene18_sub2(StaticANIObject *ani, Scene *sc) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 86082c620d..75c1c7d1ea 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -503,7 +503,6 @@ void Movement::draw(bool flipFlag, int angle) { } } - void StaticANIObject::loadMovementsPixelData() { for (uint i = 0; i < _movements.size(); i++) ((Movement *)_movements[i])->loadPixelData(); |