aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/module.mk1
-rw-r--r--engines/mads/nebular/nebular_scenes5.cpp96
-rw-r--r--engines/mads/nebular/nebular_scenes5.h56
3 files changed, 153 insertions, 0 deletions
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index 5fe0c90603..04739b0a69 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -14,6 +14,7 @@ MODULE_OBJS := \
nebular/nebular_scenes2.o \
nebular/nebular_scenes3.o \
nebular/nebular_scenes4.o \
+ nebular/nebular_scenes5.o \
nebular/nebular_scenes8.o \
action.o \
animation.o \
diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp
new file mode 100644
index 0000000000..b6684c8bca
--- /dev/null
+++ b/engines/mads/nebular/nebular_scenes5.cpp
@@ -0,0 +1,96 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+#include "mads/mads.h"
+#include "mads/scene.h"
+#include "mads/nebular/nebular_scenes.h"
+#include "mads/nebular/nebular_scenes5.h"
+
+namespace MADS {
+
+namespace Nebular {
+
+void Scene5xx::setAAName() {
+ _game._aaName = Resources::formatAAName(5);
+}
+
+void Scene5xx::setPlayerSpritesPrefix() {
+ _vm->_sound->command(5);
+
+ Common::String oldName = _game._player._spritesPrefix;
+
+ if ((_scene->_nextSceneId == 502) || (_scene->_nextSceneId == 504) || (_scene->_nextSceneId == 505) || (_scene->_nextSceneId == 515))
+ _game._player._spritesPrefix = "";
+ else if (_globals[kSexOfRex] == REX_MALE)
+ _game._player._spritesPrefix = "RXM";
+ else if ((_scene->_nextSceneId == 501) || (_scene->_nextSceneId == 503) || (_scene->_nextSceneId == 551))
+ _game._player._spritesPrefix = "ROX";
+
+ _game._player._scalingVelocity = true;
+
+ if ((_scene->_nextSceneId == 512) || (_scene->_nextSceneId == 507))
+ _game._player._scalingVelocity = false;
+
+ if (oldName != _game._player._spritesPrefix)
+ _game._player._spritesChanged = true;
+
+ _vm->_palette->setEntry(16, 10, 63, 63);
+ _vm->_palette->setEntry(17, 10, 45, 45);
+}
+
+void Scene5xx::sceneEntrySound() {
+ if (!_vm->_musicFlag) {
+ _vm->_sound->command(2);
+ return;
+ }
+
+ switch (_scene->_nextSceneId) {
+ case 501:
+ case 502:
+ case 504:
+ case 505:
+ case 506:
+ case 507:
+ case 508:
+ case 511:
+ case 512:
+ case 513:
+ case 515:
+ case 551:
+ if (_scene->_priorSceneId == 503)
+ _vm->_sound->command(38);
+ else
+ _vm->_sound->command(29);
+ break;
+ case 503:
+ _vm->_sound->command(41);
+ break;
+ default:
+ break;
+ }
+}
+
+/*------------------------------------------------------------------------*/
+
+} // End of namespace Nebular
+} // End of namespace MADS
diff --git a/engines/mads/nebular/nebular_scenes5.h b/engines/mads/nebular/nebular_scenes5.h
new file mode 100644
index 0000000000..4efbc4a5c1
--- /dev/null
+++ b/engines/mads/nebular/nebular_scenes5.h
@@ -0,0 +1,56 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef MADS_NEBULAR_SCENES5_H
+#define MADS_NEBULAR_SCENES5_H
+
+#include "common/scummsys.h"
+#include "mads/game.h"
+#include "mads/scene.h"
+#include "mads/nebular/nebular_scenes.h"
+
+namespace MADS {
+
+namespace Nebular {
+
+class Scene5xx : public NebularScene {
+protected:
+ /**
+ * Plays an appropriate sound when entering a scene
+ */
+ void setAAName();
+
+ /**
+ * Updates the prefix used for getting player sprites for the scene
+ */
+ void setPlayerSpritesPrefix();
+
+ void sceneEntrySound();
+
+public:
+ Scene5xx(MADSEngine *vm) : NebularScene(vm) {}
+};
+
+} // End of namespace Nebular
+} // End of namespace MADS
+
+#endif /* MADS_NEBULAR_SCENES5_H */