diff options
author | Travis Howell | 2008-07-27 10:43:15 +0000 |
---|---|---|
committer | Travis Howell | 2008-07-27 10:43:15 +0000 |
commit | 4c7420125ec5b1549953e137176a5e6109459a5f (patch) | |
tree | 1a78cb720a177d1298224ef14fbb4a256c1f6e5b | |
parent | 6e4d26fb70566846c1d8e559db9e1c4b39e3324d (diff) | |
download | scummvm-rg350-4c7420125ec5b1549953e137176a5e6109459a5f.tar.gz scummvm-rg350-4c7420125ec5b1549953e137176a5e6109459a5f.tar.bz2 scummvm-rg350-4c7420125ec5b1549953e137176a5e6109459a5f.zip |
Add music/sound loading in Amiga version of BRA.
svn-id: r33329
-rw-r--r-- | engines/parallaction/disk.h | 2 | ||||
-rw-r--r-- | engines/parallaction/disk_br.cpp | 27 |
2 files changed, 29 insertions, 0 deletions
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 |