summaryrefslogtreecommitdiff
path: root/src/r_defs.h
diff options
context:
space:
mode:
authorSimon Howard2007-08-31 07:27:44 +0000
committerSimon Howard2007-08-31 07:27:44 +0000
commit11178d5abc068eeadf32f5cc7379a1ac53fc470c (patch)
tree1075d6b4f1221170d7702f40f59ffbc22e212185 /src/r_defs.h
parent693fb386fc1ca8551dcea553e3dd667f2f458f61 (diff)
downloadchocolate-doom-11178d5abc068eeadf32f5cc7379a1ac53fc470c.tar.gz
chocolate-doom-11178d5abc068eeadf32f5cc7379a1ac53fc470c.tar.bz2
chocolate-doom-11178d5abc068eeadf32f5cc7379a1ac53fc470c.zip
Use gcc packed attribute for all structures read/written to disk. This
fixes architectures where structure fields are aligned differently to optimise reads, causing the game to crash. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 960
Diffstat (limited to 'src/r_defs.h')
-rw-r--r--src/r_defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/r_defs.h b/src/r_defs.h
index e5bbb2df..4e0d85b7 100644
--- a/src/r_defs.h
+++ b/src/r_defs.h
@@ -288,7 +288,7 @@ typedef struct
{
byte topdelta; // -1 is the last post in a column
byte length; // length data bytes follows
-} post_t;
+} PACKEDATTR post_t;
// column_t is a list of 0 or more post_t, (byte)-1 terminated
typedef post_t column_t;
@@ -363,7 +363,7 @@ typedef struct
short topoffset; // pixels below the origin
int columnofs[8]; // only [width] used
// the [0] is &columnofs[width]
-} patch_t;
+} PACKEDATTR patch_t;