diff options
author | Sven Hesse | 2009-06-22 10:12:33 +0000 |
---|---|---|
committer | Sven Hesse | 2009-06-22 10:12:33 +0000 |
commit | dd9e62e31e18188f43980b24ac9cc5c2ae00623f (patch) | |
tree | 024cf88fb409e0eb6c58c6a46e0d8c2326b9efbe /engines/gob/sound | |
parent | 1dafcabb4379c205add3d27c428e22c2f970f865 (diff) | |
download | scummvm-rg350-dd9e62e31e18188f43980b24ac9cc5c2ae00623f.tar.gz scummvm-rg350-dd9e62e31e18188f43980b24ac9cc5c2ae00623f.tar.bz2 scummvm-rg350-dd9e62e31e18188f43980b24ac9cc5c2ae00623f.zip |
Adding DataIO::existData()
svn-id: r41752
Diffstat (limited to 'engines/gob/sound')
-rw-r--r-- | engines/gob/sound/sound.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index d6dd128f42..21e06e4700 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -114,14 +114,11 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, debugC(2, kDebugSound, "Loading sample \"%s\"", fileName); - int16 handle = _vm->_dataIO->openData(fileName); - if (handle < 0) { + if (!_vm->_dataIO->existData(fileName)) { warning("Can't open sample file \"%s\"", fileName); return false; } - _vm->_dataIO->closeData(handle); - byte *data; uint32 size; @@ -503,17 +500,12 @@ void Sound::cdLoadLIC(const char *fname) { debugC(1, kDebugSound, "CDROM: Loading LIC \"%s\"", fname); - int handle = _vm->_dataIO->openData(fname); - - if (handle == -1) + if (!_vm->_dataIO->existData(fname)) return; - _vm->_dataIO->closeData(handle); - _vm->_dataIO->getUnpackedData(fname); - handle = _vm->_dataIO->openData(fname); - DataStream *stream = _vm->_dataIO->openAsStream(handle, true); + DataStream *stream = _vm->_dataIO->getDataStream(fname); _cdrom->readLIC(*stream); |