From 9040140f586f22d24af914012e7eb4d1cb915321 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Sun, 11 Nov 2001 23:39:22 +0000 Subject: [PATCH] Created header for MAKE_SIG macro --- include/makesig.h | 18 ++++++++++++++++++ main/playsave.c | 27 ++++++++++++++++++++------- 2 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 include/makesig.h diff --git a/include/makesig.h b/include/makesig.h new file mode 100644 index 00000000..6ba998e7 --- /dev/null +++ b/include/makesig.h @@ -0,0 +1,18 @@ +/* + * $Source: /cvs/cvsroot/d2x/include/makesig.h,v $ + * $Revision: 1.1 $ + * $Author: bradleyb $ + * $Date: 2001-11-11 23:39:22 $ + * + * Macro to make file signatures + * + * $Log: not supported by cvs2svn $ + * + */ + +#ifndef _MAKESIG_H +#define _MAKESIG_H + +#define MAKE_SIG(a,b,c,d) (((long)(a)<<24)+((long)(b)<<16)+((c)<<8)+(d)) + +#endif diff --git a/main/playsave.c b/main/playsave.c index 5712d77c..6012678e 100644 --- a/main/playsave.c +++ b/main/playsave.c @@ -11,8 +11,21 @@ AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ +/* + * $Source: /cvs/cvsroot/d2x/main/playsave.c,v $ + * $Revision: 1.3 $ + * $Author: bradleyb $ + * $Date: 2001-11-11 23:39:22 $ + * + * Functions to load & save player games + * + * $Log: not supported by cvs2svn $ + * + */ + +#ifdef HAVE_CONFIG_H #include - +#endif #ifdef WINDOWS #include "desw.h" @@ -47,8 +60,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "gauges.h" #include "screens.h" #include "powerup.h" +#include "makesig.h" -#define SAVE_FILE_ID "DPLR" +#define SAVE_FILE_ID MAKE_SIG('D','P','L','R') #ifdef MACINTOSH #include @@ -353,9 +367,8 @@ int read_player_file() #endif FILE *file; int errno_ret = EZERO; - int player_file_version,i; + int id,player_file_version,i; int rewrite_it=0; - char id[4]; Assert(Player_num>=0 && Player_num