aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2012-02-24 05:29:01 +0000
committerD G Turner2012-02-24 15:04:12 +0000
commite3c5f9180ce48a7a43d13baa4b91a17deb50782a (patch)
tree5740007938da62ca668f52df025e21645db3649b /engines
parent31bf535a83682d6ad1616b8862119edbb95429c1 (diff)
downloadscummvm-rg350-e3c5f9180ce48a7a43d13baa4b91a17deb50782a.tar.gz
scummvm-rg350-e3c5f9180ce48a7a43d13baa4b91a17deb50782a.tar.bz2
scummvm-rg350-e3c5f9180ce48a7a43d13baa4b91a17deb50782a.zip
DREAMWEB: Migrate loadSounds() to using datafile prefix variable.
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamweb.h2
-rw-r--r--engines/dreamweb/sound.cpp7
-rw-r--r--engines/dreamweb/stubs.cpp2
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 40ae05bd8a..54646ba702 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -142,7 +142,7 @@ public:
void quit();
- void loadSounds(uint bank, const Common::String &file);
+ void loadSounds(uint bank, const Common::String &suffix);
bool loadSpeech(const Common::String &filename);
void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; }
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index b79be28cea..b51527a8cd 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -89,7 +89,7 @@ void DreamWebEngine::loadRoomsSample() {
return; // loaded already
assert(sample < 100);
- Common::String sampleName = Common::String::format("DREAMWEB.V%02d", sample);
+ Common::String sampleSuffix = Common::String::format("V%02d", sample);
_currentSample = sample;
uint8 ch0 = _channel0Playing;
@@ -98,7 +98,7 @@ void DreamWebEngine::loadRoomsSample() {
uint8 ch1 = _channel1Playing;
if (ch1 >= 12)
cancelCh1();
- loadSounds(1, sampleName.c_str());
+ loadSounds(1, sampleSuffix.c_str());
}
} // End of namespace DreamWeb
@@ -240,7 +240,8 @@ void DreamWebEngine::soundHandler() {
}
-void DreamWebEngine::loadSounds(uint bank, const Common::String &filename) {
+void DreamWebEngine::loadSounds(uint bank, const Common::String &suffix) {
+ Common::String filename = getDatafilePrefix() + suffix;
debug(1, "loadSounds(%u, %s)", bank, filename.c_str());
Common::File file;
if (!file.open(filename)) {
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 89c9aa8d38..caa5fc8f7f 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -579,7 +579,7 @@ void DreamWebEngine::dreamweb() {
readSetData();
_wonGame = false;
- loadSounds(0, "DREAMWEB.V99"); // basic sample
+ loadSounds(0, "V99"); // basic sample
bool firstLoop = true;