[Scummvm-cvs-logs] scummvm master -> 9a987001d4ea2d637f230f8a280ce2fa162d18b9

bluegr md5 at scummvm.org
Fri Apr 15 10:21:43 CEST 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6c4f09c058 SCI: Silenced the warning for kMacPlatform(1)
9a987001d4 SCI: Some initial work on supporting patch.005 in KQ1 Amiga


Commit: 6c4f09c058d15e18e4e95d9eeda60719a35c2343
    https://github.com/scummvm/scummvm/commit/6c4f09c058d15e18e4e95d9eeda60719a35c2343
Author: md5 (md5 at scummvm.org)
Date: 2011-04-15T01:20:05-07:00

Commit Message:
SCI: Silenced the warning for kMacPlatform(1)

This warning produces a lot of spam in the console (e.g. it pops up
whenever the icon bar is opened in Dr. Brain Mac), thus it has been
silenced

Changed paths:
    engines/sci/engine/kmisc.cpp



diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 907e0ba..8042522 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -411,7 +411,8 @@ reg_t kMacPlatform(EngineState *s, int argc, reg_t *argv) {
 		return kIconBar(s, argc - 1, argv + 1);
 	case 7: // Unknown, but always return -1
 		return SIGNAL_REG;
-	case 1:	// Unknown, calls QuickDraw region functions (KQ5, QFG1VGA)
+	case 1:	// Unknown, calls QuickDraw region functions (KQ5, QFG1VGA, Dr. Brain 1)
+		break;	// removed warning, as it produces a lot of spam in the console
 	case 2: // Unknown, "UseNextWaitEvent" (Various)
 	case 3: // Unknown, "ProcessOpenDocuments" (Various)
 	case 5: // Unknown, plays a sound (KQ7)


Commit: 9a987001d4ea2d637f230f8a280ce2fa162d18b9
    https://github.com/scummvm/scummvm/commit/9a987001d4ea2d637f230f8a280ce2fa162d18b9
Author: md5 (md5 at scummvm.org)
Date: 2011-04-15T01:20:07-07:00

Commit Message:
SCI: Some initial work on supporting patch.005 in KQ1 Amiga

Changed paths:
    engines/sci/sound/drivers/amigamac.cpp



diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp
index d64dfac..030b095 100644
--- a/engines/sci/sound/drivers/amigamac.cpp
+++ b/engines/sci/sound/drivers/amigamac.cpp
@@ -132,6 +132,7 @@ private:
 	};
 
 	bool _isSci1;
+	bool _isSci1Early;	// KQ1 Amiga, patch 5
 	bool _playSwitch;
 	int _masterVolume;
 	int _frequency;
@@ -557,6 +558,7 @@ uint32 MidiDriver_AmigaMac::property(int prop, uint32 param) {
 
 int MidiDriver_AmigaMac::open() {
 	_isSci1 = false;
+	_isSci1Early = false;
 
 	for (int i = 0; i < 48; i++)
 		_freqTable[i] = pow(2, i / (double)48);
@@ -589,9 +591,15 @@ int MidiDriver_AmigaMac::open() {
 	} else {
 		ResourceManager *resMan = g_sci->getResMan();
 
-		Resource *resource = resMan->findResource(ResourceId(kResourceTypePatch, 7), false);
+		Resource *resource = resMan->findResource(ResourceId(kResourceTypePatch, 7), false);	// Mac
 		if (!resource)
-			resource = resMan->findResource(ResourceId(kResourceTypePatch, 9), false);
+			resource = resMan->findResource(ResourceId(kResourceTypePatch, 9), false);	// Amiga
+
+		if (!resource) {
+			resource = resMan->findResource(ResourceId(kResourceTypePatch, 5), false);	// KQ1 Amiga
+			if (resource)
+				_isSci1Early = true;
+		}
 
 		// If we have a patch by this point, it's SCI1
 		if (resource)
@@ -896,6 +904,9 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI0Mac(Common::SeekableReadStream &fil
 bool MidiDriver_AmigaMac::loadInstrumentsSCI1(Common::SeekableReadStream &file) {
 	_bank.size = 128;
 
+	if (_isSci1Early)
+		file.skip(4);	// TODO: What is this offset for?
+
 	Common::Array<uint32> instrumentOffsets;
 	instrumentOffsets.resize(_bank.size);
 	_bank.instruments.resize(_bank.size);
@@ -908,11 +919,17 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI1(Common::SeekableReadStream &file)
 		if (instrumentOffsets[i] == 0)
 			continue;
 
-		file.seek(instrumentOffsets[i]);
+		file.seek(instrumentOffsets[i] + (_isSci1Early ? 4 : 0));
 
 		// Read in the instrument name
 		file.read(_bank.instruments[i].name, 10); // last two bytes are always 0
 
+		// TODO: Finish off support of SCI1 early patches (patch.005 - KQ1 Amiga)
+		if (_isSci1Early) {
+			warning("Music patch 5 isn't supported yet - ignoring instrument %d", i);
+			continue;
+		}
+
 		for (uint32 j = 0; ; j++) {
 			InstrumentSample *sample = new InstrumentSample;
 			memset(sample, 0, sizeof(InstrumentSample));






More information about the Scummvm-git-logs mailing list