ref: c1eab2431740217d8b43cb4cbb8546579be55e9a
parent: 509b22c5a816888ad7819d57ea2a672a37be8c23
parent: 429944bd45e618d2e9e931852838ed9cbf8d1d4d
author: Turo Lamminen <turol@users.noreply.github.com>
date: Wed Sep 28 08:33:23 EDT 2022
Merge pull request #1511 from turol/extern-strife Clean up extern, Strife-specific bits
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -114,12 +114,6 @@
boolean showintro = true; // [STRIFE] checkparm of -nograph, disables intro
-//extern int soundVolume;
-//extern int sfxVolume;
-//extern int musicVolume;
-
-extern boolean inhelpscreens;
-
skill_t startskill;
int startepisode;
int startmap;
@@ -205,9 +199,6 @@
// * 20110206: Start wipegamestate at GS_UNKNOWN (STRIFE-TODO: rename?)
//
gamestate_t wipegamestate = GS_UNKNOWN;
-extern boolean setsizeneeded;
-//extern int showMessages; [STRIFE] no such variable
-void R_ExecuteSetViewSize (void);
void D_Display (void)
{
@@ -1708,8 +1699,6 @@
if ( (p=M_CheckParm ("-turbo")) )
{
int scale = 200;
- extern int forwardmove[2];
- extern int sidemove[2];
if (p<myargc-1)
scale = atoi (myargv[p+1]);
--- a/src/strife/d_main.h
+++ b/src/strife/d_main.h
@@ -22,9 +22,9 @@
#include "doomdef.h"
+#include "v_patch.h"
-
// Read events from all input devices
void D_ProcessEvents (void);
@@ -41,7 +41,10 @@
void D_QuitGame (void); // [STRIFE]
void D_IntroTick(void); // [STRIFE]
-
+
+boolean D_PatchClipCallback(patch_t *patch, int x, int y); // [STRIFE]
+
+
//
// GLOBAL VARIABLES
//
@@ -51,6 +54,11 @@
extern boolean isdemoversion; // haleyjd [STRIFE]
extern boolean stonecold; // villsa [STRIFE]
extern boolean workparm; // villsa [STRIFE]
+extern boolean advancedemo;
+
+// haleyjd 20130915 [STRIFE]: need nickname
+extern char *nickname;
+
#endif
--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -67,7 +67,6 @@
static void RunTic(ticcmd_t *cmds, boolean *ingame)
{
- extern boolean advancedemo;
unsigned int i;
// Check for player quits.
--- a/src/strife/doomstat.h
+++ b/src/strife/doomstat.h
@@ -183,6 +183,9 @@
extern boolean demorecording;
extern int mouse_fire_countdown; // villsa [STRIFE]
+extern fixed_t forwardmove[2];
+extern fixed_t sidemove[2];
+
// Round angleturn in ticcmds to the nearest 256. This is used when
// recording Vanilla demos in netgames.
--- a/src/strife/f_finale.c
+++ b/src/strife/f_finale.c
@@ -518,7 +518,6 @@
// haleyjd 09/13/10: Not present in Strife: Cast drawing functions
#include "hu_stuff.h"
-extern patch_t *hu_font[HU_FONTSIZE];
/*
//
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -1369,8 +1369,6 @@
//
// G_DoCompleted
//
-//boolean secretexit;
-extern char* pagename;
//
// G_RiftExitLevel
@@ -1659,8 +1657,6 @@
// G_InitFromSavegame
// Can be called by the startup code or the menu task.
//
-extern boolean setsizeneeded;
-void R_ExecuteSetViewSize (void);
char savename[256];
--- a/src/strife/hu_lib.c
+++ b/src/strife/hu_lib.c
@@ -24,17 +24,17 @@
#include "v_video.h"
#include "i_swap.h"
+#include "d_main.h"
#include "hu_lib.h"
#include "r_local.h"
#include "r_draw.h"
#include "hu_stuff.h" // [STRIFE]
+#include "doomstat.h"
+
// boolean : whether the screen is always erased
#define noterased viewwindowx
-extern boolean automapactive; // in AM_map.c
-
-extern boolean D_PatchClipCallback(patch_t *patch, int x, int y); // [STRIFE]
//
// HUlib_drawYellowText
--- a/src/strife/hu_stuff.c
+++ b/src/strife/hu_stuff.c
@@ -28,6 +28,7 @@
#include "i_swap.h"
#include "i_video.h"
+#include "d_main.h"
#include "hu_stuff.h"
#include "hu_lib.h"
#include "m_controls.h"
@@ -91,12 +92,8 @@
static hu_stext_t w_message;
static int message_counter;
-//extern int showMessages; [STRIFE] no such variable
static boolean headsupactive = false;
-
-// haleyjd 20130915 [STRIFE]: need nickname
-extern char *nickname;
// haleyjd 20130915 [STRIFE]: true if setting nickname
static boolean hu_setting_name = false;
--- a/src/strife/hu_stuff.h
+++ b/src/strife/hu_stuff.h
@@ -63,6 +63,13 @@
// [STRIFE]
extern patch_t* yfont[HU_FONTSIZE]; // haleyjd 09/18/10: [STRIFE]
+extern patch_t *hu_font[HU_FONTSIZE];
+
+extern boolean message_dontfuckwithme;
+
+extern boolean chat_on;
+extern boolean sendsave;
+
#endif
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -62,14 +62,9 @@
#include "p_dialog.h"
-extern void M_QuitStrife(int);
+void M_QuitStrife(int);
-extern patch_t* hu_font[HU_FONTSIZE];
-extern boolean message_dontfuckwithme;
-extern boolean chat_on; // in heads-up code
-extern boolean sendsave; // [STRIFE]
-
//
// defaulted values
//
@@ -131,7 +126,6 @@
#define CURSORXOFF -28
#define LINEHEIGHT 19
-extern boolean sendpause;
char savegamestrings[10][SAVESTRINGSIZE];
char endstring[160];
@@ -1274,7 +1268,6 @@
*/
#if 0
-extern void F_StartCast(void);
//
// M_CheckStartCast
--- a/src/strife/m_menu.h
+++ b/src/strife/m_menu.h
@@ -98,4 +98,7 @@
extern int detailLevel;
extern int screenblocks;
+extern boolean inhelpscreens;
+
+
#endif
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -383,8 +383,6 @@
fixed_t xspeed[8] = {FRACUNIT,47000,0,-47000,-FRACUNIT,-47000,0,47000};
fixed_t yspeed[8] = {0,47000,FRACUNIT,47000,0,-47000,-FRACUNIT,-47000};
-extern line_t* spechit[];
-extern int numspechit;
boolean P_Move (mobj_t* actor)
{
@@ -712,8 +710,6 @@
} // end else
}
-// haleyjd 09/05/10: Needed below.
-extern void P_BulletSlope (mobj_t *mo);
//
// P_LookForPlayers
--- a/src/strife/p_local.h
+++ b/src/strife/p_local.h
@@ -226,6 +226,16 @@
extern line_t *ceilingline;
extern line_t *blockingline; // [STRIFE] New global
+extern int numspechit;
+extern line_t *spechit[];
+
+extern fixed_t attackrange;
+
+// slopes to top and bottom of target
+extern fixed_t topslope;
+extern fixed_t bottomslope;
+
+
boolean P_CheckPosition (mobj_t *thing, fixed_t x, fixed_t y);
boolean P_TryMove (mobj_t* thing, fixed_t x, fixed_t y);
boolean P_CheckPositionZ(mobj_t* thing, fixed_t z); // villsa [STRIFE]
--- a/src/strife/p_map.c
+++ b/src/strife/p_map.c
@@ -953,10 +953,6 @@
fixed_t aimslope;
-// slopes to top and bottom of target
-extern fixed_t topslope;
-extern fixed_t bottomslope;
-
//
// PTR_AimTraverse
--- a/src/strife/p_maputl.c
+++ b/src/strife/p_maputl.c
@@ -772,7 +772,6 @@
return true; // everything was traversed
}
-extern fixed_t bulletslope;
#if 0
// Intercepts Overrun emulation, from PrBoom-plus.
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -30,10 +30,7 @@
#include "doomstat.h"
#include "d_main.h" // villsa [STRIFE]
-extern line_t *spechit[]; // haleyjd:
-extern int numspechit; // [STRIFE] - needed in P_XYMovement
-
void G_PlayerReborn (int player);
void P_SpawnMapThing (mapthing_t* mthing);
@@ -1029,7 +1026,6 @@
// * No spawn tics randomization
// * Player melee behavior
//
-extern fixed_t attackrange;
void
P_SpawnPuff
--- a/src/strife/p_pspr.h
+++ b/src/strife/p_pspr.h
@@ -23,6 +23,7 @@
// Basic data types.
// Needs fixed point, and BAM angles.
#include "m_fixed.h"
+#include "p_mobj.h"
#include "tables.h"
@@ -73,7 +74,13 @@
typedef struct player_s *playerptr;
+
+extern fixed_t bulletslope;
+
+
// haleyjd [STRIFE] Exported
void P_SetPsprite(playerptr player, int position, statenum_t stnum);
+void P_BulletSlope(mobj_t *mo);
+
#endif
--- a/src/strife/p_spec.c
+++ b/src/strife/p_spec.c
@@ -143,8 +143,8 @@
// haleyjd 08/29/10: [STRIFE] MAXLINEANIMS raised from 64 to 96
#define MAXLINEANIMS 96
-extern short numlinespecials;
-extern line_t* linespeciallist[MAXLINEANIMS];
+short numlinespecials = 0;
+line_t *linespeciallist[MAXLINEANIMS];
@@ -1681,8 +1681,6 @@
static int tmp_s3_floorheight;
static int tmp_s3_floorpic;
- extern int numflats;
-
if (first)
{
int p;
@@ -1865,8 +1863,6 @@
// After the map has been loaded, scan for specials
// that spawn thinkers
//
-short numlinespecials;
-line_t* linespeciallist[MAXLINEANIMS];
// Parses command line parameters.
--- a/src/strife/r_data.h
+++ b/src/strife/r_data.h
@@ -26,6 +26,9 @@
#include "p_spec.h" // villsa [STRIFE]
+extern int numflats;
+
+
// Retrieve column data for span blitting.
byte*
R_GetColumn
--- a/src/strife/r_main.c
+++ b/src/strife/r_main.c
@@ -52,7 +52,6 @@
lighttable_t* fixedcolormap;
-extern lighttable_t** walllights;
int centerx;
int centery;
--- a/src/strife/r_main.h
+++ b/src/strife/r_main.h
@@ -35,6 +35,7 @@
extern int viewwindowx;
extern int viewwindowy;
+extern boolean setsizeneeded;
extern int centerx;
@@ -156,5 +157,8 @@
// Called by M_Responder.
void R_SetViewSize (int blocks, int detail);
+
+void R_ExecuteSetViewSize(void);
+
#endif
--- a/src/strife/r_segs.h
+++ b/src/strife/r_segs.h
@@ -21,6 +21,7 @@
#define __R_SEGS__
+extern lighttable_t **walllights;
void
--- a/src/strife/st_lib.c
+++ b/src/strife/st_lib.c
@@ -36,12 +36,6 @@
#include "r_local.h"
-// in AM_map.c
-extern boolean automapactive;
-
-
-
-
//
// Hack display negative frags.
// Loads and store the stminus lump.