mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-24 10:50:58 +01:00
engine: client: only load paused icon when requested
This commit is contained in:
parent
b316af13d6
commit
689e29bc42
@ -952,7 +952,11 @@ void CL_DrawHUD( int state )
|
||||
CL_DrawCenterPrint ();
|
||||
clgame.dllFuncs.pfnRedraw( cl.time, cl.intermission );
|
||||
if( showpause.value )
|
||||
CL_DrawLoadingOrPaused( cls.pauseIcon );
|
||||
{
|
||||
if( !cls.pauseIcon )
|
||||
cls.pauseIcon = SCR_LoadPauseIcon();
|
||||
CL_DrawLoadingOrPaused( Q_max( 0, cls.pauseIcon ));
|
||||
}
|
||||
break;
|
||||
case CL_LOADING:
|
||||
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
|
||||
@ -803,12 +815,6 @@ INTERNAL RESOURCE
|
||||
void SCR_RegisterTextures( void )
|
||||
{
|
||||
// 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( cl_allow_levelshots.value )
|
||||
|
@ -953,6 +953,7 @@ void SCR_VidInit( void );
|
||||
void SCR_TileClear( void );
|
||||
void SCR_DirtyScreen( void );
|
||||
void SCR_EndLoadingPlaque( void );
|
||||
int SCR_LoadPauseIcon( void );
|
||||
void SCR_RegisterTextures( void );
|
||||
void SCR_LoadCreditsFont( void );
|
||||
void SCR_MakeScreenShot( void );
|
||||
|
Loading…
Reference in New Issue
Block a user