From 4c7420125ec5b1549953e137176a5e6109459a5f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 27 Jul 2008 10:43:15 +0000 Subject: Add music/sound loading in Amiga version of BRA. svn-id: r33329 --- engines/parallaction/disk.h | 2 ++ engines/parallaction/disk_br.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'engines') diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 5b00baeb04..24f80e1a44 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -254,6 +254,8 @@ public: 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 diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index 035d0d13c5..aec605dbcd 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -656,4 +656,31 @@ Font* AmigaDisk_br::loadFont(const char* name) { 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 -- cgit v1.2.3