[Scummvm-cvs-logs] SF.net SVN: scummvm:[33329] scummvm/trunk/engines/parallaction

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Jul 27 12:43:16 CEST 2008


Revision: 33329
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33329&view=rev
Author:   Kirben
Date:     2008-07-27 10:43:15 +0000 (Sun, 27 Jul 2008)

Log Message:
-----------
Add music/sound loading in Amiga version of BRA.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/disk.h
    scummvm/trunk/engines/parallaction/disk_br.cpp

Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h	2008-07-27 10:37:54 UTC (rev 33328)
+++ scummvm/trunk/engines/parallaction/disk.h	2008-07-27 10:43:15 UTC (rev 33329)
@@ -254,6 +254,8 @@
 	Frames* loadFrames(const char* name);
 	void loadSlide(BackgroundInfo& info, const char *filename);
 	void loadScenery(BackgroundInfo& info, const char* name, const char* mask, const char* path);
+	Common::SeekableReadStream* loadMusic(const char* name);
+	Common::ReadStream* loadSound(const char* name);
 };
 
 } // namespace Parallaction

Modified: scummvm/trunk/engines/parallaction/disk_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk_br.cpp	2008-07-27 10:37:54 UTC (rev 33328)
+++ scummvm/trunk/engines/parallaction/disk_br.cpp	2008-07-27 10:43:15 UTC (rev 33329)
@@ -656,4 +656,31 @@
 	return createFont(name, stream);
 }
 
+Common::SeekableReadStream* AmigaDisk_br::loadMusic(const char* name) {
+	debugC(5, kDebugDisk, "AmigaDisk_br::loadMusic");
+
+	char path[PATH_LEN];
+	sprintf(path, "%s/msc/%s", _partPath, name);
+
+	Common::File *stream = new Common::File;
+	if (!stream->open(path))
+		return 0;
+
+	return stream;
+}
+
+
+Common::ReadStream* AmigaDisk_br::loadSound(const char* name) {
+	debugC(5, kDebugDisk, "AmigaDisk_br::loadSound");
+
+	char path[PATH_LEN];
+	sprintf(path, "%s/sfx/%s", _partPath, name);
+
+	Common::File *stream = new Common::File;
+	if (!stream->open(path))
+		errorFileNotFound(path);
+
+	return stream;
+}
+
 } // namespace Parallaction


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