aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJochen Hoenicke2003-09-14 15:03:12 +0000
committerJochen Hoenicke2003-09-14 15:03:12 +0000
commitc902282a0569619d1091c9a603428a9dfe54375c (patch)
tree85f287e1f6b849590a3e7127d03693d818489dc8 /scumm
parentf36473e25bc63210d6f232ccb20433018471aeac (diff)
downloadscummvm-rg350-c902282a0569619d1091c9a603428a9dfe54375c.tar.gz
scummvm-rg350-c902282a0569619d1091c9a603428a9dfe54375c.tar.bz2
scummvm-rg350-c902282a0569619d1091c9a603428a9dfe54375c.zip
A hack for bug #770581. This makes the sound much closer to the
original, but I think to make it completely right a bigger change to the adlib backend would be necessary. svn-id: r10251
Diffstat (limited to 'scumm')
-rw-r--r--scumm/resource.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 7ee887df98..12968a90f5 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -1246,7 +1246,10 @@ void Scumm::convertADResource(int type, int idx, byte *src_ptr, int size) {
ch = channel[i] - 1;
if (ch < 0 || ch > 15)
continue;
-
+
+ if (instr[i*16 + 13])
+ warning("Sound %d instrument %d uses percussion", idx, i);
+
debug(4, "Sound %d: instrument %d on channel %d.",
idx, i, ch);
@@ -1305,7 +1308,7 @@ void Scumm::convertADResource(int type, int idx, byte *src_ptr, int size) {
// There is a constant delay of ppqn/3 before the music starts.
if (ppqn / 3 >= 128)
- *ptr++ = (ppqn / 3 >> 7) | 0x80;
+ *ptr++ = (ppqn / 3 >> 7) | 0x80;
*ptr++ = ppqn / 3 & 0x7f;
// Now copy the actual music data
@@ -1488,7 +1491,6 @@ void Scumm::convertADResource(int type, int idx, byte *src_ptr, int size) {
delay = mintime - curtime;
curtime = mintime;
-
{
delay = convert_extraflags(ptr + 30 + 22, src_ptr + 1);
delay2 = convert_extraflags(ptr + 30 + 40, src_ptr + 6);
@@ -1512,6 +1514,8 @@ void Scumm::convertADResource(int type, int idx, byte *src_ptr, int size) {
{
int freq = ((current_instr[ch][1] & 3) << 8)
| current_instr[ch][0];
+ if (!freq)
+ freq = 0x80;
freq <<= ((current_instr[ch][1] >> 2) & 7) + 1;
int note = -11;
while (freq >= 0x100) {