aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-03 21:17:58 +0000
committerMartin Kiewitz2010-01-03 21:17:58 +0000
commitd13b23d688c51849509de267fa469af7334a94f9 (patch)
tree9db99ac081d566629ebd36a71b83a3081fbda0a2 /engines/sci
parent781dd3b18369bebe4c089526be9f470c12311e48 (diff)
downloadscummvm-rg350-d13b23d688c51849509de267fa469af7334a94f9.tar.gz
scummvm-rg350-d13b23d688c51849509de267fa469af7334a94f9.tar.bz2
scummvm-rg350-d13b23d688c51849509de267fa469af7334a94f9.zip
SCI/newmusic: this fix will make qfg1vga character selection music work
svn-id: r46950
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sfx/soundcmd.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index bdb621416e..6a20d5f2df 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -279,6 +279,7 @@ void SoundCommandParser::cmdInitSound(reg_t obj, int16 value) {
newSound->soundRes = new SoundResource(number, _resMan, _soundVersion);
else
newSound->soundRes = 0;
+
newSound->soundObj = obj;
newSound->loop = GET_SEL32V(_segMan, obj, loop);
newSound->prio = GET_SEL32V(_segMan, obj, pri) & 0xFF;
@@ -301,8 +302,11 @@ void SoundCommandParser::cmdInitSound(reg_t obj, int16 value) {
newSound->pStreamAud = _audio->getAudioStream(number, 65535, &sampleLen);
newSound->soundType = Audio::Mixer::kSpeechSoundType;
} else {
- if (newSound->soundRes)
- _music->soundInitSnd(newSound);
+ // If sound resource doesnt exist, we are supposed to leave nodePtr/handle selector alone
+ // otherwise character selection music in qfg1vga wont work.
+ if (!newSound->soundRes)
+ return;
+ _music->soundInitSnd(newSound);
}
_music->pushBackSlot(newSound);