mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
gl_draw.c: search for a mod-provided conback image in Draw_Init time
and cache the result, instead of doing it everytime. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@77 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
eb9e15a9b3
commit
f8f8da4933
1 changed files with 5 additions and 1 deletions
|
@ -319,11 +319,12 @@ Draw_ConbackPic -- QuakeSpasm custom conback drawing.
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
extern char *get_conback(void);
|
extern char *get_conback(void);
|
||||||
|
static qboolean have_mod_conback;
|
||||||
qpic_t *Draw_ConbackPic (void)
|
qpic_t *Draw_ConbackPic (void)
|
||||||
{
|
{
|
||||||
if (fitzmode) {
|
if (fitzmode) {
|
||||||
return Draw_CachePic ("gfx/conback.lmp");
|
return Draw_CachePic ("gfx/conback.lmp");
|
||||||
} else if (COM_LoadTempFile("gfx/conback.lmp")) {
|
} else if (have_mod_conback) {
|
||||||
/* even if we are running in custom mode
|
/* even if we are running in custom mode
|
||||||
allow for mod-provided conback images */
|
allow for mod-provided conback images */
|
||||||
return Draw_CachePic ("gfx/conback.lmp");
|
return Draw_CachePic ("gfx/conback.lmp");
|
||||||
|
@ -460,6 +461,9 @@ void Draw_Init (void)
|
||||||
|
|
||||||
// load game pics
|
// load game pics
|
||||||
Draw_LoadPics ();
|
Draw_LoadPics ();
|
||||||
|
|
||||||
|
/* QuakeSpasm customization: */
|
||||||
|
have_mod_conback = (COM_LoadTempFile("gfx/conback.lmp") != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
Loading…
Reference in a new issue