aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorStrangerke2014-04-16 18:08:26 +0200
committerStrangerke2014-04-16 18:08:26 +0200
commit301ca80915d4b9ad6fa61f732c9e736f81ea1997 (patch)
tree38b9bb909e0edf06789066a7673e7208a43d57dc /engines/mads
parent39088c0121dec470f31a4171336ac8bd525b6fde (diff)
downloadscummvm-rg350-301ca80915d4b9ad6fa61f732c9e736f81ea1997.tar.gz
scummvm-rg350-301ca80915d4b9ad6fa61f732c9e736f81ea1997.tar.bz2
scummvm-rg350-301ca80915d4b9ad6fa61f732c9e736f81ea1997.zip
MADS: Implement scene 302
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/nebular/nebular_scenes.cpp2
-rw-r--r--engines/mads/nebular/nebular_scenes3.cpp40
-rw-r--r--engines/mads/nebular/nebular_scenes3.h15
3 files changed, 56 insertions, 1 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index fde69b653a..c0a1552597 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -105,6 +105,8 @@ SceneLogic *SceneFactory::createScene(MADSEngine *vm) {
// Scene group #3
case 301:
return new Scene301(vm);
+ case 302:
+ return new Scene302(vm);
// Scene group #8
case 804:
diff --git a/engines/mads/nebular/nebular_scenes3.cpp b/engines/mads/nebular/nebular_scenes3.cpp
index 2d9f2d3de7..8a305b8835 100644
--- a/engines/mads/nebular/nebular_scenes3.cpp
+++ b/engines/mads/nebular/nebular_scenes3.cpp
@@ -156,6 +156,44 @@ void Scene301::step() {
}
/*------------------------------------------------------------------------*/
-
+
+void Scene302::setup() {
+ setPlayerSpritesPrefix();
+ setAAName();
+}
+
+void Scene302::enter() {
+ _game._player._stepEnabled = false;
+ _game._player._visible = false;
+
+ _scene->loadAnimation(formAnimName('a',-1), 71);
+ sceneEntrySound();
+}
+
+void Scene302::step() {
+ if (_game._trigger == 71)
+ _scene->_nextSceneId = 303;
+
+ if ((_scene->_activeAnimation != nullptr) && (_scene->_activeAnimation->getCurrentFrame() != _oldFrame)) {
+ _oldFrame = _scene->_activeAnimation->getCurrentFrame();
+ if (_oldFrame == 147) {
+ _game._objects.setRoom(OBJ_POISON_DARTS, 1);
+ _game._objects.setRoom(OBJ_BLOWGUN, 1);
+ _game._objects.setRoom(OBJ_REBREATHER, 1);
+ _game._objects.setRoom(OBJ_STUFFED_FISH, 1);
+ _game._objects.setRoom(OBJ_DEAD_FISH, 1);
+ _game._objects.setRoom(OBJ_BURGER, 1);
+
+ int count = (int)_game._objects._inventoryList.size();
+ for (int idx = 0; idx < count; idx++) {
+ if (_game._objects.isInInventory(idx))
+ _game._objects.setRoom(idx, 50);
+ }
+ }
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
} // 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 eb92de5b85..fad60cf118 100644
--- a/engines/mads/nebular/nebular_scenes3.h
+++ b/engines/mads/nebular/nebular_scenes3.h
@@ -60,6 +60,21 @@ public:
virtual void actions() {};
virtual void postActions() {};
};
+
+class Scene302: public Scene3xx {
+private:
+ int _oldFrame;
+
+public:
+ Scene302(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