aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-04-20 22:12:54 +0200
committerStrangerke2014-04-20 22:13:24 +0200
commitfb78efa3a798707f86e8902ce10a5370033a9b8d (patch)
treea2eea857c8b2d9b780383a66247541ac0d75ff90
parent2ccaea811f7c1859fc474eda92e7ceb48b3d5adf (diff)
downloadscummvm-rg350-fb78efa3a798707f86e8902ce10a5370033a9b8d.tar.gz
scummvm-rg350-fb78efa3a798707f86e8902ce10a5370033a9b8d.tar.bz2
scummvm-rg350-fb78efa3a798707f86e8902ce10a5370033a9b8d.zip
MADS: Implement scene 316
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes3.cpp457
-rw-r--r--engines/mads/nebular/nebular_scenes3.h4
3 files changed, 463 insertions, 0 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index 1c19d244b9..8c75cbdd7b 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -123,6 +123,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
return new Scene311(vm);
case 313:
return new Scene313(vm);
+ case 316:
+ return new Scene316(vm);
// Scene group #8
case 804:
diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp
index 7c485481b3..e1d1180dc4 100644
--- a/engines/mads/nebular/nebular_scenes3.cpp
+++ b/engines/mads/nebular/nebular_scenes3.cpp
@@ -1827,5 +1827,462 @@ void Scene313::actions() {
/*------------------------------------------------------------------------*/
+void Scene316::setup() {
+ if (_scene->_currentSceneId == 366)
+ _globals[kSexOfRex] = REX_MALE;
+
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene316::handleRexInGrate() {
+ switch (_game._trigger) {
+ case 0:
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _globals._sequenceIndexes[4] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 1);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+ _scene->_sequences.addTimer(15, 1);
+ break;
+
+ case 1:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[4]);
+ _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 12, 3, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 2, 3);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
+ break;
+
+ case 2: {
+ int oldIdx = _globals._sequenceIndexes[4];
+ _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 4, 8);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx);
+
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
+ }
+ break;
+
+ case 3: {
+ int oldIdx = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx);
+ }
+ break;
+
+ case 4: {
+ int oldIdx = _globals._sequenceIndexes[4];
+ _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 10, 11);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx);
+
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 5, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 5);
+ }
+ break;
+
+ case 5: {
+ int oldIdx = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 3);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx);
+
+ oldIdx = _globals._sequenceIndexes[4];
+ _globals._sequenceIndexes[4] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 12);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], oldIdx);
+ _scene->_sequences.addTimer(15, 6);
+ }
+ break;
+
+ case 6:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[4]);
+ _globals._sequenceIndexes[4] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[4], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 13, 14);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, 3);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 7);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 8);
+ break;
+
+ case 7:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[4]);
+ _globals._sequenceIndexes[4] = _scene->_sequences.startCycle(_globals._spriteIndexes[4], false, 15);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[4], -1);
+ break;
+
+ case 8: {
+ int oldIdx = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], oldIdx);
+ _scene->_sequences.addTimer(15, 9);
+ }
+ break;
+
+ case 9:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[4]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 1);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.addTimer(48, 10);
+ break;
+
+ case 10:
+ _scene->_nextSceneId = 313;
+ break;
+
+ default:
+ break;
+ }
+}
+
+void Scene316::handleRoxInGrate() {
+ int temp;
+ int temp1;
+
+ switch (_game._trigger) {
+ case 0:
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 1);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+ _scene->_sequences.addTimer(15, 1);
+ break;
+
+ case 1:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[5]);
+ _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 17, 3, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 2, 3);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
+ break;
+
+ case 2:
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 17, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+
+ temp = _globals._sequenceIndexes[5];
+ _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 17, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 4, 8);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], temp);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
+ break;
+
+ case 3:
+ temp1 = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], temp1);
+ break;
+
+ case 4:
+ temp = _globals._sequenceIndexes[5];
+ _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 17, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 10, 11);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], temp);
+
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 17, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 5, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 5);
+ break;
+
+ case 5:
+ temp = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 3);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], temp);
+
+ temp = _globals._sequenceIndexes[5];
+ _globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 12);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], temp);
+ _scene->_sequences.addTimer(20, 6);
+ break;
+
+ case 6:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[5]);
+ _globals._sequenceIndexes[5] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[5], false, 17, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[5], 13, 15);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 17, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, 3);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 7);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 8);
+ break;
+
+ case 7:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[5]);
+ _globals._sequenceIndexes[5] = _scene->_sequences.startCycle(_globals._spriteIndexes[5], false, 16);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[5]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[5], -1);
+ break;
+
+ case 8:
+ temp = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], temp);
+ _scene->_sequences.addTimer(20, 9);
+ break;
+
+ case 9:
+ _scene->_sequences.setDone(_globals._sequenceIndexes[5]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 1);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.addTimer(48, 10);
+ break;
+
+ case 10:
+ _scene->_nextSceneId = 313;
+ break;
+
+ default:
+ break;
+ }
+}
+
+void Scene316::enter() {
+ int series;
+
+ if (_globals[kSexOfRex] == REX_MALE) {
+ _globals._spriteIndexes[1] = _scene->_sprites.addSprites(formAnimName('g', -1));
+ _globals._spriteIndexes[4] = _scene->_sprites.addSprites("*RXCL_8");
+ _globals._spriteIndexes[6] = _scene->_sprites.addSprites("*RXCL_2");
+ } else {
+ _globals._spriteIndexes[2] = _scene->_sprites.addSprites(formAnimName('g', 0));
+ _globals._spriteIndexes[5] = _scene->_sprites.addSprites("*ROXCL_8");
+ }
+
+ _globals._spriteIndexes[3] = _scene->_sprites.addSprites(formAnimName('v', 0));
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 1);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+
+ if (_scene->_priorSceneId == 366) {
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _game._player._playerPos = Common::Point(78, 87);
+ _game._player._facing = FACING_SOUTH;
+ _scene->_sequences.addTimer(48, 70);
+ } else if (_scene->_priorSceneId == 321) {
+ _game._player._playerPos = Common::Point(153, 102);
+ _game._player._facing = FACING_SOUTH;
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _vm->_sound->command(44);
+ series = (_globals[kSexOfRex] == REX_MALE) ? 1 : 2;
+ _globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[series], false, 6, 1, 0, 0);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 60);
+ } else if (_scene->_priorSceneId != -2)
+ _game._player._playerPos = Common::Point(291, 126);
+
+ sceneEntrySound();
+ _game.loadQuoteSet(0xFD, 0);
+}
+
+void Scene316::step() {
+ int temp;
+
+ if (_game._trigger == 60) {
+ _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[1]);
+ _game._player._visible = true;
+ _game._player._stepEnabled = true;
+ }
+
+ if (_game._trigger >= 70) {
+ switch (_game._trigger) {
+ case 70:
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 2, 6);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+
+ _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 1, 5);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[6]);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 72);
+ break;
+
+ case 71:
+ temp = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 3);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], temp);
+ break;
+
+ case 72:
+ temp = _globals._sequenceIndexes[6];
+ _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 6, 9);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[6]);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[6], temp);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 73);
+ break;
+
+ case 73:
+ _scene->_sequences.remove(_globals._sequenceIndexes[3]);
+ _globals._sequenceIndexes[3] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[3], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[3], 1, 5);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[6]);
+
+ _globals._sequenceIndexes[6] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[6], false, 12, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[6], 10, -2);
+ _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[6]);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[3], SEQUENCE_TRIGGER_EXPIRE, 0, 74);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[6], SEQUENCE_TRIGGER_EXPIRE, 0, 75);
+ break;
+
+ case 74:
+ temp = _globals._sequenceIndexes[3];
+ _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, 1);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 12);
+ _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], temp);
+ break;
+
+ case 75:
+ _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[6]);
+ _game._player._stepEnabled = true;
+ _game._player._visible = true;
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+void Scene316::preActions() {
+ if (_action.isAction(0x1AD, 0x2B9)) {
+ if (_globals[kAfterHavoc])
+ _game._player._walkOffScreenSceneId = 354;
+ else
+ _game._player._walkOffScreenSceneId = 304;
+ }
+}
+
+void Scene316::actions() {
+ if (_action.isAction(0x2F7, 0x11)) {
+ if (_globals[kSexOfRex] == REX_FEMALE)
+ handleRoxInGrate();
+ else
+ handleRexInGrate();
+ } else if (_action.isAction(0x227, 0x226) || _action.isAction(0x2B5, 0x22C)) {
+ switch (_game._trigger) {
+ case 0:
+ if (_globals[kCityFlooded]) {
+ _vm->_dialogs->show(0x7B87);
+ } else {
+ _vm->_sound->command(45);
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ if (_globals[kSexOfRex] == REX_MALE) {
+ _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 7, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -1, 7);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
+ } else {
+ _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 7, 1, 0, 0);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 3);
+ }
+ }
+ break;
+
+ case 1:
+ _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 7, 1, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], 8, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 2);
+ _scene->_kernelMessages.reset();
+ if (!_game._visitedScenes.exists(321))
+ _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 120, _game.getQuote(253));
+
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 2);
+ break;
+
+ case 2:
+ _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 7, 0, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[1], -2, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 2);
+ _scene->_sequences.addTimer(48, 4);
+ break;
+
+ case 3:
+ _globals._sequenceIndexes[2] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[2], false, 7, 0, 0, 0);
+ _scene->_sequences.setAnimRange(_globals._sequenceIndexes[2], -2, -2);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2);
+ _scene->_sequences.addTimer(48, 4);
+ break;
+
+ case 4:
+ _scene->_nextSceneId = 321;
+ break;
+ }
+ } else if (_action.isAction(VERB_LOOK, 0x22C))
+ _vm->_dialogs->show(0x7B7A);
+ else if (_action.isAction(VERB_LOOK, 0x1B6)) {
+ if (_game._visitedScenes.exists(321))
+ _vm->_dialogs->show(0x7B7C);
+ else
+ _vm->_dialogs->show(0x7B7B);
+ } else if (_action.isAction(VERB_LOOK, 0x2C6))
+ _vm->_dialogs->show(0x7B7D);
+ else if (_action.isAction(VERB_LOOK, 0x2C7))
+ _vm->_dialogs->show(0x7B7E);
+ else if (_action.isAction(VERB_LOOK, 0x1E0))
+ _vm->_dialogs->show(0x7B7F);
+ else if (_action.isAction(VERB_LOOK, 0xE2))
+ _vm->_dialogs->show(0x7B80);
+ else if (_action.isAction(VERB_LOOK, 0x226))
+ _vm->_dialogs->show(0x7B81);
+ else if (_action.isAction(VERB_LOOK, 0x11))
+ _vm->_dialogs->show(0x7B82);
+ else if (_action.isAction(VERB_LOOK, 0x2B9)) {
+ if (!_globals[kAfterHavoc]) {
+ if (_game._difficulty != DIFFICULTY_IMPOSSIBLE)
+ _vm->_dialogs->show(0x7B84);
+ else
+ _vm->_dialogs->show(0x7B83);
+ }
+ } else if (_action.isAction(VERB_LOOK, 0x89))
+ _vm->_dialogs->show(0x7B85);
+ else if (_action.isAction(VERB_LOOK, 0x257))
+ _vm->_dialogs->show(0x7B86);
+ else
+ return;
+
+ _action._inProgress = false;
+}
+
+
+/*------------------------------------------------------------------------*/
+
} // End of namespace Nebular
} // End of namespace MADS
diff --git a/engines/mads/nebular/nebular_scenes3.h b/engines/mads/nebular/nebular_scenes3.h
index f746b9f25e..9dd2e12421 100644
--- a/engines/mads/nebular/nebular_scenes3.h
+++ b/engines/mads/nebular/nebular_scenes3.h
@@ -231,6 +231,10 @@ public:
};
class Scene316: public Scene3xx {
+private:
+ void handleRexInGrate();
+ void handleRoxInGrate();
+
public:
Scene316(MADSEngine *vm) : Scene3xx(vm) {}