aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-09-21 12:06:52 +0000
committerTorbjörn Andersson2005-09-21 12:06:52 +0000
commit27334a55d7f0d2728a931b4d88af981f482dbf7d (patch)
tree9e130d5e55ea76d763a37736af3d58adc5140485 /sword1
parent65959dafaa518187d2da0fba9eef9d4645b7347e (diff)
downloadscummvm-rg350-27334a55d7f0d2728a931b4d88af981f482dbf7d.tar.gz
scummvm-rg350-27334a55d7f0d2728a931b4d88af981f482dbf7d.tar.bz2
scummvm-rg350-27334a55d7f0d2728a931b4d88af981f482dbf7d.zip
Marked all these structs as packed, except CollisionData, which I have
removed because it wasn't used. Does this make any difference at all on 64-bit architectures in general, and bug #1153682 in particular? svn-id: r18856
Diffstat (limited to 'sword1')
-rw-r--r--sword1/object.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/sword1/object.h b/sword1/object.h
index 40c9c0a159..d2c22d1e21 100644
--- a/sword1/object.h
+++ b/sword1/object.h
@@ -30,26 +30,29 @@ namespace Sword1 {
#define O_WALKANIM_SIZE 600 //max number of nodes in router output
#define O_GRID_SIZE 200
#define EXTRA_GRID_SIZE 20
-//--------------------------------------------------------------------------------------
+
+#if !defined(__GNUC__)
+ #pragma START_PACK_STRUCTS
+#endif
struct OEventSlot { //receiving event list in the compact -
int32 o_event; //array of these with O_TOTAL_EVENTS elements
int32 o_event_script;
-};
+} GCC_PACK; // size = 2*int32 = 8 bytes
#define TOTAL_script_levels 5
-//-----
-struct ScriptTree { //this is a logic tree, used by OBJECTs
+
+struct ScriptTree { //this is a logic tree, used by OBJECTs
int32 o_script_level; //logic level
int32 o_script_id[TOTAL_script_levels]; //script id's (are unique to each level)
int32 o_script_pc[TOTAL_script_levels]; //pc of script for each (if script_manager)
-}; // size = 11*int32 = 44 bytes
-//--------------------------------------------------------------------------------------
+} GCC_PACK; // size = 11*int32 = 44 bytes
+
struct TalkOffset {
int32 x;
int32 y;
-}; // size = 2*int32 = 8 bytes
-//--------------------------------------------------------------------------------------
+} GCC_PACK; // size = 2*int32 = 8 bytes
+
struct WalkData {
int32 frame;
int32 x;
@@ -114,14 +117,11 @@ struct Object {
WalkData o_route[O_WALKANIM_SIZE]; // 340 size = 600*20 bytes = 12000
// mega size = 12340 bytes (+ 8 byte offset table + 20 byte header = 12368)
-};
-
-struct CollisionData {
- Object *compact;
- int32 w[24];
- int32 h[24];
- WalkData route[24];
-};
+} GCC_PACK;
+
+#if !defined(__GNUC__)
+ #pragma END_PACK_STRUCTS
+#endif
} // End of namespace Sword1