aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/nebular_scenes4.cpp
diff options
context:
space:
mode:
authorStrangerke2014-05-01 18:20:10 +0200
committerStrangerke2014-05-01 18:20:10 +0200
commit0350cc79b3db9eb3e35314730f6e067bc6693c82 (patch)
tree64f123e279b1c1e2cf1554ce2d97bd8d9de6c3a2 /engines/mads/nebular/nebular_scenes4.cpp
parent1ed814259972ac5ea75087e62f8bf9289f2d9f35 (diff)
downloadscummvm-rg350-0350cc79b3db9eb3e35314730f6e067bc6693c82.tar.gz
scummvm-rg350-0350cc79b3db9eb3e35314730f6e067bc6693c82.tar.bz2
scummvm-rg350-0350cc79b3db9eb3e35314730f6e067bc6693c82.zip
MADS: Implement scene 407
Diffstat (limited to 'engines/mads/nebular/nebular_scenes4.cpp')
-rw-r--r--engines/mads/nebular/nebular_scenes4.cpp108
1 files changed, 108 insertions, 0 deletions
diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp
index f6f3b418bb..1335bd609f 100644
--- a/engines/mads/nebular/nebular_scenes4.cpp
+++ b/engines/mads/nebular/nebular_scenes4.cpp
@@ -2677,5 +2677,113 @@ void Scene406::actions() {
/*------------------------------------------------------------------------*/
+void Scene407::setup() {
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene407::enter() {
+ if (_scene->_priorSceneId != -2)
+ _fromNorth = false;
+
+ if (_scene->_priorSceneId == 318) {
+ _game._player._playerPos = Common::Point(172, 92);
+ _game._player._facing = FACING_SOUTH;
+ _fromNorth = true;
+ } else if (_scene->_priorSceneId != -2) {
+ _game._player._playerPos = Common::Point(172, 132);
+ _game._player._facing = FACING_NORTH;
+ }
+
+ _game.loadQuoteSet(0x250, 0);
+ sceneEntrySound();
+}
+
+void Scene407::step() {
+ if (_game._trigger == 70) {
+ _scene->_nextSceneId = 318;
+ _scene->_reloadSceneFlag = true;
+ }
+
+ if (_game._trigger == 80) {
+ _game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount;
+ _game._player._stepEnabled = true;
+ _game._player._visible = true;
+ _fromNorth = false;
+ _game._player.walk(Common::Point(173, 104), FACING_SOUTH);
+ }
+}
+
+void Scene407::preActions() {
+ if (_action.isAction(VERB_TAKE))
+ _game._player._needToWalk = false;
+
+ if (_action.isAction(VERB_LOOK, 0x6E))
+ _game._player._needToWalk = true;
+
+ if (_action.isAction(0x1AD, 0x2B4)) {
+ _game._player.walk(Common::Point(172, 91), FACING_NORTH);
+ _fromNorth = false;
+ }
+
+ if (_game._player._needToWalk && _fromNorth) {
+ if (_globals[kSexOfRex] == REX_MALE)
+ destPos = Common::Point(171, 95);
+ else
+ destPos = Common::Point(173, 96);
+
+ _game._player.walk(destPos, FACING_SOUTH);
+ }
+}
+
+void Scene407::actions() {
+ if ((_game._player._playerPos == destPos) && _fromNorth) {
+ if (_globals[kSexOfRex] == REX_MALE) {
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _vm->_sound->command(21);
+ _scene->loadAnimation(formAnimName('s', 1), 70);
+ _globals[kHasBeenScanned] = true;
+ _scene->_kernelMessages.add(Common::Point(0, 0), 0x1110, 34, 0, 60, _game.getQuote(60));
+ _vm->_sound->command(22);
+ }
+
+ if (_globals[kSexOfRex] == REX_FEMALE) {
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+ _vm->_sound->command(21);
+ _scene->loadAnimation(formAnimName('s', 2), 80);
+ _vm->_sound->command(23);
+ _globals[kHasBeenScanned] = true;
+ }
+ }
+
+ if (_action.isAction(0x1AD, 0x2B3) && !_fromNorth)
+ _scene->_nextSceneId = 406;
+ else if (_action.isAction(0x1AD, 0x2B4))
+ _scene->_nextSceneId = 318;
+ else if (_action.isAction(VERB_LOOK, 0x1F3)) {
+ if (_globals[kHasBeenScanned])
+ _vm->_dialogs->show(40711);
+ else
+ _vm->_dialogs->show(40710);
+ } else if (_action.isAction(VERB_LOOK, 0x6E))
+ _vm->_dialogs->show(40712);
+ else if (_action.isAction(VERB_LOOK, 0x2B3))
+ _vm->_dialogs->show(40713);
+ else if (_action.isAction(VERB_LOOK, 0x2B4))
+ _vm->_dialogs->show(40714);
+ else if (_action._lookFlag)
+ _vm->_dialogs->show(40715);
+ else
+ return;
+
+ _action._inProgress = false;
+}
+
+/*------------------------------------------------------------------------*/
+
} // End of namespace Nebular
} // End of namespace MADS