diff options
author | Filippos Karapetis | 2014-05-10 13:25:11 +0300 |
---|---|---|
committer | Filippos Karapetis | 2014-05-10 13:25:11 +0300 |
commit | 5ae5a1aa58987230a75166fdd71ad8cb608ff6b3 (patch) | |
tree | 6bfa6146bf21e88acbf31d24285a9b9b49a914cc /engines | |
parent | 600a715661333565e8546dfcafabf5e1da95d340 (diff) | |
download | scummvm-rg350-5ae5a1aa58987230a75166fdd71ad8cb608ff6b3.tar.gz scummvm-rg350-5ae5a1aa58987230a75166fdd71ad8cb608ff6b3.tar.bz2 scummvm-rg350-5ae5a1aa58987230a75166fdd71ad8cb608ff6b3.zip |
MADS: Start implementing scene 701
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes7.cpp | 87 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes7.h | 10 |
3 files changed, 98 insertions, 1 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index dd3410750f..a77c123793 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -251,7 +251,7 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) { // Scene group #7 (submerged men's city / upper floor) case 701: // outside elevator (after city is submerged) - return new DummyScene(vm); // TODO + return new Scene701(vm); case 702: // outside teleporter (after city is submerged) return new Scene702(vm); case 703: // water diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp index 3e6847135c..cb9880e1aa 100644 --- a/engines/mads/nebular/nebular_scenes7.cpp +++ b/engines/mads/nebular/nebular_scenes7.cpp @@ -89,6 +89,93 @@ void Scene7xx::sceneEntrySound() { /*------------------------------------------------------------------------*/ +void Scene701::setup() { + setPlayerSpritesPrefix(); + setAAName(); + + _scene->addActiveVocab(NOUN_BOAT); + _scene->addActiveVocab(VERB_CLIMB_INTO); + _scene->addActiveVocab(NOUN_FISHING_LINE); + _scene->addActiveVocab(VERB_WALKTO); +} + +void Scene701::enter() { + _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('x', 0)); + _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('b', 5)); + _globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('b', 0)); + //_globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('b', 1)); // FIXME: Invalid resource? + _globals._spriteIndexes[5] = _scene->_sprites.addSprites("*RM202A1"); + _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('b', 8)); + + if (_scene->_roomChanged) { + _game._objects.addToInventory(OBJ_BINOCULARS); + _game._objects.addToInventory(OBJ_TWINKIFRUIT); + _game._objects.addToInventory(OBJ_BOMB); + _game._objects.addToInventory(OBJ_CHICKEN); + _game._objects.addToInventory(OBJ_BONES); + + _globals[kCityFlooded] = true; + _globals[kLineStatus] = LINE_TIED; + _globals[kBoatRaised] = false; + } + + if (_globals[kBoatStatus] == BOAT_UNFLOODED) { + if (_globals[kBoatRaised]) { + _globals[kBoatStatus] = BOAT_GONE; + } else { + if (_globals[kLineStatus] == LINE_TIED) { + _globals[kBoatStatus] = BOAT_TIED_FLOATING; + } else { + if (_game._difficulty == DIFFICULTY_HARD) { + _globals[kBoatStatus] = BOAT_ADRIFT; + } else { + _globals[kBoatStatus] = BOAT_TIED; + } + } + } + } + + _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, 1); + _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[1], Common::Point(48, 136)); + _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10); + + int boatStatus = (_scene->_priorSceneId == 703) ? BOAT_GONE : _globals[kBoatStatus]; + + switch (boatStatus) { + case BOAT_TIED_FLOATING: + _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 20, 0, 0, 0); + _scene->_sequences.setDepth(_globals._sequenceIndexes[4], 10); + break; + case BOAT_ADRIFT: + _globals._sequenceIndexes[6] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[6], false, 20, 0, 0, 0); + _scene->_sequences.setDepth(_globals._sequenceIndexes[6], 10); + break; + case BOAT_TIED: + _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -1); + _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 9); + break; + case BOAT_GONE: + _scene->_hotspots.activate(NOUN_BOAT, false); + break; + default: + break; + } + + // TODO: Line status + + // TODO +} + +void Scene701::preActions() { + // TODO +} + +void Scene701::actions() { + // TODO +} + +/*------------------------------------------------------------------------*/ + void Scene702::setup() { setPlayerSpritesPrefix(); setAAName(); diff --git a/engines/mads/nebular/nebular_scenes7.h b/engines/mads/nebular/nebular_scenes7.h index ae5b822474..cc8220624d 100644 --- a/engines/mads/nebular/nebular_scenes7.h +++ b/engines/mads/nebular/nebular_scenes7.h @@ -50,6 +50,16 @@ public: Scene7xx(MADSEngine *vm) : NebularScene(vm) {} }; +class Scene701: public Scene7xx { +public: + Scene701(MADSEngine *vm) : Scene7xx(vm) {} + + virtual void setup(); + virtual void enter(); + virtual void preActions(); + virtual void actions(); +}; + class Scene702: public Scene7xx { public: Scene702(MADSEngine *vm) : Scene7xx(vm) {} |