diff options
author | Travis Howell | 2011-08-28 00:40:55 +1000 |
---|---|---|
committer | Matthew Hoops | 2011-08-27 11:00:24 -0400 |
commit | 5346ac18b7e33a603aa2743fa57f430d96cdbc33 (patch) | |
tree | 2ad2a778bea8b850cd68438448283e16aa90ff1f /engines/agos/res_snd.cpp | |
parent | f91f0f275660cfa3362036f583619b4ef7d343fd (diff) | |
download | scummvm-rg350-5346ac18b7e33a603aa2743fa57f430d96cdbc33.tar.gz scummvm-rg350-5346ac18b7e33a603aa2743fa57f430d96cdbc33.tar.bz2 scummvm-rg350-5346ac18b7e33a603aa2743fa57f430d96cdbc33.zip |
AGOS: Integrate InstallShield support.
Diffstat (limited to 'engines/agos/res_snd.cpp')
-rw-r--r-- | engines/agos/res_snd.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index 9a04ce2d26..1d4e2d1060 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -450,17 +450,17 @@ static const char *dimpSoundList[32] = { void AGOSEngine::loadSoundFile(const char* filename) { - Common::File in; + Common::SeekableReadStream *in; - in.open(filename); - if (in.isOpen() == false) + in = _archives.open(filename); + if (!in) error("loadSound: Can't load %s", filename); - uint32 dstSize = in.size(); + uint32 dstSize = in->size(); byte *dst = (byte *)malloc(dstSize); - if (in.read(dst, dstSize) != dstSize) + if (in->read(dst, dstSize) != dstSize) error("loadSound: Read failed"); - in.close(); + delete in; _sound->playSfxData(dst, 0, 0, 0); } @@ -469,21 +469,21 @@ void AGOSEngine::loadSound(uint16 sound, int16 pan, int16 vol, uint16 type) { byte *dst; if (getGameId() == GID_DIMP) { - Common::File in; + Common::SeekableReadStream *in; char filename[15]; assert(sound >= 1 && sound <= 32); sprintf(filename, "%s.wav", dimpSoundList[sound - 1]); - in.open(filename); - if (in.isOpen() == false) + in = _archives.open(filename); + if (!in) error("loadSound: Can't load %s", filename); - uint32 dstSize = in.size(); + uint32 dstSize = in->size(); dst = (byte *)malloc(dstSize); - if (in.read(dst, dstSize) != dstSize) + if (in->read(dst, dstSize) != dstSize) error("loadSound: Read failed"); - in.close(); + delete in; } else if (getFeatures() & GF_ZLIBCOMP) { char filename[15]; |