summaryrefslogtreecommitdiff
path: root/src/r_data.c
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_data.c
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_data.c')
-rw-r--r--src/r_data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/r_data.c b/src/r_data.c
index 1fdc0a85..37827d14 100644
--- a/src/r_data.c
+++ b/src/r_data.c
@@ -70,7 +70,7 @@ typedef struct
short patch;
short stepdir;
short colormap;
-} mappatch_t;
+} PACKEDATTR mappatch_t;
//
@@ -81,13 +81,13 @@ typedef struct
typedef struct
{
char name[8];
- boolean masked;
+ int masked;
short width;
short height;
int obsolete;
short patchcount;
mappatch_t patches[1];
-} maptexture_t;
+} PACKEDATTR maptexture_t;
// A single patch from a texture definition,