diff options
author | Filippos Karapetis | 2011-02-10 16:48:29 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-02-10 16:48:29 +0000 |
commit | e4b46bd159419c96c683a6a19b63416fb368e6d8 (patch) | |
tree | 96bd7fae76e66185fa8a3e05cdc7ad3c83b45796 /engines/sci/resource.cpp | |
parent | 80347e96303ff707d394759297547b3392fdb64b (diff) | |
download | scummvm-rg350-e4b46bd159419c96c683a6a19b63416fb368e6d8.tar.gz scummvm-rg350-e4b46bd159419c96c683a6a19b63416fb368e6d8.tar.bz2 scummvm-rg350-e4b46bd159419c96c683a6a19b63416fb368e6d8.zip |
SCI: Added resource manager support for changing the audio directory dynamically. Also,
moved some audio-specific resource code inside resource_audio.cpp
This functionality is used by kSetLanguage(), called when switching the language in
MUMG Deluxe from the game's main menu.
svn-id: r55872
Diffstat (limited to 'engines/sci/resource.cpp')
-rw-r--r-- | engines/sci/resource.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index f98a875f7f..d1bf869836 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -318,7 +318,7 @@ bool Resource::loadPatch(Common::SeekableReadStream *file) { bool Resource::loadFromPatchFile() { Common::File file; const Common::String &filename = _source->getLocationName(); - if (file.open(filename) == false) { + if (!file.open(filename)) { warning("Failed to open patch file %s", filename.c_str()); unalloc(); return false; @@ -739,28 +739,6 @@ int ResourceManager::addAppropriateSources(const Common::FSList &fslist) { return 1; } -bool ResourceManager::addAudioSources() { - Common::List<ResourceId> *resources = listResources(kResourceTypeMap); - Common::List<ResourceId>::iterator itr = resources->begin(); - - while (itr != resources->end()) { - ResourceSource *src = addSource(new IntMapResourceSource("MAP", itr->getNumber())); - - if ((itr->getNumber() == 65535) && Common::File::exists("RESOURCE.SFX")) - addSource(new AudioVolumeResourceSource(this, "RESOURCE.SFX", src, 0)); - else if (Common::File::exists("RESOURCE.AUD")) - addSource(new AudioVolumeResourceSource(this, "RESOURCE.AUD", src, 0)); - else - return false; - - ++itr; - } - - delete resources; - - return true; -} - void ResourceManager::addScriptChunkSources() { #ifdef ENABLE_SCI32 if (_mapVersion >= kResVersionSci2) { |