engine: client: only load paused icon when requested
This commit is contained in:
parent
b316af13d6
commit
689e29bc42
3 changed files with 18 additions and 7 deletions
|
@ -952,7 +952,11 @@ void CL_DrawHUD( int state )
|
||||||
CL_DrawCenterPrint ();
|
CL_DrawCenterPrint ();
|
||||||
clgame.dllFuncs.pfnRedraw( cl.time, cl.intermission );
|
clgame.dllFuncs.pfnRedraw( cl.time, cl.intermission );
|
||||||
if( showpause.value )
|
if( showpause.value )
|
||||||
CL_DrawLoadingOrPaused( cls.pauseIcon );
|
{
|
||||||
|
if( !cls.pauseIcon )
|
||||||
|
cls.pauseIcon = SCR_LoadPauseIcon();
|
||||||
|
CL_DrawLoadingOrPaused( Q_max( 0, cls.pauseIcon ));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CL_LOADING:
|
case CL_LOADING:
|
||||||
CL_DrawLoadingOrPaused( cls.loadingBar );
|
CL_DrawLoadingOrPaused( cls.loadingBar );
|
||||||
|
|
|
@ -793,6 +793,18 @@ static void SCR_InstallParticlePalette( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SCR_LoadPauseIcon( void )
|
||||||
|
{
|
||||||
|
int texnum = 0;
|
||||||
|
|
||||||
|
if( FS_FileExists( "gfx/paused.lmp", false ))
|
||||||
|
texnum = ref.dllFuncs.GL_LoadTexture( "gfx/paused.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
||||||
|
else if( FS_FileExists( "gfx/pause.lmp", false ))
|
||||||
|
texnum = ref.dllFuncs.GL_LoadTexture( "gfx/pause.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
||||||
|
|
||||||
|
return texnum ? texnum : -1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
SCR_RegisterTextures
|
SCR_RegisterTextures
|
||||||
|
@ -803,12 +815,6 @@ INTERNAL RESOURCE
|
||||||
void SCR_RegisterTextures( void )
|
void SCR_RegisterTextures( void )
|
||||||
{
|
{
|
||||||
// register gfx.wad images
|
// register gfx.wad images
|
||||||
|
|
||||||
if( FS_FileExists( "gfx/paused.lmp", false ))
|
|
||||||
cls.pauseIcon = ref.dllFuncs.GL_LoadTexture( "gfx/paused.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
|
||||||
else if( FS_FileExists( "gfx/pause.lmp", false ))
|
|
||||||
cls.pauseIcon = ref.dllFuncs.GL_LoadTexture( "gfx/pause.lmp", NULL, 0, TF_IMAGE|TF_ALLOW_NEAREST );
|
|
||||||
|
|
||||||
if( FS_FileExists( "gfx/lambda.lmp", false ))
|
if( FS_FileExists( "gfx/lambda.lmp", false ))
|
||||||
{
|
{
|
||||||
if( cl_allow_levelshots.value )
|
if( cl_allow_levelshots.value )
|
||||||
|
|
|
@ -953,6 +953,7 @@ void SCR_VidInit( void );
|
||||||
void SCR_TileClear( void );
|
void SCR_TileClear( void );
|
||||||
void SCR_DirtyScreen( void );
|
void SCR_DirtyScreen( void );
|
||||||
void SCR_EndLoadingPlaque( void );
|
void SCR_EndLoadingPlaque( void );
|
||||||
|
int SCR_LoadPauseIcon( void );
|
||||||
void SCR_RegisterTextures( void );
|
void SCR_RegisterTextures( void );
|
||||||
void SCR_LoadCreditsFont( void );
|
void SCR_LoadCreditsFont( void );
|
||||||
void SCR_MakeScreenShot( void );
|
void SCR_MakeScreenShot( void );
|
||||||
|
|
Loading…
Add table
Reference in a new issue