aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-06-30 11:03:55 +0000
committerTravis Howell2004-06-30 11:03:55 +0000
commit857c9fc85834e1b28828e1f7d9503d4c94aa1063 (patch)
tree9957c48c546ef38ba644a570fe37ea7f7b20bf79 /scumm/script_v6.cpp
parent0532767c1dc48dd1cf172604613474142066cb47 (diff)
downloadscummvm-rg350-857c9fc85834e1b28828e1f7d9503d4c94aa1063.tar.gz
scummvm-rg350-857c9fc85834e1b28828e1f7d9503d4c94aa1063.tar.bz2
scummvm-rg350-857c9fc85834e1b28828e1f7d9503d4c94aa1063.zip
Changes for non-akos version of puttputt
svn-id: r14133
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index ee924eed2d..b18e4af726 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -403,12 +403,12 @@ ArrayHeader *ScummEngine_v6::defineArray(int array, int type, int dim2, int dim1
int size;
ArrayHeader *ah;
- if (!(_features & GF_HUMONGOUS)) {
- if (type != rtSound)
- type = rtInventory;
- } else {
+ if (_heversion >= 60) {
if (type == rtScript || type == rtRoom)
type = rtCostume;
+ } else {
+ if (type != rtSound)
+ type = rtInventory;
}
nukeArray(array);
@@ -502,8 +502,7 @@ int ScummEngine_v6::readArray(int array, int idx, int base) {
assert(base >= 0 && base < FROM_LE_16(ah->dim1) * FROM_LE_16(ah->dim2));
- if (FROM_LE_16(ah->type) == 4 || (_features & GF_HUMONGOUS
- && FROM_LE_16(ah->type) == rtCostume)) {
+ if (FROM_LE_16(ah->type) == 4 || (_heversion >= 60 && FROM_LE_16(ah->type) == rtCostume)) {
return ah->data[base];
} else if (_version == 8) {
return (int32)READ_LE_UINT32(ah->data + base * 4);
@@ -520,8 +519,7 @@ void ScummEngine_v6::writeArray(int array, int idx, int base, int value) {
assert(base >= 0 && base < FROM_LE_16(ah->dim1) * FROM_LE_16(ah->dim2));
- if (FROM_LE_16(ah->type) == rtSound || (_features & GF_HUMONGOUS
- && FROM_LE_16(ah->type) == rtCostume)) {
+ if (FROM_LE_16(ah->type) == rtSound || (_heversion >= 60 && FROM_LE_16(ah->type) == rtCostume)) {
ah->data[base] = value;
} else if (_version == 8) {
#if defined(SCUMM_NEED_ALIGNMENT)
@@ -1028,8 +1026,17 @@ void ScummEngine_v6::o6_getOwner() {
void ScummEngine_v6::o6_startSound() {
if (_features & GF_DIGI_IMUSE)
_imuseDigital->startSfx(pop(), 64);
- else
+ else {
+ if (_features & GF_HUMONGOUS) {
+ // 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());
+ }
}
void ScummEngine_v6::o6_stopSound() {