[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.123,1.124
Max Horn
fingolfin at users.sourceforge.net
Sat May 24 16:52:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv24065
Modified Files:
sound.cpp
Log Message:
correction for zak256 SFX
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- sound.cpp 24 May 2003 22:13:01 -0000 1.123
+++ sound.cpp 24 May 2003 23:51:57 -0000 1.124
@@ -329,7 +329,7 @@
As you can see, there are quite some patterns, e.g.
the 00 00 00 3c - the sound data seems to start at
- offset 54.
+ offset 54 = 0x36, but it could also be 0x3c...
Indy 3 seems to use a different format. The very first sound played
in Indy 3 looks as follows:
@@ -358,9 +358,8 @@
#endif
rate = 11000;
- ptr += 0x16;
if (size == 30) {
- int track = *ptr;
+ int track = *(ptr + 0x16);
if (track == _scumm->current_cd_sound)
if (pollCD() == 1)
@@ -371,21 +370,15 @@
return;
}
+ ptr += 0x36;
size -= 0x36;
sound = (char *)malloc(size);
for (int x = 0; x < size; x++) {
int bit = *ptr++;
- if (_scumm->_gameId == GID_INDY3_256) {
- // FIXME - this is an (obviously incorrect, just listen to it)
- // test hack for the Indy3 music format.... it doesn't work better
- // but at least the generated data "looks" somewhat OK :-)
- sound[x] = bit ^ 0x80;
- } else {
- if (bit < 0x80)
- sound[x] = 0x7F - bit;
- else
- sound[x] = bit;
- }
+ if (bit < 0x80)
+ sound[x] = 0x7F - bit;
+ else
+ sound[x] = bit;
}
// FIXME: Maybe something in the header signifies looping? Need to
More information about the Scummvm-git-logs
mailing list