aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-04-15 17:43:35 +0200
committerStrangerke2014-04-15 17:43:35 +0200
commit52ba3b408362970b1764e569ddd8a01a66bb495b (patch)
tree043621b44d17bfa20bbbb56f9eb57ba60f880d75
parenteb1f885c42d7ef26ea8c39e67fcc8844b66ca544 (diff)
downloadscummvm-rg350-52ba3b408362970b1764e569ddd8a01a66bb495b.tar.gz
scummvm-rg350-52ba3b408362970b1764e569ddd8a01a66bb495b.tar.bz2
scummvm-rg350-52ba3b408362970b1764e569ddd8a01a66bb495b.zip
MADS: Implement scene 112
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp55
-rw-r--r--engines/mads/nebular/nebular_scenes1.h12
3 files changed, 66 insertions, 3 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index 8b18fad294..a3b75c6098 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -69,6 +69,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
return new Scene110(vm);
case 111:
return new Scene111(vm);
+ case 112:
+ return new Scene112(vm);
// Scene group #2
case 201:
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index 4cb6b8c67e..63f7f631ea 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -2822,7 +2822,7 @@ void Scene111::enter() {
if ((_scene->_priorSceneId < 201) && (_scene->_priorSceneId != -2)) {
_game._player._stepEnabled = false;
- _game._player._visible = false;
+ _game._player._visible = false;
_scene->loadAnimation(Resources::formatName(111, 'A', 0, EXT_AA, ""), 70);
_game._player._playerPos = Common::Point(234, 116);
_game._player._facing = FACING_EAST;
@@ -2895,9 +2895,9 @@ void Scene111::actions() {
switch (_game._trigger) {
case 0:
_scene->loadAnimation(Resources::formatName(111, 'A', 1, EXT_AA, ""), 1);
- _rexDivingFl = true;
+ _rexDivingFl = true;
_game._player._stepEnabled = false;
- _game._player._visible = false;
+ _game._player._visible = false;
break;
case 1:
@@ -2924,5 +2924,54 @@ void Scene111::actions() {
/*------------------------------------------------------------------------*/
+void Scene112::setup() {
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene112::enter() {
+ sceneEntrySound();
+
+ _globals._spriteIndexes[0] = _scene->_sprites.addSprites(formAnimName('X', 0));
+ _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('X', 1));
+ _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('X', 2));
+ _globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('X', 5));
+
+ _globals._sequenceIndexes[0] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[0], false, 10, 0, 17, 20);
+ _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 4, 0, 0, 0);
+ _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 6, 0, 3, 0);
+
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+
+ _scene->_userInterface.emptyTalkList();
+ _scene->_userInterface.setup(kInputConversation);
+
+ _scene->loadAnimation(Resources::formatName(112, 'X', -1, EXT_AA, ""), 70);
+}
+
+void Scene112::step() {
+ if ((_scene->_activeAnimation != nullptr) && (_game._storyMode == STORYMODE_NICE)) {
+ if (_scene->_activeAnimation->getCurrentFrame() >= 54) {
+ _scene->_activeAnimation->free();
+ _game._trigger = 70;
+ }
+ }
+
+ if (_game._trigger == 70) {
+ _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 7, 3, 0, 11);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 1);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SM_0, 0, 71);
+ }
+
+ if (_game._trigger == 71) {
+ _scene->_nextSceneId = 101;
+ _game._player._stepEnabled = true;
+ _game._player._visible = true;
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
} // End of namespace Nebular
} // End of namespace MADS
diff --git a/engines/mads/nebular/nebular_scenes1.h b/engines/mads/nebular/nebular_scenes1.h
index a2637b57e0..b4585b0ed3 100644
--- a/engines/mads/nebular/nebular_scenes1.h
+++ b/engines/mads/nebular/nebular_scenes1.h
@@ -246,6 +246,18 @@ public:
virtual void postActions() {};
};
+class Scene112 : public Scene1xx {
+public:
+ Scene112(MADSEngine *vm) : Scene1xx(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