aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-05-12 00:20:54 +0200
committerStrangerke2014-05-12 00:21:33 +0200
commit991096d01ed0befa2b56beea4091de9d04aafaac (patch)
tree830d2c60fe355ef9c8612471555eccafc5a14eaa /engines
parent8abcbf3fb08fbca6f0cfdb9eabd22cf56e83b440 (diff)
downloadscummvm-rg350-991096d01ed0befa2b56beea4091de9d04aafaac.tar.gz
scummvm-rg350-991096d01ed0befa2b56beea4091de9d04aafaac.tar.bz2
scummvm-rg350-991096d01ed0befa2b56beea4091de9d04aafaac.zip
MADS: Implement scene 620
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes6.cpp52
-rw-r--r--engines/mads/nebular/nebular_scenes6.h12
3 files changed, 65 insertions, 1 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index 7c5700ad72..4cbcb81490 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -247,7 +247,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
case 612: // expressway / maintenance building
return new DummyScene(vm); // TODO
case 620: // cutscene, viewport glass breaking
- return new DummyScene(vm); // TODO
+ return new Scene620(vm);
// Scene group #7 (submerged men's city / upper floor)
case 701: // outside elevator (after city is submerged)
diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp
index 46ef066c97..8cda6ed14d 100644
--- a/engines/mads/nebular/nebular_scenes6.cpp
+++ b/engines/mads/nebular/nebular_scenes6.cpp
@@ -1418,5 +1418,57 @@ void Scene607::actions() {
/*------------------------------------------------------------------------*/
+void Scene620::setup() {
+ _game._player._spritesPrefix = "";
+ setAAName();
+}
+
+void Scene620::enter() {
+ _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('b', 0));
+ _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, -1);
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _scene->_sequences.addTimer(30, 70);
+ _scene->_userInterface.setup(kInputLimitedSentences);
+ sceneEntrySound();
+}
+
+void Scene620::step() {
+ switch (_game._trigger) {
+ case 70:
+ _scene->_sequences.remove(_globals._sequenceIndexes[1]);
+ _scene->loadAnimation(formAnimName('E', -1), 71);
+ break;
+
+ case 71:
+ if (_scene->_priorSceneId == 751) {
+ _globals[kCityFlooded] = true;
+ _globals[kTeleporterRoom + 5] = 0;
+ _scene->_nextSceneId = 701;
+ } else if (_scene->_priorSceneId == 752) {
+ _globals[kCityFlooded] = true;
+ _globals[kTeleporterRoom + 5] = 0;
+ _scene->_nextSceneId = 702;
+ } else if (_scene->_priorSceneId < 501 || _scene->_priorSceneId > 752) {
+ _globals[kCityFlooded] = true;
+ _globals[kTeleporterRoom + 5] = 0;
+ _scene->_nextSceneId = _scene->_priorSceneId;
+ } else if (_scene->_priorSceneId >= 501 && _scene->_priorSceneId <= 612) {
+ _globals[kResurrectRoom] = _globals[kHoverCarLocation];
+ _game._objects.addToInventory(OBJ_TIMEBOMB);
+ _globals[kTimebombStatus] = 0;
+ _globals[kTimebombTimer] = 0;
+ _scene->_nextSceneId = 605;
+ }
+ _game._player._stepEnabled = true;
+ break;
+
+ default:
+ break;
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
} // End of namespace Nebular
} // End of namespace MADS
diff --git a/engines/mads/nebular/nebular_scenes6.h b/engines/mads/nebular/nebular_scenes6.h
index 0f7e7763ff..69db9eb4f3 100644
--- a/engines/mads/nebular/nebular_scenes6.h
+++ b/engines/mads/nebular/nebular_scenes6.h
@@ -160,6 +160,18 @@ public:
virtual void actions();
virtual void postActions() {};
};
+
+class Scene620: public Scene6xx{
+public:
+ Scene620(MADSEngine *vm) : Scene6xx(vm) {}
+
+ virtual void setup();
+ virtual void enter();
+ virtual void step();
+ virtual void preActions() {};
+ virtual void actions() {};
+ virtual void postActions() {};
+};
} // End of namespace Nebular
} // End of namespace MADS