[Scummvm-cvs-logs] CVS: scummvm/simon intern.h,1.6,1.7 simon.cpp,1.104,1.105

Oliver Kiehl olki at users.sourceforge.net
Sat Nov 30 03:08:02 CET 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv27087

Modified Files:
	intern.h simon.cpp 
Log Message:
cleanup


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/intern.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- intern.h	27 Nov 2002 15:46:48 -0000	1.6
+++ intern.h	30 Nov 2002 11:07:06 -0000	1.7
@@ -118,7 +118,6 @@
 	uint VGA_DELAY_BASE;
 	uint TABLE_INDEX_BASE;
 	uint TEXT_INDEX_BASE;
-	uint NUM_GAME_OFFSETS;
 	uint NUM_VIDEO_OP_CODES;
 	uint VGA_MEM_SIZE;
 	uint TABLES_MEM_SIZE;

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- simon.cpp	29 Nov 2002 16:50:10 -0000	1.104
+++ simon.cpp	30 Nov 2002 11:07:06 -0000	1.105
@@ -40,7 +40,6 @@
 	1,										/* VGA_DELAY_BASE */
 	1576 / 4,									/* TABLE_INDEX_BASE */
 	1460 / 4,									/* TEXT_INDEX_BASE */
-	1700 / 4,									/* NUM_GAME_OFFSETS */
 	64,										/* NUM_VIDEO_OP_CODES */
 	1000000,									/* VGA_MEM_SIZE */
 	50000,										/* TABLES_MEM_SIZE */
@@ -59,7 +58,6 @@
 	1,										/* VGA_DELAY_BASE */
 	1576 / 4,									/* TABLE_INDEX_BASE */
 	1460 / 4,									/* TEXT_INDEX_BASE */
-	1700 / 4,									/* NUM_GAME_OFFSETS */
 	64,										/* NUM_VIDEO_OP_CODES */
 	1000000,									/* VGA_MEM_SIZE */
 	50000,										/* TABLES_MEM_SIZE */
@@ -78,7 +76,6 @@
 	5,										/* VGA_DELAY_BASE */
 	1580 / 4,									/* TABLE_INDEX_BASE */
 	1500 / 4,									/* TEXT_INDEX_BASE */
-	2116 / 4,									/* NUM_GAME_OFFSETS */
 	75,										/* NUM_VIDEO_OP_CODES */
 	2000000,									/* VGA_MEM_SIZE */
 	100000,										/* TABLES_MEM_SIZE */
@@ -97,7 +94,6 @@
 	5,										/* VGA_DELAY_BASE */
 	1580 / 4,									/* TABLE_INDEX_BASE */
 	1500 / 4,									/* TEXT_INDEX_BASE */
-	2116 / 4,									/* NUM_GAME_OFFSETS */
 	75,										/* NUM_VIDEO_OP_CODES */
 	2000000,									/* VGA_MEM_SIZE */
 	100000,										/* TABLES_MEM_SIZE */
@@ -4244,13 +4240,15 @@
 		if (_game_file->isOpen() == false)
 			error("cannot open game file '%s'", gss->gme_filename);
 
-		_game_offsets_ptr = (uint32 *)malloc(gss->NUM_GAME_OFFSETS * sizeof(uint32));
+		uint32 size = _game_file->readUint32LE();
+
+		_game_offsets_ptr = (uint32 *)malloc(size);
 		if (_game_offsets_ptr == NULL)
 			error("out of memory, game offsets");
 
-		resfile_read(_game_offsets_ptr, 0, gss->NUM_GAME_OFFSETS * sizeof(uint32));
+		resfile_read(_game_offsets_ptr, 0, size);
 #if defined(SCUMM_BIG_ENDIAN)
-		for (uint r = 0; r < gss->NUM_GAME_OFFSETS; r++)
+		for (uint r = 0; r < size / sizeof(uint32); r++)
 			_game_offsets_ptr[r] = FROM_LE_32(_game_offsets_ptr[r]);
 #endif
 	}





More information about the Scummvm-git-logs mailing list