[Scummvm-cvs-logs] SF.net SVN: scummvm:[51988] scummvm/trunk/engines/scumm

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed Aug 11 17:36:30 CEST 2010


Revision: 51988
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51988&view=rev
Author:   eriktorbjorn
Date:     2010-08-11 15:36:29 +0000 (Wed, 11 Aug 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/detection_tables.h
    scummvm/trunk/engines/scumm/scumm.cpp
    scummvm/trunk/engines/scumm/sound.cpp
    scummvm/trunk/engines/scumm/vars.cpp

Modified: scummvm/trunk/engines/scumm/detection_tables.h
===================================================================
--- scummvm/trunk/engines/scumm/detection_tables.h	2010-08-11 15:16:55 UTC (rev 51987)
+++ scummvm/trunk/engines/scumm/detection_tables.h	2010-08-11 15:36:29 UTC (rev 51988)
@@ -219,9 +219,9 @@
 	{"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},

Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp	2010-08-11 15:16:55 UTC (rev 51987)
+++ scummvm/trunk/engines/scumm/scumm.cpp	2010-08-11 15:36:29 UTC (rev 51988)
@@ -1745,7 +1745,7 @@
 		_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);

Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp	2010-08-11 15:16:55 UTC (rev 51987)
+++ scummvm/trunk/engines/scumm/sound.cpp	2010-08-11 15:36:29 UTC (rev 51988)
@@ -1134,7 +1134,7 @@
 	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 @@
 				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 @@
 		}
 	}
 
-	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);

Modified: scummvm/trunk/engines/scumm/vars.cpp
===================================================================
--- scummvm/trunk/engines/scumm/vars.cpp	2010-08-11 15:16:55 UTC (rev 51987)
+++ scummvm/trunk/engines/scumm/vars.cpp	2010-08-11 15:36:29 UTC (rev 51988)
@@ -727,6 +727,9 @@
 		case MDT_PCSPK:
 			VAR(VAR_SOUNDCARD) = 0;
 			break;
+		case MDT_PCJR:
+			VAR(VAR_SOUNDCARD) = 1;
+			break;
 		case MDT_CMS:
 			VAR(VAR_SOUNDCARD) = 2;
 			break;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list