aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-03-13 12:05:01 +0000
committerTorbjörn Andersson2004-03-13 12:05:01 +0000
commit0fc86ef674edd02b7eb4fcaf1f5c5e3ef82d3a85 (patch)
treef92c48d137373375f2b4b8b9ce507375fcf86378
parent1f5d4dcd233e15aa1cc15f533cc4d65342164e15 (diff)
downloadscummvm-rg350-0fc86ef674edd02b7eb4fcaf1f5c5e3ef82d3a85.tar.gz
scummvm-rg350-0fc86ef674edd02b7eb4fcaf1f5c5e3ef82d3a85.tar.bz2
scummvm-rg350-0fc86ef674edd02b7eb4fcaf1f5c5e3ef82d3a85.zip
Fixed a slight logic error in the music fading. At this point the code
should only check if the music is fading, not in which direction. (Also made a minor cleanup.) svn-id: r13235
-rw-r--r--sword2/driver/d_sound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 2305bc619e..ccadfe4ec8 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -469,14 +469,14 @@ int32 Sound::streamCompMusic(const char *filename, uint32 musicId, bool looping)
// If both music streams are playing, one of them will have to go.
if (_music[0]._streaming && _music[1]._streaming) {
- if (_music[0]._fading == 0 && _music[1]._fading == 0) {
+ if (!_music[0]._fading && !_music[1]._fading) {
// None of them are fading. This shouldn't happen, so
// just pick one and be done with it.
primaryStream = 0;
- } else if (_music[0]._fading != 0 && _music[1]._fading == 0) {
+ } else if (_music[0]._fading && !_music[1]._fading) {
// Stream 0 is fading, so pick that one.
primaryStream = 0;
- } else if (_music[0]._fading == 0 && _music[1]._fading > 0) {
+ } else if (!_music[0]._fading && _music[1]._fading) {
// Stream 1 is fading, so pick that one.
primaryStream = 1;
} else {