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

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sun Nov 29 01:39:22 CET 2009


Revision: 46185
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46185&view=rev
Author:   athrxx
Date:     2009-11-29 00:39:22 +0000 (Sun, 29 Nov 2009)

Log Message:
-----------
KYRA: fixed pc98 intro sfx (regression)

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_lok.cpp
    scummvm/trunk/engines/kyra/sound_intern.h
    scummvm/trunk/engines/kyra/sound_towns.cpp

Modified: scummvm/trunk/engines/kyra/kyra_lok.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_lok.cpp	2009-11-29 00:31:39 UTC (rev 46184)
+++ scummvm/trunk/engines/kyra/kyra_lok.cpp	2009-11-29 00:39:22 UTC (rev 46185)
@@ -198,7 +198,7 @@
 		error("Couldn't init sound");
 
 	if (_flags.platform == Common::kPlatformPC98)
-		_sound->loadSoundFile("introsfx.98");
+		_sound->loadSoundFile(k1PC98IntroSfx);
 	else
 		_sound->loadSoundFile(0);
 

Modified: scummvm/trunk/engines/kyra/sound_intern.h
===================================================================
--- scummvm/trunk/engines/kyra/sound_intern.h	2009-11-29 00:31:39 UTC (rev 46184)
+++ scummvm/trunk/engines/kyra/sound_intern.h	2009-11-29 00:39:22 UTC (rev 46185)
@@ -170,7 +170,7 @@
 	bool init();
 
 	void process() {}
-	void loadSoundFile(uint file) {}
+	void loadSoundFile(uint file);
 	void loadSoundFile(Common::String file);
 
 	void playTrack(uint8 track);

Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp	2009-11-29 00:31:39 UTC (rev 46184)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp	2009-11-29 00:39:22 UTC (rev 46185)
@@ -4049,6 +4049,22 @@
 	return _driver->init();
 }
 
+void SoundPC98::loadSoundFile(uint file) {
+	delete[] _sfxTrackData;
+
+	int tmpSize;
+	const uint8 *tmp = _vm->staticres()->loadRawData((int) file, tmpSize);
+	
+	if (!tmp) {
+		warning("Failed to load static sound data with id %d.", file);
+		_sfxTrackData = 0;
+		return;
+	}
+		
+	_sfxTrackData = new uint8[tmpSize];
+	memcpy(_sfxTrackData, tmp, tmpSize);
+}
+
 void SoundPC98::loadSoundFile(Common::String file) {
 	delete[] _sfxTrackData;	
 	_sfxTrackData = _vm->resource()->fileData(file.c_str(), 0);


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