diff options
author | Max Horn | 2008-09-30 09:12:02 +0000 |
---|---|---|
committer | Max Horn | 2008-09-30 09:12:02 +0000 |
commit | 7c0b2cfd277569fdbd2b3a99faa8ed05dc794f5a (patch) | |
tree | 251b4b715803d5ece6b94dd1aa02d65f3161169d /engines/saga | |
parent | d4a76c026febb9067226e130827de034a0ec0eef (diff) | |
download | scummvm-rg350-7c0b2cfd277569fdbd2b3a99faa8ed05dc794f5a.tar.gz scummvm-rg350-7c0b2cfd277569fdbd2b3a99faa8ed05dc794f5a.tar.bz2 scummvm-rg350-7c0b2cfd277569fdbd2b3a99faa8ed05dc794f5a.zip |
Added multiple new open() methods to Common::File, which make it possible to use this class as a generic convenience wrapper around all kinds of SeekableReadStream; also renamed the name() method to the less confusing getName()
svn-id: r34696
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/music.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 5bf0c0ec03..5d0c75d0ce 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -96,7 +96,12 @@ DigitalMusicInputStream::DigitalMusicInputStream(SagaEngine *vm, ResourceContext _compressedStream = NULL; - if (scumm_stricmp(_file->name(), "music.cmp") == 0 || scumm_stricmp(_file->name(), "musicd.cmp") == 0) { + // FIXME: It is a bad idea to use the File::getName() method to distinguish + // files here (note that it is for debugging purposes only, though that was + // not correctly documented in the past). + // A better way is to keep track of this via some flag, which indicates + // whether the music file contains compressed data. + if (scumm_stricmp(_file->getName(), "music.cmp") == 0 || scumm_stricmp(_file->getName(), "musicd.cmp") == 0) { // Read compressed header to determine compression type _file->seek((long)resourceData->offset, SEEK_SET); _file->read(compressedHeader, 9); |