aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2007-07-01 18:18:43 +0000
committerMax Horn2007-07-01 18:18:43 +0000
commite1bcd70436656ed48933aadca38636f70348c842 (patch)
treefe324a6c31f5c368277c3b9e9fd42e0440f8dc7f /engines/sword1
parentf7041f94ce0a28ed21b918d1fb05ba66f131ea6d (diff)
downloadscummvm-rg350-e1bcd70436656ed48933aadca38636f70348c842.tar.gz
scummvm-rg350-e1bcd70436656ed48933aadca38636f70348c842.tar.bz2
scummvm-rg350-e1bcd70436656ed48933aadca38636f70348c842.zip
Re-added __attribute__(packed)
svn-id: r27830
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/mouse.h2
-rw-r--r--engines/sword1/object.h10
-rw-r--r--engines/sword1/router.h4
-rw-r--r--engines/sword1/sworddefs.h10
4 files changed, 13 insertions, 13 deletions
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