shithub: hexen

Download patch

ref: 54bb991f273c0f4daff122226eec8a11e3f894be
parent: 21f6a1501d32f541673f8226d4b2292aef920c2b
author: Jacob Moody <[email protected]>
date: Sun Jan 22 23:52:49 EST 2023

saves work now

--- a/p_spec.h
+++ b/p_spec.h
@@ -461,9 +461,12 @@
 	ASTE_TERMINATING
 } aste_t;
 
+#pragma pack on
+
 typedef struct acs_s acs_t;
 typedef struct acsInfo_s acsInfo_t;
 
+
 struct acsInfo_s
 {
 	int		number;
@@ -494,6 +497,8 @@
 	int		script;		/* Script number on target map */
 	byte		args[4];	/* Padded to 4 for alignment */
 } acsstore_t;
+
+#pragma pack off
 
 void P_LoadACScripts(int lump);
 boolean P_StartACS(int number, int map, byte *args, mobj_t *activator, line_t *line, int side);
--- a/sv_save.c
+++ b/sv_save.c
@@ -270,12 +270,12 @@
 
 // CODE --------------------------------------------------------------------
 
-static inline byte GET_BYTE (void)
+static byte GET_BYTE (void)
 {
 	return *SavePtr++;
 }
 
-static inline int16_t GET_WORD (void)
+static int16_t GET_WORD (void)
 {
 	uint16_t val = READ_INT16(SavePtr);
 	INCR_INT16(SavePtr);
@@ -282,7 +282,7 @@
 	return (int16_t) val;
 }
 
-static inline int32_t GET_LONG (void)
+static int32_t GET_LONG (void)
 {
 	uint32_t val = READ_INT32(SavePtr);
 	INCR_INT32(SavePtr);
--- a/sv_save.h
+++ b/sv_save.h
@@ -11,11 +11,7 @@
 #ifndef __SAVE_DEFS
 #define __SAVE_DEFS
 
-#ifndef _DOSSAVE_COMPAT
-#define __compat_doshexen
-#else
-#define __compat_doshexen	__attribute__((__packed__))
-#endif
+#pragma pack on
 
 typedef struct
 {
@@ -69,7 +65,7 @@
 	short			tid;
 	byte			special;
 	byte			args[5];
-} __compat_doshexen save_mobj_t;
+} save_mobj_t;
 #if !(defined(VERSION10_WAD) || defined(_DOSSAVE_COMPAT))
 /* make sure the struct is of 176 bytes size, so that all our
    saved games are uniform. */
@@ -128,7 +124,7 @@
 	int		morphTics;
 	unsigned int	jumpTics;
 	unsigned int	worldTimer;
-} __compat_doshexen save_player_t;
+} save_player_t;
 #if !(defined(VERSION10_WAD) || defined(_DOSSAVE_COMPAT))
 /* make sure the struct is of 648 bytes size, so that all our saved
    games are uniform: Raven's DOS versions seem to have this struct
@@ -155,7 +151,7 @@
 	short		resetDelay;
 	short		resetDelayCount;
 	byte		textureChange;		/*  */
-} __compat_doshexen save_floormove_t;
+} save_floormove_t;
 #if !(defined(VERSION10_WAD) || defined(_DOSSAVE_COMPAT))
 /* make sure the struct is of 72 bytes size, so that all our saved
    games are uniform. */
@@ -288,6 +284,8 @@
 	int		vars[MAX_ACS_SCRIPT_VARS];
 	int32_t		ip_idx;				/* byte		*ip; */
 } save_acs_t;
+
+#pragma pack off
 
 #endif	/* __SAVE_DEFS */