[Scummvm-cvs-logs] CVS: scummvm/sword2 icons.h,1.10,1.11 object.h,1.6,1.7

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Mon Jan 5 06:47:01 CET 2004


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1:/tmp/cvs-serv31747

Modified Files:
	icons.h object.h 
Log Message:
Marked some more structs as packed. I don't know if it makes any
difference, as they contain only 32-bit integers, but I also believe it
does no harm.


Index: icons.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/icons.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- icons.h	28 Dec 2003 15:08:11 -0000	1.10
+++ icons.h	5 Jan 2004 14:46:12 -0000	1.11
@@ -28,11 +28,19 @@
 
 // define these in a script and then register them with the system
 
+#if !defined(__GNUC__)
+	#pragma START_PACK_STRUCTS
+#endif
+
 struct MenuObject {
 	int32 icon_resource;	// icon graphic graphic
 	int32 luggage_resource;	// luggage icon resource (for attaching to
 				// mouse pointer)
-};
+} GCC_PACK;
+
+#if !defined(__GNUC__)
+	#pragma END_PACK_STRUCTS
+#endif
 
 } // End of namespace Sword2
 

Index: object.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/object.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- object.h	28 Dec 2003 15:08:11 -0000	1.6
+++ object.h	5 Jan 2004 14:46:12 -0000	1.7
@@ -22,6 +22,10 @@
 
 namespace Sword2 {
 
+#if !defined(__GNUC__)
+	#pragma START_PACK_STRUCTS
+#endif
+
 // these structures represent the broken up compact components
 // these here declared to the system must be the same as those declared to
 // LINC (or it wont work)
@@ -36,7 +40,7 @@
 	int32 y2;
 	int32 priority;
 	int32 pointer;			// type (or resource id?) of pointer used over this area
-};
+} GCC_PACK;
 
 // logic structure - contains fields used in logic script processing
 
@@ -44,7 +48,7 @@
 	int32 looping;			// 0 when first calling fn<function>;
 					// 1 when calling subsequent times in same loop
 	int32 pause;			// pause count, used by fnPause()
-};
+} GCC_PACK;
 
 // status bits for 'type' field of ObjectGraphic)
 
@@ -70,7 +74,7 @@
 	int32 type;			// see above
 	int32 anim_resource;		// resource id of animation file
 	int32 anim_pc;			// current frame number of animation
-};
+} GCC_PACK;
 
 // speech structure - contains fields used by speech scripts & text output
 
@@ -84,7 +88,7 @@
 	int32 ins4;
 	int32 ins5;
 	int32 wait_state;		// 0 not waiting, 1 waiting for next speech command
-};
+} GCC_PACK;
 
 // mega structure - contains fields used for mega-character & mega-set
 // processing
@@ -104,7 +108,7 @@
 	int32 NOT_USED_5;		// means were currently avoiding a collision (see fnWalk)
 	int32 megaset_res;		// resource id of mega-set file
 	int32 NOT_USED_6;		// NOT USED
-};
+} GCC_PACK;
 
 // walk-data structure - contains details of layout of frames in the
 // mega-set, and how they are to be used
@@ -119,7 +123,11 @@
 	int32 leadingLeg[8];		// leading leg for walk	in each direction  (0 = left  1 = right)
 	int32 dx[8 * (12 + 1)];		// walk step distances in x direction
 	int32 dy[8 * (12 + 1)];		// walk step distances in y direction
-};
+} GCC_PACK;
+
+#if !defined(__GNUC__)
+	#pragma END_PACK_STRUCTS
+#endif
 
 } // End of namespace Sword2
 





More information about the Scummvm-git-logs mailing list