diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes8.cpp | 51 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes8.h | 16 |
3 files changed, 69 insertions, 0 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 38153d9a6d..abc3cda700 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -202,6 +202,8 @@ Scene *BlueForceGame::createScene(int sceneNumber) { // Boat Rentals return new Scene840(); case 850: + // Boat Leaving/Entering Marina + return new Scene850(); case 860: case 870: case 880: diff --git a/engines/tsage/blue_force/blueforce_scenes8.cpp b/engines/tsage/blue_force/blueforce_scenes8.cpp index ff1837b2d1..c97b8689e7 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.cpp +++ b/engines/tsage/blue_force/blueforce_scenes8.cpp @@ -2505,6 +2505,57 @@ void Scene840::dispatch() { } } +/*-------------------------------------------------------------------------- + * Scene 850 - Boat Leaving/Entering Marina + * + *--------------------------------------------------------------------------*/ + +void Scene850::Timer1::signal() { + PaletteRotation *rot = BF_GLOBALS._scenePalette.addRotation(240, 254, 1); + rot->setDelay(25); + + remove(); +} + +/*--------------------------------------------------------------------------*/ + +void Scene850::postInit(SceneObjectList *OwnerList) { + SceneExt::postInit(); + loadScene(850); + BF_GLOBALS._sound1.fadeSound(35); + + BF_GLOBALS._player.disableControl(); + _timer.set(2, NULL); + + _object1.postInit(); + if (BF_GLOBALS._sceneManager._previousScene == 830) { + _sceneMode = 8500; + setAction(&_sequenceManager, this, 8500, &_object1, NULL); + } else { + BF_GLOBALS._sound1.changeSound(10); + _sceneMode = 8501; + setAction(&_sequenceManager, this, 8501, &_object1, NULL); + } +} + +void Scene850::remove() { + BF_GLOBALS._scenePalette.clearListeners(); + SceneExt::remove(); +} + +void Scene850::signal() { + switch (_sceneMode) { + case 8500: + BF_GLOBALS._sceneManager.changeScene(860); + break; + case 8501: + BF_GLOBALS._sceneManager.changeScene(830); + break; + default: + break; + } +} + } // End of namespace BlueForce } // End of namespace TsAGE diff --git a/engines/tsage/blue_force/blueforce_scenes8.h b/engines/tsage/blue_force/blueforce_scenes8.h index 5bdb9fac65..170b7cca72 100644 --- a/engines/tsage/blue_force/blueforce_scenes8.h +++ b/engines/tsage/blue_force/blueforce_scenes8.h @@ -393,6 +393,22 @@ public: virtual void dispatch(); }; +class Scene850: public SceneExt { + /* Timers */ + class Timer1: public Timer { + public: + virtual void signal(); + }; +public: + SequenceManager _sequenceManager; + Timer1 _timer; + NamedObject _object1; + ASoundExt _sound1; + + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void remove(); + virtual void signal(); +}; } // End of namespace BlueForce |