Correct RO sound resource size for blocked games.

svn-id: r10146
This commit is contained in:
Travis Howell 2003-09-10 03:50:03 +00:00
parent 94c4cf0e55
commit 87ff23ddc1

View File

@ -1573,7 +1573,7 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) {
ro_size = _fileHandle.readUint16LE();
src_ptr = (byte *) calloc(ro_size - 4, 1);
_fileHandle.seek(ro_offs +4, SEEK_SET);
_fileHandle.seek(ro_offs + 4, SEEK_SET);
_fileHandle.read(src_ptr, ro_size -4);
ptr = createResource(type, idx, ro_size + 2);
@ -1599,8 +1599,8 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) {
(char) ((tag >> 8) & 0xff), size);
if (tag == 0x4F52) { // RO
ro_size = size;
ro_offs = _fileHandle.pos();
ro_size = size;
} else {
pos = 6;
while (pos < total_size) {
@ -1667,7 +1667,7 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) {
return 1;
} else if (ro_offs != 0) {
_fileHandle.seek(ro_offs - 2, SEEK_SET);
_fileHandle.read(createResource(type, idx, ro_size + 2), ro_size + 2);
_fileHandle.read(createResource(type, idx, ro_size - 4), ro_size - 4);
return 1;
}
res.roomoffs[type][idx] = 0xFFFFFFFF;