shithub: choc

Download patch

ref: 15f26fadf4315e0336fd0e2c68e7162c29bbffcb
parent: c7ddc423f67236a99956960cf9fe89abf077839b
author: Simon Howard <fraggle@gmail.com>
date: Thu Sep 4 20:33:18 EDT 2008

Fix #include statements to use lower case filenames. Add automake
configuration for building heretic/hexen code.

Subversion-branch: /branches/raven-branch
Subversion-revision: 1198

--- a/configure.in
+++ b/configure.in
@@ -79,6 +79,8 @@
 setup/Makefile
 man/Makefile
 src/Makefile
+src/heretic/Makefile
+src/hexen/Makefile
 pcsound/Makefile
 src/resource.rc
 src/doom-screensaver.desktop
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,6 @@
 
+SUBDIRS=heretic hexen
+
 gamesdir = $(prefix)/games
 
 games_PROGRAMS = chocolate-doom chocolate-server
--- /dev/null
+++ b/src/heretic/Makefile.am
@@ -1,0 +1,61 @@
+
+noinst_LIBRARIES=libheretic.a
+
+SOURCE_FILES=                                        \
+                       am_data.h                     \
+am_map.c               am_map.h                      \
+ct_chat.c              ct_chat.h                     \
+d_main.c                                             \
+d_net.c                                              \
+                       doomdata.h                    \
+                       doomdef.h                     \
+                       dstrings.h                    \
+f_finale.c                                           \
+g_game.c                                             \
+                       i_header.h                    \
+info.c                 info.h                        \
+in_lude.c                                            \
+m_misc.c                                             \
+mn_menu.c                                            \
+p_ceilng.c                                           \
+p_doors.c                                            \
+p_enemy.c                                            \
+p_floor.c                                            \
+p_inter.c                                            \
+p_lights.c                                           \
+p_local.h                                            \
+p_map.c                                              \
+p_maputl.c                                           \
+p_mobj.c                                             \
+p_plats.c                                            \
+p_pspr.c                                             \
+p_setup.c                                            \
+p_sight.c                                            \
+p_spec.c               p_spec.h                      \
+p_switch.c                                           \
+p_telept.c                                           \
+p_tick.c                                             \
+p_user.c                                             \
+r_bsp.c                                              \
+r_data.c                                             \
+r_draw.c                                             \
+                       r_local.h                     \
+r_main.c                                             \
+r_plane.c                                            \
+r_segs.c                                             \
+r_things.c                                           \
+sb_bar.c                                             \
+sounds.c               sounds.h                      \
+                       soundst.h                     \
+tables.c                                             \
+v_video.c                                            \
+w_wad.c                                              \
+z_zone.c 
+
+EXTRA_DIST=                                          \
+i_sound.c              i_sound.h                     \
+i_cyber.c                                            \
+i_ibm.c   
+
+libheretic_a_SOURCES=$(SOURCE_FILES)
+
--- a/src/heretic/am_map.c
+++ b/src/heretic/am_map.c
@@ -23,10 +23,10 @@
 
 // AM_map.c
 
-#include "DoomDef.h"
-#include "P_local.h"
-#include "AM_map.h"
-#include "AM_data.h"
+#include "doomdef.h"
+#include "p_local.h"
+#include "am_map.h"
+#include "am_data.h"
 #include <stdio.h>
 
 vertex_t KeyPoints[NUMKEYS];
--- a/src/heretic/ct_chat.c
+++ b/src/heretic/ct_chat.c
@@ -26,8 +26,8 @@
 
 #include <string.h>
 #include <ctype.h>
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 #define QUEUESIZE		128
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -31,8 +31,8 @@
 #endif
 #include <stdio.h>
 #include <stdlib.h>
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 boolean shareware = false;      // true if only episode 1 present
--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -24,7 +24,7 @@
 // d_net.c
 // This version has the fixed ticdup code
 
-#include "DoomDef.h"
+#include "doomdef.h"
 
 #define NCMD_EXIT               0x80000000
 #define NCMD_RETRANSMIT 0x40000000
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -41,10 +41,10 @@
 //#define RANGECHECK
 
 // all external data is defined here
-#include "DoomData.h"
+#include "doomdata.h"
 
 // all important printed strings
-#include "DStrings.h"
+#include "dstrings.h"
 
 // header generated by multigen utility
 #include "info.h"
--- a/src/heretic/f_finale.c
+++ b/src/heretic/f_finale.c
@@ -22,7 +22,7 @@
 //-----------------------------------------------------------------------------
 // F_finale.c
 
-#include "DoomDef.h"
+#include "doomdef.h"
 #include "soundst.h"
 #include <ctype.h>
 
@@ -153,7 +153,7 @@
 =======================
 */
 
-//#include "HU_stuff.h"
+//#include "hu_stuff.h"
 //extern        patch_t *hu_font[HU_FONTSIZE];
 
 void F_TextWrite(void)
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -25,8 +25,8 @@
 
 #include <stdio.h>
 #include <string.h>
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 // Macros
--- a/src/heretic/i_header.h
+++ b/src/heretic/i_header.h
@@ -23,7 +23,7 @@
 #ifndef __I_HEADER_H__
 #define __I_HEADER_H__
 
-#include "DoomDef.h"
+#include "doomdef.h"
 
 //--------
 //SOUND IO
--- a/src/heretic/i_ibm.c
+++ b/src/heretic/i_ibm.c
@@ -28,8 +28,8 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <graph.h>
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 #include "sounds.h"
 #include "i_sound.h"
 #include "dmx.h"
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -28,7 +28,7 @@
 ========================
 */
 
-#include "DoomDef.h"
+#include "doomdef.h"
 #include "soundst.h"
 
 typedef enum
--- a/src/heretic/info.c
+++ b/src/heretic/info.c
@@ -20,7 +20,7 @@
 // 02111-1307, USA.
 //
 //-----------------------------------------------------------------------------
-#include "DoomDef.h"
+#include "doomdef.h"
 // generated by multigen
 
 char *sprnames[NUMSPRITES] = {
--- a/src/heretic/m_misc.c
+++ b/src/heretic/m_misc.c
@@ -28,7 +28,6 @@
 #else
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <direct.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #endif
@@ -35,7 +34,7 @@
 
 #include <ctype.h>
 
-#include "DoomDef.h"
+#include "doomdef.h"
 #include "soundst.h"
 
 int myargc;
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -24,9 +24,9 @@
 // MN_menu.c
 
 #include <ctype.h>
-#include "DoomDef.h"
-#include "P_local.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "p_local.h"
+#include "r_local.h"
 #include "soundst.h"
 
 // Macros
--- a/src/heretic/p_ceilng.c
+++ b/src/heretic/p_ceilng.c
@@ -21,8 +21,8 @@
 //
 //-----------------------------------------------------------------------------
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 //==================================================================
--- a/src/heretic/p_doors.c
+++ b/src/heretic/p_doors.c
@@ -23,8 +23,8 @@
 
 // P_doors.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 //==================================================================
--- a/src/heretic/p_enemy.c
+++ b/src/heretic/p_enemy.c
@@ -23,8 +23,8 @@
 
 // P_enemy.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 // Macros
--- a/src/heretic/p_floor.c
+++ b/src/heretic/p_floor.c
@@ -20,8 +20,8 @@
 // 02111-1307, USA.
 //
 //-----------------------------------------------------------------------------
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 //==================================================================
--- a/src/heretic/p_inter.c
+++ b/src/heretic/p_inter.c
@@ -23,8 +23,8 @@
 
 // P_inter.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 #define BONUSADD 6
--- a/src/heretic/p_lights.c
+++ b/src/heretic/p_lights.c
@@ -20,8 +20,8 @@
 // 02111-1307, USA.
 //
 //-----------------------------------------------------------------------------
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 
 //==================================================================
 //==================================================================
--- a/src/heretic/p_local.h
+++ b/src/heretic/p_local.h
@@ -27,7 +27,7 @@
 #define __P_LOCAL__
 
 #ifndef __R_LOCAL__
-#include "R_local.h"
+#include "r_local.h"
 #endif
 
 #define STARTREDPALS	1
@@ -281,6 +281,6 @@
 extern int ArtifactFlash;
 void SB_PaletteFlash(void);
 
-#include "P_spec.h"
+#include "p_spec.h"
 
 #endif // __P_LOCAL__
--- a/src/heretic/p_map.c
+++ b/src/heretic/p_map.c
@@ -22,8 +22,8 @@
 //-----------------------------------------------------------------------------
 // P_map.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 /*
--- a/src/heretic/p_maputl.c
+++ b/src/heretic/p_maputl.c
@@ -23,8 +23,8 @@
 
 // P_maputl.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 
 
 /*
--- a/src/heretic/p_mobj.c
+++ b/src/heretic/p_mobj.c
@@ -23,8 +23,8 @@
 
 // P_mobj.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "sounds.h"
 #include "soundst.h"
 
--- a/src/heretic/p_plats.c
+++ b/src/heretic/p_plats.c
@@ -23,8 +23,8 @@
 
 // P_plats.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 plat_t *activeplats[MAXPLATS];
--- a/src/heretic/p_pspr.c
+++ b/src/heretic/p_pspr.c
@@ -23,8 +23,8 @@
 
 // P_pspr.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 // Macros
--- a/src/heretic/p_setup.c
+++ b/src/heretic/p_setup.c
@@ -25,8 +25,8 @@
 
 #include <math.h>
 #include <stdlib.h>
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 void P_SpawnMapThing(mapthing_t * mthing);
--- a/src/heretic/p_sight.c
+++ b/src/heretic/p_sight.c
@@ -22,8 +22,8 @@
 //-----------------------------------------------------------------------------
 // P_sight.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 
 /*
 ==============================================================================
--- a/src/heretic/p_spec.c
+++ b/src/heretic/p_spec.c
@@ -23,8 +23,8 @@
 
 // P_Spec.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 // Macros
--- a/src/heretic/p_switch.c
+++ b/src/heretic/p_switch.c
@@ -21,8 +21,8 @@
 //
 //-----------------------------------------------------------------------------
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 //==================================================================
--- a/src/heretic/p_telept.c
+++ b/src/heretic/p_telept.c
@@ -23,8 +23,8 @@
 
 // P_telept.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 //----------------------------------------------------------------------------
--- a/src/heretic/p_tick.c
+++ b/src/heretic/p_tick.c
@@ -23,8 +23,8 @@
 
 // P_tick.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 
 int leveltime;
 int TimerGame;
--- a/src/heretic/p_user.c
+++ b/src/heretic/p_user.c
@@ -23,8 +23,8 @@
 
 // P_user.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 void P_PlayerNextArtifact(player_t * player);
--- a/src/heretic/r_bsp.c
+++ b/src/heretic/r_bsp.c
@@ -22,8 +22,8 @@
 //-----------------------------------------------------------------------------
 // R_bsp.c
 
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 
 seg_t *curline;
 side_t *sidedef;
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -23,9 +23,9 @@
 
 // R_data.c
 
-#include "DoomDef.h"
-#include "R_local.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "r_local.h"
+#include "p_local.h"
 
 extern void CheckAbortStartup(void);
 
--- a/src/heretic/r_draw.c
+++ b/src/heretic/r_draw.c
@@ -22,8 +22,8 @@
 //-----------------------------------------------------------------------------
 // R_draw.c
 
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 
 /*
 
--- a/src/heretic/r_main.c
+++ b/src/heretic/r_main.c
@@ -23,8 +23,8 @@
 // R_main.c
 
 #include <math.h>
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 /*
 
 */
--- a/src/heretic/r_plane.c
+++ b/src/heretic/r_plane.c
@@ -22,8 +22,8 @@
 //-----------------------------------------------------------------------------
 // R_planes.c
 
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 
 planefunction_t floorfunc, ceilingfunc;
 
--- a/src/heretic/r_segs.c
+++ b/src/heretic/r_segs.c
@@ -29,8 +29,8 @@
 //**
 //**************************************************************************
 
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 
 // OPTIMIZE: closed two sided lines as single sided
 
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -23,8 +23,8 @@
 // R_things.c
 #include <stdio.h>
 #include <stdlib.h>
-#include "DoomDef.h"
-#include "R_local.h"
+#include "doomdef.h"
+#include "r_local.h"
 
 void R_DrawColumn(void);
 void R_DrawFuzzColumn(void);
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -23,8 +23,8 @@
 
 // SB_bar.c
 
-#include "DoomDef.h"
-#include "P_local.h"
+#include "doomdef.h"
+#include "p_local.h"
 #include "soundst.h"
 
 // Macros
--- a/src/heretic/sounds.c
+++ b/src/heretic/sounds.c
@@ -24,7 +24,7 @@
 
 // sounds.c
 
-#include "DoomDef.h"
+#include "doomdef.h"
 #include "sounds.h"
 
 // Music info
--- a/src/heretic/tables.c
+++ b/src/heretic/tables.c
@@ -20,7 +20,7 @@
 // 02111-1307, USA.
 //
 //-----------------------------------------------------------------------------
-#include "DoomDef.h"
+#include "doomdef.h"
 
 int finetangent[4096] = {
     -170910304, -56965752, -34178904, -24413316, -18988036, -15535599,
--- a/src/heretic/v_video.c
+++ b/src/heretic/v_video.c
@@ -23,7 +23,7 @@
 
 // V_video.c
 
-#include "DoomDef.h"
+#include "doomdef.h"
 
 #define SC_INDEX 0x3c4
 
--- a/src/heretic/w_wad.c
+++ b/src/heretic/w_wad.c
@@ -26,18 +26,20 @@
 #include <libc.h>
 #include <ctype.h>
 
-// next doesn't need a binary flag in open call
-#define	O_BINARY	0
 
 #else
 
 #include <malloc.h>
-#include <io.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #endif
 
-#include "DoomDef.h"
+// next doesn't need a binary flag in open call
+#ifndef O_BINARY
+#define	O_BINARY	0
+#endif
+
+#include "doomdef.h"
 
 //===============
 //   TYPES
--- a/src/heretic/z_zone.c
+++ b/src/heretic/z_zone.c
@@ -23,7 +23,7 @@
 // Z_zone.c
 
 #include <stdlib.h>
-#include "DoomDef.h"
+#include "doomdef.h"
 
 /*
 ==============================================================================
--- a/src/hexen/m_misc.c
+++ b/src/hexen/m_misc.c
@@ -29,11 +29,8 @@
 #else
 #include <sys/stat.h>
 #include <sys/types.h>
-#include <direct.h>
 #include <fcntl.h>
 #include <stdlib.h>
-#include <io.h>
-#include <conio.h>
 #endif
 #include <ctype.h>
 #include "h2def.h"
@@ -567,12 +564,8 @@
 
     {"usegamma", &usegamma, 0},
 
-#ifdef __NeXT__
 #define DEFAULT_SAVEPATH		"hexndata/"
-#endif
-#ifdef __WATCOMC__
-#define DEFAULT_SAVEPATH		"hexndata\\"
-#endif
+
     {"savedir", (int *) &SavePath, (int) DEFAULT_SAVEPATH},
 
     {"messageson", (int *) &messageson, 1},
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -295,7 +295,6 @@
     &SaveMenu
 };
 
-#ifdef __WATCOMC__
 static char *GammaText[] = {
     TXT_GAMMA_LEVEL_OFF,
     TXT_GAMMA_LEVEL_1,
@@ -303,7 +302,6 @@
     TXT_GAMMA_LEVEL_3,
     TXT_GAMMA_LEVEL_4
 };
-#endif
 
 // CODE --------------------------------------------------------------------
 
--- a/src/hexen/st_start.c
+++ b/src/hexen/st_start.c
@@ -24,18 +24,15 @@
 
 
 // HEADER FILES ------------------------------------------------------------
-#ifdef __WATCOMC__
-#include <sys\stat.h>
-#include <sys\types.h>
-#include <io.h>
-#else
-#include <libc.h>
 #include <ctype.h>
+#include <fcntl.h>
+#include <stdarg.h>
+
+#ifndef O_BINARY
 #define O_BINARY 0
 #endif
+
 #include "h2def.h"
-#include <fcntl.h>
-#include <stdarg.h>             // Needed for next as well as dos
 #include "st_start.h"
 
 
--- a/src/hexen/w_wad.c
+++ b/src/hexen/w_wad.c
@@ -24,23 +24,17 @@
 
 // HEADER FILES ------------------------------------------------------------
 
-#ifdef NeXT
-#include <libc.h>
-#include <ctype.h>
-#else
-#include <malloc.h>
-#include <io.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
 #include <fcntl.h>
-#include <sys/stat.h>
-#endif
+
 #include "h2def.h"
 
 // MACROS ------------------------------------------------------------------
 
-#ifdef NeXT
-// NeXT doesn't need a binary flag in open call
+#ifndef O_BINARY
 #define O_BINARY 0
-#define strcmpi strcasecmp
 #endif
 
 // TYPES -------------------------------------------------------------------