aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-04-10 01:31:31 +0000
committerMax Horn2005-04-10 01:31:31 +0000
commit063fa83483b69c4e3758015ea81b0eaad8d978a5 (patch)
tree8aeef7a47e2bf05986de37728f29089cc3b86d62
parentb40fa83d4134f13eefb360c173044159674d687c (diff)
downloadscummvm-rg350-063fa83483b69c4e3758015ea81b0eaad8d978a5.tar.gz
scummvm-rg350-063fa83483b69c4e3758015ea81b0eaad8d978a5.tar.bz2
scummvm-rg350-063fa83483b69c4e3758015ea81b0eaad8d978a5.zip
Init music engine within setupMusic(), even for V1 and V2 games
svn-id: r17498
-rw-r--r--scumm/resource_v2.cpp11
-rw-r--r--scumm/scumm.cpp4
2 files changed, 4 insertions, 11 deletions
diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp
index 38eb622a6e..1e968d6b00 100644
--- a/scumm/resource_v2.cpp
+++ b/scumm/resource_v2.cpp
@@ -22,8 +22,6 @@
#include "stdafx.h"
#include "scumm/scumm.h"
#include "scumm/intern.h"
-#include "scumm/player_v2.h"
-#include "scumm/player_v1.h"
#include "scumm/resource.h"
#include "sound/mididrv.h"
@@ -33,9 +31,6 @@ void ScummEngine_v2::readClassicIndexFile() {
int i;
if (_gameId == GID_MANIAC) {
- if (!(_features & GF_AMIGA) && !(_features & GF_NES))
- _musicEngine = new Player_V1(this, _midiDriver != MD_PCSPK);
-
if (_features & GF_NES)
_numGlobalObjects = 775;
else
@@ -52,9 +47,6 @@ void ScummEngine_v2::readClassicIndexFile() {
_numScripts = 200;
_numSounds = 100;
} else if (_gameId == GID_ZAK) {
- if (!(_features & GF_AMIGA))
- _musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);
-
_numGlobalObjects = 775;
_numRooms = 61;
_numCostumes = 37;
@@ -114,9 +106,6 @@ void ScummEngine_v2::readClassicIndexFile() {
void ScummEngine_v2::readEnhancedIndexFile() {
- if (!(_features & GF_AMIGA))
- _musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);
-
_numGlobalObjects = _fileHandle->readUint16LE();
_fileHandle->seek(_numGlobalObjects, SEEK_CUR);
_numRooms = _fileHandle->readByte();
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 80590af715..4e5387e622 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1671,6 +1671,10 @@ void ScummEngine::setupMusic(int midi) {
_musicEngine = new Player_V3A(this);
} else if ((_features & GF_AMIGA) && (_version < 5)) {
_musicEngine = NULL;
+ } else if (_gameId == GID_MANIAC && (_version == 1)) {
+ _musicEngine = new Player_V1(this, _midiDriver != MD_PCSPK);
+ } else if (_version <= 2) {
+ _musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);;
} else if (((_midiDriver == MD_PCJR) || (_midiDriver == MD_PCSPK)) && ((_version > 2) && (_version < 5))) {
_musicEngine = new Player_V2(this, _midiDriver != MD_PCSPK);
} else if (_version > 2 && _heversion <= 60) {