ref: 78e9b63d292b42b7fc988e814fed81bab6b338c7
parent: 693fe024f868d3925cef707c1e541656ee1b854b
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jan 22 02:44:17 EST 2023
pack some more The original had some COMPILE_ASSERT's for ensuring offsets matched with what packed structs would, lets just pack anyway.
--- a/xddefs.h
+++ b/xddefs.h
@@ -33,6 +33,8 @@
ML_BEHAVIOR
};
+#pragma pack on
+
typedef struct
{
short x;
@@ -39,8 +41,6 @@
short y;
} mapvertex_t;
-#pragma pack on
-
typedef struct
{
short textureoffset;
@@ -51,8 +51,6 @@
short sector; /* on viewer's side */
} mapsidedef_t;
-#pragma pack off
-
typedef struct
{
short v1;
@@ -67,6 +65,8 @@
short sidenum[2]; /* sidenum[1] will be -1 if one sided */
} maplinedef_t;
+#pragma pack off
+
#define ML_BLOCKING 0x0001
#define ML_BLOCKMONSTERS 0x0002
#define ML_TWOSIDED 0x0004
@@ -103,8 +103,6 @@
short tag;
} mapsector_t;
-#pragma pack off
-
typedef struct
{
short numsegs;
@@ -170,8 +168,6 @@
/* ---- Texture definition ---- */
-#pragma pack on
-
typedef struct
{
short originx;
@@ -203,8 +199,6 @@
/* length data bytes follows */
} post_t;
-#pragma pack off
-
/* column_t is a list of 0 or more post_t, (byte)-1 terminated */
typedef post_t column_t;
@@ -220,6 +214,8 @@
int columnofs[8]; /* only [width] used */
/* the [0] is &columnofs[width] */
} patch_t;
+
+#pragma pack off
#endif /* __XDDEFS__ */