shithub: choc

Download patch

ref: b9a5732a74152bf8ee21e86fc23fe43d3b235f4c
parent: 859fc3d3db9665a907ab8b52aa53b3adc681ae5d
author: Simon Howard <fraggle@gmail.com>
date: Wed Oct 12 17:52:01 EDT 2005

doomfeatures.h to allow certain features to be disabled in the build

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

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,7 @@
 deh_defs.h  deh_frame.c deh_main.c  deh_ptr.c   deh_text.c  deh_thing.c \
 deh_io.c    deh_io.h    deh_ammo.c  deh_cheat.c deh_weapon.c            \
 deh_misc.c  deh_mapping.c deh_mapping.h         deh_sound.c deh_main.h  \
-w_merge.c   w_merge.h
+w_merge.c   w_merge.h   doomfeatures.h
 
 
 if HAVE_WINDRES
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_main.c 180 2005-10-09 14:34:19Z fraggle $
+// $Id: d_main.c 190 2005-10-12 21:52:01Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.25  2005/10/12 21:52:01  fraggle
+// doomfeatures.h to allow certain features to be disabled in the build
+//
 // Revision 1.24  2005/10/09 14:34:19  fraggle
 // Fix banner string for ultimate doom
 //
@@ -115,7 +118,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_main.c 180 2005-10-09 14:34:19Z fraggle $";
+static const char rcsid[] = "$Id: d_main.c 190 2005-10-12 21:52:01Z fraggle $";
 
 #define	BGCOLOR		7
 #define	FGCOLOR		8
@@ -140,6 +143,7 @@
 #include "doomstat.h"
 
 #include "dstrings.h"
+#include "doomfeatures.h"
 #include "sounds.h"
 
 
@@ -1146,12 +1150,15 @@
     printf ("Z_Init: Init zone memory allocation daemon. \n");
     Z_Init ();
 
+#ifdef FEATURE_DEHACKED
     printf("DEH_CheckCommandLine: Init Dehacked support.\n");
     DEH_CheckCommandLine();
+#endif
 
     printf ("W_Init: Init WADfiles.\n");
     W_InitMultipleFiles (wadfiles);
 
+#ifdef FEATURE_WAD_MERGE
     p = M_CheckParm("-merge");
 
     if (p > 0)
@@ -1161,6 +1168,7 @@
             W_MergeFile(myargv[p]);
         }
     }
+#endif
     
     IdentifyVersion();
 
--- a/src/deh_main.h
+++ b/src/deh_main.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_main.h 160 2005-10-03 21:39:39Z fraggle $
+// $Id: deh_main.h 190 2005-10-12 21:52:01Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.3  2005/10/12 21:52:01  fraggle
+// doomfeatures.h to allow certain features to be disabled in the build
+//
 // Revision 1.2  2005/10/03 21:39:39  fraggle
 // Dehacked text substitutions
 //
@@ -38,6 +41,7 @@
 #define DEH_MAIN_H
 
 #include "doomtype.h"
+#include "doomfeatures.h"
 
 void DEH_CheckCommandLine(void);
 
@@ -47,7 +51,15 @@
 //
 // Used to do dehacked text substitutions throughout the program
 
+#ifdef FEATURE_DEHACKED
+
 char *DEH_String(char *s);
+
+#else
+
+#define DEH_String(x) (x)
+
+#endif
 
 #endif /* #ifndef DEH_MAIN_H */
 
--- /dev/null
+++ b/src/doomfeatures.h
@@ -1,0 +1,47 @@
+// Emacs style mode select   -*- C++ -*- 
+//-----------------------------------------------------------------------------
+//
+// $Id: doomfeatures.h 190 2005-10-12 21:52:01Z fraggle $
+//
+// Copyright(C) 2005 Simon Howard
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+// 02111-1307, USA.
+//
+// $Log$
+// Revision 1.1  2005/10/12 21:52:01  fraggle
+// doomfeatures.h to allow certain features to be disabled in the build
+//
+//
+// DESCRIPTION:
+//     List of features which can be enabled/disabled to slim down the
+//     program.
+//
+//-----------------------------------------------------------------------------
+
+#ifndef DOOM_FEATURES_H
+#define DOOM_FEATURES_H
+
+// Enables wad merging (the '-merge' command line parameter)
+
+#define FEATURE_WAD_MERGE 1
+
+// Enables dehacked support ('-deh')
+
+#define FEATURE_DEHACKED 1
+
+#endif /* #ifndef DOOM_FEATURES_H */
+
+