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:
Ozkan Sezer 2010-02-20 09:30:14 +00:00
parent eb9e15a9b3
commit f8f8da4933
1 changed files with 5 additions and 1 deletions

View File

@ -319,11 +319,12 @@ Draw_ConbackPic -- QuakeSpasm custom conback drawing.
================
*/
extern char *get_conback(void);
static qboolean have_mod_conback;
qpic_t *Draw_ConbackPic (void)
{
if (fitzmode) {
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
allow for mod-provided conback images */
return Draw_CachePic ("gfx/conback.lmp");
@ -460,6 +461,9 @@ void Draw_Init (void)
// load game pics
Draw_LoadPics ();
/* QuakeSpasm customization: */
have_mod_conback = (COM_LoadTempFile("gfx/conback.lmp") != NULL);
}
//==============================================================================