aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-08-11 15:36:29 +0000
committerTorbjörn Andersson2010-08-11 15:36:29 +0000
commit416b56874490fae9aeba76bc7603313b59f24df7 (patch)
treef6ac5df238ae63875348dc843701b224c3ee2f26 /engines/scumm
parent10b6a395cf4665c115b3e8bb233bd8842acf1724 (diff)
downloadscummvm-rg350-416b56874490fae9aeba76bc7603313b59f24df7.tar.gz
scummvm-rg350-416b56874490fae9aeba76bc7603313b59f24df7.tar.bz2
scummvm-rg350-416b56874490fae9aeba76bc7603313b59f24df7.zip
SCUMM: Re-enable PCjr music for Indy 3
Apart from adding the necessary detector flags, in cases where we used to only check for PC Speaker we now also need to check for PCjr. Note that I have only tested this with the VGA version. And even with that one, I've only given it the briefest of tests. svn-id: r51988
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/detection_tables.h6
-rw-r--r--engines/scumm/scumm.cpp2
-rw-r--r--engines/scumm/sound.cpp8
-rw-r--r--engines/scumm/vars.cpp3
4 files changed, 11 insertions, 8 deletions
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index af7f72f79e..258c3d0b59 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -219,9 +219,9 @@ static const GameSettings gameVariantsTable[] = {
{"zak", "V2", "v2", GID_ZAK, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
{"zak", "FM-TOWNS", 0, GID_ZAK, 3, 0, MDT_TOWNS, GF_OLD256 | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI},
- {"indy3", "EGA", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
- {"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
- {"indy3", "VGA", "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
+ {"indy3", "EGA", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
+ {"indy3", "No AdLib", "ega", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO_NOSPEECH | GUIO_NOMIDI},
+ {"indy3", "VGA", "vga", GID_INDY3, 3, 0, MDT_PCSPK | MDT_PCJR | MDT_ADLIB, GF_OLD256 | GF_FEW_LOCALS, Common::kPlatformPC, GUIO_NOSPEECH | GUIO_NOMIDI},
{"indy3", "FM-TOWNS", 0, GID_INDY3, 3, 0, MDT_TOWNS, GF_OLD256 | GF_FEW_LOCALS | GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI},
{"loom", "EGA", "ega", GID_LOOM, 3, 0, MDT_PCSPK | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 30ec40b026..d72306abc3 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1745,7 +1745,7 @@ void ScummEngine::setupMusic(int midi) {
_musicEngine = new Player_V1(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK);
} else if (_game.version <= 2) {
_musicEngine = new Player_V2(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK);
- } else if ((_musicType == MDT_PCSPK) && (_game.version > 2 && _game.version <= 4)) {
+ } else if ((_musicType == MDT_PCSPK || _musicType == MDT_PCJR) && (_game.version > 2 && _game.version <= 4)) {
_musicEngine = new Player_V2(this, _mixer, MidiDriver::getMusicType(dev) != MT_PCSPK);
} else if (_musicType == MDT_CMS) {
_musicEngine = new Player_V2CMS(this, _mixer);
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index a845f623c2..61445b21eb 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -1134,7 +1134,7 @@ int ScummEngine::readSoundResource(int idx) {
switch (basetag) {
case MKID_BE('MIDI'):
case MKID_BE('iMUS'):
- if (_musicType != MDT_PCSPK) {
+ if (_musicType != MDT_PCSPK && _musicType != MDT_PCJR) {
_fileHandle->seek(-8, SEEK_CUR);
_fileHandle->read(_res->createResource(rtSound, idx, total_size + 8), total_size + 8);
return 1;
@@ -1177,12 +1177,12 @@ int ScummEngine::readSoundResource(int idx) {
break;
case MKID_BE('SPK '):
pri = -1;
-// if (_musicType == MDT_PCSPK)
+// if (_musicType == MDT_PCSPK || _musicType == MDT_PCJR)
// pri = 11;
break;
}
- if ((_musicType == MDT_PCSPK || _musicType == MDT_CMS) && pri != 11)
+ if ((_musicType == MDT_PCSPK || _musicType == MDT_PCJR || _musicType == MDT_CMS) && pri != 11)
pri = -1;
debugC(DEBUG_RESOURCE, " tag: %s, total_size=%d, pri=%d", tag2str(tag), size, pri);
@@ -2114,7 +2114,7 @@ int ScummEngine::readSoundResourceSmallHeader(int idx) {
}
}
- if ((_musicType == MDT_PCSPK) && wa_offs != 0) {
+ if ((_musicType == MDT_PCSPK || _musicType == MDT_PCJR) && wa_offs != 0) {
if (_game.features & GF_OLD_BUNDLE) {
_fileHandle->seek(wa_offs, SEEK_SET);
_fileHandle->read(_res->createResource(rtSound, idx, wa_size), wa_size);
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index cacfd0101b..d1d3ed63a4 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -727,6 +727,9 @@ void ScummEngine::resetScummVars() {
case MDT_PCSPK:
VAR(VAR_SOUNDCARD) = 0;
break;
+ case MDT_PCJR:
+ VAR(VAR_SOUNDCARD) = 1;
+ break;
case MDT_CMS:
VAR(VAR_SOUNDCARD) = 2;
break;