mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-13 00:34:11 +00:00
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:
parent
95f413d1ea
commit
7411fe1a24
3 changed files with 11 additions and 0 deletions
|
@ -39,5 +39,7 @@ qpic_t *Draw_PicFromWad (char *name);
|
||||||
qpic_t *Draw_CachePic (char *path);
|
qpic_t *Draw_CachePic (char *path);
|
||||||
void Draw_NewGame (void);
|
void Draw_NewGame (void);
|
||||||
|
|
||||||
|
void Draw_ClearMenuPicCache (void);
|
||||||
|
|
||||||
void GL_SetCanvas (canvastype newcanvas); //johnfitz
|
void GL_SetCanvas (canvastype newcanvas); //johnfitz
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,13 @@ byte scrap_texels[MAX_SCRAPS][BLOCK_WIDTH*BLOCK_HEIGHT]; //johnfitz -- removed
|
||||||
qboolean scrap_dirty;
|
qboolean scrap_dirty;
|
||||||
gltexture_t *scrap_textures[MAX_SCRAPS]; //johnfitz
|
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
|
Scrap_AllocBlock
|
||||||
|
|
|
@ -428,6 +428,8 @@ void VID_Restart (void)
|
||||||
|
|
||||||
vid_canalttab = true;
|
vid_canalttab = true;
|
||||||
|
|
||||||
|
// Clear menu pic cache
|
||||||
|
Draw_ClearMenuPicCache ();
|
||||||
//warpimages needs to be recalculated
|
//warpimages needs to be recalculated
|
||||||
TexMgr_RecalcWarpImageSize ();
|
TexMgr_RecalcWarpImageSize ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue