aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/nebular_scenes1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/nebular/nebular_scenes1.cpp')
-rw-r--r--engines/mads/nebular/nebular_scenes1.cpp142
1 files changed, 142 insertions, 0 deletions
diff --git a/engines/mads/nebular/nebular_scenes1.cpp b/engines/mads/nebular/nebular_scenes1.cpp
index 1de4eca509..d684f02c84 100644
--- a/engines/mads/nebular/nebular_scenes1.cpp
+++ b/engines/mads/nebular/nebular_scenes1.cpp
@@ -30,6 +30,41 @@ namespace MADS {
namespace Nebular {
+void Scene1xx::sceneEntrySound() {
+ if (_vm->_musicFlag) {
+ switch (_scene->_nextSceneId) {
+ case 101:
+ _vm->_sound->command(11);
+ break;
+ case 102:
+ _vm->_sound->command(12);
+ break;
+ case 103:
+ _vm->_sound->command(3);
+ _vm->_sound->command(25);
+ break;
+ case 109:
+ _vm->_sound->command(13);
+ break;
+ case 110:
+ _vm->_sound->command(10);
+ break;
+ case 111:
+ _vm->_sound->command(3);
+ break;
+ case 112:
+ _vm->_sound->command(15);
+ break;
+ default:
+ if (_scene->_priorSceneId < 104 || _scene->_priorSceneId > 108)
+ _vm->_sound->command(10);
+ break;
+ }
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
void Scene101::setup() {
}
@@ -48,6 +83,113 @@ void Scene101::actions() {
void Scene101::postActions() {
}
+/*------------------------------------------------------------------------*/
+
+void Scene103::setup() {
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene103::enter() {
+ _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', 3));
+ _globals._spriteIndexes[4] = _scene->_sprites.addSprites(formAnimName('x', 4));
+ _globals._spriteIndexes[5] = _scene->_sprites.addSprites(formAnimName('x', 5));
+ _globals._spriteIndexes[6] = _scene->_sprites.addSprites(formAnimName('b', -1));
+ _globals._spriteIndexes[7] = _scene->_sprites.addSprites(formAnimName('h', -1));
+ _globals._spriteIndexes[8] = _scene->_sprites.addSprites(formAnimName('m', -1));
+ _globals._spriteIndexes[9] = _scene->_sprites.addSprites(formAnimName('t', -1));
+ _globals._spriteIndexes[10] = _scene->_sprites.addSprites(formAnimName('r', -1));
+ _globals._spriteIndexes[11] = _scene->_sprites.addSprites(formAnimName('c', -1));
+
+ _globals._spriteIndexes[12] = _scene->_sprites.addSprites("*RXMBD_2");
+ _globals._spriteIndexes[13] = _scene->_sprites.addSprites("*RXMRD_3");
+ _globals._spriteIndexes[15] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[0], false, 7, 0, 1, 0);
+ _globals._spriteIndexes[16] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[1], false, 6, 0, 2, 0);
+ _scene->_sequences.setDepth(_globals._spriteIndexes[16], 0);
+ _globals._spriteIndexes[17] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[2], false, 6, 0, 0, 25);
+ _globals._spriteIndexes[18] = _scene->_sequences.addSubEntry(
+ _globals._spriteIndexes[17], SM_FRAME_INDEX, 2, 72);
+ _globals._spriteIndexes[19] = _scene->_sequences.addSubEntry(
+ _globals._spriteIndexes[17], SM_FRAME_INDEX, 2, 72);
+ int idx = _scene->_sequences.addSubEntry(_globals._spriteIndexes[17],
+ SM_FRAME_INDEX, 2, 73);
+
+ _globals._spriteIndexes[23] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[8], false, 8);
+ _globals._spriteIndexes[22] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[7], false, 6);
+ _globals._spriteIndexes[19] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[4], false, 6);
+ _globals._spriteIndexes[20] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[5], false, 6);
+
+ if (_game._objects.isInRoom(OBJ_TIMER_MODULE)) {
+ _vm->_game->_scene._hotspots.activate(371, false);
+ } else {
+ _globals._spriteIndexes[26] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[11], false, 6);
+ }
+
+ if (_game._objects.isInRoom(OBJ_REBREATHER)) {
+ _vm->_game->_scene._hotspots.activate(289, false);
+ } else {
+ _globals._spriteIndexes[25] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[10], false, 6);
+ }
+
+ if (_globals[11]) {
+ _globals._spriteIndexes[24] = _scene->_sequences.addSpriteCycle(
+ _globals._spriteIndexes[9], false, 6);
+ _scene->_sequences.setAnimRange(_globals._spriteIndexes[24], -2, -2);
+ _scene->_hotspots.activate(362, false);
+ }
+
+ if (_scene->_priorSceneId != -2)
+ _game._player._playerPos = Common::Point(237, 74);
+ if (_scene->_priorSceneId == 102) {
+ _game._player._stepEnabled = false;
+
+ _globals._spriteIndexes[21] = _scene->_sequences.addReverseSpriteCycle(
+ _globals._spriteIndexes[6], false, 6, 1, 0, 0);
+ _scene->_sequences.addSubEntry(_globals._spriteIndexes[21], SM_0, 0, 70);
+ }
+
+ sceneEntrySound();
+ _vm->_game->loadQuoteSet(70, 51, 71, 7, 73, 0);
+
+ if (!_game._visitedScenes._sceneRevisited) {
+ int msgIndex = _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110,
+ 34, 0, 120, _game.getQuote(70));
+ _scene->_kernelMessages.setQuoted(msgIndex, 4, true);
+ }
+
+ if (_scene->_priorSceneId == 102)
+ _vm->_sound->command(20);
+
+ _vm->_palette->setEntry(252, 63, 63, 10);
+ _vm->_palette->setEntry(253, 45, 45, 10);
+ _globals._v0 = 0;
+ _globals._frameTime = _scene->_frameStartTime;
+}
+
+void Scene103::step() {
+}
+
+void Scene103::preActions() {
+}
+
+void Scene103::actions() {
+}
+
+void Scene103::postActions() {
+}
+
} // End of namespace Nebular
} // End of namespace MADS