[Scummvm-cvs-logs] SF.net SVN: scummvm:[43121] scummvm/branches/branch-1-0-0/engines/tinsel

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Aug 8 13:57:23 CEST 2009


Revision: 43121
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43121&view=rev
Author:   lordhoto
Date:     2009-08-08 11:57:23 +0000 (Sat, 08 Aug 2009)

Log Message:
-----------
Backport fixes for tinsel bugs #2820054 (r43119) and #2412336 (r43120).

Modified Paths:
--------------
    scummvm/branches/branch-1-0-0/engines/tinsel/dw.h
    scummvm/branches/branch-1-0-0/engines/tinsel/music.cpp

Modified: scummvm/branches/branch-1-0-0/engines/tinsel/dw.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/tinsel/dw.h	2009-08-08 11:51:15 UTC (rev 43120)
+++ scummvm/branches/branch-1-0-0/engines/tinsel/dw.h	2009-08-08 11:57:23 UTC (rev 43121)
@@ -100,7 +100,7 @@
 #define NO_ENTRY_NUM	(-3458)	// Magic unlikely number
 
 
-#define SAMPLETIMEOUT	(15*ONE_SECOND)
+#define SAMPLETIMEOUT	(20*ONE_SECOND)
 
 // Language for the resource strings
 enum LANGUAGE {

Modified: scummvm/branches/branch-1-0-0/engines/tinsel/music.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/tinsel/music.cpp	2009-08-08 11:51:15 UTC (rev 43120)
+++ scummvm/branches/branch-1-0-0/engines/tinsel/music.cpp	2009-08-08 11:57:23 UTC (rev 43121)
@@ -256,6 +256,22 @@
 
 		midiStream.close();
 
+		// WORKAROUND for bug #2820054 "DW1: No intro music at first start on Wii",
+		// which actually affects all ports, since it's specific to the multi language
+		// version.
+		//
+		// The multilanguage version does not seem to set the channel volume at all for
+		// the intro track, thus we need to do that here. We only initialize the
+		// channels used in that sequence. And we are using 127 as default channel volume.
+		if (_vm->getGameID() == GID_DW1 && dwFileOffset == 38888 &&
+			(_vm->getFeatures() & (GF_USE_3FLAGS | GF_USE_4FLAGS | GF_USE_5FLAGS))) {
+			_vm->_midiMusic->send(0x7F07B0 |  3);
+			_vm->_midiMusic->send(0x7F07B0 |  5);
+			_vm->_midiMusic->send(0x7F07B0 |  8);
+			_vm->_midiMusic->send(0x7F07B0 | 10);
+			_vm->_midiMusic->send(0x7F07B0 | 13);
+		}
+
 		_vm->_midiMusic->playXMIDI(midiBuffer.pDat, dwSeqLen, bLoop);
 
 		// Store the length
@@ -320,10 +336,10 @@
 		_vm->_midiMusic->setVolume(vol);
 	} else if (vol != 0 && priorVolMusic == 0) {
 		// Perhaps restart last midi sequence
-		if (currentLoop) {
+		if (currentLoop)
 			PlayMidiSequence(currentMidi, true);
+
 			_vm->_midiMusic->setVolume(vol);
-		}
 	} else if (vol != 0 && priorVolMusic != 0) {
 		// Alter current volume
 		_vm->_midiMusic->setVolume(vol);
@@ -377,6 +393,7 @@
 
 MidiMusicPlayer::MidiMusicPlayer(MidiDriver *driver) : _parser(0), _driver(driver), _looping(false), _isPlaying(false) {
 	memset(_channel, 0, sizeof(_channel));
+	memset(_channelVolume, 0, sizeof(_channelVolume));
 	_masterVolume = 0;
 	this->open();
 	_xmidiParser = MidiParser::createParser_XMIDI();


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