remove extern from *.c files (#1686)

This commit is contained in:
Roman Fomin 2024-05-13 16:43:07 +07:00 committed by GitHub
parent df65db124d
commit 26ce44b216
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
55 changed files with 245 additions and 230 deletions

View File

@ -24,8 +24,6 @@
//#define OPL_DEBUG_TRACE
extern opl_driver_t opl_sdl_driver;
static opl_driver_t *drivers[] =
{
&opl_sdl_driver,

View File

@ -44,6 +44,8 @@ typedef struct
opl_adjust_callbacks_func adjust_callbacks_func;
} opl_driver_t;
extern opl_driver_t opl_sdl_driver;
// Sample rate to use when doing software emulation.
extern unsigned int opl_sample_rate;

View File

@ -106,7 +106,6 @@ void MainMenu(void)
static void SetIcon(void)
{
extern SDL_Window *TXT_SDLWindow;
SDL_Surface *surface;
surface = SDL_CreateRGBSurfaceFrom((void *) setup_icon_data, setup_icon_w,

View File

@ -73,6 +73,7 @@ extern mpoint_t *markpoints;
extern int markpointnum, markpointnum_max;
extern boolean followplayer;
extern boolean automap_grid;
extern int ddt_cheating;
// end changes -- killough 2/22/98

View File

@ -1635,11 +1635,6 @@ deh_bexptr deh_bexptrs[] =
{{NULL}, "A_NULL"}, // Ty 05/16/98
};
extern byte *defined_codeptr_args;
// to hold startup code pointers from INFO.C
extern actionf_t *deh_codeptr;
// ====================================================================
// ProcessDehFile
// Purpose: Read and process a DEH or BEX file

View File

@ -27,6 +27,20 @@
#ifndef __D_DEH__
#define __D_DEH__
#include "doomtype.h"
extern int deh_maxhealth;
extern boolean deh_set_maxhealth;
extern boolean deh_set_blood_color;
extern boolean deh_pars;
extern char **dehfiles;
extern char **mapnames[];
extern char **mapnames2[];
extern char **mapnamesp[];
extern char **mapnamest[];
//
// Ty 03/22/98 - note that we are keeping the english versions and
// comments in this file

View File

@ -20,6 +20,7 @@
#define __D_LOOP__
#include "doomtype.h"
#include "m_fixed.h"
#include "net_defs.h"
// Callback function invoked while waiting for the netgame to start.
@ -52,8 +53,8 @@ boolean D_InitNetGame(net_connect_data_t *connect_data);
void D_StartNetGame(net_gamesettings_t *settings,
netgame_startup_callback_t callback);
// extern boolean singletics;
// extern int gametic, ticdup;
// extern int oldleveltime; // [crispy] check if leveltime keeps tickin'
void D_ReceiveTic(ticcmd_t *ticcmds, boolean *players_mask);
extern fixed_t offsetms;
#endif

View File

@ -1912,9 +1912,6 @@ static void D_InitTables(void)
void D_SetMaxHealth(void)
{
extern boolean deh_set_maxhealth;
extern int deh_maxhealth;
if (demo_compatibility)
{
maxhealth = 100;
@ -1929,8 +1926,6 @@ void D_SetMaxHealth(void)
void D_SetBloodColor(void)
{
extern boolean deh_set_blood_color;
if (deh_set_blood_color)
return;

View File

@ -27,6 +27,8 @@ struct event_s;
extern char **wadfiles; // killough 11/98
extern char **tempdirs;
void D_AddFile(const char *file);
char *D_DoomExeName(void); // killough 10/98: executable's name

View File

@ -22,6 +22,7 @@
#include "SDL.h"
#include "doomstat.h"
#include "d_main.h"
#include "g_game.h"
#include "i_glob.h"
#include "i_printf.h"
@ -34,8 +35,6 @@
// I_Quit
//
extern char **tempdirs;
void I_Quit(void)
{
int i;

View File

@ -26,7 +26,7 @@ typedef void (*actionf_v)();
typedef void (*actionf_p1)(void *);
typedef void (*actionf_p2)(void *, void *);
typedef union
typedef union actionf_u
{
actionf_v v;
actionf_p1 p1;

View File

@ -17,6 +17,9 @@
#ifndef __DSDHACKED__
#define __DSDHACKED__
#include "doomtype.h"
#include "info.h"
void dsdh_InitTables(void);
void dsdh_FreeTables(void);
@ -29,4 +32,8 @@ int dsdh_GetDehSFXIndex(const char *key, size_t length);
int dsdh_GetDehMusicIndex(const char *key, int length);
int dsdh_GetOriginalSFXIndex(const char *key);
extern byte *defined_codeptr_args;
extern union actionf_u *deh_codeptr;
extern statenum_t *seenstate_tab;
#endif

View File

@ -18,7 +18,6 @@
//-----------------------------------------------------------------------------
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
@ -27,6 +26,7 @@
#include "doomdef.h"
#include "doomstat.h"
#include "doomtype.h"
#include "g_game.h"
#include "hu_lib.h"
#include "info.h"
#include "m_misc.h" // [FG] M_StringDuplicate()
@ -38,6 +38,7 @@
#include "u_mapinfo.h"
#include "v_video.h"
#include "w_wad.h"
#include "wi_stuff.h"
#include "z_zone.h"
// Stage of animation:
@ -52,18 +53,15 @@ int finalecount;
#define NEWTEXTSPEED 0.01f // new value // phares
#define NEWTEXTWAIT 1000 // new value // phares
const char *finaletext;
const char *finaleflat;
static const char *finaletext;
static const char *finaleflat;
void F_StartCast (void);
void F_CastTicker (void);
boolean F_CastResponder (event_t *ev);
void F_CastDrawer (void);
void WI_checkForAccelerate(void); // killough 3/28/98: used to
extern int acceleratestage; // accelerate intermission screens
static int midstage; // whether we're in "mid-stage"
extern boolean secretexit; // whether we've entered a secret map
boolean using_FMI;
@ -371,7 +369,6 @@ void F_TextWrite (void)
cx = 10;
cy = 10;
ch = finaletext;
count = (int)((finalecount - 10)/Get_TextSpeed()); // phares
if (count < 0)

View File

@ -200,8 +200,7 @@ fixed_t angleturn[3] = {640, 1280, 320}; // + slow turn
boolean gamekeydown[NUMKEYS];
int turnheld; // for accelerative turning
boolean mousearray[NUM_MOUSE_BUTTONS + 1]; // [FG] support more mouse buttons
boolean *mousebuttons = &mousearray[1]; // allow [-1]
boolean mousebuttons[NUM_MOUSE_BUTTONS];
// mouse values are used once
static int mousex;
@ -221,8 +220,7 @@ static carry_t prevcarry;
static carry_t carry;
static ticcmd_t basecmd;
boolean joyarray[NUM_CONTROLLER_BUTTONS + 1]; // [FG] support more joystick buttons
boolean *joybuttons = &joyarray[1]; // allow [-1]
boolean joybuttons[NUM_CONTROLLER_BUTTONS];
static const int direction[] = { 1, -1 };
@ -676,7 +674,6 @@ void G_BuildTiccmd(ticcmd_t* cmd)
int side = 0;
int newweapon; // phares
extern boolean boom_weapon_state_injection;
static boolean done_autoswitch = false;
G_DemoSkipTics();
@ -1043,10 +1040,7 @@ static void G_DoLoadLevel(void)
// by Z_FreeTags() when the previous level ended or player
// died.
{
extern msecnode_t *headsecnode; // phares 3/25/98
headsecnode = NULL;
}
headsecnode = NULL;
critical = (gameaction == ga_playdemo || demorecording || demoplayback || D_CheckNetConnect());
@ -1081,8 +1075,8 @@ static void G_DoLoadLevel(void)
G_ClearInput();
sendpause = sendsave = paused = false;
// [FG] array size!
memset (mousearray, 0, sizeof(mousearray));
memset (joyarray, 0, sizeof(joyarray));
memset (mousebuttons, 0, sizeof(mousebuttons));
memset (joybuttons, 0, sizeof(joybuttons));
//jff 4/26/98 wake up the status bar in case were coming out of a DM demo
// killough 5/13/98: in case netdemo has consoleplayer other than green
@ -1103,8 +1097,6 @@ static void G_DoLoadLevel(void)
}
}
extern int ddt_cheating;
static void G_ReloadLevel(void)
{
if (demorecording || netgame)
@ -2290,7 +2282,6 @@ void CheckSaveGame(size_t size)
// (previously code was scattered around in multiple places)
// [FG] support up to 8 pages of savegames
extern int savepage;
char* G_SaveGameName(int slot)
{
@ -2676,7 +2667,6 @@ void G_CleanScreenshot(void)
{
int old_screenblocks;
boolean old_hide_weapon;
extern void ST_ResetPalette(void);
ST_ResetPalette();
@ -2813,7 +2803,6 @@ void G_Ticker(void)
cmd->forwardmove > TURBOTHRESHOLD &&
!(gametic&31) && ((gametic>>5)&3) == i )
{
extern char **player_names[];
displaymsg("%s is turbo!", *player_names[i]); // killough 9/29/98
}
@ -2945,8 +2934,6 @@ void G_PlayerReborn(int player)
// because something is occupying it
//
void P_SpawnPlayer(mapthing_t *mthing);
static boolean G_CheckSpot(int playernum, mapthing_t *mthing)
{
fixed_t x,y;
@ -4334,7 +4321,6 @@ void G_DeferedPlayDemo(char* name)
#define DEMO_FOOTER_SEPARATOR "\n"
#define NUM_DEMO_FOOTER_LUMPS 4
extern char **dehfiles;
static size_t WriteCmdLineLump(MEMFILE *stream)
{

View File

@ -95,6 +95,10 @@ extern complevel_t force_complevel, default_complevel;
extern int realtic_clock_rate;
extern boolean gamekeydown[];
extern boolean mousebuttons[];
extern boolean joybuttons[];
// killough 5/2/98: moved from m_misc.c:
extern int key_escape;
extern int key_enter;
@ -116,6 +120,9 @@ extern int bodyquesize, default_bodyquesize; // killough 2/8/98, 10/98
// Par times (new item with BOOM) - from g_game.c
extern int pars[][10]; // hardcoded array size
extern int cpars[]; // hardcoded array size
extern boolean um_pars;
extern boolean secretexit;
#endif

View File

@ -34,6 +34,7 @@
#include "hu_lib.h"
#include "hu_obituary.h"
#include "hu_stuff.h"
#include "i_timer.h" // time_scale
#include "i_video.h" // fps
#include "m_config.h"
#include "m_fixed.h"
@ -190,10 +191,6 @@ int hud_crosshair;
// Ty 03/27/98 - externalized map name arrays - now in d_deh.c
// and converted to arrays of pointers to char *
// See modified HUTITLEx macros
extern char **mapnames[];
extern char **mapnames2[];
extern char **mapnamesp[];
extern char **mapnamest[];
// key tables
// jff 5/10/98 french support removed,
@ -321,8 +318,6 @@ void HU_ResetMessageColors(void)
}
}
extern boolean st_invul;
static byte* ColorByHealth(int health, int maxhealth, boolean invul)
{
if (invul)
@ -1142,7 +1137,6 @@ static void HU_widget_build_sttime(void)
{
char hud_timestr[HU_MAXLINELENGTH/2];
int offset = 0;
extern int time_scale;
if ((hud_level_time & HUD_WIDGET_HUD && !automapactive) ||
(hud_level_time & HUD_WIDGET_AUTOMAP && automapactive))

View File

@ -48,6 +48,8 @@ boolean HU_DemoProgressBar(boolean force);
void HU_ResetMessageColors(void);
void WI_DrawTimeWidget(void);
// killough 5/2/98: moved from m_misc.c:
//jff 2/16/98 hud supported automap colors added
@ -65,8 +67,13 @@ extern boolean show_messages;
extern boolean show_toggle_messages;
extern boolean show_pickup_messages;
extern boolean chat_on;
extern boolean message_dontfuckwithme;
extern int playback_tic, playback_totaltics;
extern char **player_names[];
enum
{
HUD_TYPE_CRISPY,

View File

@ -52,4 +52,6 @@ void I_InitTimer(void);
// Wait for vertical retrace or pause a bit.
void I_WaitVBL(int count);
extern int time_scale;
#endif

View File

@ -35,6 +35,8 @@
#include "m_fixed.h"
#include "m_input.h"
#include "m_misc.h"
#include "mn_menu.h"
#include "p_action.h"
#include "p_inter.h"
#include "p_map.h"
#include "p_mobj.h"
@ -42,6 +44,7 @@
#include "p_spec.h" // SPECHITS
#include "p_tick.h"
#include "r_defs.h"
#include "r_main.h"
#include "r_state.h"
#include "s_sound.h"
#include "sounds.h"
@ -335,7 +338,6 @@ static void cheat_showfps()
// killough 7/19/98: Autoaiming optional in beta emulation mode
static void cheat_autoaim()
{
extern int autoaim;
displaymsg((autoaim=!autoaim) ?
"Projectile autoaiming on" :
"Projectile autoaiming off");
@ -417,7 +419,6 @@ static void cheat_god()
{
signed int an;
mapthing_t mt = {0};
extern void P_SpawnPlayer (mapthing_t* mthing);
P_MapStart();
mt.x = plyr->mo->x >> FRACBITS;
@ -723,8 +724,6 @@ static void cheat_friction()
"Variable Friction disabled");
}
extern const char *default_skill_strings[];
static void cheat_skill0()
{
displaymsg("Skill: %s", default_skill_strings[gameskill + 1]);
@ -769,7 +768,6 @@ static void cheat_massacre() // jff 2/01/98 kill all monsters
int killcount=0;
thinker_t *currentthinker=&thinkercap;
extern void A_PainDie(mobj_t *);
// killough 7/20/98: kill friendly monsters only if no others to kill
int mask = MF_FRIEND;
P_MapStart();
@ -948,7 +946,6 @@ static void cheat_spechits()
// killough 3/26/98: emulate Doom better
static void cheat_ddt()
{
extern int ddt_cheating;
if (automapactive)
ddt_cheating = (ddt_cheating+1) % 3;
}
@ -993,7 +990,6 @@ static void cheat_reveal_secret()
static void cheat_cycle_mobj(mobj_t **last_mobj, int *last_count,
int flags, int alive)
{
extern int init_thinkers_count;
thinker_t *th, *start_th;
// If the thinkers have been wiped, addresses are invalid
@ -1055,7 +1051,6 @@ static void cheat_reveal_item()
// killough 2/7/98: HOM autodetection
static void cheat_hom()
{
extern int autodetect_hom; // Ty 03/27/98 - *not* externalized
displaymsg((autodetect_hom = !autodetect_hom) ? "HOM Detection On" :
"HOM Detection Off");
}
@ -1164,7 +1159,6 @@ static void cheat_pitch()
static void cheat_nuke()
{
extern int disable_nuke;
displaymsg((disable_nuke = !disable_nuke) ? "Nukage Disabled" :
"Nukage Enabled");
}

View File

@ -58,6 +58,8 @@ extern struct cheat_s {
boolean deh_modified; // killough 9/12/98
} cheat[];
void cheat_mypos_print();
boolean M_CheatResponder(struct event_s *ev);
#endif

View File

@ -18,6 +18,7 @@
#include "d_event.h"
#include "doomkeys.h"
#include "g_game.h"
#include "m_input.h"
#include "m_config.h"
@ -26,10 +27,6 @@
static input_t *composite_inputs[NUM_INPUT_ID];
extern boolean gamekeydown[];
extern boolean *mousebuttons;
extern boolean *joybuttons;
static event_t *event;
static boolean InputMatch(int id, input_type_t type, int value)

View File

@ -65,10 +65,6 @@
# include <unistd.h> // [FG] isatty()
#endif
extern boolean message_dontfuckwithme;
extern boolean chat_on; // in heads-up code
//
// defaulted values
//

View File

@ -79,6 +79,10 @@ typedef enum
extern backdrop_t menu_backdrop;
boolean MN_MenuIsShaded(void);
extern int savepage;
extern const char *default_skill_strings[];
void MN_SetQuickSaveSlot(int slot);
void MN_InitMenuStrings(void);

View File

@ -14,7 +14,9 @@
//
#include "mn_internal.h"
#include "am_map.h"
#include "d_deh.h"
#include "d_main.h"
#include "doomdef.h"
#include "doomstat.h"
@ -3830,8 +3832,6 @@ void MN_InitMenuStrings(void)
void MN_SetupResetMenu(void)
{
extern boolean deh_set_blood_color;
DisableItem(force_strictmode, comp_settings1, "strictmode");
DisableItem(force_complevel != CL_NONE, comp_settings1, "default_complevel");
DisableItem(M_ParmExists("-pistolstart"), comp_settings1, "pistolstart");

View File

@ -18,6 +18,7 @@
#include <string.h>
#include "config.h"
#include "d_loop.h"
#include "d_ticcmd.h"
#include "doomtype.h"
#include "i_printf.h"
@ -32,8 +33,6 @@
#include "net_server.h"
#include "net_structrw.h"
extern void D_ReceiveTic(ticcmd_t *ticcmds, boolean *playeringame);
typedef enum
{
// waiting for the game to launch
@ -89,8 +88,6 @@ typedef struct
net_ticdiff_t cmd;
} net_server_send_t;
extern fixed_t offsetms;
static net_connection_t client_connection;
static net_clientstate_t client_state;
static net_addr_t *server_addr;

View File

@ -30,126 +30,126 @@ struct mobj_s;
// modified for years by Dehacked enthusiasts. The new BEX format
// allows more extensive changes (see d_deh.c)
extern void A_Light0(struct player_s *player, struct pspdef_s *psp);
extern void A_WeaponReady(struct player_s *player, struct pspdef_s *psp);
extern void A_Lower(struct player_s *player, struct pspdef_s *psp);
extern void A_Raise(struct player_s *player, struct pspdef_s *psp);
extern void A_Punch(struct player_s *player, struct pspdef_s *psp);
extern void A_ReFire(struct player_s *player, struct pspdef_s *psp);
extern void A_FirePistol(struct player_s *player, struct pspdef_s *psp);
extern void A_Light1(struct player_s *player, struct pspdef_s *psp);
extern void A_FireShotgun(struct player_s *player, struct pspdef_s *psp);
extern void A_Light2(struct player_s *player, struct pspdef_s *psp);
extern void A_FireShotgun2(struct player_s *player, struct pspdef_s *psp);
extern void A_CheckReload(struct player_s *player, struct pspdef_s *psp);
extern void A_OpenShotgun2(struct player_s *player, struct pspdef_s *psp);
extern void A_LoadShotgun2(struct player_s *player, struct pspdef_s *psp);
extern void A_CloseShotgun2(struct player_s *player, struct pspdef_s *psp);
extern void A_FireCGun(struct player_s *player, struct pspdef_s *psp);
extern void A_GunFlash(struct player_s *player, struct pspdef_s *psp);
extern void A_FireMissile(struct player_s *player, struct pspdef_s *psp);
extern void A_Saw(struct player_s *player, struct pspdef_s *psp);
extern void A_FirePlasma(struct player_s *player, struct pspdef_s *psp);
extern void A_BFGsound(struct player_s *player, struct pspdef_s *psp);
extern void A_FireBFG(struct player_s *player, struct pspdef_s *psp);
extern void A_BFGSpray(struct mobj_s *mo);
extern void A_Explode(struct mobj_s *thingy);
extern void A_Pain(struct mobj_s *actor);
extern void A_PlayerScream(struct mobj_s *mo);
extern void A_Fall(struct mobj_s *actor);
extern void A_XScream(struct mobj_s *actor);
extern void A_Look(struct mobj_s *actor);
extern void A_Chase(struct mobj_s *actor);
extern void A_FaceTarget(struct mobj_s *actor);
extern void A_PosAttack(struct mobj_s *actor);
extern void A_Scream(struct mobj_s *actor);
extern void A_SPosAttack(struct mobj_s *actor);
extern void A_VileChase(struct mobj_s *actor);
extern void A_VileStart(struct mobj_s *actor);
extern void A_VileTarget(struct mobj_s *actor);
extern void A_VileAttack(struct mobj_s *actor);
extern void A_StartFire(struct mobj_s *actor);
extern void A_Fire(struct mobj_s *actor);
extern void A_FireCrackle(struct mobj_s *actor);
extern void A_Tracer(struct mobj_s *actor);
extern void A_SkelWhoosh(struct mobj_s *actor);
extern void A_SkelFist(struct mobj_s *actor);
extern void A_SkelMissile(struct mobj_s *actor);
extern void A_FatRaise(struct mobj_s *actor);
extern void A_FatAttack1(struct mobj_s *actor);
extern void A_FatAttack2(struct mobj_s *actor);
extern void A_FatAttack3(struct mobj_s *actor);
extern void A_BossDeath(struct mobj_s *mo);
extern void A_CPosAttack(struct mobj_s *actor);
extern void A_CPosRefire(struct mobj_s *actor);
extern void A_TroopAttack(struct mobj_s *actor);
extern void A_SargAttack(struct mobj_s *actor);
extern void A_HeadAttack(struct mobj_s *actor);
extern void A_BruisAttack(struct mobj_s *actor);
extern void A_SkullAttack(struct mobj_s *actor);
extern void A_Metal(struct mobj_s *mo);
extern void A_SpidRefire(struct mobj_s *actor);
extern void A_BabyMetal(struct mobj_s *mo);
extern void A_BspiAttack(struct mobj_s *actor);
extern void A_Hoof(struct mobj_s *mo);
extern void A_CyberAttack(struct mobj_s *actor);
extern void A_PainAttack(struct mobj_s *actor);
extern void A_PainDie(struct mobj_s *actor);
extern void A_KeenDie(struct mobj_s *mo);
extern void A_BrainPain(struct mobj_s *mo);
extern void A_BrainScream(struct mobj_s *mo);
extern void A_BrainDie(struct mobj_s *mo);
extern void A_BrainAwake(struct mobj_s *mo);
extern void A_BrainSpit(struct mobj_s *mo);
extern void A_SpawnSound(struct mobj_s *mo);
extern void A_SpawnFly(struct mobj_s *mo);
extern void A_BrainExplode(struct mobj_s *mo);
extern void A_Detonate(struct mobj_s *mo); // killough 8/9/98
extern void A_Mushroom(struct mobj_s *actor); // killough 10/98
extern void A_Die(struct mobj_s *actor); // killough 11/98
extern void A_Spawn(struct mobj_s *mo); // killough 11/98
extern void A_Turn(struct mobj_s *mo); // killough 11/98
extern void A_Face(struct mobj_s *mo); // killough 11/98
extern void A_Scratch(struct mobj_s *mo); // killough 11/98
extern void A_PlaySound(struct mobj_s *mo); // killough 11/98
extern void A_RandomJump(struct mobj_s *mo); // killough 11/98
extern void A_LineEffect(struct mobj_s *mo); // killough 11/98
void A_Light0(struct player_s *player, struct pspdef_s *psp);
void A_WeaponReady(struct player_s *player, struct pspdef_s *psp);
void A_Lower(struct player_s *player, struct pspdef_s *psp);
void A_Raise(struct player_s *player, struct pspdef_s *psp);
void A_Punch(struct player_s *player, struct pspdef_s *psp);
void A_ReFire(struct player_s *player, struct pspdef_s *psp);
void A_FirePistol(struct player_s *player, struct pspdef_s *psp);
void A_Light1(struct player_s *player, struct pspdef_s *psp);
void A_FireShotgun(struct player_s *player, struct pspdef_s *psp);
void A_Light2(struct player_s *player, struct pspdef_s *psp);
void A_FireShotgun2(struct player_s *player, struct pspdef_s *psp);
void A_CheckReload(struct player_s *player, struct pspdef_s *psp);
void A_OpenShotgun2(struct player_s *player, struct pspdef_s *psp);
void A_LoadShotgun2(struct player_s *player, struct pspdef_s *psp);
void A_CloseShotgun2(struct player_s *player, struct pspdef_s *psp);
void A_FireCGun(struct player_s *player, struct pspdef_s *psp);
void A_GunFlash(struct player_s *player, struct pspdef_s *psp);
void A_FireMissile(struct player_s *player, struct pspdef_s *psp);
void A_Saw(struct player_s *player, struct pspdef_s *psp);
void A_FirePlasma(struct player_s *player, struct pspdef_s *psp);
void A_BFGsound(struct player_s *player, struct pspdef_s *psp);
void A_FireBFG(struct player_s *player, struct pspdef_s *psp);
void A_BFGSpray(struct mobj_s *mo);
void A_Explode(struct mobj_s *thingy);
void A_Pain(struct mobj_s *actor);
void A_PlayerScream(struct mobj_s *mo);
void A_Fall(struct mobj_s *actor);
void A_XScream(struct mobj_s *actor);
void A_Look(struct mobj_s *actor);
void A_Chase(struct mobj_s *actor);
void A_FaceTarget(struct mobj_s *actor);
void A_PosAttack(struct mobj_s *actor);
void A_Scream(struct mobj_s *actor);
void A_SPosAttack(struct mobj_s *actor);
void A_VileChase(struct mobj_s *actor);
void A_VileStart(struct mobj_s *actor);
void A_VileTarget(struct mobj_s *actor);
void A_VileAttack(struct mobj_s *actor);
void A_StartFire(struct mobj_s *actor);
void A_Fire(struct mobj_s *actor);
void A_FireCrackle(struct mobj_s *actor);
void A_Tracer(struct mobj_s *actor);
void A_SkelWhoosh(struct mobj_s *actor);
void A_SkelFist(struct mobj_s *actor);
void A_SkelMissile(struct mobj_s *actor);
void A_FatRaise(struct mobj_s *actor);
void A_FatAttack1(struct mobj_s *actor);
void A_FatAttack2(struct mobj_s *actor);
void A_FatAttack3(struct mobj_s *actor);
void A_BossDeath(struct mobj_s *mo);
void A_CPosAttack(struct mobj_s *actor);
void A_CPosRefire(struct mobj_s *actor);
void A_TroopAttack(struct mobj_s *actor);
void A_SargAttack(struct mobj_s *actor);
void A_HeadAttack(struct mobj_s *actor);
void A_BruisAttack(struct mobj_s *actor);
void A_SkullAttack(struct mobj_s *actor);
void A_Metal(struct mobj_s *mo);
void A_SpidRefire(struct mobj_s *actor);
void A_BabyMetal(struct mobj_s *mo);
void A_BspiAttack(struct mobj_s *actor);
void A_Hoof(struct mobj_s *mo);
void A_CyberAttack(struct mobj_s *actor);
void A_PainAttack(struct mobj_s *actor);
void A_PainDie(struct mobj_s *actor);
void A_KeenDie(struct mobj_s *mo);
void A_BrainPain(struct mobj_s *mo);
void A_BrainScream(struct mobj_s *mo);
void A_BrainDie(struct mobj_s *mo);
void A_BrainAwake(struct mobj_s *mo);
void A_BrainSpit(struct mobj_s *mo);
void A_SpawnSound(struct mobj_s *mo);
void A_SpawnFly(struct mobj_s *mo);
void A_BrainExplode(struct mobj_s *mo);
void A_Detonate(struct mobj_s *mo); // killough 8/9/98
void A_Mushroom(struct mobj_s *actor); // killough 10/98
void A_Die(struct mobj_s *actor); // killough 11/98
void A_Spawn(struct mobj_s *mo); // killough 11/98
void A_Turn(struct mobj_s *mo); // killough 11/98
void A_Face(struct mobj_s *mo); // killough 11/98
void A_Scratch(struct mobj_s *mo); // killough 11/98
void A_PlaySound(struct mobj_s *mo); // killough 11/98
void A_RandomJump(struct mobj_s *mo); // killough 11/98
void A_LineEffect(struct mobj_s *mo); // killough 11/98
// killough 7/19/98: classic BFG firing function
extern void A_FireOldBFG(struct player_s *player, struct pspdef_s *psp);
void A_FireOldBFG(struct player_s *player, struct pspdef_s *psp);
// killough 10/98: beta lost souls attacked different
extern void A_BetaSkullAttack(struct mobj_s *actor);
extern void A_Stop(struct mobj_s *actor);
void A_BetaSkullAttack(struct mobj_s *actor);
void A_Stop(struct mobj_s *actor);
// [XA] New mbf21 codepointers
extern void A_SpawnObject(struct mobj_s *actor);
extern void A_MonsterProjectile(struct mobj_s *actor);
extern void A_MonsterBulletAttack(struct mobj_s *actor);
extern void A_MonsterMeleeAttack(struct mobj_s *actor);
extern void A_RadiusDamage(struct mobj_s *actor);
extern void A_NoiseAlert(struct mobj_s *actor);
extern void A_HealChase(struct mobj_s *actor);
extern void A_SeekTracer(struct mobj_s *actor);
extern void A_FindTracer(struct mobj_s *actor);
extern void A_ClearTracer(struct mobj_s *actor);
extern void A_JumpIfHealthBelow(struct mobj_s *actor);
extern void A_JumpIfTargetInSight(struct mobj_s *actor);
extern void A_JumpIfTargetCloser(struct mobj_s *actor);
extern void A_JumpIfTracerInSight(struct mobj_s *actor);
extern void A_JumpIfTracerCloser(struct mobj_s *actor);
extern void A_JumpIfFlagsSet(struct mobj_s *actor);
extern void A_AddFlags(struct mobj_s *actor);
extern void A_RemoveFlags(struct mobj_s *actor);
extern void A_WeaponProjectile(struct player_s *player, struct pspdef_s *psp);
extern void A_WeaponBulletAttack(struct player_s *player, struct pspdef_s *psp);
extern void A_WeaponMeleeAttack(struct player_s *player, struct pspdef_s *psp);
extern void A_WeaponSound(struct player_s *player, struct pspdef_s *psp);
extern void A_WeaponAlert(struct player_s *player, struct pspdef_s *psp);
extern void A_WeaponJump(struct player_s *player, struct pspdef_s *psp);
extern void A_ConsumeAmmo(struct player_s *player, struct pspdef_s *psp);
extern void A_CheckAmmo(struct player_s *player, struct pspdef_s *psp);
extern void A_RefireTo(struct player_s *player, struct pspdef_s *psp);
extern void A_GunFlashTo(struct player_s *player, struct pspdef_s *psp);
void A_SpawnObject(struct mobj_s *actor);
void A_MonsterProjectile(struct mobj_s *actor);
void A_MonsterBulletAttack(struct mobj_s *actor);
void A_MonsterMeleeAttack(struct mobj_s *actor);
void A_RadiusDamage(struct mobj_s *actor);
void A_NoiseAlert(struct mobj_s *actor);
void A_HealChase(struct mobj_s *actor);
void A_SeekTracer(struct mobj_s *actor);
void A_FindTracer(struct mobj_s *actor);
void A_ClearTracer(struct mobj_s *actor);
void A_JumpIfHealthBelow(struct mobj_s *actor);
void A_JumpIfTargetInSight(struct mobj_s *actor);
void A_JumpIfTargetCloser(struct mobj_s *actor);
void A_JumpIfTracerInSight(struct mobj_s *actor);
void A_JumpIfTracerCloser(struct mobj_s *actor);
void A_JumpIfFlagsSet(struct mobj_s *actor);
void A_AddFlags(struct mobj_s *actor);
void A_RemoveFlags(struct mobj_s *actor);
void A_WeaponProjectile(struct player_s *player, struct pspdef_s *psp);
void A_WeaponBulletAttack(struct player_s *player, struct pspdef_s *psp);
void A_WeaponMeleeAttack(struct player_s *player, struct pspdef_s *psp);
void A_WeaponSound(struct player_s *player, struct pspdef_s *psp);
void A_WeaponAlert(struct player_s *player, struct pspdef_s *psp);
void A_WeaponJump(struct player_s *player, struct pspdef_s *psp);
void A_ConsumeAmmo(struct player_s *player, struct pspdef_s *psp);
void A_CheckAmmo(struct player_s *player, struct pspdef_s *psp);
void A_RefireTo(struct player_s *player, struct pspdef_s *psp);
void A_GunFlashTo(struct player_s *player, struct pspdef_s *psp);
#endif

View File

@ -329,10 +329,6 @@ static int P_IsUnderDamage(mobj_t *actor)
static fixed_t xspeed[8] = {FRACUNIT,47000,0,-47000,-FRACUNIT,-47000,0,47000};
static fixed_t yspeed[8] = {0,47000,FRACUNIT,47000,0,-47000,-FRACUNIT,-47000};
// 1/11/98 killough: Limit removed on special lines crossed
extern line_t **spechit; // New code -- killough
extern int numspechit;
static boolean P_Move(mobj_t *actor, boolean dropoff) // killough 9/12/98
{
fixed_t tryx, tryy, deltax, deltay;

View File

@ -31,6 +31,7 @@
#include "p_mobj.h"
#include "p_spec.h"
#include "p_tick.h"
#include "r_data.h"
#include "r_defs.h"
#include "r_state.h"
#include "s_sound.h"
@ -110,8 +111,6 @@ result_e T_MovePlane
// http://prboom.sourceforge.net/mbf-bugs.html
if ((flag == true) && demo_compatibility)
{
extern boolean P_ChangeSector(sector_t *sector,boolean crunch);
sector->floorheight = lastpos;
P_ChangeSector(sector,crush);
return crushed;
@ -905,8 +904,6 @@ int EV_BuildStairs
static boolean DonutOverrun(fixed_t *pfloorheight, short *pfloorpic)
{
extern int numflats;
if (demo_compatibility && overflow[emu_donut].enabled)
{
overflow[emu_donut].triggered = true;

View File

@ -38,6 +38,7 @@
#include "p_mobj.h"
#include "p_setup.h"
#include "p_spec.h"
#include "p_user.h"
#include "r_defs.h"
#include "r_main.h"
#include "r_state.h"
@ -1161,7 +1162,6 @@ static void P_HitSlideLine(line_t *ld)
}
else
{
extern boolean onground;
icyfloor = !compatibility &&
variable_friction &&
slidemo->player &&

View File

@ -61,6 +61,8 @@ void P_RadiusAttack(struct mobj_s *spot, struct mobj_s *source,
int damage, int distance);
boolean P_CheckPosition(struct mobj_s *thing, fixed_t x, fixed_t y);
boolean P_ChangeSector(struct sector_s *sector,boolean crunch);
//jff 3/19/98 P_CheckSector(): new routine to replace P_ChangeSector()
boolean P_CheckSector(struct sector_s *sector, boolean crunch);
void P_DelSeclist(struct msecnode_s *); // phares 3/16/98
@ -74,6 +76,9 @@ void P_ApplyTorque(struct mobj_s *mo); // killough 9
void P_MapStart(void);
void P_MapEnd(void);
boolean PIT_RadiusAttack(struct mobj_s *thing);
boolean PIT_ChangeSector(struct mobj_s* thing);
// If "floatok" true, move would be ok if within "tmfloorz - tmceilingz".
extern boolean floatok;
extern boolean felldown; // killough 11/98: indicates object pushed off ledge
@ -83,10 +88,17 @@ extern struct line_s *ceilingline;
extern struct line_s *floorline; // killough 8/23/98
extern struct mobj_s *linetarget; // who got hit (or NULL)
extern struct msecnode_s *sector_list; // phares 3/16/98
extern struct msecnode_s *headsecnode;
extern fixed_t tmbbox[4]; // phares 3/20/98
extern struct line_s *blockline; // killough 8/11/98
extern boolean hangsolid;
// 1/11/98 killough: Limit removed on special lines crossed
extern struct line_s **spechit;
extern int numspechit;
extern fixed_t attackrange;
#endif // __P_MAP__
//----------------------------------------------------------------------------

View File

@ -420,8 +420,6 @@ boolean P_BlockLinesIterator(int x, int y, boolean func(line_t*))
// killough 5/3/98: reformatted, cleaned up
boolean blockmapfix;
extern boolean PIT_RadiusAttack(mobj_t* thing);
extern boolean PIT_ChangeSector(mobj_t* thing);
boolean P_BlockThingsIterator(int x, int y, boolean func(mobj_t*))
{
@ -704,8 +702,6 @@ boolean P_TraverseIntercepts(traverser_t func, fixed_t maxfrac)
return true; // everything was traversed
}
extern fixed_t bulletslope;
// Intercepts Overrun emulation, from PrBoom-plus.
// Thanks to Andrey Budko (entryway) for researching this and his
// implementation of Intercepts Overrun emulation in PrBoom-plus

View File

@ -23,6 +23,7 @@
#include "d_player.h"
#include "doomdef.h"
#include "doomstat.h"
#include "dsdhacked.h"
#include "g_game.h"
#include "hu_stuff.h"
#include "i_printf.h"
@ -66,7 +67,7 @@ boolean P_SetMobjState(mobj_t* mobj,statenum_t state)
// killough 4/9/98: remember states seen, to detect cycles:
extern statenum_t *seenstate_tab; // fast transition table
// fast transition table
statenum_t *seenstate = seenstate_tab; // pointer to table
static int recursion; // detects recursion
statenum_t i = state; // initial state
@ -1359,8 +1360,6 @@ spawnit:
// P_SpawnPuff
//
extern fixed_t attackrange;
void P_SpawnPuff(fixed_t x,fixed_t y,fixed_t z)
{
mobj_t* th;
@ -1498,8 +1497,6 @@ mobj_t* P_SpawnPlayerMissile(mobj_t* source,mobjtype_t type)
mobj_t *th;
fixed_t x, y, z, slope = 0;
extern void A_Recoil(player_t* player);
// see which target is to be aimed at
angle_t an = source->angle;

View File

@ -433,7 +433,9 @@ boolean P_SetMobjState(mobj_t *mobj, statenum_t state);
void P_MobjThinker(mobj_t *mobj);
void P_SpawnPuff(fixed_t x, fixed_t y, fixed_t z);
void P_SpawnBlood(fixed_t x, fixed_t y, fixed_t z, int damage, mobj_t *bleeder);
void P_SpawnPlayer (mapthing_t* mthing);
mobj_t *P_SpawnMissile(mobj_t *source, mobj_t *dest, mobjtype_t type);
extern int autoaim;
mobj_t *P_SpawnPlayerMissile(mobj_t *source, mobjtype_t type);
void P_SpawnMapThing (mapthing_t* mthing);
boolean P_CheckMissileSpawn(mobj_t*); // killough 8/2/98

View File

@ -32,6 +32,7 @@
#include "p_mobj.h"
#include "p_pspr.h"
#include "p_tick.h"
#include "p_user.h"
#include "r_main.h"
#include "s_sound.h"
#include "sounds.h"
@ -44,8 +45,6 @@
#define BFGCELLS bfgcells /* Ty 03/09/98 externalized in p_inter.c */
extern void P_Thrust(player_t *, angle_t, fixed_t);
// The following array holds the recoil values // phares
static struct
{
@ -796,7 +795,6 @@ void A_FireOldBFG(player_t *player, pspdef_t *psp)
angle_t an = mo->angle;
angle_t an1 = ((P_Random(pr_bfg)&127) - 64) * (ANG90/768) + an;
angle_t an2 = ((P_Random(pr_bfg)&127) - 64) * (ANG90/640) + ANG90;
extern int autoaim;
if (autoaim || !beta_emulation)
{

View File

@ -66,6 +66,9 @@ extern int weapon_preferences[2][NUMWEAPONS+1]; // killough 5/2/98
int P_WeaponPreferred(int w1, int w2);
extern boolean weapon_recoilpitch;
extern boolean boom_weapon_state_injection;
extern fixed_t bulletslope;
extern int lastshottic;
int P_SwitchWeapon(struct player_s *player);
boolean P_CheckAmmo(struct player_s *player);
@ -75,6 +78,7 @@ void P_DropWeapon(struct player_s *player);
// mbf21
void P_SubtractAmmo(struct player_s *player, int compat_amt);
void P_SetPspritePtr(struct player_s *player, pspdef_t *psp, statenum_t stnum);
void A_Recoil(struct player_s* player);
#endif

View File

@ -36,6 +36,7 @@
#include "p_saveg.h"
#include "p_spec.h"
#include "p_tick.h"
#include "r_data.h"
#include "r_defs.h"
#include "r_state.h"
#include "w_wad.h" // [FG] W_LumpLength()
@ -2085,7 +2086,6 @@ void P_UnArchiveWorld (void)
{
// [crispy] add overflow guard for the flattranslation[] array
short floorpic, ceilingpic;
extern int numflats;
// killough 10/98: load full floor & ceiling heights, including fractions

View File

@ -964,6 +964,8 @@ void P_ShootSpecialLine(struct mobj_s *thing, struct line_s *line);
void P_CrossSpecialLine(struct line_s *, int side, struct mobj_s *thing,
boolean bossaction); // killough 11/98
extern int disable_nuke; // killough 12/98: nukage disabling cheat
void P_PlayerInSpecialSector(struct player_s *player);
// p_lights

View File

@ -48,6 +48,8 @@ typedef enum {
extern thinker_t thinkerclasscap[];
extern int init_thinkers_count;
#endif
//----------------------------------------------------------------------------

View File

@ -30,6 +30,7 @@
#include "g_game.h"
#include "hu_stuff.h"
#include "info.h"
#include "m_cheat.h"
#include "m_input.h"
#include "p_map.h"
#include "p_mobj.h"
@ -570,7 +571,6 @@ void P_PlayerThink (player_t* player)
if (player->cheats & CF_MAPCOORDS)
{
extern void cheat_mypos_print();
cheat_mypos_print();
}

View File

@ -42,6 +42,8 @@ typedef enum
extern death_use_action_t death_use_action;
extern boolean onground; // whether player is on ground or in air
#endif // __P_USER__
//----------------------------------------------------------------------------

View File

@ -43,6 +43,9 @@ extern drawseg_t *ds_p;
extern byte *solidcol;
// killough 4/7/98: indicates doors closed wrt automap bugfix:
extern int doorclosed;
void R_ClearClipSegs(void);
void R_ClearDrawSegs(void);
void R_RenderBSPNode(int bspnum);

View File

@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include "d_main.h"
#include "d_think.h"
#include "doomdef.h"
#include "doomstat.h"
@ -936,7 +937,6 @@ void R_InitTranMap(int progress)
else
{ // Compose a default transparent filter map based on PLAYPAL.
unsigned char *playpal = W_CacheLumpName("PLAYPAL", PU_STATIC);
extern const char *D_DoomPrefDir(void);
char *fname = M_StringJoin(D_DoomPrefDir(), DIR_SEPARATOR_S, "tranmap.dat", NULL);
struct {
unsigned char pct;

View File

@ -51,6 +51,8 @@ void R_InvulMode(void);
boolean R_IsPatchLump (const int lump);
extern int numflats;
extern byte *main_tranmap, *tranmap;
extern int tran_filter_pct;

View File

@ -32,6 +32,7 @@
#include "doomstat.h"
#include "i_video.h"
#include "p_mobj.h"
#include "p_pspr.h"
#include "p_setup.h" // P_SegLengths
#include "r_bsp.h"
#include "r_data.h"
@ -40,6 +41,7 @@
#include "r_main.h"
#include "r_bmaps.h"
#include "r_plane.h"
#include "r_segs.h"
#include "r_sky.h"
#include "r_state.h"
#include "r_swirl.h"
@ -72,7 +74,6 @@ double deltatics;
boolean raw_input;
fixed_t viewcos, viewsin;
player_t *viewplayer;
extern lighttable_t **walllights;
fixed_t viewheightfrac; // [FG] sprite clipping optimizations
static fixed_t focallength, lightfocallength;
@ -861,7 +862,6 @@ void R_RenderPlayerView (player_t* player)
if (autodetect_hom)
{ // killough 2/10/98: add flashing red HOM indicators
pixel_t c[47*47];
extern int lastshottic;
int i , color = !flashing_hom || (gametic % 20) < 9 ? 0xb0 : 0;
V_FillRect(scaledviewx, scaledviewy, scaledviewwidth, scaledviewheight, color);
for (i=0;i<47*47;i++)

View File

@ -156,6 +156,8 @@ inline static angle_t LerpAngle(angle_t oangle, angle_t nangle)
extern double deltatics;
extern boolean raw_input;
extern int autodetect_hom;
#endif
//----------------------------------------------------------------------------

View File

@ -661,7 +661,6 @@ void R_StoreWallRange(const int start, const int stop)
// killough 4/7/98: make doorclosed external variable
{
extern int doorclosed; // killough 1/17/98, 2/8/98, 4/7/98
if (doorclosed || backsector->interpceilingheight<=frontsector->interpfloorheight)
{
ds_p->sprbottomclip = negonearray;

View File

@ -20,11 +20,15 @@
#ifndef __R_SEGS__
#define __R_SEGS__
#include "doomtype.h"
struct drawseg_s;
void R_RenderMaskedSegRange(struct drawseg_s *ds, int x1, int x2);
void R_StoreWallRange(int start, int stop);
extern lighttable_t **walllights;
#endif
//----------------------------------------------------------------------------

View File

@ -29,8 +29,6 @@
boolean sts_colored_numbers; //jff 2/18/98 control to disable status color changes
boolean sts_pct_always_gray; // killough 2/21/98: always gray %'s? bug or feature?
extern boolean st_crispyhud;
patch_t* sttminus;
//

View File

@ -205,7 +205,7 @@ static boolean st_statusbaron;
// [crispy] distinguish classic status bar with background and player face
// from Crispy HUD
boolean st_crispyhud;
static boolean st_crispyhud;
static boolean st_classicstatusbar;
// !deathmatch
@ -317,8 +317,6 @@ int st_keyorskull[3];
// a random number per tick
static int st_randomnumber;
extern char *mapnames[];
//
// STATUS BAR CODE
//

View File

@ -55,6 +55,8 @@ void ST_Start(void);
void ST_Init(void);
void ST_Warnings(void);
void ST_ResetPalette(void);
// [crispy] forcefully initialize the status bar backing screen
void ST_refreshBackground(void);
@ -86,6 +88,8 @@ extern boolean hud_armor_type; // color of armor depends on type
extern boolean palette_changes;
extern boolean st_invul;
void ST_BindSTSVariables(void);
#endif

View File

@ -21,12 +21,14 @@
#include <string.h>
#include "d_event.h"
#include "d_deh.h"
#include "d_player.h"
#include "doomdef.h"
#include "doomstat.h"
#include "doomtype.h"
#include "g_game.h"
#include "hu_lib.h"
#include "hu_stuff.h"
#include "i_printf.h"
#include "m_misc.h"
#include "m_random.h"
@ -42,10 +44,6 @@
#include "wi_stuff.h"
#include "z_zone.h"
// Ty 03/17/98: flag that new par times have been loaded in d_deh
extern boolean deh_pars;
extern boolean um_pars;
//
// Data needed to add patches to full screen intermission pics.
// Patches are statistics messages, and animations.
@ -2130,7 +2128,6 @@ void WI_loadData(void)
//
void WI_Drawer (void)
{
extern void WI_DrawTimeWidget(void);
switch (state)
{
case StatCount:

View File

@ -31,6 +31,8 @@ typedef enum
ShowNextLoc
} stateenum_t;
extern int acceleratestage;
// Called by main loop, animate the intermission.
void WI_Ticker (void);

View File

@ -26,9 +26,6 @@
#include "txt_utf8.h"
#include "txt_window.h"
extern txt_widget_class_t txt_inputbox_class;
extern txt_widget_class_t txt_int_inputbox_class;
static void SetBufferFromValue(txt_inputbox_t *inputbox)
{
if (inputbox->widget.widget_class == &txt_inputbox_class)

View File

@ -71,6 +71,9 @@ txt_inputbox_t *TXT_NewInputBox(char **value, int size);
txt_inputbox_t *TXT_NewIntInputBox(int *value, int size);
extern txt_widget_class_t txt_inputbox_class;
extern txt_widget_class_t txt_int_inputbox_class;
#endif /* #ifndef TXT_INPUTBOX_H */

View File

@ -39,5 +39,7 @@ void TXT_SDL_SetEventCallback(TxtSDLEventCallbackFunc callback, void *user_data)
void TXT_PreInit(SDL_Window *preset_window, SDL_Renderer *preset_renderer);
extern SDL_Window *TXT_SDLWindow;
#endif /* #ifndef TXT_SDL_H */