[Scummvm-cvs-logs] SF.net SVN: scummvm: [32819] scummvm/trunk/engines/kyra

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sat Jun 28 15:13:37 CEST 2008


Revision: 32819
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32819&view=rev
Author:   athrxx
Date:     2008-06-28 06:13:37 -0700 (Sat, 28 Jun 2008)

Log Message:
-----------
- HOF: bug fix for music driver
- KYRA1 PC98: fix music file selection

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound_lok.cpp
    scummvm/trunk/engines/kyra/sound_towns.cpp

Modified: scummvm/trunk/engines/kyra/sound_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_lok.cpp	2008-06-28 00:02:54 UTC (rev 32818)
+++ scummvm/trunk/engines/kyra/sound_lok.cpp	2008-06-28 13:13:37 UTC (rev 32819)
@@ -57,12 +57,12 @@
 			_sound->haltTrack();
 		}
 	} else if (_flags.platform == Common::kPlatformPC98) {
-		
-		//////////////
-		//// TODO ////
-		//////////////
-		_sound->playTrack(command);
-		
+		if (command == 1)
+			_sound->beginFadeOut();
+		else if (command >= 2)
+			_sound->playTrack(command);	
+		else
+			_sound->haltTrack();
 	} else {
 		KyraEngine_v1::snd_playWanderScoreViaMap(command, restart);
 	}

Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp	2008-06-28 00:02:54 UTC (rev 32818)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp	2008-06-28 13:13:37 UTC (rev 32819)
@@ -1273,6 +1273,8 @@
 		o = &feedbuf[0];
 		i = &feedbuf[1];
 		phaseShift = _feedbackLevel ? ((feedbuf[0] + feedbuf[1]) << _feedbackLevel) : 0;
+		if (phasebuf == -1)
+			*i = 0;
 		*o = *i;
 	} else {
 		phaseShift = phasebuf << 15;
@@ -1796,7 +1798,7 @@
 					break;
 				case 5:
 					*del = feed[1];
-					_channels[i]->opr[0]->generateOutput(0, feed, phbuf1);
+					_channels[i]->opr[0]->generateOutput(-1, feed, phbuf1);
 					_channels[i]->opr[2]->generateOutput(*del, 0, output);
 					_channels[i]->opr[1]->generateOutput(*del, 0, output);
 					_channels[i]->opr[3]->generateOutput(*del, 0, output);
@@ -2707,6 +2709,9 @@
 }
 
 void SoundPC98::playTrack(uint8 track) {
+	if (--track >= 56)
+		track -= 55;
+ 
 	if (track == _lastTrack && _musicEnabled)
 		return;
 
@@ -2715,9 +2720,7 @@
 	char musicfile[13];
 	sprintf(musicfile, fileListEntry(0), track);
 	delete[] _musicTrackData;
-	// This is just for testing purposes atm since we haven't found a way
-	// to determine the correct file yet
-	_musicTrackData = _vm->resource()->fileData("kyram40.dat"/*musicfile*/, 0);
+	_musicTrackData = _vm->resource()->fileData(musicfile, 0);
 	if (_musicEnabled)
 		_driver->loadData(_musicTrackData);
 
@@ -2767,6 +2770,7 @@
 		(Common::File::exists("track1.mp3") || Common::File::exists("track1.ogg") ||
 		 Common::File::exists("track1.flac") || Common::File::exists("track1.fla")))
 			_musicEnabled = 2;
+	_musicEnabled = 1;
 	return _driver->init();
 }
 


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