SCI: sound resource handling fixed (fixes lsl5 music w/ new music code)

svn-id: r46494
This commit is contained in:
Martin Kiewitz 2009-12-23 12:39:24 +00:00
parent 4be2788ffd
commit 957737d018

View File

@ -1852,6 +1852,9 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan) : _resMa
aTracks[i].nDigital = j;
ptr += 6;
}
} else {
// Skip over digital track
ptr += 6;
}
ptr++; // skipping 0xFF that closes channels list
}
@ -1879,9 +1882,10 @@ SoundResource::tagTrack* SoundResource::getTrackByNumber(uint16 number) {
}
SoundResource::tagTrack* SoundResource::getTrackByType(kTrackType type) {
for (int i = 0; i < nTracks; i++)
for (int i = 0; i < nTracks; i++) {
if (aTracks[i].type == type)
return &aTracks[i];
}
return NULL;
}