aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-07-14 07:29:09 +0000
committerTravis Howell2004-07-14 07:29:09 +0000
commitd68d9a4e1ddce1e660dd09e48479c15873cedd2c (patch)
tree1b43276845c9f9707d328d08795d3a78be9abcf1 /scumm/script_v6.cpp
parent63003a1ccaee2f4ebfdc08d3954e317dad432283 (diff)
downloadscummvm-rg350-d68d9a4e1ddce1e660dd09e48479c15873cedd2c.tar.gz
scummvm-rg350-d68d9a4e1ddce1e660dd09e48479c15873cedd2c.tar.bz2
scummvm-rg350-d68d9a4e1ddce1e660dd09e48479c15873cedd2c.zip
Add support for sound offsets in HE games.
svn-id: r14209
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index f71083d565..19adb9013c 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -1024,19 +1024,19 @@ void ScummEngine_v6::o6_getOwner() {
}
void ScummEngine_v6::o6_startSound() {
+ int offset = 0;
+ int snd = pop();
+
+ // In Fatty Bear's Birthday Surprise the piano uses offsets 1 - 23 to
+ // indicate which note to play, but only when using the standard piano
+ // sound. See also o6_soundOps()
+ if ((_features & GF_HUMONGOUS) && (_gameId != GID_PUTTDEMO))
+ offset = pop();
+
if (_features & GF_DIGI_IMUSE)
- _imuseDigital->startSfx(pop(), 64);
- else {
- if ((_features & GF_HUMONGOUS) && (_gameId != GID_PUTTDEMO)) {
- // Seems to range between 952 - 9000
- // In Fatty Bear's Birthday Surprise the piano uses offsets 1 - 23 to
- // indicate which note to play, but only when using the standard piano
- // sound. See also o6_soundOps().
- int offset = pop();
- debug(2, "o6_startSound: offset %d", offset);
- }
- _sound->addSoundToQueue(pop());
- }
+ _imuseDigital->startSfx(snd, 64);
+ else
+ _sound->addSoundToQueue(snd, offset);
}
void ScummEngine_v6::o6_stopSound() {
@@ -1046,8 +1046,8 @@ void ScummEngine_v6::o6_stopSound() {
void ScummEngine_v6::o6_startMusic() {
if (_features & GF_DIGI_IMUSE)
error("o6_startMusic() It shouldn't be called here for imuse digital");
- else
- _sound->addSoundToQueue(pop());
+
+ _sound->addSoundToQueue(pop());
}
void ScummEngine_v6::o6_stopObjectScript() {