diff options
author | Simon Howard | 2007-08-31 07:27:44 +0000 |
---|---|---|
committer | Simon Howard | 2007-08-31 07:27:44 +0000 |
commit | 11178d5abc068eeadf32f5cc7379a1ac53fc470c (patch) | |
tree | 1075d6b4f1221170d7702f40f59ffbc22e212185 /src/r_data.c | |
parent | 693fb386fc1ca8551dcea553e3dd667f2f458f61 (diff) | |
download | chocolate-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.c | 6 |
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, |