SW: Remove very bad externs.

Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@7505 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-04-08 06:26:08 +00:00 committed by Christoph Oelckers
parent 38e55f1a8b
commit 8ab6e700f1
12 changed files with 13 additions and 24 deletions

View file

@ -417,7 +417,6 @@ void DrawPanelBorderSides(PLAYERp pp, short x, short y, short x2, short y2, shor
static static
void BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize) void BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize)
{ {
void setview(int scrx1, int scry1, int scrx2, int scry2);
int x, x2, y, y2; int x, x2, y, y2;
BORDER_INFO *b; BORDER_INFO *b;

View file

@ -955,7 +955,6 @@ int AutoBreakSprite(short BreakSprite, short type)
SPRITEp bp = &sprite[BreakSprite]; SPRITEp bp = &sprite[BreakSprite];
BREAK_INFOp break_info; BREAK_INFOp break_info;
extern void DoWallBreakMatch(short match); extern void DoWallBreakMatch(short match);
int SpawnBreakFlames(int16_t SpriteNum);
break_info = FindSpriteBreakInfo(bp->picnum); break_info = FindSpriteBreakInfo(bp->picnum);

View file

@ -1,6 +1,13 @@
#ifndef colormap_public_
#define colormap_public_
extern unsigned char DefaultPalette[];
void MapColors(short num,COLOR_MAP cm,short create); void MapColors(short num,COLOR_MAP cm,short create);
void InitPalette(void); void InitPalette(void);
void SetPaletteToVESA(unsigned char *pal); void SetPaletteToVESA(unsigned char *pal);
void set_pal(unsigned char *pal); void set_pal(unsigned char *pal);
void GetPaletteFromVESA(unsigned char *pal); void GetPaletteFromVESA(unsigned char *pal);
void InitPalette(void); void InitPalette(void);
#endif

View file

@ -57,7 +57,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
static int OverlapDraw = FALSE; static int OverlapDraw = FALSE;
extern SWBOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet; extern SWBOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet;
extern SWBOOL Voxel; extern SWBOOL Voxel;
extern char tempbuf[];
extern char buffer[]; extern char buffer[];
SWBOOL DrawScreen; SWBOOL DrawScreen;
extern short f_c; extern short f_c;
@ -1388,8 +1387,8 @@ void PrintLocationInfo(PLAYERp pp)
i = totalclock; i = totalclock;
if (i != frameval[framecnt]) if (i != frameval[framecnt])
{ {
sprintf(tempbuf, "FPS: %d", ((120 * AVERAGEFRAMES) / (i - frameval[framecnt])) + f_c); sprintf(buffer, "FPS: %d", ((120 * AVERAGEFRAMES) / (i - frameval[framecnt])) + f_c);
printext256(x, y, 1, -1, tempbuf, 1); printext256(x, y, 1, -1, buffer, 1);
frameval[framecnt] = i; frameval[framecnt] = i;
} }
@ -1541,9 +1540,6 @@ void SpriteSortList2D(int tx, int ty)
int COVERsetgamemode(int mode, int xdim, int ydim, int bpp) int COVERsetgamemode(int mode, int xdim, int ydim, int bpp)
{ {
extern int ScreenHeight, ScreenWidth, ScreenMode, ScreenBPP;
ScreenHeight = ydim; ScreenHeight = ydim;
ScreenWidth = xdim; ScreenWidth = xdim;
ScreenMode = mode; ScreenMode = mode;

View file

@ -563,7 +563,6 @@ static char sectorfloorpals[MAXSECTORS], sectorceilingpals[MAXSECTORS], wallpals
void void
DoPlayerNightVisionPalette(PLAYERp pp) DoPlayerNightVisionPalette(PLAYERp pp)
{ {
extern char DefaultPalette[];
short i; short i;
if (pp->InventoryActive[INVENTORY_NIGHT_VISION] && (pp - Player == screenpeek)) if (pp->InventoryActive[INVENTORY_NIGHT_VISION] && (pp - Player == screenpeek))
@ -611,8 +610,6 @@ DoPlayerNightVisionPalette(PLAYERp pp)
void void
DoPlayerNightVisionPalette(PLAYERp pp) DoPlayerNightVisionPalette(PLAYERp pp)
{ {
extern char DefaultPalette[];
if (pp != Player + screenpeek) return; if (pp != Player + screenpeek) return;
if (pp->InventoryActive[INVENTORY_NIGHT_VISION]) if (pp->InventoryActive[INVENTORY_NIGHT_VISION])

View file

@ -122,7 +122,6 @@ short buttonsettings[btn_max];
// EXTERNS //////////////////////////// // EXTERNS ////////////////////////////
#define XDIM 320 #define XDIM 320
#define YDIM 200 #define YDIM 200
extern char DefaultPalette[];
extern SWBOOL QuitFlag; extern SWBOOL QuitFlag;
void TerminateGame(void); void TerminateGame(void);

View file

@ -80,7 +80,6 @@ void ResetMenuInput(void);
) )
extern SWBOOL BorderAdjust; extern SWBOOL BorderAdjust;
extern int FXDevice,MusicDevice;
extern SWBOOL MultiPlayQuitFlag; extern SWBOOL MultiPlayQuitFlag;
// Make memcpy an intrinsic function for an easy frame rate boost // Make memcpy an intrinsic function for an easy frame rate boost

View file

@ -62,7 +62,7 @@ SYNC BUG NOTES:
//#undef MAXSYNCBYTES //#undef MAXSYNCBYTES
//#define MAXSYNCBYTES 16 //#define MAXSYNCBYTES 16
uint8_t tempbuf[576], packbuf[576]; static uint8_t tempbuf[576], packbuf[576];
int PlayClock; int PlayClock;
extern SWBOOL PauseKeySet; extern SWBOOL PauseKeySet;
extern char CommPlayerName[32]; extern char CommPlayerName[32];

View file

@ -138,7 +138,6 @@ char PlayerGravity = PLAYER_JUMP_GRAV;
#endif #endif
int vel, svel, angvel; int vel, svel, angvel;
extern char tempbuf[];
extern SWBOOL DebugOperate; extern SWBOOL DebugOperate;
//unsigned char synctics, lastsynctics; //unsigned char synctics, lastsynctics;
@ -5058,8 +5057,6 @@ DoPlayerWarpToSurface(PLAYERp pp)
void void
DoPlayerDivePalette(PLAYERp pp) DoPlayerDivePalette(PLAYERp pp)
{ {
extern char DefaultPalette[];
if (pp != Player + screenpeek) return; if (pp != Player + screenpeek) return;
if ((pp->DeathType == PLAYER_DEATH_DROWN || TEST((Player+screenpeek)->Flags, PF_DIVING)) && !TEST(pp->Flags, PF_DIVING_IN_LAVA)) if ((pp->DeathType == PLAYER_DEATH_DROWN || TEST((Player+screenpeek)->Flags, PF_DIVING)) && !TEST(pp->Flags, PF_DIVING_IN_LAVA))
@ -5220,7 +5217,6 @@ DoPlayerStopDive(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
SPRITEp sp = &sprite[pp->PlayerSprite]; SPRITEp sp = &sprite[pp->PlayerSprite];
extern char DefaultPalette[];
if (Prediction) if (Prediction)
return; return;
@ -6399,8 +6395,6 @@ char *KilledPlayerMessage(PLAYERp pp, PLAYERp killer)
char *p1 = pp->PlayerName; char *p1 = pp->PlayerName;
char *p2 = killer->PlayerName; char *p2 = killer->PlayerName;
extern char *DeathString(short SpriteNum);
if (pp->HitBy == killer->PlayerSprite) if (pp->HitBy == killer->PlayerSprite)
{ {
sprintf(ds,"%s was killed by %s.",p1,p2); sprintf(ds,"%s was killed by %s.",p1,p2);

View file

@ -3155,7 +3155,6 @@ void initlava(void)
#if 0 #if 0
int x, y, z, r; int x, y, z, r;
int i; int i;
extern char tempbuf[];
//char lavabakpic[(LAVASIZ + 2) * (LAVASIZ + 2)], lavainc[LAVASIZ]; //char lavabakpic[(LAVASIZ + 2) * (LAVASIZ + 2)], lavainc[LAVASIZ];
//int lavanumdrops, lavanumframes; //int lavanumdrops, lavanumframes;

View file

@ -10948,12 +10948,10 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy)
int int
SpawnBreakFlames(int16_t SpriteNum, int16_t enemy) SpawnBreakFlames(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp ep = &sprite[enemy];
USERp eu = User[enemy];
SPRITEp np; SPRITEp np;
USERp nu; USERp nu;
short New; short New;

View file

@ -82,6 +82,8 @@ int DoShrapVelocity(int16_t SpriteNum);
int ShrapKillSprite(short SpriteNum); int ShrapKillSprite(short SpriteNum);
SWBOOL MissileSetPos(short Weapon,ANIMATORp DoWeapon,int dist); SWBOOL MissileSetPos(short Weapon,ANIMATORp DoWeapon,int dist);
int ActorPain(short SpriteNum); int ActorPain(short SpriteNum);
int SpawnBreakFlames(int16_t SpriteNum);
const char *DeathString(short SpriteNum);
// //
// Damage Amounts defined in damage.h // Damage Amounts defined in damage.h