shithub: choc

Download patch

ref: a053707f271981151070a2c5f9d975d4490ae6bb
parent: 479d7ded6db85c364940e5e77966746224318f20
author: Simon Howard <fraggle@gmail.com>
date: Thu Aug 4 18:55:08 EDT 2005

Use DOOM_VERSION to define the Doom version (don't conflict with
automake's config.h). Display GPL message instead of anti-piracy
messages.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 41

--- a/src/d_main.c
+++ b/src/d_main.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_main.c 39 2005-08-04 21:48:32Z fraggle $
+// $Id: d_main.c 41 2005-08-04 22:55:08Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.5  2005/08/04 22:55:07  fraggle
+// Use DOOM_VERSION to define the Doom version (don't conflict with
+// automake's config.h).  Display GPL message instead of anti-piracy
+// messages.
+//
 // Revision 1.4  2005/08/04 21:48:32  fraggle
 // Turn on compiler optimisation and warning options
 // Add SDL_mixer sound code
@@ -45,7 +50,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_main.c 39 2005-08-04 21:48:32Z fraggle $";
+static const char rcsid[] = "$Id: d_main.c 41 2005-08-04 22:55:08Z fraggle $";
 
 #define	BGCOLOR		7
 #define	FGCOLOR		8
@@ -61,6 +66,7 @@
 #endif
 
 
+#include "config.h"
 #include "doomdef.h"
 #include "doomstat.h"
 
@@ -831,7 +837,7 @@
 		 "                         "
 		 "The Ultimate DOOM Startup v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
       case shareware:
 	sprintf (title,
@@ -838,7 +844,7 @@
 		 "                            "
 		 "DOOM Shareware Startup v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
       case registered:
 	sprintf (title,
@@ -845,7 +851,7 @@
 		 "                            "
 		 "DOOM Registered Startup v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
       case commercial:
 	sprintf (title,
@@ -852,7 +858,7 @@
 		 "                         "
 		 "DOOM 2: Hell on Earth v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
 /*FIXME
        case pack_plut:
@@ -860,7 +866,7 @@
 		 "                   "
 		 "DOOM 2: Plutonia Experiment v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
       case pack_tnt:
 	sprintf (title,
@@ -867,7 +873,7 @@
 		 "                     "
 		 "DOOM 2: TNT - Evilution v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
 */
       default:
@@ -875,7 +881,7 @@
 		 "                     "
 		 "Public DOOM - v%i.%i"
 		 "                           ",
-		 VERSION/100,VERSION%100);
+		 DOOM_VERSION/100,DOOM_VERSION%100);
 	break;
     }
     
@@ -1056,6 +1062,7 @@
 		    I_Error("\nThis is not the registered version.");
     }
     
+#if 0
     // Iff additonal PWAD files are used, print modified banner
     if (modifiedgame)
     {
@@ -1069,7 +1076,6 @@
 	    );
 	getchar ();
     }
-	
 
     // Check and print which version is executed.
     switch ( gamemode )
@@ -1097,6 +1103,16 @@
 	// Ouch.
 	break;
     }
+#endif	
+    printf (
+	    "===========================================================================\n"
+	    " " PACKAGE_NAME " is free software, covered by the GNU General Public\n"
+            " License.  There is NO warranty; not even for MERCHANTABILITY or FITNESS\n"
+            " FOR A PARTICULAR PURPOSE. You are welcome to change and distribute\n"
+            " copies under certain conditions. See the source for more information.\n"
+
+	    "===========================================================================\n"
+	);
 
     printf ("M_Init: Init miscellaneous info.\n");
     M_Init ();
--- a/src/d_net.c
+++ b/src/d_net.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_net.c 19 2005-07-23 19:17:11Z fraggle $
+// $Id: d_net.c 41 2005-08-04 22:55:08Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.4  2005/08/04 22:55:07  fraggle
+// Use DOOM_VERSION to define the Doom version (don't conflict with
+// automake's config.h).  Display GPL message instead of anti-piracy
+// messages.
+//
 // Revision 1.3  2005/07/23 19:17:11  fraggle
 // Use ANSI-standard limit constants.  Remove LINUX define.
 //
@@ -39,7 +44,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_net.c 19 2005-07-23 19:17:11Z fraggle $";
+static const char rcsid[] = "$Id: d_net.c 41 2005-08-04 22:55:08Z fraggle $";
 
 
 #include "m_menu.h"
@@ -508,7 +513,7 @@
 		continue;
 	    if (netbuffer->checksum & NCMD_SETUP)
 	    {
-		if (netbuffer->player != VERSION)
+		if (netbuffer->player != DOOM_VERSION)
 		    I_Error ("Different DOOM versions cannot play a net game!");
 		startskill = netbuffer->retransmitfrom & 15;
 		deathmatch = (netbuffer->retransmitfrom & 0xc0) >> 6;
@@ -537,7 +542,7 @@
 		if (respawnparm)
 		    netbuffer->retransmitfrom |= 0x10;
 		netbuffer->starttic = startepisode * 64 + startmap;
-		netbuffer->player = VERSION;
+		netbuffer->player = DOOM_VERSION;
 		netbuffer->numtics = 0;
 		HSendPacket (i, NCMD_SETUP);
 	    }
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: doomdef.h 39 2005-08-04 21:48:32Z fraggle $
+// $Id: doomdef.h 41 2005-08-04 22:55:08Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -37,7 +37,7 @@
 // Global parameters/defines.
 //
 // DOOM version
-enum { VERSION =  109 };
+enum { DOOM_VERSION =  109 };
 
 
 // Game mode handling - identify IWAD version
@@ -362,6 +362,11 @@
 //-----------------------------------------------------------------------------
 //
 // $Log$
+// Revision 1.6  2005/08/04 22:55:08  fraggle
+// Use DOOM_VERSION to define the Doom version (don't conflict with
+// automake's config.h).  Display GPL message instead of anti-piracy
+// messages.
+//
 // Revision 1.5  2005/08/04 21:48:32  fraggle
 // Turn on compiler optimisation and warning options
 // Add SDL_mixer sound code
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 32 2005-08-03 22:20:09Z fraggle $
+// $Id: g_game.c 41 2005-08-04 22:55:08Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,11 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.4  2005/08/04 22:55:08  fraggle
+// Use DOOM_VERSION to define the Doom version (don't conflict with
+// automake's config.h).  Display GPL message instead of anti-piracy
+// messages.
+//
 // Revision 1.3  2005/08/03 22:20:09  fraggle
 // Display FPS on quit
 //
@@ -38,7 +43,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 32 2005-08-03 22:20:09Z fraggle $";
+rcsid[] = "$Id: g_game.c 41 2005-08-04 22:55:08Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -1228,7 +1233,7 @@
     
     // skip the description field 
     memset (vcheck,0,sizeof(vcheck)); 
-    sprintf (vcheck,"version %i",VERSION); 
+    sprintf (vcheck,"version %i",DOOM_VERSION); 
     if (strcmp (save_p, vcheck)) 
 	return;				// bad version 
     save_p += VERSIONSIZE; 
@@ -1302,7 +1307,7 @@
     memcpy (save_p, description, SAVESTRINGSIZE); 
     save_p += SAVESTRINGSIZE; 
     memset (name2,0,sizeof(name2)); 
-    sprintf (name2,"version %i",VERSION); 
+    sprintf (name2,"version %i",DOOM_VERSION); 
     memcpy (save_p, name2, VERSIONSIZE); 
     save_p += VERSIONSIZE; 
 	 
@@ -1568,7 +1573,7 @@
 		
     demo_p = demobuffer;
 	
-    *demo_p++ = VERSION;
+    *demo_p++ = DOOM_VERSION;
     *demo_p++ = gameskill; 
     *demo_p++ = gameepisode; 
     *demo_p++ = gamemap; 
@@ -1602,7 +1607,7 @@
 	 
     gameaction = ga_nothing; 
     demobuffer = demo_p = W_CacheLumpName (defdemoname, PU_STATIC); 
-    if ( *demo_p++ != VERSION)
+    if ( *demo_p++ != DOOM_VERSION)
     {
       fprintf( stderr, "Demo is from a different game version!\n");
       gameaction = ga_nothing;