From e1bcd70436656ed48933aadca38636f70348c842 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 1 Jul 2007 18:18:43 +0000 Subject: Re-added __attribute__(packed) svn-id: r27830 --- engines/sword1/mouse.h | 2 +- engines/sword1/object.h | 10 +++++----- engines/sword1/router.h | 4 ++-- engines/sword1/sworddefs.h | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'engines/sword1') diff --git a/engines/sword1/mouse.h b/engines/sword1/mouse.h index 92b26c3573..f2c800d63b 100644 --- a/engines/sword1/mouse.h +++ b/engines/sword1/mouse.h @@ -60,7 +60,7 @@ struct MousePtr { uint16 hotSpotX; uint16 hotSpotY; uint8 dummyData[0x30]; -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/sword1/object.h b/engines/sword1/object.h index ba65002918..87cbce7b84 100644 --- a/engines/sword1/object.h +++ b/engines/sword1/object.h @@ -40,7 +40,7 @@ namespace Sword1 { struct OEventSlot { //receiving event list in the compact - int32 o_event; //array of these with O_TOTAL_EVENTS elements int32 o_event_script; -}; // size = 2*int32 = 8 bytes +} PACKED_STRUCT; // size = 2*int32 = 8 bytes #define TOTAL_script_levels 5 @@ -48,12 +48,12 @@ 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 +} PACKED_STRUCT; // size = 11*int32 = 44 bytes struct TalkOffset { int32 x; int32 y; -}; // size = 2*int32 = 8 bytes +} PACKED_STRUCT; // size = 2*int32 = 8 bytes struct WalkData { int32 frame; @@ -61,7 +61,7 @@ struct WalkData { int32 y; int32 step; int32 dir; -}; // size = 5*int32 = 20 bytes +} PACKED_STRUCT; // size = 5*int32 = 20 bytes struct Object { int32 o_type; // 0 broad description of type - object, floor, etc. @@ -119,7 +119,7 @@ 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) -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/sword1/router.h b/engines/sword1/router.h index 67be8d0593..60456cc5c8 100644 --- a/engines/sword1/router.h +++ b/engines/sword1/router.h @@ -44,7 +44,7 @@ struct BarData { int16 dx; // x2 - x1 int16 dy; // y2 - y1 int32 co; // co = (y1*dx) - (x1*dy) from an equation for a line y*dx = x*dy + co -}; +} PACKED_STRUCT; struct NodeData { int16 x; @@ -52,7 +52,7 @@ struct NodeData { int16 level; int16 prev; int16 dist; -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING diff --git a/engines/sword1/sworddefs.h b/engines/sword1/sworddefs.h index aedc38ef7e..e90eafe825 100644 --- a/engines/sword1/sworddefs.h +++ b/engines/sword1/sworddefs.h @@ -100,7 +100,7 @@ struct Header { uint32 comp_length; char compression[4]; uint32 decomp_length; -}; +} PACKED_STRUCT; struct FrameHeader { uint8 runTimeComp[4]; @@ -115,25 +115,25 @@ struct ParallaxHeader { char type[16]; uint16 sizeX; uint16 sizeY; -}; +} PACKED_STRUCT; struct AnimUnit { uint32 animX; uint32 animY; uint32 animFrame; -}; +} PACKED_STRUCT; struct AnimSet { uint32 cdt; uint32 spr; -}; +} PACKED_STRUCT; struct WalkGridHeader { int32 scaleA; int32 scaleB; int32 numBars; int32 numNodes; -}; +} PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING -- cgit v1.2.3