aboutsummaryrefslogtreecommitdiff
path: root/queen/sound.cpp
diff options
context:
space:
mode:
authorJoost Peters2004-01-04 03:37:12 +0000
committerJoost Peters2004-01-04 03:37:12 +0000
commit7cc972791683c232338f01818b8ccef1fccae62d (patch)
tree4a1e86298fd3d0fe954c4d102f8a8c33e02e3b69 /queen/sound.cpp
parent1ac275e20baa3784e401ef548f7bfe6ca4137601 (diff)
downloadscummvm-rg350-7cc972791683c232338f01818b8ccef1fccae62d.tar.gz
scummvm-rg350-7cc972791683c232338f01818b8ccef1fccae62d.tar.bz2
scummvm-rg350-7cc972791683c232338f01818b8ccef1fccae62d.zip
respond to 'alter'-type overrides
svn-id: r12126
Diffstat (limited to 'queen/sound.cpp')
-rw-r--r--queen/sound.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/queen/sound.cpp b/queen/sound.cpp
index 06a506f25b..456b6ab945 100644
--- a/queen/sound.cpp
+++ b/queen/sound.cpp
@@ -99,20 +99,31 @@ void Sound::playSong(int16 songNum) {
return;
}
- int16 newTune = _song[songNum - 1].tuneList[0];
+ int16 newTune = _song[songNum - 1].tuneList[0] - 1;
- if (_tune[newTune - 1].sfx[0]) {
+ if (_tune[newTune].sfx[0]) {
if (sfxOn())
- playSfx(_tune[newTune - 1].sfx[0]);
+ playSfx(_tune[newTune].sfx[0]);
return;
}
if (!musicOn() || _vm->resource()->isDemo())
return;
+ switch (_song[songNum - 1].override) {
+ // Override all songs
+ case 1:
+ break;
+ // Alter song settings (such as volume) and exit
+ case 2:
+ default:
+ return;
+ break;
+ }
+
_lastOverride = songNum;
- switch (_tune[newTune - 1].mode) {
+ switch (_tune[newTune].mode) {
//Random loop
case 0:
warning("Music: Random loop not yet supported (doing sequential loop instead)");
@@ -127,7 +138,7 @@ void Sound::playSong(int16 songNum) {
break;
}
- int16 song = _tune[newTune - 1].tuneNum[0] - 1;
+ int16 song = _tune[newTune].tuneNum[0] - 1;
// Work around bug in Roland music, note that these numbers are 'one-off' from
// the original code.