made loading of embedded custom conback friendly with dynamic gamedirs:

gl_draw.c (Draw_CheckConback): new proc.
 (Draw_Init): moved mod-provided gfx/conback.lmp check form here to
Draw_CheckConback().
draw.h (Draw_CheckConback): added prototype.
gl_texmgr.c (TexMgr_NewGame): call Draw_CheckConback().


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@78 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-02-20 09:55:32 +00:00
parent f8f8da4933
commit 3399f519f6
3 changed files with 9 additions and 1 deletions

View file

@ -41,3 +41,5 @@ void Draw_NewGame (void);
void GL_SetCanvas (canvastype newcanvas); //johnfitz
void Draw_CheckConback (void); // QuakeSpasm customization

View file

@ -320,6 +320,10 @@ Draw_ConbackPic -- QuakeSpasm custom conback drawing.
*/
extern char *get_conback(void);
static qboolean have_mod_conback;
void Draw_CheckConback (void)
{
have_mod_conback = (COM_LoadTempFile("gfx/conback.lmp") != NULL);
}
qpic_t *Draw_ConbackPic (void)
{
if (fitzmode) {
@ -463,7 +467,7 @@ void Draw_Init (void)
Draw_LoadPics ();
/* QuakeSpasm customization: */
have_mod_conback = (COM_LoadTempFile("gfx/conback.lmp") != NULL);
Draw_CheckConback ();
}
//==============================================================================

View file

@ -488,6 +488,8 @@ void TexMgr_NewGame (void)
{
TexMgr_FreeTextures (0, TEXPREF_PERSIST); //deletes all textures where TEXPREF_PERSIST is unset
TexMgr_LoadPalette ();
/* QuakeSpasm customization: */
Draw_CheckConback ();
}
/*