[Scummvm-cvs-logs] CVS: scummvm/scumm bundle.cpp,1.21,1.22 bundle.h,1.9,1.10 debugger.cpp,1.11,1.12

James Brown ender at users.sourceforge.net
Sat Jan 18 07:55:04 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv25541/scumm

Modified Files:
	bundle.cpp bundle.h debugger.cpp 
Log Message:
Fix shadowed variable in debugger, change bundle compression tables to be dynamic


Index: bundle.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- bundle.cpp	17 Jan 2003 16:49:41 -0000	1.21
+++ bundle.cpp	18 Jan 2003 15:54:38 -0000	1.22
@@ -260,7 +260,10 @@
 		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 @@
 			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();

Index: bundle.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bundle.h	14 Jan 2003 18:23:46 -0000	1.9
+++ bundle.h	18 Jan 2003 15:54:38 -0000	1.10
@@ -42,8 +42,8 @@
 
 	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[3361];
+	CompTable *_compVoiceTable;
+	CompTable *_compMusicTable;
 	File _voiceFile;
 	BundleAudioTable *_bundleVoiceTable;
 	BundleAudioTable *_bundleMusicTable;

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- debugger.cpp	18 Jan 2003 14:51:06 -0000	1.11
+++ debugger.cpp	18 Jan 2003 15:54:38 -0000	1.12
@@ -360,8 +360,6 @@
 }
 
 bool ScummDebugger::Cmd_DebugLevel(int argc, const char **argv) {
-	int level;
-	
 	if (argc == 1) {
 		if (_s->_debugMode == false)
 			Debug_Printf("Debugging is not enabled at this time\n");





More information about the Scummvm-git-logs mailing list