diff options
author | James Brown | 2004-07-11 04:41:48 +0000 |
---|---|---|
committer | James Brown | 2004-07-11 04:41:48 +0000 |
commit | 9756a420a3629900783c63f1bc4778c08e2c969b (patch) | |
tree | 80124eac426f0a93ac6a4767ab669a5186a48eed /sound | |
parent | 26f4df6aa35199522be4111da17e38f7a6ffbd61 (diff) | |
download | scummvm-rg350-9756a420a3629900783c63f1bc4778c08e2c969b.tar.gz scummvm-rg350-9756a420a3629900783c63f1bc4778c08e2c969b.tar.bz2 scummvm-rg350-9756a420a3629900783c63f1bc4778c08e2c969b.zip |
Use extrapath in Sword1 engine (from 0.6.0 branch). More verbose errors to go with the forthcoming new manual. Sword1 CD swapping doesn't work as expected HERE, either :)
svn-id: r14188
Diffstat (limited to 'sound')
-rw-r--r-- | sound/audiostream.cpp | 7 | ||||
-rw-r--r-- | sound/audiostream.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index ee86fd9c30..d61f572f34 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -67,7 +67,7 @@ static const StreamFileFormat STREAM_FILEFORMATS[] = { { NULL, NULL, NULL } // Terminator }; -AudioStream* AudioStream::openStreamFile(const char* filename) +AudioStream* AudioStream::openStreamFile(const char* filename, const char *path) { char buffer[1024]; const uint len = strlen(filename); @@ -82,7 +82,10 @@ AudioStream* AudioStream::openStreamFile(const char* filename) for (int i = 0; i < ARRAYSIZE(STREAM_FILEFORMATS)-1 && stream == NULL; ++i) { strcpy(ext, STREAM_FILEFORMATS[i].fileExtension); - fileHandle->open(buffer); + if (path != NULL) + fileHandle->open(buffer, File::kFileReadMode, path); + else + fileHandle->open(buffer); if (fileHandle->isOpen()) stream = STREAM_FILEFORMATS[i].openStreamFile(fileHandle, fileHandle->size()); } diff --git a/sound/audiostream.h b/sound/audiostream.h index ac456233ba..bd39c04c2b 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -86,7 +86,7 @@ public: * @return an Audiostream ready to use in case of success; * NULL in case of an error (e.g. invalid/nonexisting file) */ - static AudioStream* openStreamFile(const char* filename); + static AudioStream* openStreamFile(const char* filename, const char* path=NULL); }; class AppendableAudioStream : public AudioStream { |