From 7bae2062f8f1f66d153ff5beac33678d1b1f977b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Tue, 14 Jan 2003 17:47:33 +0000 Subject: [PATCH] increased compression table for comi music, and added assert for it svn-id: r6456 --- scumm/bundle.cpp | 2 ++ scumm/bundle.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp index 2b113565ea4..7918d71f413 100644 --- a/scumm/bundle.cpp +++ b/scumm/bundle.cpp @@ -271,6 +271,7 @@ int32 Bundle::decompressVoiceSampleByIndex(int32 index, byte *comp_final, int32 comp_output = (byte *)malloc(10000); + assert(num <= 50); for (i = 0; i < num; i++) { comp_input = (byte *)malloc(_compVoiceTable[i].size); @@ -313,6 +314,7 @@ int32 Bundle::decompressMusicSampleByIndex(int32 index, int32 number, byte *comp return 0; } + assert(num <= 3361); for (i = 0; i < num; i++) { _compMusicTable[i].offset = _musicFile.readUint32BE(); _compMusicTable[i].size = _musicFile.readUint32BE(); diff --git a/scumm/bundle.h b/scumm/bundle.h index d4d2df78500..26190663c52 100644 --- a/scumm/bundle.h +++ b/scumm/bundle.h @@ -43,8 +43,9 @@ struct BundleAudioTable { int32 compDecode(byte *src, byte *dst); int32 decompressCodec(int32 codec, byte *comp_input, byte *comp_output, int32 size, int32 index, int32 & channels); CompTable _compVoiceTable[50]; - CompTable _compMusicTable[2500]; + CompTable _compMusicTable[3361]; File _voiceFile; + File _musicFile; BundleAudioTable *_bundleVoiceTable; BundleAudioTable *_bundleMusicTable; int32 _numVoiceFiles; @@ -59,7 +60,6 @@ public: Bundle(); ~Bundle(); - File _musicFile; void initializeImcTables(); bool openVoiceFile(const char *filename, const char *directory); bool openMusicFile(const char *filename, const char *directory);