ref: d5288044cabde1037a74e1e3d369ea18dbf7ea8e
parent: 3e9ca5f3aadcfb0416ff5bc80f726ee78af37bc1
parent: 6520134b41d12a7f061d9544e5c04e7ba15377b4
author: Turo Lamminen <turol@users.noreply.github.com>
date: Wed Oct 26 09:50:49 EDT 2022
Merge pull request #1528 from turol/extern-heretic Clean up extern in Heretic, part N
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -142,8 +142,6 @@
void D_Display(void)
{
- extern boolean askforquit;
-
// Change the view size if needed
if (setsizeneeded)
{
--- a/src/heretic/d_net.c
+++ b/src/heretic/d_net.c
@@ -33,10 +33,6 @@
ticcmd_t *netcmds;
-extern void D_DoAdvanceDemo(void);
-extern void D_ProcessEvents(void);
-extern void G_BuildTiccmd(ticcmd_t *cmd, int maketic);
-extern boolean G_CheckDemoStatus(void);
// Called when a player leaves the game
@@ -68,7 +64,6 @@
static void RunTic(ticcmd_t *cmds, boolean *ingame)
{
- extern boolean advancedemo;
unsigned int i;
// Check for player quits.
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -566,6 +566,7 @@
extern int startepisode;
extern int startmap;
extern boolean autostart;
+extern boolean advancedemo;
extern boolean testcontrols;
extern int testcontrols_mousespeed;
@@ -587,6 +588,7 @@
//BASE LEVEL
//----------
void D_DoomMain(void);
+void CheckAbortStartup(void);
void IncThermo(void);
void InitThermo(int max);
void tprintf(const char *string, int initflag);
@@ -602,6 +604,9 @@
// calls all ?_Responder, ?_Ticker, and ?_Drawer functions
// calls I_GetTime, I_StartFrame, and I_StartTic
+void D_StartTitle(void);
+
+
//---------
//SYSTEM IO
//---------
@@ -685,12 +690,18 @@
void G_PlayDemo(char *name);
void G_TimeDemo(char *name);
+boolean G_CheckDemoStatus(void);
+void D_DoAdvanceDemo(void);
void G_ExitLevel(void);
void G_SecretExitLevel(void);
+void D_ProcessEvents(void);
+
void G_WorldDone(void);
+void G_BuildTiccmd(ticcmd_t *cmd, int maketic);
+
void G_Ticker(void);
boolean G_Responder(event_t * ev);
@@ -802,6 +813,12 @@
// STATUS BAR (SB_bar.c)
//----------------------
+
+extern boolean inventory;
+extern int curpos;
+extern int inv_ptr;
+
+
void SB_Init(void);
boolean SB_Responder(event_t * event);
void SB_Ticker(void);
@@ -811,6 +828,7 @@
// MENU (MN_menu.c)
//-----------------
+extern boolean askforquit;
extern boolean MenuActive;
void MN_Init(void);
--- a/src/heretic/f_finale.c
+++ b/src/heretic/f_finale.c
@@ -38,7 +38,6 @@
extern boolean viewactive;
-extern void D_StartTitle(void);
/*
=======================
@@ -295,7 +294,6 @@
void F_DrawUnderwater(void)
{
static boolean underwawa = false;
- extern boolean askforquit;
const char *lumpname;
byte *palette;
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -39,7 +39,6 @@
// Functions
-boolean G_CheckDemoStatus(void);
void G_ReadDemoTiccmd(ticcmd_t * cmd);
void G_WriteDemoTiccmd(ticcmd_t * cmd);
void G_PlayerReborn(int player);
@@ -280,9 +279,6 @@
====================
*/
-extern boolean inventory;
-extern int curpos;
-extern int inv_ptr;
boolean usearti = true;
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1044,8 +1044,6 @@
int key;
int i;
MenuItem_t *item;
- extern void D_StartTitle(void);
- extern void G_CheckDemoStatus(void);
char *textBuffer;
// In testcontrols mode, none of the function keys should do anything
--- a/src/heretic/p_user.c
+++ b/src/heretic/p_user.c
@@ -305,8 +305,6 @@
*/
#define ANG5 (ANG90/18)
-extern int inv_ptr;
-extern int curpos;
void P_DeathThink(player_t * player)
{
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -25,7 +25,6 @@
#include "r_local.h"
#include "p_local.h"
-extern void CheckAbortStartup(void);
typedef struct
{