aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-06-02 01:02:25 -0400
committerPaul Gilbert2014-06-02 01:02:25 -0400
commit8f16d1fc977759b50e4d63f22f60155ca82c8270 (patch)
tree72733f8e380b94c7b10dfe3113d4e8ba50ecdfd8
parent82b56efc42b8f7596f5de783c7ea3ce45562757d (diff)
downloadscummvm-rg350-8f16d1fc977759b50e4d63f22f60155ca82c8270.tar.gz
scummvm-rg350-8f16d1fc977759b50e4d63f22f60155ca82c8270.tar.bz2
scummvm-rg350-8f16d1fc977759b50e4d63f22f60155ca82c8270.zip
MADS: Implement actions for scene 804
-rw-r--r--engines/mads/nebular/nebular_scenes.h1
-rw-r--r--engines/mads/nebular/nebular_scenes8.cpp96
-rw-r--r--engines/mads/nebular/nebular_scenes8.h2
3 files changed, 97 insertions, 2 deletions
diff --git a/engines/mads/nebular/nebular_scenes.h b/engines/mads/nebular/nebular_scenes.h
index 6195395fd6..cf33b21aad 100644
--- a/engines/mads/nebular/nebular_scenes.h
+++ b/engines/mads/nebular/nebular_scenes.h
@@ -118,6 +118,7 @@ enum Verb {
VERB_WALK = 0x32F,
VERB_REFLECT = 0x365,
VERB_GET_INTO = 0x36A,
+ VERB_LOOK_OUT = 0x397,
VERB_APPLY = 0x3A6,
VERB_STEER_TOWARDS = 0x3B1,
VERB_NIBBLE_ON = 0x3B7,
diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp
index 66502831cc..6039135794 100644
--- a/engines/mads/nebular/nebular_scenes8.cpp
+++ b/engines/mads/nebular/nebular_scenes8.cpp
@@ -1002,7 +1002,8 @@ void Scene804::step() {
_game._objects.setRoom(OBJ_POLYCEMENT, NOWHERE);
}
- if (_scene->_activeAnimation->getCurrentFrame() == 1) {
+ // FIXME: Original doesn't have resetFrame check. Check why this has been needed
+ if (_resetFrame == -1 && _scene->_activeAnimation->getCurrentFrame() == 1) {
int randomVal = _vm->getRandomNumber(29) + 1;
switch (randomVal) {
case 1:
@@ -1092,6 +1093,99 @@ void Scene804::step() {
}
}
+void Scene804::actions() {
+ if (_action.isAction(VERB_LOOK, NOUN_SERVICE_PANEL) ||
+ _action.isAction(VERB_OPEN, NOUN_SERVICE_PANEL)) {
+ _scene->_nextSceneId = 805;
+ } else if ((_action.isAction(VERB_ACTIVATE, NOUN_REMOTE)) && _globals[kTopButtonPushed]) {
+ if (!_globals[kInSpace]) {
+ // Top button pressed on panel in hanger control
+ if (!_globals[kBeamIsUp]) {
+ _globals[kFromCockpit] = true;
+ _globals[kUpBecauseOfRemote] = true;
+ _scene->_nextSceneId = 803;
+ } else {
+ // Player turning off remote
+ _globals[kBeamIsUp] = false;
+ _globals[kUpBecauseOfRemote] = false;
+ _scene->_sequences.remove(_globals._sequenceIndexes[8]);
+ _vm->_sound->command(15);
+ }
+ }
+ } else if (_action.isAction(VERB_PULL, NOUN_THROTTLE)) {
+ _game._player._stepEnabled = false;
+ if (_globals[kBeamIsUp]) {
+ if (!_game._objects.isInInventory(OBJ_VASE) && _globals[kWindowFixed]) {
+ _vm->_dialogs->show(80423);
+ _game._player._stepEnabled = true;
+ } else {
+ _action._inProgress = false;
+
+ //saveGame("REX000.SAV");
+
+ _vm->_dialogs->show(80424);
+ _pullThrottleReally = true;
+ _scene->_kernelMessages.add(Common::Point(78, 75), 0x1110, 0, 0,
+ 120, _game.getQuote(791));
+ }
+ } else {
+ _messWithThrottle = true;
+ }
+ }
+ else if (_action.isAction(VERB_APPLY, NOUN_POLYCEMENT, NOUN_CRACK) ||
+ _action.isAction(VERB_PUT, NOUN_POLYCEMENT, NOUN_CRACK)) {
+ if (!_globals[kWindowFixed]) {
+ _resetFrame = 2;
+ _game._player._stepEnabled = false;
+ }
+ } else if (_action.isAction(VERB_EXIT, NOUN_SHIP)) {
+ _globals[kExitShip] = true;
+ _globals[kFromCockpit] = true;
+ if (_globals[kBeamIsUp]) {
+ _vm->_dialogs->show(80425);
+ _scene->_sequences.remove(_globals._sequenceIndexes[8]);
+ _vm->_sound->command(15);
+ _globals[kBeamIsUp] = false;
+ }
+ _game._triggerSetupMode = SEQUENCE_TRIGGER_DAEMON;
+ _scene->_sequences.addTimer(2, 90);
+ } else if (_action._lookFlag) {
+ _vm->_dialogs->show(80410);
+ } else if ((_action.isAction(VERB_LOOK, NOUN_WINDOW)) ||
+ (_action.isAction(VERB_LOOK_OUT, NOUN_WINDOW))) {
+ if (_globals[kBeamIsUp]) {
+ _vm->_dialogs->show(80412);
+ } else {
+ _vm->_dialogs->show(80411);
+ }
+ } else if (_action.isAction(VERB_LOOK, NOUN_CRACK)) {
+ if (_globals[kWindowFixed]) {
+ _vm->_dialogs->show(80414);
+ } else {
+ _vm->_dialogs->show(80413);
+ }
+ } else if (_action.isAction(VERB_LOOK, NOUN_CONTROLS)) {
+ _vm->_dialogs->show(80415);
+ } else if (_action.isAction(VERB_LOOK, NOUN_STATUS_PANEL)) {
+ if (_globals[kBeamIsUp]) {
+ _vm->_dialogs->show(80417);
+ } else {
+ _vm->_dialogs->show(80416);
+ }
+ } else if (_action.isAction(VERB_LOOK, NOUN_TP)) {
+ _vm->_dialogs->show(80418);
+ } else if (_action.isAction(VERB_TAKE, NOUN_TP)) {
+ _vm->_dialogs->show(80419);
+ } else if (_action.isAction(VERB_LOOK, NOUN_INSTRUMENTATION)) {
+ _vm->_dialogs->show(80420);
+ } else if (_action.isAction(VERB_LOOK, NOUN_SEAT)) {
+ _vm->_dialogs->show(80421);
+ } else
+ return;
+
+ _action._inProgress = false;
+}
+
/*------------------------------------------------------------------------*/
void Scene805::setup() {
diff --git a/engines/mads/nebular/nebular_scenes8.h b/engines/mads/nebular/nebular_scenes8.h
index 39e022e31f..7f2c34a843 100644
--- a/engines/mads/nebular/nebular_scenes8.h
+++ b/engines/mads/nebular/nebular_scenes8.h
@@ -108,7 +108,7 @@ public:
virtual void setup();
virtual void enter();
virtual void step();
- virtual void actions() {};
+ virtual void actions();
};
class Scene805 : public Scene8xx{