summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2011-10-29 22:58:13 +0000
committerSimon Howard2011-10-29 22:58:13 +0000
commit4bf764a5b8952856b1ca04f1282121e8054938de (patch)
tree1a5992de07f5b5377854dd3a0aab42ff7c81db10
parentcfbdd3d79d1e3cc48165536cb7b4166b94f77e9b (diff)
downloadchocolate-doom-4bf764a5b8952856b1ca04f1282121e8054938de.tar.gz
chocolate-doom-4bf764a5b8952856b1ca04f1282121e8054938de.tar.bz2
chocolate-doom-4bf764a5b8952856b1ca04f1282121e8054938de.zip
Enable gcc warning to detect redundant declarations, and clean up
instances of this within the code (thanks Edward-san). Subversion-branch: /branches/v2-branch Subversion-revision: 2468
-rw-r--r--Makefile.am2
-rw-r--r--configure.in2
-rw-r--r--src/doom/am_map.c9
-rw-r--r--src/doom/d_main.c3
-rw-r--r--src/doom/d_net.c2
-rw-r--r--src/doom/doomstat.h8
-rw-r--r--src/doom/f_finale.c3
-rw-r--r--src/doom/f_wipe.c2
-rw-r--r--src/doom/g_game.c8
-rw-r--r--src/doom/hu_stuff.c1
-rw-r--r--src/doom/m_menu.c3
-rw-r--r--src/doom/r_draw.c7
-rw-r--r--src/doom/r_main.h2
-rw-r--r--src/doom/st_stuff.h1
-rw-r--r--src/heretic/ct_chat.c5
-rw-r--r--src/heretic/d_main.c4
-rw-r--r--src/heretic/doomdef.h26
-rw-r--r--src/heretic/f_finale.c1
-rw-r--r--src/heretic/g_game.c7
-rw-r--r--src/heretic/in_lude.c4
-rw-r--r--src/heretic/mn_menu.c1
-rw-r--r--src/heretic/p_user.c12
-rw-r--r--src/heretic/r_local.h2
-rw-r--r--src/heretic/r_things.c3
-rw-r--r--src/heretic/sb_bar.c2
-rw-r--r--src/hexen/ct_chat.c5
-rw-r--r--src/hexen/g_game.c5
-rw-r--r--src/hexen/h2_main.c2
-rw-r--r--src/hexen/h2def.h19
-rw-r--r--src/hexen/in_lude.c7
-rw-r--r--src/hexen/mn_menu.c4
-rw-r--r--src/hexen/p_anim.c1
-rw-r--r--src/hexen/p_user.c7
-rw-r--r--src/hexen/po_man.c6
-rw-r--r--src/hexen/r_local.h2
-rw-r--r--src/hexen/r_things.c3
-rw-r--r--src/hexen/s_sound.c3
-rw-r--r--src/hexen/sb_bar.c3
-rw-r--r--src/hexen/st_start.h3
-rw-r--r--src/hexen/sv_save.c4
-rw-r--r--src/i_system.h7
-rw-r--r--src/m_controls.h13
-rw-r--r--src/setup/sound.c1
-rw-r--r--src/setup/sound.h4
-rw-r--r--src/strife/am_map.c8
-rw-r--r--src/strife/d_main.c4
-rw-r--r--src/strife/d_net.c2
-rw-r--r--src/strife/doomstat.h10
-rw-r--r--src/strife/f_finale.c2
-rw-r--r--src/strife/f_wipe.c2
-rw-r--r--src/strife/g_game.c8
-rw-r--r--src/strife/hu_stuff.c1
-rw-r--r--src/strife/m_menu.c4
-rw-r--r--src/strife/p_user.c1
-rw-r--r--src/strife/r_draw.c11
-rw-r--r--src/strife/r_main.h2
-rw-r--r--src/strife/st_stuff.h1
57 files changed, 13 insertions, 262 deletions
diff --git a/Makefile.am b/Makefile.am
index 46c9dec8..0012b97f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,8 +54,6 @@ doc_DATA=$(DOC_FILES)
MAINTAINERCLEANFILES = $(AUX_DIST_GEN)
-docdir=$(prefix)/share/doc/@PACKAGE@
-
SUBDIRS=wince textscreen opl pcsound data src man
DIST_SUBDIRS=pkg $(SUBDIRS)
diff --git a/configure.in b/configure.in
index 21c4ca35..094a87c3 100644
--- a/configure.in
+++ b/configure.in
@@ -27,7 +27,7 @@ AC_ARG_ENABLE(penis-extension,
if test "$GCC" = "yes"
then
- WARNINGS="-Wall -Wdeclaration-after-statement"
+ WARNINGS="-Wall -Wdeclaration-after-statement -Wredundant-decls"
CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS"
fi
diff --git a/src/doom/am_map.c b/src/doom/am_map.c
index d957ea67..0e7b88e7 100644
--- a/src/doom/am_map.c
+++ b/src/doom/am_map.c
@@ -274,15 +274,6 @@ cheatseq_t cheat_amap = CHEAT("iddt", 0);
static boolean stopped = true;
-extern boolean viewactive;
-
-void
-V_MarkRect
-( int x,
- int y,
- int width,
- int height );
-
// Calculates the slope and slope according to the x-axis of a line
// segment in map coordinates (with the upright y-axis n' all) so
// that it can be used with the brain-dead drawing stuff.
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index ba542727..d91649a8 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -134,7 +134,6 @@ int show_endoom = 1;
void D_CheckNetGame (void);
-void D_DoAdvanceDemo (void);
//
@@ -411,8 +410,6 @@ boolean D_GrabMouseCallback(void)
//
// D_DoomLoop
//
-extern boolean demorecording;
-
void D_DoomLoop (void)
{
if (demorecording)
diff --git a/src/doom/d_net.c b/src/doom/d_net.c
index 137aaf1c..74893724 100644
--- a/src/doom/d_net.c
+++ b/src/doom/d_net.c
@@ -250,8 +250,6 @@ void D_InitSinglePlayerGame(net_gamesettings_t *settings)
// D_CheckNetGame
// Works out player numbers among the net participants
//
-extern int viewangleoffset;
-
void D_CheckNetGame (void)
{
net_connect_data_t connect_data;
diff --git a/src/doom/doomstat.h b/src/doom/doomstat.h
index 6b7288bd..9e09bb42 100644
--- a/src/doom/doomstat.h
+++ b/src/doom/doomstat.h
@@ -155,11 +155,6 @@ extern boolean viewactive;
extern boolean nodrawers;
-extern int viewwindowx;
-extern int viewwindowy;
-extern int viewheight;
-extern int viewwidth;
-extern int scaledviewwidth;
extern boolean testcontrols;
extern int testcontrols_mousespeed;
@@ -247,9 +242,6 @@ extern mapthing_t playerstarts[MAXPLAYERS];
extern wbstartstruct_t wminfo;
-// LUT of ammunition limits for each kind.
-// This doubles with BackPack powerup item.
-extern int maxammo[NUMAMMO];
diff --git a/src/doom/f_finale.c b/src/doom/f_finale.c
index f682c224..0b3e3813 100644
--- a/src/doom/f_finale.c
+++ b/src/doom/f_finale.c
@@ -345,9 +345,6 @@ boolean castattacking;
//
// F_StartCast
//
-extern gamestate_t wipegamestate;
-
-
void F_StartCast (void)
{
wipegamestate = -1; // force a screen wipe
diff --git a/src/doom/f_wipe.c b/src/doom/f_wipe.c
index efc678ca..10c720ef 100644
--- a/src/doom/f_wipe.c
+++ b/src/doom/f_wipe.c
@@ -276,8 +276,6 @@ wipe_ScreenWipe
wipe_initMelt, wipe_doMelt, wipe_exitMelt
};
- void V_MarkRect(int, int, int, int);
-
// initial stuff
if (!go)
{
diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index b698d465..92577ff4 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -83,17 +83,14 @@
#define SAVEGAMESIZE 0x2c000
-boolean G_CheckDemoStatus (void);
void G_ReadDemoTiccmd (ticcmd_t* cmd);
void G_WriteDemoTiccmd (ticcmd_t* cmd);
void G_PlayerReborn (int player);
-void G_InitNew (skill_t skill, int episode, int map);
void G_DoReborn (int playernum);
void G_DoLoadLevel (void);
void G_DoNewGame (void);
-void G_DoLoadGame (void);
void G_DoPlayDemo (void);
void G_DoCompleted (void);
void G_DoVictory (void);
@@ -599,8 +596,6 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
//
// G_DoLoadLevel
//
-extern gamestate_t wipegamestate;
-
void G_DoLoadLevel (void)
{
int i;
@@ -1618,9 +1613,6 @@ void G_DoNewGame (void)
gameaction = ga_nothing;
}
-// The sky texture to be used instead of the F_SKY1 dummy.
-extern int skytexture;
-
void
G_InitNew
diff --git a/src/doom/hu_stuff.c b/src/doom/hu_stuff.c
index 62e90aae..9b67a1a5 100644
--- a/src/doom/hu_stuff.c
+++ b/src/doom/hu_stuff.c
@@ -108,7 +108,6 @@ static hu_stext_t w_message;
static int message_counter;
extern int showMessages;
-extern boolean automapactive;
static boolean headsupactive = false;
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index a21060b1..e54ac7ff 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -66,8 +66,6 @@
#include "m_menu.h"
-extern void M_QuitDOOM(int);
-
extern patch_t* hu_font[HU_FONTSIZE];
extern boolean message_dontfuckwithme;
@@ -226,7 +224,6 @@ void M_DrawSelCell(menu_t *menu,int item);
void M_WriteText(int x, int y, char *string);
int M_StringWidth(char *string);
int M_StringHeight(char *string);
-void M_StartControlPanel(void);
void M_StartMessage(char *string,void *routine,boolean input);
void M_StopMessage(void);
void M_ClearMenus (void);
diff --git a/src/doom/r_draw.c b/src/doom/r_draw.c
index 80362208..b1e3ffae 100644
--- a/src/doom/r_draw.c
+++ b/src/doom/r_draw.c
@@ -946,13 +946,6 @@ R_VideoErase
// Draws the border around the view
// for different size windows?
//
-void
-V_MarkRect
-( int x,
- int y,
- int width,
- int height );
-
void R_DrawViewBorder (void)
{
int top;
diff --git a/src/doom/r_main.h b/src/doom/r_main.h
index edc5dbbb..5cb858bb 100644
--- a/src/doom/r_main.h
+++ b/src/doom/r_main.h
@@ -40,8 +40,6 @@
extern fixed_t viewcos;
extern fixed_t viewsin;
-extern int viewwidth;
-extern int viewheight;
extern int viewwindowx;
extern int viewwindowy;
diff --git a/src/doom/st_stuff.h b/src/doom/st_stuff.h
index 31bd9764..2ee91cce 100644
--- a/src/doom/st_stuff.h
+++ b/src/doom/st_stuff.h
@@ -80,7 +80,6 @@ typedef enum
} st_chatstateenum_t;
-boolean ST_Responder(event_t* ev);
extern byte *st_backing_screen;
extern cheatseq_t cheat_mus;
diff --git a/src/heretic/ct_chat.c b/src/heretic/ct_chat.c
index 4b89fe89..19c27bb2 100644
--- a/src/heretic/ct_chat.c
+++ b/src/heretic/ct_chat.c
@@ -51,11 +51,6 @@
// Public data
-void CT_Init(void);
-void CT_Drawer(void);
-boolean CT_Responder(event_t * ev);
-void CT_Ticker(void);
-char CT_dequeueChatChar(void);
boolean chatmodeon;
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index a34ef3ac..d1c74b7c 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -91,7 +91,6 @@ static int show_endoom = 1;
void D_CheckNetGame(void);
void D_PageDrawer(void);
void D_AdvanceDemo(void);
-void F_Drawer(void);
boolean F_Responder(event_t * ev);
//---------------------------------------------------------------------------
@@ -152,7 +151,6 @@ extern boolean finalestage;
void D_Display(void)
{
- extern boolean MenuActive;
extern boolean askforquit;
// Change the view size if needed
@@ -308,8 +306,6 @@ void D_PageTicker(void)
================
*/
-extern boolean MenuActive;
-
void D_PageDrawer(void)
{
V_DrawRawScreen(W_CacheLumpName(pagename, PU_CACHE));
diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h
index 3209cbe4..9f6122d8 100644
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -533,7 +533,6 @@ extern player_t players[MAXPLAYERS];
extern boolean DebugSound; // debug flag for displaying sound info
-extern int maxammo[NUMAMMO];
extern int GetWeaponAmmo[NUMWEAPONS];
extern boolean demorecording;
@@ -561,12 +560,6 @@ extern mapthing_t *deathmatch_p;
extern mapthing_t deathmatchstarts[10];
extern mapthing_t playerstarts[MAXPLAYERS];
-extern int viewwindowx;
-extern int viewwindowy;
-extern int viewwidth;
-extern int scaledviewwidth;
-extern int viewheight;
-
extern int mouseSensitivity;
extern boolean precache; // if true, load all graphics at level load
@@ -611,27 +604,9 @@ void D_DoomLoop(void);
// calls all ?_Responder, ?_Ticker, and ?_Drawer functions
// calls I_GetTime, I_StartFrame, and I_StartTic
-void NetUpdate(void);
-// create any new ticcmds and broadcast to other players
-
-void D_QuitNetGame(void);
-// broadcasts special packets to other players to notify of game exit
-
-void TryRunTics(void);
-
//---------
//SYSTEM IO
//---------
-
-byte *I_ZoneBase(int *size);
-// called by startup code to get the ammount of memory to malloc
-// for the zone management
-
-// asyncronous interrupt functions should maintain private ques that are
-// read by the syncronous functions to be converted into events
-
-// Copy buffer to video
-
byte *I_AllocLow(int length);
// allocates from low memory under dos, just mallocs under unix
@@ -823,7 +798,6 @@ void F_StartFinale(void);
// STATUS BAR (SB_bar.c)
//----------------------
-extern int SB_state;
void SB_Init(void);
boolean SB_Responder(event_t * event);
void SB_Ticker(void);
diff --git a/src/heretic/f_finale.c b/src/heretic/f_finale.c
index 4077bb82..7f6b3594 100644
--- a/src/heretic/f_finale.c
+++ b/src/heretic/f_finale.c
@@ -305,7 +305,6 @@ void F_DemonScroll(void)
void F_DrawUnderwater(void)
{
static boolean underwawa;
- extern boolean MenuActive;
extern boolean askforquit;
switch (finalestage)
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c
index e6c1fd8c..d3331b6e 100644
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -52,13 +52,11 @@ boolean G_CheckDemoStatus(void);
void G_ReadDemoTiccmd(ticcmd_t * cmd);
void G_WriteDemoTiccmd(ticcmd_t * cmd);
void G_PlayerReborn(int player);
-void G_InitNew(skill_t skill, int episode, int map);
void G_DoReborn(int playernum);
void G_DoLoadLevel(void);
void G_DoNewGame(void);
-void G_DoLoadGame(void);
void G_DoPlayDemo(void);
void G_DoCompleted(void);
void G_DoVictory(void);
@@ -708,7 +706,6 @@ static void SetJoyButtons(unsigned int buttons_mask)
boolean G_Responder(event_t * ev)
{
player_t *plr;
- extern boolean MenuActive;
plr = &players[consoleplayer];
if (ev->type == ev_keyup && ev->data1 == key_useartifact)
@@ -1071,8 +1068,6 @@ void G_InitPlayer(int player)
= Can when a player completes a level
====================
*/
-extern int curpos;
-extern int inv_ptr;
extern int playerkeys;
void G_PlayerFinishLevel(int player)
@@ -1508,8 +1503,6 @@ void G_DoNewGame(void)
gameaction = ga_nothing;
}
-extern int skytexture;
-
void G_InitNew(skill_t skill, int episode, int map)
{
int i;
diff --git a/src/heretic/in_lude.c b/src/heretic/in_lude.c
index 3c382814..e389371f 100644
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -31,6 +31,7 @@
#include "doomdef.h"
#include "deh_str.h"
+#include "p_local.h"
#include "s_sound.h"
#include "i_system.h"
#include "i_video.h"
@@ -45,9 +46,6 @@ typedef enum
// Public functions
-void IN_Start(void);
-void IN_Ticker(void);
-void IN_Drawer(void);
boolean intermission;
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index 6c7e425d..94713080 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -123,7 +123,6 @@ void MN_LoadSlotText(void);
// External Data
-extern int usegamma;
extern int detailLevel;
extern int screenblocks;
diff --git a/src/heretic/p_user.c b/src/heretic/p_user.c
index 6b2a69fc..79620630 100644
--- a/src/heretic/p_user.c
+++ b/src/heretic/p_user.c
@@ -313,12 +313,12 @@ void P_MovePlayer(player_t * player)
*/
#define ANG5 (ANG90/18)
+extern int inv_ptr;
+extern int curpos;
void P_DeathThink(player_t * player)
{
angle_t angle, delta;
- extern int inv_ptr;
- extern int curpos;
int lookDelta;
P_MovePsprites(player);
@@ -543,8 +543,6 @@ void P_PlayerThink(player_t * player)
ticcmd_t *cmd;
weapontype_t newweapon;
- extern boolean ultimatemsg;
-
// No-clip cheat
if (player->cheats & CF_NOCLIP)
{
@@ -812,9 +810,6 @@ void P_ArtiTele(player_t * player)
void P_PlayerNextArtifact(player_t * player)
{
- extern int inv_ptr;
- extern int curpos;
-
if (player == &players[consoleplayer])
{
inv_ptr--;
@@ -851,9 +846,6 @@ void P_PlayerNextArtifact(player_t * player)
void P_PlayerRemoveArtifact(player_t * player, int slot)
{
int i;
- extern int inv_ptr;
- extern int curpos;
-
player->artifactCount--;
if (!(--player->inventory[slot].count))
{ // Used last of a type - compact the artifact list
diff --git a/src/heretic/r_local.h b/src/heretic/r_local.h
index 184b0288..ade120a1 100644
--- a/src/heretic/r_local.h
+++ b/src/heretic/r_local.h
@@ -281,6 +281,7 @@ extern angle_t rw_normalangle;
// R_main.c
//
extern int viewwidth, viewheight, viewwindowx, viewwindowy;
+extern int scaledviewwidth;
extern int centerx, centery;
extern int flyheight;
extern fixed_t centerxfrac;
@@ -391,7 +392,6 @@ extern fixed_t *spritewidth; // needed for pre rendering (fracs)
extern fixed_t *spriteoffset;
extern fixed_t *spritetopoffset;
extern lighttable_t *colormaps;
-extern int viewwidth, scaledviewwidth, viewheight;
extern int firstflat;
extern int numflats;
diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c
index e5ff4b4b..353ce7ad 100644
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -30,9 +30,6 @@
#include "i_system.h"
#include "r_local.h"
-void R_DrawColumn(void);
-void R_DrawTLColumn(void);
-
typedef struct
{
int x1, x2;
diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c
index 51bd3b9c..03ec453d 100644
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -1138,8 +1138,6 @@ static void CheatHealthFunc(player_t * player, Cheat_t * cheat)
static void CheatKeysFunc(player_t * player, Cheat_t * cheat)
{
- extern int playerkeys;
-
player->keys[key_yellow] = true;
player->keys[key_green] = true;
player->keys[key_blue] = true;
diff --git a/src/hexen/ct_chat.c b/src/hexen/ct_chat.c
index fab7582d..6ef39e44 100644
--- a/src/hexen/ct_chat.c
+++ b/src/hexen/ct_chat.c
@@ -56,11 +56,6 @@ enum
// Public data
-void CT_Init(void);
-void CT_Drawer(void);
-boolean CT_Responder(event_t * ev);
-void CT_Ticker(void);
-char CT_dequeueChatChar(void);
boolean chatmodeon;
diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c
index 0118cd6b..707f2cac 100644
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -48,14 +48,12 @@ extern void P_PlayerNextArtifact(player_t * player);
boolean G_CheckDemoStatus(void);
void G_ReadDemoTiccmd(ticcmd_t * cmd);
void G_WriteDemoTiccmd(ticcmd_t * cmd);
-void G_InitNew(skill_t skill, int episode, int map);
void G_DoReborn(int playernum);
void G_DoLoadLevel(void);
void G_DoInitNew(void);
void G_DoNewGame(void);
-void G_DoLoadGame(void);
void G_DoPlayDemo(void);
void G_DoTeleportNewMap(void);
void G_DoCompleted(void);
@@ -194,9 +192,6 @@ int testcontrols_mousespeed;
*/
extern boolean inventory;
-extern int curpos;
-extern int inv_ptr;
-
boolean usearti = true;
void G_BuildTiccmd(ticcmd_t *cmd, int maketic)
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 49d7f21b..3d9ae87d 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -77,7 +77,6 @@ typedef struct
void R_ExecuteSetViewSize(void);
void D_CheckNetGame(void);
-void F_Drawer(void);
boolean F_Responder(event_t * ev);
void I_StartupKeyboard(void);
void I_StartupJoystick(void);
@@ -111,7 +110,6 @@ static void WarpCheck(void);
extern boolean automapactive;
extern boolean MenuActive;
extern boolean askforquit;
-extern char *SavePath;
// PUBLIC DATA DEFINITIONS -------------------------------------------------
diff --git a/src/hexen/h2def.h b/src/hexen/h2def.h
index 5960743c..95f3e554 100644
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -655,8 +655,6 @@ extern int leveltime; // tics in game play for par
extern ticcmd_t *netcmds;
-extern int rndindex;
-
#define MAXDEATHMATCHSTARTS 16
extern mapthing_t *deathmatch_p;
extern mapthing_t deathmatchstarts[MAXDEATHMATCHSTARTS];
@@ -667,12 +665,6 @@ extern int RebornPosition;
#define MAX_PLAYER_STARTS 8
extern mapthing_t playerstarts[MAX_PLAYER_STARTS][MAXPLAYERS];
-extern int viewwindowx;
-extern int viewwindowy;
-extern int viewwidth;
-extern int scaledviewwidth;
-extern int viewheight;
-
extern int mouseSensitivity;
extern boolean precache; // if true, load all graphics at level load
@@ -717,22 +709,12 @@ void H2_GameLoop(void);
// calls all ?_Responder, ?_Ticker, and ?_Drawer functions
// calls I_GetTime, I_StartFrame, and I_StartTic
-void NetUpdate(void);
-// create any new ticcmds and broadcast to other players
-
-void D_QuitNetGame(void);
-// broadcasts special packets to other players to notify of game exit
-
-void TryRunTics(void);
-
//---------
//SYSTEM IO
//---------
byte *I_AllocLow(int length);
// allocates from low memory under dos, just mallocs under unix
-void I_Tactile(int on, int off, int total);
-
// haleyjd: was WATCOMC, again preserved for historical interest as in Heretic
#if 0
extern boolean useexterndriver;
@@ -1055,7 +1037,6 @@ void F_StartFinale(void);
extern int inv_ptr;
extern int curpos;
-extern int SB_state;
void SB_Init(void);
void SB_SetClassData(void);
boolean SB_Responder(event_t * event);
diff --git a/src/hexen/in_lude.c b/src/hexen/in_lude.c
index 8e95596d..4164d549 100644
--- a/src/hexen/in_lude.c
+++ b/src/hexen/in_lude.c
@@ -22,12 +22,13 @@
//
//-----------------------------------------------------------------------------
+#include <ctype.h>
#include "h2def.h"
#include "s_sound.h"
#include "i_system.h"
#include "i_video.h"
-#include <ctype.h>
+#include "p_local.h"
#include "v_video.h"
// MACROS ------------------------------------------------------------------
@@ -48,10 +49,6 @@ typedef enum
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
-void IN_Start(void);
-void IN_Ticker(void);
-void IN_Drawer(void);
-
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
static void WaitStop(void);
diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
index 32458a1e..301c5c1d 100644
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -129,8 +129,6 @@ void MN_LoadSlotText(void);
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
extern int detailLevel;
-extern char *SavePath;
-extern int key_speed, key_strafe;
extern boolean gamekeydown[256]; // The NUMKEYS macro is local to g_game
// PUBLIC DATA DEFINITIONS -------------------------------------------------
@@ -1012,8 +1010,6 @@ static void SCClass(int option)
static void SCSkill(int option)
{
- extern int SB_state;
-
PlayerClass[consoleplayer] = MenuPClass;
G_DeferredNewGame(option);
SB_SetClassData();
diff --git a/src/hexen/p_anim.c b/src/hexen/p_anim.c
index c23c95fa..7655aef2 100644
--- a/src/hexen/p_anim.c
+++ b/src/hexen/p_anim.c
@@ -78,7 +78,6 @@ static void P_LightningFlash(void);
extern fixed_t Sky1ColumnOffset;
extern fixed_t Sky2ColumnOffset;
-extern int Sky1Texture;
extern boolean DoubleSky;
// PUBLIC DATA DEFINITIONS -------------------------------------------------
diff --git a/src/hexen/p_user.c b/src/hexen/p_user.c
index dd64315d..17c96a47 100644
--- a/src/hexen/p_user.c
+++ b/src/hexen/p_user.c
@@ -330,8 +330,6 @@ void P_DeathThink(player_t * player)
int dir;
angle_t delta;
int lookDelta;
- extern int inv_ptr;
- extern int curpos;
P_MovePsprites(player);
@@ -1336,9 +1334,6 @@ boolean P_HealRadius(player_t * player)
void P_PlayerNextArtifact(player_t * player)
{
- extern int inv_ptr;
- extern int curpos;
-
if (player == &players[consoleplayer])
{
inv_ptr--;
@@ -1375,8 +1370,6 @@ void P_PlayerNextArtifact(player_t * player)
void P_PlayerRemoveArtifact(player_t * player, int slot)
{
int i;
- extern int inv_ptr;
- extern int curpos;
player->artifactCount--;
if (!(--player->inventory[slot].count))
diff --git a/src/hexen/po_man.c b/src/hexen/po_man.c
index 50b79518..4429c3e0 100644
--- a/src/hexen/po_man.c
+++ b/src/hexen/po_man.c
@@ -40,10 +40,6 @@
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
-boolean PO_MovePolyobj(int num, int x, int y);
-boolean PO_RotatePolyobj(int num, angle_t angle);
-void PO_Init(int lump);
-
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
static polyobj_t *GetPolyobj(int polyNum);
@@ -62,8 +58,6 @@ static void TranslateToStartSpot(int tag, int originX, int originY);
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
-extern seg_t *segs;
-
// PUBLIC DATA DEFINITIONS -------------------------------------------------
polyblock_t **PolyBlockMap;
diff --git a/src/hexen/r_local.h b/src/hexen/r_local.h
index e030bcef..8e34ea63 100644
--- a/src/hexen/r_local.h
+++ b/src/hexen/r_local.h
@@ -336,6 +336,7 @@ extern angle_t rw_normalangle;
//
extern int screenblocks;
extern int viewwidth, viewheight, viewwindowx, viewwindowy;
+extern int scaledviewwidth;
extern int centerx, centery;
extern int flyheight;
extern fixed_t centerxfrac;
@@ -456,7 +457,6 @@ extern fixed_t *spritewidth; // needed for pre rendering (fracs)
extern fixed_t *spriteoffset;
extern fixed_t *spritetopoffset;
extern lighttable_t *colormaps;
-extern int viewwidth, scaledviewwidth, viewheight;
extern int firstflat;
extern int numflats;
diff --git a/src/hexen/r_things.c b/src/hexen/r_things.c
index e59c7053..6cc0c6a5 100644
--- a/src/hexen/r_things.c
+++ b/src/hexen/r_things.c
@@ -30,9 +30,6 @@
#include "i_swap.h"
#include "r_local.h"
-void R_DrawColumn(void);
-void R_DrawTLColumn(void);
-void R_DrawAltTLColumn(void);
//void R_DrawTranslatedAltTLColumn(void);
typedef struct
diff --git a/src/hexen/s_sound.c b/src/hexen/s_sound.c
index f11e4ee9..b06a8d4b 100644
--- a/src/hexen/s_sound.c
+++ b/src/hexen/s_sound.c
@@ -77,9 +77,6 @@ int snd_MaxVolume = 10; // maximum volume for sound
int snd_MusicVolume = 10; // maximum volume for music
int snd_Channels = 16;
-extern int startepisode;
-extern int startmap;
-
// int AmbChan;
//==========================================================================
diff --git a/src/hexen/sb_bar.c b/src/hexen/sb_bar.c
index 01a2ef0c..bcaa40be 100644
--- a/src/hexen/sb_bar.c
+++ b/src/hexen/sb_bar.c
@@ -48,8 +48,6 @@ typedef struct Cheat_s
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
-void SB_PaletteFlash(boolean forceChange);
-
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
static void DrawSoundInfo(void);
@@ -84,7 +82,6 @@ static void CheatQuickenFunc3(player_t * player, Cheat_t * cheat);
static void CheatClassFunc1(player_t * player, Cheat_t * cheat);
static void CheatClassFunc2(player_t * player, Cheat_t * cheat);
static void CheatInitFunc(player_t * player, Cheat_t * cheat);
-static void CheatInitFunc(player_t * player, Cheat_t * cheat);
static void CheatVersionFunc(player_t * player, Cheat_t * cheat);
static void CheatDebugFunc(player_t * player, Cheat_t * cheat);
static void CheatScriptFunc1(player_t * player, Cheat_t * cheat);
diff --git a/src/hexen/st_start.h b/src/hexen/st_start.h
index 53cd85c9..be938b74 100644
--- a/src/hexen/st_start.h
+++ b/src/hexen/st_start.h
@@ -22,6 +22,8 @@
//
//-----------------------------------------------------------------------------
+#ifndef STSTART_H
+#define STSTART_H
// HEADER FILES ------------------------------------------------------------
@@ -42,3 +44,4 @@ extern void ST_NetDone(void);
extern int graphical_startup;
+#endif
diff --git a/src/hexen/sv_save.c b/src/hexen/sv_save.c
index bafa89d7..9dc8fc5d 100644
--- a/src/hexen/sv_save.c
+++ b/src/hexen/sv_save.c
@@ -145,10 +145,6 @@ static void StreamOutLong(unsigned int val);
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
-extern int ACScriptCount;
-extern byte *ActionCodeBase;
-extern acsInfo_t *ACSInfo;
-
// PUBLIC DATA DEFINITIONS -------------------------------------------------
#define DEFAULT_SAVEPATH "hexndata/"
diff --git a/src/i_system.h b/src/i_system.h
index 5a99b213..195895bb 100644
--- a/src/i_system.h
+++ b/src/i_system.h
@@ -62,15 +62,8 @@ void I_Quit (void);
void I_Error (char *error, ...);
-// Allocates from low memory under dos,
-// just mallocs under unix
-byte* I_AllocLow (int length);
-
void I_Tactile (int on, int off, int total);
-
-void I_Error (char *error, ...);
-
boolean I_GetMemoryValue(unsigned int offset, void *value, int size);
// Schedule a function to be called when the program exits.
diff --git a/src/m_controls.h b/src/m_controls.h
index 3e50d557..75bd9355 100644
--- a/src/m_controls.h
+++ b/src/m_controls.h
@@ -93,19 +93,6 @@ extern int key_map_grid;
extern int key_map_mark;
extern int key_map_clearmark;
-extern int key_map_north;
-extern int key_map_south;
-extern int key_map_east;
-extern int key_map_west;
-extern int key_map_zoomin;
-extern int key_map_zoomout;
-extern int key_map_toggle;
-extern int key_map_maxzoom;
-extern int key_map_follow;
-extern int key_map_grid;
-extern int key_map_mark;
-extern int key_map_clearmark;
-
// menu keys:
extern int key_menu_activate;
diff --git a/src/setup/sound.c b/src/setup/sound.c
index 522c4f9f..f6a9e551 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -28,7 +28,6 @@
#include "textscreen.h"
#include "m_config.h"
-#include "i_sound.h"
#include "mode.h"
#include "sound.h"
diff --git a/src/setup/sound.h b/src/setup/sound.h
index 87317589..b41c1b4b 100644
--- a/src/setup/sound.h
+++ b/src/setup/sound.h
@@ -22,9 +22,9 @@
#ifndef SETUP_SOUND_H
#define SETUP_SOUND_H
+#include "i_sound.h"
+
void ConfigSound(void);
void BindSoundVariables(void);
-extern int snd_musicdevice;
-
#endif /* #ifndef SETUP_SOUND_H */
diff --git a/src/strife/am_map.c b/src/strife/am_map.c
index 45b46c9b..2e13d28f 100644
--- a/src/strife/am_map.c
+++ b/src/strife/am_map.c
@@ -251,14 +251,6 @@ cheatseq_t cheat_amap = CHEAT("topo", 0); // villsa [STRIFE]
static boolean stopped = true;
-extern boolean viewactive;
-
-void
-V_MarkRect
-( int x,
- int y,
- int width,
- int height );
// Calculates the slope and slope according to the x-axis of a line
// segment in map coordinates (with the upright y-axis n' all) so
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 08274636..89f99648 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -165,8 +165,6 @@ static int comport = 0;
static char *nickname = NULL;
void D_CheckNetGame (void);
-void D_ProcessEvents (void);
-void D_DoAdvanceDemo (void);
//
@@ -490,8 +488,6 @@ boolean D_GrabMouseCallback(void)
//
// haleyjd 08/23/10: [STRIFE] Verified unmodified.
//
-extern boolean demorecording;
-
void D_DoomLoop (void)
{
if (demorecording)
diff --git a/src/strife/d_net.c b/src/strife/d_net.c
index a8d91136..656d1393 100644
--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -253,8 +253,6 @@ void D_InitSinglePlayerGame(net_gamesettings_t *settings)
// D_CheckNetGame
// Works out player numbers among the net participants
//
-extern int viewangleoffset;
-
void D_CheckNetGame (void)
{
net_connect_data_t connect_data;
diff --git a/src/strife/doomstat.h b/src/strife/doomstat.h
index 05c2d0ee..1d2d191d 100644
--- a/src/strife/doomstat.h
+++ b/src/strife/doomstat.h
@@ -151,12 +151,6 @@ extern boolean viewactive;
extern boolean nodrawers;
-extern int viewwindowx;
-extern int viewwindowy;
-extern int viewheight;
-extern int viewwidth;
-extern int scaledviewwidth;
-
extern boolean testcontrols;
extern int testcontrols_mousespeed;
@@ -247,10 +241,6 @@ extern mapthing_t riftSpots[MAXRIFTSPOTS];
extern wbstartstruct_t wminfo;
-// LUT of ammunition limits for each kind.
-// This doubles with BackPack powerup item.
-extern int maxammo[NUMAMMO];
-
diff --git a/src/strife/f_finale.c b/src/strife/f_finale.c
index 551a4e24..b853c601 100644
--- a/src/strife/f_finale.c
+++ b/src/strife/f_finale.c
@@ -608,8 +608,6 @@ int castframes;
int castonmelee;
boolean castattacking;
-extern gamestate_t wipegamestate;
-
//
// F_StartCast
//
diff --git a/src/strife/f_wipe.c b/src/strife/f_wipe.c
index 8c3eeaae..2d2ac3bd 100644
--- a/src/strife/f_wipe.c
+++ b/src/strife/f_wipe.c
@@ -271,8 +271,6 @@ wipe_ScreenWipe
wipe_initMelt, wipe_doMelt, wipe_exitMelt
};
- void V_MarkRect(int, int, int, int);
-
// initial stuff
if (!go)
{
diff --git a/src/strife/g_game.c b/src/strife/g_game.c
index 18f037c2..f76ce747 100644
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -77,17 +77,14 @@
#define SAVEGAMESIZE 0x2c000
-boolean G_CheckDemoStatus (void);
void G_ReadDemoTiccmd (ticcmd_t* cmd);
void G_WriteDemoTiccmd (ticcmd_t* cmd);
void G_PlayerReborn (int player);
-void G_InitNew (skill_t skill, int map);
void G_DoReborn (int playernum);
void G_DoLoadLevel (void);
void G_DoNewGame (void);
-void G_DoLoadGame (boolean userload);
void G_DoPlayDemo (void);
void G_DoCompleted (void);
void G_DoVictory (void);
@@ -669,8 +666,6 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
//
// G_DoLoadLevel
//
-extern gamestate_t wipegamestate;
-
void G_DoLoadLevel (void)
{
int i;
@@ -1921,9 +1916,6 @@ void G_DoNewGame (void)
gameaction = ga_nothing;
}
-// The sky texture to be used instead of the F_SKY1 dummy.
-extern int skytexture;
-
//
// G_InitNew
//
diff --git a/src/strife/hu_stuff.c b/src/strife/hu_stuff.c
index 83757b07..ab973e8d 100644
--- a/src/strife/hu_stuff.c
+++ b/src/strife/hu_stuff.c
@@ -118,7 +118,6 @@ static hu_stext_t w_message;
static int message_counter;
//extern int showMessages; [STRIFE] no such variable
-extern boolean automapactive;
static boolean headsupactive = false;
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index 2fa63abc..10b9854e 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -174,7 +174,6 @@ void M_EndGame(int choice);
void M_ReadThis(int choice);
void M_ReadThis2(int choice);
void M_ReadThis3(int choice); // [STRIFE]
-void M_QuitStrife(int choice);
//void M_ChangeMessages(int choice); [STRIFE]
void M_ChangeSensitivity(int choice);
@@ -186,7 +185,6 @@ void M_StartGame(int choice);
void M_Sound(int choice);
//void M_FinishReadThis(int choice); - [STRIFE] unused
-void M_LoadSelect(int choice);
void M_SaveSelect(int choice);
void M_ReadSaveStrings(void);
void M_QuickSave(void);
@@ -210,10 +208,8 @@ void M_DrawEmptyCell(menu_t *menu,int item);
void M_DrawSelCell(menu_t *menu,int item);
int M_StringWidth(char *string);
int M_StringHeight(char *string);
-void M_StartControlPanel(void);
void M_StartMessage(char *string,void *routine,boolean input);
void M_StopMessage(void);
-void M_ClearMenus (int choice);
diff --git a/src/strife/p_user.c b/src/strife/p_user.c
index af03e81f..aa2ba430 100644
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -52,7 +52,6 @@
#define LOOKDOWNMAX -110 // villsa [STRIFE]
-boolean P_UseInventoryItem(player_t* player, int item); // fraggle [STRIFE]
void P_DropInventoryItem(player_t* player, int sprite); // villsa [STRIFE]
boolean P_ItemBehavior(player_t* player, int item); // villsa [STRIFE]
static char useinventorymsg[44]; // villsa [STRIFE]
diff --git a/src/strife/r_draw.c b/src/strife/r_draw.c
index 61226b15..27c44763 100644
--- a/src/strife/r_draw.c
+++ b/src/strife/r_draw.c
@@ -433,10 +433,6 @@ void R_DrawTRTLColumn(void)
}
-// haleyjd 08/26/10: [STRIFE] - Rogue's translucency lookup table
-// This is functionally equivalent to Raven's TINTTAB and BOOM's TRANMAPs.
-extern byte *xlatab;
-
//
// R_InitTranslationTables
// Creates the translation tables to map
@@ -943,13 +939,6 @@ R_VideoErase
// Draws the border around the view
// for different size windows?
//
-void
-V_MarkRect
-( int x,
- int y,
- int width,
- int height );
-
void R_DrawViewBorder (void)
{
int top;
diff --git a/src/strife/r_main.h b/src/strife/r_main.h
index edc5dbbb..5cb858bb 100644
--- a/src/strife/r_main.h
+++ b/src/strife/r_main.h
@@ -40,8 +40,6 @@
extern fixed_t viewcos;
extern fixed_t viewsin;
-extern int viewwidth;
-extern int viewheight;
extern int viewwindowx;
extern int viewwindowy;
diff --git a/src/strife/st_stuff.h b/src/strife/st_stuff.h
index 34b1146d..2bf3bbd4 100644
--- a/src/strife/st_stuff.h
+++ b/src/strife/st_stuff.h
@@ -85,7 +85,6 @@ typedef enum
} st_chatstateenum_t;
-boolean ST_Responder(event_t* ev);
extern byte *st_backing_screen;