[Scummvm-cvs-logs] CVS: tools mm_nes_extract.c,1.3,1.4

Max Horn fingolfin at users.sourceforge.net
Wed Sep 10 16:48:37 CEST 2003


Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv25108

Modified Files:
	mm_nes_extract.c 
Log Message:
fixed compilation

Index: mm_nes_extract.c
===================================================================
RCS file: /cvsroot/scummvm/tools/mm_nes_extract.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mm_nes_extract.c	10 Sep 2003 21:53:34 -0000	1.3
+++ mm_nes_extract.c	10 Sep 2003 22:52:40 -0000	1.4
@@ -757,7 +757,11 @@
 	{ -1, NULL }
 };
 
+#define GCC_PACK __attribute__((packed))
+
+#if defined(_MSC_VER)
 #pragma	pack(push,1)
+#endif
 struct	_lfl_index
 {
 	unsigned char	room_lfl[55];
@@ -768,8 +772,14 @@
 	unsigned short	script_addr[200];
 	unsigned char	sound_lfl[100];
 	unsigned short	sound_addr[100];
+  #if defined(__GNUC__)
+} __attribute__((packed))	lfl_index;
+  #else
 }	lfl_index;
+  #endif
+#if defined(_MSC_VER)
 #pragma	pack(pop)
+#endif
 #else	// !MAKE_LFLS
 void	dump_resource (FILE *input, char *fn_template, int num, p_resource res)
 {
@@ -894,7 +904,7 @@
 	extract_resource(input,output,&res_globdata);
 	for (i = res_globdata.length[ROMset]; i < 800; i++)
 		write_byte(output,0);
-	for (i = 0; i < sizeof(lfl_index); i++)
+	for (i = 0; i < (int)sizeof(lfl_index); i++)
 		write_byte(output,((unsigned char *)&lfl_index)[i]);
 	fclose(output);
 #else	// !MAKE_LFLS





More information about the Scummvm-git-logs mailing list