aboutsummaryrefslogtreecommitdiff
path: root/scumm/bundle.cpp
diff options
context:
space:
mode:
authorJames Brown2003-01-18 15:54:38 +0000
committerJames Brown2003-01-18 15:54:38 +0000
commit97ff115e7d8d53e1ef3a8cc5c0fb60693a13d11e (patch)
treedbb75939feb4f60895055679363d52bcc9640679 /scumm/bundle.cpp
parent92a53a5bdf9aa1b67b6c844fa68ea783dd7ec96c (diff)
downloadscummvm-rg350-97ff115e7d8d53e1ef3a8cc5c0fb60693a13d11e.tar.gz
scummvm-rg350-97ff115e7d8d53e1ef3a8cc5c0fb60693a13d11e.tar.bz2
scummvm-rg350-97ff115e7d8d53e1ef3a8cc5c0fb60693a13d11e.zip
Fix shadowed variable in debugger, change bundle compression tables to be dynamic
svn-id: r6499
Diffstat (limited to 'scumm/bundle.cpp')
-rw-r--r--scumm/bundle.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp
index 9d8fc0793c..3723f6309f 100644
--- a/scumm/bundle.cpp
+++ b/scumm/bundle.cpp
@@ -260,7 +260,10 @@ int32 Bundle::decompressVoiceSampleByIndex(int32 index, byte *comp_final, int32
return 0;
}
- assert(num <= 50);
+ if (_compVoiceTable)
+ free(_compVoiceTable);
+
+ _compVoiceTable = (CompTable*)malloc(sizeof(CompTable) * num);
for (i = 0; i < num; i++) {
_compVoiceTable[i].offset = _voiceFile.readUint32BE();
_compVoiceTable[i].size = _voiceFile.readUint32BE();
@@ -315,7 +318,10 @@ int32 Bundle::decompressMusicSampleByIndex(int32 index, int32 number, byte *comp
return 0;
}
- assert(num <= 3361);
+ if (_compMusicTable)
+ free(_compMusicTable);
+ _compMusicTable = (CompTable*)malloc(sizeof(CompTable) * num);
+
for (i = 0; i < num; i++) {
_compMusicTable[i].offset = _musicFile.readUint32BE();
_compMusicTable[i].size = _musicFile.readUint32BE();