video: Remove show_diskicon from video code.

Since this is game-specific there is no real reason for this to be
defined in the common video code. This also fixes the show_diskicon
variable which was broken by recent changes.
This commit is contained in:
Simon Howard 2016-05-31 20:03:55 +01:00
parent 90a455e539
commit 2730a06cf1
4 changed files with 28 additions and 18 deletions

View file

@ -125,6 +125,7 @@ char wadfile[1024]; // primary wad file
char mapdir[1024]; // directory of development maps
int show_endoom = 1;
int show_diskicon = 1;
void D_ConnectNetGame(void);
@ -328,6 +329,27 @@ void D_Display (void)
} while (!done);
}
static void EnableLoadingDisk(void)
{
char *disk_lump_name;
if (show_diskicon)
{
if (M_CheckParm("-cdrom") > 0)
{
disk_lump_name = DEH_String("STCDROM");
}
else
{
disk_lump_name = DEH_String("STDISK");
}
V_EnableLoadingDisk(disk_lump_name,
SCREENWIDTH - LOADING_DISK_W,
SCREENHEIGHT - LOADING_DISK_H);
}
}
//
// Add configuration file variable bindings.
//
@ -408,8 +430,6 @@ boolean D_GrabMouseCallback(void)
//
void D_DoomLoop (void)
{
char *disk_lump_name;
if (gamevariant == bfgedition &&
(demorecording || (gameaction == ga_playdemo) || netgame))
{
@ -430,14 +450,7 @@ void D_DoomLoop (void)
I_GraphicsCheckCommandLine();
I_SetGrabMouseCallback(D_GrabMouseCallback);
I_InitGraphics();
if (M_CheckParm("-cdrom") > 0)
disk_lump_name = DEH_String("STCDROM");
else
disk_lump_name = DEH_String("STDISK");
V_EnableLoadingDisk(disk_lump_name,
SCREENWIDTH - LOADING_DISK_W,
SCREENHEIGHT - LOADING_DISK_H);
EnableLoadingDisk();
V_RestoreBuffer();
R_ExecuteSetViewSize();

View file

@ -171,10 +171,6 @@ int novert = 0;
int png_screenshots = 0;
// Display disk activity indicator.
int show_diskicon = 1;
// if true, I_VideoBuffer is screen->pixels
static boolean native_surface;

View file

@ -152,7 +152,4 @@ extern int screen_bpp;
extern int fullscreen;
extern int aspect_ratio_correct;
extern int show_diskicon;
extern int diskicon_readbytes;
#endif

View file

@ -142,6 +142,7 @@ char wadfile[1024]; // primary wad file
char mapdir[1024]; // directory of development maps
int show_endoom = 1;
int show_diskicon = 1;
int graphical_startup = 1;
// If true, startup has completed and the main game loop has started.
@ -511,7 +512,10 @@ void D_DoomLoop (void)
I_InitGraphics();
}
V_EnableLoadingDisk("STDISK", SCREENWIDTH - LOADING_DISK_W, 3);
if (show_diskicon)
{
V_EnableLoadingDisk("STDISK", SCREENWIDTH - LOADING_DISK_W, 3);
}
I_SetGrabMouseCallback(D_GrabMouseCallback);
V_RestoreBuffer();