summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2005-10-12 21:52:01 +0000
committerSimon Howard2005-10-12 21:52:01 +0000
commitb9a5732a74152bf8ee21e86fc23fe43d3b235f4c (patch)
tree663020b176dfaaf0e295f2186a124080c3b5ca2f
parent859fc3d3db9665a907ab8b52aa53b3adc681ae5d (diff)
downloadchocolate-doom-b9a5732a74152bf8ee21e86fc23fe43d3b235f4c.tar.gz
chocolate-doom-b9a5732a74152bf8ee21e86fc23fe43d3b235f4c.tar.bz2
chocolate-doom-b9a5732a74152bf8ee21e86fc23fe43d3b235f4c.zip
doomfeatures.h to allow certain features to be disabled in the build
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 190
-rw-r--r--src/Makefile.am2
-rw-r--r--src/d_main.c12
-rw-r--r--src/deh_main.h14
-rw-r--r--src/doomfeatures.h47
4 files changed, 71 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 71cc4928..786bfb5f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,7 @@ d_textur.h i_system.h p_enemy.c p_telept.c r_things.c mmus2mid.h \
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
diff --git a/src/d_main.c b/src/d_main.c
index 71a3b20c..5b891eff 100644
--- 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 @@ static const char rcsid[] = "$Id: d_main.c 180 2005-10-09 14:34:19Z fraggle $";
#include "doomstat.h"
#include "dstrings.h"
+#include "doomfeatures.h"
#include "sounds.h"
@@ -1146,12 +1150,15 @@ void D_DoomMain (void)
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 @@ void D_DoomMain (void)
W_MergeFile(myargv[p]);
}
}
+#endif
IdentifyVersion();
diff --git a/src/deh_main.h b/src/deh_main.h
index 8a2b3721..7c78f15e 100644
--- 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 @@ boolean DEH_ParseAssignment(char *line, char **variable_name, char **value);
//
// 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 */
diff --git a/src/doomfeatures.h b/src/doomfeatures.h
new file mode 100644
index 00000000..2c056d6e
--- /dev/null
+++ b/src/doomfeatures.h
@@ -0,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 */
+
+