draw.h: Added prototype for the new Draw_ClearMenuPicCache().

gl_draw.c (Draw_ClearMenuPicCache): VID_Restart procedures does not seem to
clear the menu picture cache. Added this new tiny helper to do that job.
gl_vidsdl.c (VID_Restart): do call Draw_ClearMenuPicCache().

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@23 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-02-16 12:16:07 +00:00
parent 95f413d1ea
commit 7411fe1a24
3 changed files with 11 additions and 0 deletions

View file

@ -39,5 +39,7 @@ qpic_t *Draw_PicFromWad (char *name);
qpic_t *Draw_CachePic (char *path);
void Draw_NewGame (void);
void Draw_ClearMenuPicCache (void);
void GL_SetCanvas (canvastype newcanvas); //johnfitz

View file

@ -138,6 +138,13 @@ byte scrap_texels[MAX_SCRAPS][BLOCK_WIDTH*BLOCK_HEIGHT]; //johnfitz -- removed
qboolean scrap_dirty;
gltexture_t *scrap_textures[MAX_SCRAPS]; //johnfitz
void Draw_ClearMenuPicCache (void)
{
memset(menu_cachepics, 0, menu_numcachepics * sizeof(cachepic_t));
menu_numcachepics = 0;
}
/*
================
Scrap_AllocBlock

View file

@ -428,6 +428,8 @@ void VID_Restart (void)
vid_canalttab = true;
// Clear menu pic cache
Draw_ClearMenuPicCache ();
//warpimages needs to be recalculated
TexMgr_RecalcWarpImageSize ();