aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/parallaction/parallaction.cpp46
-rw-r--r--engines/parallaction/parallaction.h3
-rw-r--r--engines/parallaction/parallaction_br.cpp58
-rw-r--r--engines/parallaction/parallaction_ns.cpp69
4 files changed, 130 insertions, 46 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 523fbcf88b..1dfc95716e 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -146,12 +146,6 @@ Parallaction::~Parallaction() {
int Parallaction::init() {
- // Detect game
- if (!detectGame()) {
- GUIErrorMessage("No valid games were found in the specified directory.");
- return -1;
- }
-
_objectsNames = NULL;
_globalTable = NULL;
_localFlagNames = NULL;
@@ -170,20 +164,8 @@ int Parallaction::init() {
// _musicData1 = 0;
strcpy(_characterName1, "null");
- _soundMan = 0;
-
_baseTime = 0;
-
- if (_vm->getGameType() == GType_Nippon) {
- _screenWidth = 320;
- _screenHeight = 200;
- } else
- if (_vm->getGameType() == GType_BRA) {
- _screenWidth = 640;
- _screenHeight = 400;
- }
-
_screenMaskWidth = _screenWidth / 4;
_screenPathWidth = _screenWidth / 8;
@@ -191,25 +173,6 @@ int Parallaction::init() {
_screenMaskSize = _screenMaskWidth * _screenHeight;
_screenPathSize = _screenPathWidth * _screenHeight;
- if (getGameType() == GType_Nippon) {
- if (getPlatform() == Common::kPlatformPC) {
- _disk = new DosDisk_ns(this);
- } else {
- if (getFeatures() & GF_DEMO) {
- strcpy(_location._name, "fognedemo");
- }
- _disk = new AmigaDisk_ns(this);
- _disk->selectArchive((_vm->getFeatures() & GF_DEMO) ? "disk0" : "disk1");
- }
- } else
- if (getGameType() == GType_BRA) {
- if (getPlatform() == Common::kPlatformPC) {
- _disk = new DosDisk_br(this);
- } else
- error("unsupported platform for Big Red Adventure");
- } else
- error("unknown game type");
-
_engineFlags = 0;
strcpy(_characterName, "dough");
@@ -231,15 +194,6 @@ int Parallaction::init() {
_animations.push_front(&_vm->_char._ani);
_gfx = new Gfx(this);
- if (getPlatform() == Common::kPlatformPC) {
- int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
- MidiDriver *driver = MidiDriver::createMidi(midiDriver);
- _soundMan = new DosSoundMan(this, driver);
- _soundMan->setMusicVolume(ConfMan.getInt("music_volume"));
- } else {
- _soundMan = new AmigaSoundMan(this);
- }
-
_debugger = new Debugger(this);
return 0;
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 33dc5563e6..0cb6e92709 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -486,6 +486,7 @@ public:
Parallaction_ns(OSystem* syst) : Parallaction(syst) { }
~Parallaction_ns() { }
+ int init();
};
class Parallaction_br : public Parallaction {
@@ -494,6 +495,8 @@ public:
Parallaction_br(OSystem* syst) : Parallaction(syst) { }
~Parallaction_br() { }
+ int init();
+
};
// FIXME: remove global
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
new file mode 100644
index 0000000000..1609921d85
--- /dev/null
+++ b/engines/parallaction/parallaction_br.cpp
@@ -0,0 +1,58 @@
+/* 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.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/stdafx.h"
+#include "parallaction/parallaction.h"
+#include "parallaction/sound.h"
+
+namespace Parallaction {
+
+int Parallaction_br::init() {
+
+ // Detect game
+ if (!detectGame()) {
+ GUIErrorMessage("No valid games were found in the specified directory.");
+ return -1;
+ }
+
+ _screenWidth = 640;
+ _screenHeight = 400;
+
+ if (getGameType() == GType_BRA) {
+ if (getPlatform() == Common::kPlatformPC) {
+ _disk = new DosDisk_br(this);
+ } else
+ error("unsupported platform for Big Red Adventure");
+ } else
+ error("unknown game type");
+
+ _soundMan = new DummySoundMan(this);
+
+ Parallaction::init();
+
+ return 0;
+}
+
+} // namespace Parallaction
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
new file mode 100644
index 0000000000..bc856772c3
--- /dev/null
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -0,0 +1,69 @@
+/* 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.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/stdafx.h"
+#include "common/config-manager.h"
+
+#include "parallaction/parallaction.h"
+#include "parallaction/sound.h"
+
+namespace Parallaction {
+
+int Parallaction_ns::init() {
+
+ // Detect game
+ if (!detectGame()) {
+ GUIErrorMessage("No valid games were found in the specified directory.");
+ return -1;
+ }
+
+ _screenWidth = 320;
+ _screenHeight = 200;
+
+ if (getPlatform() == Common::kPlatformPC) {
+ _disk = new DosDisk_ns(this);
+ } else {
+ if (getFeatures() & GF_DEMO) {
+ strcpy(_location._name, "fognedemo");
+ }
+ _disk = new AmigaDisk_ns(this);
+ _disk->selectArchive((_vm->getFeatures() & GF_DEMO) ? "disk0" : "disk1");
+ }
+
+ if (getPlatform() == Common::kPlatformPC) {
+ int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
+ MidiDriver *driver = MidiDriver::createMidi(midiDriver);
+ _soundMan = new DosSoundMan(this, driver);
+ _soundMan->setMusicVolume(ConfMan.getInt("music_volume"));
+ } else {
+ _soundMan = new AmigaSoundMan(this);
+ }
+
+ Parallaction::init();
+
+ return 0;
+}
+
+} // namespace Parallaction