aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorFilippos Karapetis2014-05-17 12:50:47 +0300
committerFilippos Karapetis2014-05-17 12:50:47 +0300
commit73945d55320bd5cee6cebe06bb62607be4217af7 (patch)
treee492c6ff7ffc7804b716d37303177e809a4c5c7e /engines/mads
parentdc1d78e8ad86bc608064cc4c3daf54247a1ccee2 (diff)
downloadscummvm-rg350-73945d55320bd5cee6cebe06bb62607be4217af7.tar.gz
scummvm-rg350-73945d55320bd5cee6cebe06bb62607be4217af7.tar.bz2
scummvm-rg350-73945d55320bd5cee6cebe06bb62607be4217af7.zip
MADS: Further work on scene 701
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/nebular/nebular_scenes.h5
-rw-r--r--engines/mads/nebular/nebular_scenes7.cpp102
2 files changed, 87 insertions, 20 deletions
diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h
index 61cbd44e78..2c38dd0689 100644
--- a/engines/mads/nebular/nebular_scenes.h
+++ b/engines/mads/nebular/nebular_scenes.h
@@ -39,6 +39,7 @@ enum {
};
enum Verb {
+ VERB_CAST = 0x03D,
VERB_CLIMB_DOWN = 0x04E,
VERB_CLIMB_UP = 0x050,
VERB_EAT = 0x075,
@@ -65,7 +66,7 @@ enum Verb {
VERB_EXIT_FROM = 0x1CE,
VERB_CLIMB_INTO = 0x2F7,
VERB_STEP_INTO = 0x2F9,
- VERB_WALK_ALONG = 0x312,
+ VERB_WALK_ALONG = 0x312
};
enum Noun {
@@ -85,6 +86,7 @@ enum Noun {
NOUN_DOOR = 0x6E,
NOUN_ENTER_KEY = 0x7A,
NOUN_FISHING_LINE = 0x87,
+ NOUN_FISHING_ROD = 0x88,
NOUN_FRONT_WINDOW = 0x8E,
NOUN_FUZZY_DICE = 0x91,
NOUN_HOTPANTS = 0x0A7,
@@ -150,6 +152,7 @@ enum Noun {
NOUN_DROP = 0x3AD,
NOUN_DASH = 0x3AE,
NOUN_SPLASH = 0x3AF,
+ NOUN_HOOK = 0x467,
NOUN_BIRDS = 0x487,
NOUN_WEST_END_OF_PLATFORM = 0x4A9,
NOUN_EAST_END_OF_PLATFORM = 0x4AA
diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp
index 1ce95667e4..cc24070169 100644
--- a/engines/mads/nebular/nebular_scenes7.cpp
+++ b/engines/mads/nebular/nebular_scenes7.cpp
@@ -187,9 +187,8 @@ void Scene701::enter() {
} else if (_scene->_priorSceneId != -2 && _scene->_priorSceneId != -620) {
_game._player._playerPos = Common::Point(22, 131);
_game._player._facing = FACING_EAST;
- // TODO: Enable once step() is implemented
- //_game._player._stepEnabled = false;
- //_scene->_sequences.addTimer(1 * 60, 70);
+ _game._player._stepEnabled = false;
+ _scene->_sequences.addTimer(1 * 60, 70);
}
_game.loadQuoteSet(0x310, 0x30F, 0);
@@ -199,27 +198,49 @@ void Scene701::enter() {
void Scene701::step() {
switch(_game._trigger) {
case 60:
- // TODO
+ _scene->_sequences.remove(_globals._sequenceIndexes[5]);
+ _globals._sequenceIndexes[5] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[5], false, 6, 1, 0, 0);
+ _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[5], Common::Point(155, 129));
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[5], SEQUENCE_TRIGGER_EXPIRE, 0, 61);
break;
case 61:
- // TODO
+ _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[5]);
+ _game._player._visible = true;
+ _game._player._stepEnabled = true;
break;
case 70:
- // TODO
+ _vm->_sound->command(16);
+ _scene->_sequences.remove(_globals._sequenceIndexes[1]);
+ _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0);
+ _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[1], Common::Point(48, 136));
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
break;
case 71:
_game._player.walk(Common::Point(61, 131), FACING_EAST);
_scene->_sequences.addTimer(2 * 60, 72);
break;
case 72:
- // TODO
+ _vm->_sound->command(17);
+ _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0);
+ _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[1], Common::Point(48, 136));
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 73);
break;
case 73:
- // TODO
+ _game._player._stepEnabled = true;
+ _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);
+ _scene->_kernelMessages.reset();
break;
case 80:
_game._player._visible = true;
- // TODO
+ _game._player._priorTimer = _scene->_frameStartTime - _game._player._ticksAmount;
+ _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -1);
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 9);
+ int idx = _scene->_dynamicHotspots.add(NOUN_BOAT, VERB_CLIMB_INTO, _globals._sequenceIndexes[2], Common::Rect(0, 0, 0, 0));
+ _scene->_dynamicHotspots.setPosition(idx, Common::Point(234, 129), FACING_NORTH);
_globals[kBoatStatus] = BOAT_TIED;
_game._player._stepEnabled = true;
break;
@@ -270,25 +291,64 @@ void Scene701::actions() {
case 0:
_game._player._stepEnabled = false;
_scene->_sequences.remove(_globals._sequenceIndexes[1]);
- // TODO: finish this
+ _vm->_sound->command(16);
+ _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0);
+ _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[1], Common::Point(48, 136));
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10);
+ _scene->_kernelMessages.reset();
+ _scene->_kernelMessages.add(Common::Point(0, 0), 0x310, 34, 0, 120, _game.getQuote(0x30D));
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1);
break;
case 1:
_game._player.walk(Common::Point(22, 131), FACING_EAST);
_scene->_sequences.addTimer(2 * 60, 3);
break;
case 3:
- // TODO
+ _vm->_sound->command(17);
+ _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 5, 1, 0, 0);
+ _scene->_sequences.setMsgPosition(_globals._sequenceIndexes[1], Common::Point(48, 136));
+ _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 10);
+ _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 4);
break;
case 4:
- // TODO
+ _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);
+ _globals[kResurrectRoom] = 701;
+ _scene->_nextSceneId = 605;
break;
}
- } else if (false) {
- // TODO: boat + fishing line action
+ } else if ((_action.isAction(VERB_PULL, NOUN_BOAT) || _action.isAction(VERB_TAKE, NOUN_BOAT) ||
+ _action.isAction(VERB_PULL, NOUN_FISHING_LINE) || _action.isAction(VERB_TAKE, NOUN_FISHING_LINE)) &&
+ !_game._objects.isInInventory(OBJ_FISHING_LINE)) {
+ if (_globals[kBoatStatus] == BOAT_TIED_FLOATING) {
+ switch (_game._trigger) {
+ case 0:
+ // TODO
+ break;
+ case 1:
+ // TODO
+ break;
+ case 2:
+ _globals[kBoatStatus] = BOAT_TIED;
+ _globals[kLineStatus] = LINE_NOW_UNTIED;
+ _game._player._stepEnabled = true;
+ break;
+ }
+ } else if (_globals[kBoatStatus] == BOAT_TIED) {
+ _vm->_dialogs->show(70125);
+ } else if (_globals[kLineStatus] == LINE_DROPPED) {
+ // TODO
+ } else {
+ _vm->_dialogs->show(70127);
+ }
} else if (_action.isAction(VERB_CLIMB_INTO, NOUN_BOAT) && _globals[kBoatStatus] == BOAT_TIED) {
switch (_game._trigger) {
case 0:
- // TODO
+ _game._player._stepEnabled = false;
+ _scene->_sequences.remove(_globals._sequenceIndexes[2]);
+ _game._player._visible = false;
+ _scene->loadAnimation(formAnimName('B', 0), 1);
break;
case 1:
_scene->_nextSceneId = 703;
@@ -311,8 +371,11 @@ void Scene701::actions() {
_vm->_dialogs->show(70114);
} else if (_action.isAction(VERB_LOOK, NOUN_CEMENT_PYLON)) {
_vm->_dialogs->show(70115);
- } else if (false) {
- // TODO: hook
+ } else if (_action.isAction(VERB_LOOK, NOUN_HOOK)) {
+ if (_globals[kLineStatus] == LINE_NOT_DROPPED || _globals[kLineStatus] == LINE_NOW_UNTIED)
+ _vm->_dialogs->show(70116);
+ else
+ _vm->_dialogs->show(70117);
} else if (_action.isAction(VERB_LOOK, NOUN_ROCK)) {
_vm->_dialogs->show(70118);
} else if (_action.isAction(VERB_TAKE, NOUN_ROCK)) {
@@ -326,8 +389,9 @@ void Scene701::actions() {
_vm->_dialogs->show(70122);
else
_vm->_dialogs->show(70123);
- } else if (false) {
- // TODO: fishing rod + boat
+ } else if (_action.isAction(VERB_CAST, NOUN_FISHING_ROD, NOUN_BOAT)) {
+ if (_game._objects.isInInventory(OBJ_FISHING_LINE))
+ _vm->_dialogs->show(70124);
}
}