shithub: wl3d

Download patch

ref: 2c0d5e026f50ae4f2a069b882a598e9a8a4d553b
parent: ba287ed5e02c179343eb8f2642730ce95f403f8f
author: Konstantinn Bonnet <[email protected]>
date: Sun Feb 21 07:59:35 EST 2016

remove most useless defines

--- a/ca.c
+++ b/ca.c
@@ -99,19 +99,9 @@
 s32int		_seg *grstarts;	// array of offsets in egagraph, -1 for sparse
 s32int		_seg *audiostarts;	// array of offsets in audio / audiot
 
-#ifdef GRHEADERLINKED
-huffnode	*grhuffman;
-#else
 huffnode	grhuffman[255];
-#endif
-
-#ifdef AUDIOHEADERLINKED
-huffnode	*audiohuffman;
-#else
 huffnode	audiohuffman[255];
-#endif
 
-
 s16int			grhandle;		// handle to EGAGRAPH
 s16int			maphandle;		// handle to MAPTEMP / GAMEMAPS
 s16int			audiohandle;	// handle to AUDIOT / AUDIO
@@ -864,15 +854,6 @@
 	s16int handle;
 	uchar *compseg;
 
-#ifdef GRHEADERLINKED
-
-	grhuffman = (huffnode *)&EGAdict;
-	grstarts = (s32int _seg *)FP_SEG(&EGAhead);
-
-	CAL_OptimizeNodes (grhuffman);
-
-#else
-
 //
 // load ???dict.ext (huffman dictionary for graphics files)
 //
@@ -903,9 +884,6 @@
 
 	close(handle);
 
-
-#endif
-
 //
 // Open the graphics file, leaving it open until the game is finished
 //
@@ -949,7 +927,6 @@
 //
 // load maphead.ext (offsets and tileinfo for map file)
 //
-#ifndef MAPHEADERLINKED
 	strcpy(fname,mheadname);
 	strcat(fname,extension);
 
@@ -961,16 +938,10 @@
 	MM_GetPtr (&(uchar *)tinf,length);
 	CA_FarRead(handle, tinf, length);
 	close(handle);
-#else
 
-	tinf = (u8int _seg *)FP_SEG(&maphead);
-
-#endif
-
 //
 // open the data file
 //
-#ifdef CARMACIZED
 	strcpy(fname,"GAMEMAPS.");
 	strcat(fname,extension);
 
@@ -977,15 +948,7 @@
 	if ((maphandle = open(fname,
 		 O_RDONLY | O_BINARY, S_IREAD)) == -1)
 		CA_CannotOpen(fname);
-#else
-	strcpy(fname,mfilename);
-	strcat(fname,extension);
 
-	if ((maphandle = open(fname,
-		 O_RDONLY | O_BINARY, S_IREAD)) == -1)
-		CA_CannotOpen(fname);
-#endif
-
 //
 // load all map header
 //
@@ -1032,7 +995,6 @@
 //
 // load maphead.ext (offsets and tileinfo for map file)
 //
-#ifndef AUDIOHEADERLINKED
 	strcpy(fname,aheadname);
 	strcat(fname,extension);
 
@@ -1044,16 +1006,10 @@
 	MM_GetPtr (&(uchar *)audiostarts,length);
 	CA_FarRead(handle, (u8int far *)audiostarts, length);
 	close(handle);
-#else
-	audiohuffman = (huffnode *)&audiodict;
-	CAL_OptimizeNodes (audiohuffman);
-	audiostarts = (s32int _seg *)FP_SEG(&audiohead);
-#endif
 
 //
 // open the data file
 //
-#ifndef AUDIOHEADERLINKED
 	strcpy(fname,afilename);
 	strcat(fname,extension);
 
@@ -1060,11 +1016,6 @@
 	if ((audiohandle = open(fname,
 		 O_RDONLY | O_BINARY, S_IREAD)) == -1)
 		CA_CannotOpen(fname);
-#else
-	if ((audiohandle = open("AUDIO."EXTENSION,
-		 O_RDONLY | O_BINARY, S_IREAD)) == -1)
-		Quit ("Can't open AUDIO."EXTENSION"!");
-#endif
 }
 
 //==========================================================================
@@ -1082,11 +1033,6 @@
 
 void CA_Startup (void)
 {
-#ifdef PROFILE
-	unlink ("PROFILE.TXT");
-	profilehandle = open("PROFILE.TXT", O_CREAT | O_WRONLY | O_TEXT);
-#endif
-
 	CAL_SetupMapFile ();
 	CAL_SetupGrFile ();
 	CAL_SetupAudioFile ();
@@ -1112,10 +1058,6 @@
 
 void CA_Shutdown (void)
 {
-#ifdef PROFILE
-	close (profilehandle);
-#endif
-
 	close (maphandle);
 	close (grhandle);
 	close (audiohandle);
@@ -1134,11 +1076,6 @@
 void CA_CacheAudioChunk (s16int chunk)
 {
 	s32int	pos,compressed;
-#ifdef AUDIOHEADERLINKED
-	s32int	expanded;
-	uchar *bigbufferseg;
-	u8int	far *source;
-#endif
 
 	if (audiosegs[chunk])
 	{
@@ -1155,42 +1092,11 @@
 
 	lseek(audiohandle,pos,SEEK_SET);
 
-#ifndef AUDIOHEADERLINKED
-
 	MM_GetPtr (&(uchar *)audiosegs[chunk],compressed);
 	if (mmerror)
 		return;
 
 	CA_FarRead(audiohandle,audiosegs[chunk],compressed);
-
-#else
-
-	if (compressed<=BUFFERSIZE)
-	{
-		CA_FarRead(audiohandle,bufferseg,compressed);
-		source = bufferseg;
-	}
-	else
-	{
-		MM_GetPtr(&bigbufferseg,compressed);
-		if (mmerror)
-			return;
-		MM_SetLock (&bigbufferseg,true);
-		CA_FarRead(audiohandle,bigbufferseg,compressed);
-		source = bigbufferseg;
-	}
-
-	expanded = *(s32int far *)source;
-	source += 4;			// skip over length
-	MM_GetPtr (&(uchar *)audiosegs[chunk],expanded);
-	if (mmerror)
-		goto done;
-	CAL_HuffExpand (source,audiosegs[chunk],expanded,audiohuffman,false);
-
-done:
-	if (compressed>BUFFERSIZE)
-		MM_FreePtr(&bigbufferseg);
-#endif
 }
 
 //===========================================================================
@@ -1432,10 +1338,8 @@
 	uchar **dest,bigbufferseg;
 	u16int	size;
 	u16int	far	*source;
-#ifdef CARMACIZED
 	uchar *buffer2seg;
 	s32int	expanded;
-#endif
 
 	mapon = mapnum;
 
@@ -1462,7 +1366,6 @@
 		}
 
 		CA_FarRead(maphandle,(u8int far *)source,compressed);
-#ifdef CARMACIZED
 		//
 		// unhuffman, then unRLEW
 		// The huffman'd chunk has a two byte expanded length first
@@ -1476,14 +1379,6 @@
 		CA_RLEWexpand (((u16int far *)buffer2seg)+1,*dest,size,
 		((mapfiletype _seg *)tinf)->RLEWtag);
 		MM_FreePtr (&buffer2seg);
-
-#else
-		//
-		// unRLEW, skipping expanded length
-		//
-		CA_RLEWexpand (source+1, *dest,size,
-		((mapfiletype _seg *)tinf)->RLEWtag);
-#endif
 
 		if (compressed>BUFFERSIZE)
 			MM_FreePtr(&bigbufferseg);
--- a/def.h
+++ b/def.h
@@ -1,8 +1,3 @@
-//#define BETA
-#define YEAR	1992
-#define MONTH	9
-#define DAY		30
-
 #include "ID_HEADS.H"
 #include <MATH.H>
 #include <VALUES.H>
@@ -1263,8 +1258,6 @@
 
 =============================================================================
 */
-
-extern	char	helpfilename[],endfilename[];
 
 extern	void	HelpScreens(void);
 extern	void	EndText(void);
--- a/draw.c
+++ b/draw.c
@@ -1251,14 +1251,6 @@
 
 	lasttimecount = newtime;
 
-#ifdef FILEPROFILE
-		strcpy (scratch,"\tTics:");
-		itoa (tics,str,10);
-		strcat (scratch,str);
-		strcat (scratch,"\n");
-		write (profilehandle,scratch,strlen(scratch));
-#endif
-
 	if (tics>MAXTICS)
 	{
 		TimeCount -= (tics-MAXTICS);
--- a/game.c
+++ b/game.c
@@ -3,11 +3,7 @@
 #include "WL_DEF.H"
 #pragma hdrstop
 
-#ifdef MYPROFILE
-#include <TIME.H>
-#endif
 
-
 /*
 =============================================================================
 
@@ -1045,7 +1041,6 @@
 {
 	s16int length;
 
-#ifdef DEMOSEXTERN
 // debug: load chunk
 #ifndef SPEARDEMO
 	s16int dems[4]={T_DEMO0,T_DEMO1,T_DEMO2,T_DEMO3};
@@ -1056,12 +1051,6 @@
 	CA_CacheGrChunk(dems[demonumber]);
 	demoptr = grsegs[dems[demonumber]];
 	MM_SetLock (&grsegs[dems[demonumber]],true);
-#else
-	demoname[4] = '0'+demonumber;
-	CA_LoadFile (demoname,&demobuffer);
-	MM_SetLock (&demobuffer,true);
-	demoptr = (char far *)demobuffer;
-#endif
 
 	NewGame (1,0);
 	gamestate.mapon = *demoptr++;
@@ -1086,11 +1075,7 @@
 
 	PlayLoop ();
 
-#ifdef DEMOSEXTERN
 	UNCACHEGRCHUNK(dems[demonumber]);
-#else
-	MM_FreePtr (&demobuffer);
-#endif
 
 	demoplayback = false;
 
@@ -1240,9 +1225,6 @@
 	s16int i,xl,yl,xh,yh;
 	char num[20];
 	int	died;
-#ifdef MYPROFILE
-	clock_t start,end;
-#endif
 
 restartgame:
 	ClearMemory ();
--- a/in.h
+++ b/in.h
@@ -5,13 +5,6 @@
 //	By Jason Blochowiak
 //
 
-#ifndef	__ID_IN__
-#define	__ID_IN__
-
-#ifdef	__DEBUG__
-#define	__DEBUG_InputMgr__
-#endif
-
 #define	MaxPlayers	4
 #define	MaxKbds		2
 #define	MaxJoys		2
@@ -197,5 +190,3 @@
 void INL_GetJoyDelta(u16int joy,s16int *dx,s16int *dy);
 void IN_StartAck(void);
 int IN_CheckAck (void);
-
-#endif
--- a/inter.c
+++ b/inter.c
@@ -1272,11 +1272,7 @@
 			"bite me!",
 			"joshua",
 			"pelt",
-#ifdef BETA
-			"beta"
-#else
 			"snoops"
-#endif
 			},
 
 		far GoodBoyStrs[10][40] = {
@@ -1292,11 +1288,7 @@
 			"Do you have any gold spray paint?",
 			"",
 
-#ifdef BETA
-			"Beta testing approved.",
-#else
 			"I wish I had a 21\" monitor...",
-#endif
 			""
 			},
 
--- a/main.c
+++ b/main.c
@@ -1432,31 +1432,11 @@
 //	nsize = (s32int)40*1024;
 //	MM_GetPtr(&nullblock,nsize);
 
-#ifndef DEMOTEST
-
-	#ifndef UPLOAD
-		#ifndef GOODTIMES
-		#ifndef SPEAR
-		if (!NoWait)
-			NonShareware();
-		#else
-
-			#ifndef GOODTIMES
-			#ifndef SPEARDEMO
-			CopyProtection();
-			#endif
-			#endif
-		#endif
-		#endif
-	#endif
-
 	StartCPMusic(INTROSONG);
 
 	if (!NoWait)
 		PG13 ();
 
-#endif
-
 	while (1)
 	{
 		while (!NoWait)
@@ -1465,7 +1445,6 @@
 // title page
 //
 			MM_SortMem ();
-#ifndef DEMOTEST
 
 #ifdef SPEAR
 			CA_CacheGrChunk (TITLEPALETTE);
@@ -1507,7 +1486,6 @@
 
 			if (IN_UserInput(TickBase*10))
 				break;
-#endif
 //
 // demo
 //
@@ -1560,22 +1538,6 @@
 void main (void)
 {
 	s16int     i;
-
-
-#ifdef BETA
-	//
-	// THIS IS FOR BETA ONLY!
-	//
-	struct dosdate_t d;
-
-	_dos_getdate(&d);
-	if (d.year > YEAR ||
-		(d.month >= MONTH && d.day >= DAY))
-	{
-	 printf("Sorry, BETA-TESTING is over. Thanks for you help.\n");
-	 exit(1);
-	}
-#endif
 
 	CheckForEpisodes();
 
--- a/menu.c
+++ b/menu.c
@@ -12,18 +12,8 @@
 //
 void CP_ReadThis(void);
 
-#ifdef SPEAR
 #define STARTITEM	newgame
 
-#else
-#ifdef GOODTIMES
-#define STARTITEM	newgame
-
-#else
-#define STARTITEM	readthis
-#endif
-#endif
-
 char far endStrings[9][80]=
 {
 #ifndef SPEAR
@@ -68,13 +58,9 @@
 	{1,STR_LG,CP_LoadGame},
 	{0,STR_SG,CP_SaveGame},
 	{1,STR_CV,CP_ChangeView},
-
-#ifndef GOODTIMES
 #ifndef SPEAR
 	{2,"Read This!",CP_ReadThis},
 #endif
-#endif
-
 	{1,STR_VS,CP_ViewScores},
 	{1,STR_BD,0},
 	{1,STR_QT,0}
@@ -246,15 +232,9 @@
 	switch(scancode)
 	{
 		case sc_F1:
-			#ifdef SPEAR
-			BossKey();
-			#else
-			#ifdef GOODTIMES
-			BossKey();
-			#else
+			#ifndef SPEAR
 			HelpScreens();
 			#endif
-			#endif
 			goto finishup;
 
 		case sc_F2:
@@ -461,8 +441,6 @@
 	VW_UpdateScreen();
 }
 
-#ifndef GOODTIMES
-#ifndef SPEAR
 ////////////////////////////////////////////////////////////////////
 //
 // READ THIS!
@@ -474,37 +452,9 @@
 	HelpScreens();
 	StartCPMusic(MENUSONG);
 }
-#endif
-#endif
 
-#ifndef SPEAR
-#ifndef GOODTIMES
-#else
 ////////////////////////////////////////////////////////////////////
 //
-// BOSS KEY
-//
-////////////////////////////////////////////////////////////////////
-void BossKey(void)
-{
-	SD_MusicOff();
-	_AX = 3;
-	geninterrupt(0x10);
-	printf("C>");
-	while (!Keyboard[sc_Escape])
-	IN_ClearKeysDown();
-
-	SD_MusicOn();
-	VL_SetVGAPlaneMode ();
-	VL_TestPaletteSet ();
-	VL_SetPalette (&gamepal);
-	LoadLatchMem();
-}
-#endif
-#endif
-
-////////////////////////////////////////////////////////////////////
-//
 // CHECK QUICK-KEYS & QUIT (WHILE IN A GAME)
 //
 ////////////////////////////////////////////////////////////////////
@@ -867,10 +817,8 @@
 	// CHANGE "READ THIS!" TO NORMAL COLOR
 	//
 	#ifndef SPEAR
-	#ifndef GOODTIMES
 	MainMenu[readthis].active=1;
 	#endif
-	#endif
 
 	pickquick = 0;
 
@@ -1249,12 +1197,9 @@
 			//
 			// CHANGE "READ THIS!" TO NORMAL COLOR
 			//
-
 			#ifndef SPEAR
-			#ifndef GOODTIMES
 			MainMenu[readthis].active=1;
 			#endif
-			#endif
 
 			exit=1;
 			break;
@@ -3569,10 +3514,4 @@
 	strcat(PageFileName,extension);
 	strcat(audioname,extension);
 	strcat(demoname,extension);
-#ifndef SPEAR
-#ifndef GOODTIMES
-	strcat(helpfilename,extension);
-#endif
-	strcat(endfilename,extension);
-#endif
 }
--- a/mm.h
+++ b/mm.h
@@ -1,9 +1,3 @@
-// ID_MM.H
-
-#ifndef __ID_CA__
-
-#define __ID_CA__
-
 #define SAVENEARHEAP	0x400		// space to leave in data segment
 #define SAVEFARHEAP		0			// space to leave in far heap
 
@@ -90,5 +84,3 @@
 void MM_BombOnError (int bomb);
 
 void MML_UseSpace (u16int segstart, u16int seglength);
-
-#endif
\ No newline at end of file
--- a/play.c
+++ b/play.c
@@ -769,9 +769,7 @@
 // F1-F7/ESC to enter control panel
 //
 	if (
-#ifndef DEBCHECK
 		scan == sc_F10 ||
-#endif
 		scan == sc_F9 ||
 		scan == sc_F7 ||
 		scan == sc_F8)			// pop up quit dialog
--- a/sd.c
+++ b/sd.c
@@ -28,23 +28,8 @@
 //			NeedsMusic - load music?
 //
 
-#pragma hdrstop		// Wierdo thing with MUSE
-
-#include <dos.h>
-
-#ifdef	_MUSE_      // Will be defined in ID_Types.h
-#include "ID_SD.h"
-#else
 #include "ID_HEADS.H"
-#endif
-#pragma	hdrstop
-#pragma	warn	-pia
 
-#ifdef	nil
-#undef	nil
-#endif
-#define	nil	0
-
 #define	SDL_SoundFinished()	{SoundNumber = SoundPriority = 0;}
 
 // Macros for SoundBlaster stuff
@@ -179,7 +164,6 @@
 static void
 SDL_SetTimer0(u16int speed)
 {
-#ifndef TPROF	// If using Borland's profiling, don't screw with the timer
 asm	pushf
 asm	cli
 
@@ -193,9 +177,6 @@
 		TimerDivisor = speed;
 
 asm	popf
-#else
-	TimerDivisor = 0x10000;
-#endif
 }
 
 ///////////////////////////////////////////////////////////////////////////
@@ -255,11 +236,7 @@
 //		requests from the SoundBlaster to cease
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_SBStopSample(void)
 {
 	u8int	is;
@@ -375,11 +352,7 @@
 //		DMA to play the sound
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_SBPlaySample(u8int huge *data,u32int len)
 {
 	u32int	used;
@@ -629,11 +602,7 @@
 //	SDL_SSStopSample() - Stops a sample playing on the Sound Source
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_SSStopSample(void)
 {
 asm	pushf
@@ -694,11 +663,7 @@
 //	SDL_SSPlaySample() - Plays the specified sample on the Sound Source
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_SSPlaySample(u8int huge *data,u32int len)
 {
 asm	pushf
@@ -822,11 +787,7 @@
 //	SDL_PCPlaySample() - Plays the specified sample on the PC speaker
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_PCPlaySample(u8int huge *data,u32int len)
 {
 asm	pushf
@@ -845,11 +806,7 @@
 //	SDL_PCStopSample() - Stops a sample playing on the PC speaker
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_PCStopSample(void)
 {
 asm	pushf
@@ -871,11 +828,7 @@
 //	SDL_PCPlaySound() - Plays the specified sound on the PC speaker
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_PCPlaySound(PCSound far *sound)
 {
 asm	pushf
@@ -893,11 +846,7 @@
 //	SDL_PCStopSound() - Stops the current sound playing on the PC Speaker
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_PCStopSound(void)
 {
 asm	pushf
@@ -1381,11 +1330,7 @@
 //		AdLib card
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_ALStopSound(void)
 {
 asm	pushf
@@ -1425,11 +1370,7 @@
 //	SDL_ALPlaySound() - Plays the specified sound on the AdLib card
 //
 ///////////////////////////////////////////////////////////////////////////
-#ifdef	_MUSE_
-void
-#else
 static void
-#endif
 SDL_ALPlaySound(AdLibSound far *sound)
 {
 	Instrument	far *inst;
@@ -1778,7 +1719,6 @@
 
 	SD_StopSound();
 
-#ifndef	_MUSE_
 	if ((mode == sdm_AdLib) && !AdLibPresent)
 		mode = sdm_PC;
 
@@ -1802,17 +1742,12 @@
 		}
 		break;
 	}
-#else
-	result = true;
-#endif
 
 	if (result && (mode != SoundMode))
 	{
 		SDL_ShutDevice();
 		SoundMode = mode;
-#ifndef	_MUSE_
 		SoundTable = (u16int *)(&audiosegs[tableoffset]);
-#endif
 		SDL_StartDevice();
 	}
 
@@ -1879,7 +1814,6 @@
 	alNoCheck = false;
 	sbNoCheck = false;
 	sbNoProCheck = false;
-#ifndef	_MUSE_
 	for (i = 1;i < _argc;i++)
 	{
 		switch (US_CheckParm(_argv[i],ParmStrings))
@@ -1913,7 +1847,6 @@
 			break;
 		}
 	}
-#endif
 
 	SoundUserHook = 0;
 
--- a/sd.h
+++ b/sd.h
@@ -1,19 +1,5 @@
-//
-//	ID Engine
-//	ID_SD.h - Sound Manager Header
-//	Version for Wolfenstein
-//	By Jason Blochowiak
-//
-
-#ifndef	__ID_SD__
-#define	__ID_SD__
-
 void	alOut(u8int n,u8int b);
 
-#ifdef	__DEBUG__
-#define	__DEBUG_SoundMgr__
-#endif
-
 #define	TickBase	70		// 70Hz per tick - used as a base for timer 0
 
 typedef	enum	{
@@ -225,13 +211,3 @@
 				SD_PlayDigitized(u16int which,int leftpos,int rightpos),
 				SD_StopDigitized(void),
 				SD_Poll(void);
-
-#ifdef	_MUSE_	// MUSE Goes directly to the lower level routines
-extern	void	SDL_PCPlaySound(PCSound far *sound),
-				SDL_PCStopSound(void),
-				SDL_ALPlaySound(AdLibSound far *sound),
-				SDL_ALStopSound(void);
-#endif
-
-#endif
-
--- a/sdmver.h
+++ b/sdmver.h
@@ -1,8 +1,2 @@
 #define SPEAR
 #define SPEARDEMO
-#define ARTSEXTERN
-#define DEMOSEXTERN
-#define CARMACIZED
-//#define MYPROFILE
-//#define DEBCHECK
-//#define UPLOAD
--- a/sodver.h
+++ b/sodver.h
@@ -1,7 +1,1 @@
 #define SPEAR
-#define ARTSEXTERN
-#define DEMOSEXTERN
-#define CARMACIZED
-//#define MYPROFILE
-//#define DEBCHECK
-//#define UPLOAD
--- a/text.c
+++ b/text.c
@@ -656,14 +656,10 @@
 
 //===========================================================================
 
-#ifdef ARTSEXTERN
 s16int 	endextern = T_ENDART1;
 #ifndef SPEAR
 s16int		helpextern = T_HELPART;
 #endif
-#endif
-char helpfilename[13] = "HELPART.",
-	 endfilename[13] = "ENDART1.";
 
 /*
 =================
@@ -682,27 +678,15 @@
 	CA_UpLevel ();
 	MM_SortMem ();
 
-#ifdef ARTSEXTERN
 	artnum = helpextern;
 	CA_CacheGrChunk (artnum);
 	text = (char _seg *)grsegs[artnum];
 	MM_SetLock (&grsegs[artnum], true);
-#else
-	CA_LoadFile (helpfilename,&layout);
-	text = (char _seg *)layout;
-	MM_SetLock (&layout, true);
-#endif
 
 	ShowArticle (text);
 
-#ifdef ARTSEXTERN
 	MM_FreePtr (&grsegs[artnum]);
-#else
-	MM_FreePtr (&layout);
-#endif
 
-
-
 	VW_FadeOut();
 
 	FreeMusic ();
@@ -726,25 +710,14 @@
 	CA_UpLevel ();
 	MM_SortMem ();
 
-#ifdef ARTSEXTERN
 	artnum = endextern+gamestate.episode;
 	CA_CacheGrChunk (artnum);
 	text = (char _seg *)grsegs[artnum];
 	MM_SetLock (&grsegs[artnum], true);
-#else
-	endfilename[6] = '1'+gamestate.episode;
-	CA_LoadFile (endfilename,&layout);
-	text = (char _seg *)layout;
-	MM_SetLock (&layout, true);
-#endif
 
 	ShowArticle (text);
 
-#ifdef ARTSEXTERN
 	MM_FreePtr (&grsegs[artnum]);
-#else
-	MM_FreePtr (&layout);
-#endif
 
 
 	VW_FadeOut();
--- a/us.h
+++ b/us.h
@@ -1,19 +1,3 @@
-//
-//	ID Engine
-//	ID_US.h - Header file for the User Manager
-//	v1.0d1
-//	By Jason Blochowiak
-//
-
-#ifndef	__ID_US__
-#define	__ID_US__
-
-#ifdef	__DEBUG__
-#define	__DEBUG_UserMgr__
-#endif
-
-//#define	HELPTEXTLINKED
-
 #define	MaxX	320
 #define	MaxY	200
 
@@ -120,4 +104,3 @@
 
 		void	USL_PrintInCenter(char far *s,Rct r);
 		char 	*USL_GiveSaveName(u16int game);
-#endif
--- a/wolf1ver.h
+++ b/wolf1ver.h
@@ -1,7 +1,1 @@
-//#define SPEAR
-#define ARTSEXTERN
-#define DEMOSEXTERN
-//#define MYPROFILE
-//#define DEBCHECK
-#define CARMACIZED
 #define UPLOAD
--- a/wolfgtv.h
+++ /dev/null
@@ -1,9 +1,0 @@
-//#define SPEAR
-#define GOODTIMES
-#define ARTSEXTERN
-#define DEMOSEXTERN
-//#define MYPROFILE
-//#define DEBCHECK
-#define CARMACIZED
-//#define UPLOAD
-
\ No newline at end of file
--- a/wolfver.h
+++ /dev/null
@@ -1,7 +1,0 @@
-//#define SPEAR
-#define ARTSEXTERN
-#define DEMOSEXTERN
-//#define MYPROFILE
-//#define DEBCHECK
-#define CARMACIZED
-//#define UPLOAD