aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-04-28 23:07:33 +0200
committerStrangerke2014-04-28 23:07:33 +0200
commitbe75349346e943542dfc0f77933a771b2181ba16 (patch)
tree85b7af1b9fd89dd5ebaaac69388519423b21145f /engines
parentaac3206ec824bb6be8943c7afeff474fb0a2183f (diff)
downloadscummvm-rg350-be75349346e943542dfc0f77933a771b2181ba16.tar.gz
scummvm-rg350-be75349346e943542dfc0f77933a771b2181ba16.tar.bz2
scummvm-rg350-be75349346e943542dfc0f77933a771b2181ba16.zip
MADS: Refactor a bit scene 389, implement scene 399
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes3.cpp44
-rw-r--r--engines/mads/nebular/nebular_scenes3.h11
3 files changed, 51 insertions, 6 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index caa72b1ffd..f012a6825a 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -162,6 +162,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
return new Scene390(vm);
case 391:
return new Scene391(vm);
+ case 399:
+ return new Scene399(vm);
// Scene group #8
case 804:
diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp
index a5d37b4a9a..62f30d254a 100644
--- a/engines/mads/nebular/nebular_scenes3.cpp
+++ b/engines/mads/nebular/nebular_scenes3.cpp
@@ -5365,12 +5365,9 @@ void Scene389::actions() {
}
} else if (_action.isAction(0xD3, 0x2D3)) {
if (_globals[kAfterHavoc]) {
- if (_game._difficulty != DIFFICULTY_HARD) {
- if (_game._objects[OBJ_SECURITY_CARD]._roomNumber == 359)
- _vm->_dialogs->show(0x97FF);
- else
- _vm->_dialogs->show(0x9800);
- } else
+ if ((_game._difficulty != DIFFICULTY_HARD) && (_game._objects[OBJ_SECURITY_CARD]._roomNumber == 359))
+ _vm->_dialogs->show(0x97FF);
+ else
_vm->_dialogs->show(0x9800);
} else
_vm->_dialogs->show(0x97FE);
@@ -5453,5 +5450,40 @@ void Scene391::actions() {
/*------------------------------------------------------------------------*/
+void Scene399::setup() {
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene399::enter() {
+ _scene->_userInterface.setup(kInputLimitedSentences);
+ _game._player._visible = false;
+ sceneEntrySound();
+}
+
+void Scene399::actions() {
+ if (_action.isAction(0x2D5, 0x2D4))
+ _scene->_nextSceneId = 313;
+ else if (_action.isAction(0xD3, 0x2D3)) {
+ if (_globals[kAfterHavoc]) {
+ if ((_game._difficulty != DIFFICULTY_HARD) && (_game._objects[OBJ_SECURITY_CARD]._roomNumber == 359))
+ _vm->_dialogs->show(0x97FF);
+ else
+ _vm->_dialogs->show(0x9800);
+ } else
+ _vm->_dialogs->show(0x97FE);
+ } else if (_action.isAction(VERB_OPEN, 0x2D3)) {
+ if (_globals[kAfterHavoc])
+ _vm->_dialogs->show(0x9802);
+ else
+ _vm->_dialogs->show(0x9801);
+ } 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 111eade8d5..45d0c9a9a9 100644
--- a/engines/mads/nebular/nebular_scenes3.h
+++ b/engines/mads/nebular/nebular_scenes3.h
@@ -555,6 +555,17 @@ public:
virtual void postActions() {};
};
+class Scene399: public Scene3xx {
+public:
+ Scene399(MADSEngine *vm) : Scene3xx(vm) {}
+
+ virtual void setup();
+ virtual void enter();
+ virtual void step() {};
+ virtual void preActions() {}
+ virtual void actions();
+ virtual void postActions() {};
+};
} // End of namespace Nebular
} // End of namespace MADS