diff options
author | Paul Gilbert | 2011-10-02 23:39:42 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-10-02 23:39:42 +1100 |
commit | 30dd2db8fe8c19a0fe2c8ff5784a7e5e8ee1d878 (patch) | |
tree | 0355268202ae2cace009b530b7f9c227d8c82592 | |
parent | 89d9aca80416ef19eebd748af48954f46d24f1e7 (diff) | |
download | scummvm-rg350-30dd2db8fe8c19a0fe2c8ff5784a7e5e8ee1d878.tar.gz scummvm-rg350-30dd2db8fe8c19a0fe2c8ff5784a7e5e8ee1d878.tar.bz2 scummvm-rg350-30dd2db8fe8c19a0fe2c8ff5784a7e5e8ee1d878.zip |
TSAGE: Implemented Blue Force scene 265 - Graduation Article
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.cpp | 6 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_logic.h | 1 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes0.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes2.cpp | 49 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes2.h | 13 |
5 files changed, 70 insertions, 1 deletions
diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index caaa5301b8..6f3a0f1cb5 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -92,6 +92,8 @@ Scene *BlueForceGame::createScene(int sceneNumber) { // Credits - Gun Training return new Scene225(); case 265: + // Graduation Article + return new Scene265(); case 270: case 271: case 280: @@ -786,6 +788,10 @@ void SceneExt::endStrip() { } } +void SceneExt::clearScreen() { + BF_GLOBALS._screenSurface.fillRect(BF_GLOBALS._screenSurface.getBounds(), 0); +} + /*--------------------------------------------------------------------------*/ PalettedScene::PalettedScene(): SceneExt() { diff --git a/engines/tsage/blue_force/blueforce_logic.h b/engines/tsage/blue_force/blueforce_logic.h index 969e4abd8b..3fa7beeb73 100644 --- a/engines/tsage/blue_force/blueforce_logic.h +++ b/engines/tsage/blue_force/blueforce_logic.h @@ -221,6 +221,7 @@ public: bool display(CursorType action); void fadeOut(); void gunDisplay(); + void clearScreen(); }; class PalettedScene: public SceneExt { diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp index 8d58d554e8..1e8c535f5f 100644 --- a/engines/tsage/blue_force/blueforce_scenes0.cpp +++ b/engines/tsage/blue_force/blueforce_scenes0.cpp @@ -419,7 +419,7 @@ void Scene50::postInit(SceneObjectList *OwnerList) { void Scene50::remove() { // Blank out the screen - BF_GLOBALS._screenSurface.fillRect(BF_GLOBALS._screenSurface.getBounds(), 0); + clearScreen(); SceneExt::remove(); BF_GLOBALS._uiElements._active = true; diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp index 3672b6efd8..f201e58e80 100644 --- a/engines/tsage/blue_force/blueforce_scenes2.cpp +++ b/engines/tsage/blue_force/blueforce_scenes2.cpp @@ -707,6 +707,55 @@ void Scene225::remove() { SceneExt::remove(); } +/*-------------------------------------------------------------------------- + * Scene 265 - Graduation Article + * + *--------------------------------------------------------------------------*/ + +void Scene265::Action1::signal() { + switch (_actionIndex++) { + case 0: + BF_GLOBALS._scenePalette.loadPalette(2); + setDelay(30); + break; + case 1: + BF_GLOBALS._scenePalette.refresh(); + setDelay(240); + break; + case 2: + ADD_MOVER(BF_GLOBALS._player, 160, 280); + break; + case 3: + // Wait until sound finishes playing + if (BF_GLOBALS._sound1.isPlaying()) + _actionIndex = 3; + setDelay(1); + break; + case 4: + BF_GLOBALS._dayNumber = 1; + BF_GLOBALS._sceneManager.changeScene(190); + break; + default: + break; + } +} + +/*--------------------------------------------------------------------------*/ + +void Scene265::postInit(SceneObjectList *OwnerList) { + SceneExt::postInit(); + loadScene(265); + + BF_GLOBALS._player.postInit(); + BF_GLOBALS._player.setPosition(Common::Point(160, 100)); + BF_GLOBALS._player.hide(); + setAction(&_action1); +} + +void Scene265::remove() { + clearScreen(); + remove(); +} } // End of namespace BlueForce diff --git a/engines/tsage/blue_force/blueforce_scenes2.h b/engines/tsage/blue_force/blueforce_scenes2.h index 4b1ebba90a..15f9487ddc 100644 --- a/engines/tsage/blue_force/blueforce_scenes2.h +++ b/engines/tsage/blue_force/blueforce_scenes2.h @@ -152,6 +152,19 @@ public: virtual void remove(); }; +class Scene265: public SceneExt { + /* Actions */ + class Action1: public ActionExt { + public: + virtual void signal(); + }; +public: + Action1 _action1; + + virtual void postInit(SceneObjectList *OwnerList = NULL); + virtual void remove(); +}; + } // End of namespace BlueForce } // End of namespace TsAGE |