]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
-Added the parameter 'persistent'(naming?) to Draw_CachePic, which decides
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Apr 2005 20:45:08 +0000 (20:45 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 14 Apr 2005 20:45:08 +0000 (20:45 +0000)
 whether the texture is loaded in texture memory directly or only on demand.
-Adapted all Draw_CachePic calls (I'll do some corrections, atm most of them
 pass persistent := false)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5180 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c
draw.h
gl_backend.c
gl_draw.c
menu.c
netconn.h
prvm_cmds.c
r_crosshairs.c
r_shadow.c
sbar.c

index dc0418a19968096b6fdf22f8af521f61bf972817..392feb9411d517f40a8e0a82780211d2ba23f342 100644 (file)
@@ -215,7 +215,7 @@ void SCR_DrawPause (void)
        if (!cl.paused)
                return;
 
        if (!cl.paused)
                return;
 
-       pic = Draw_CachePic ("gfx/pause.lmp");
+       pic = Draw_CachePic ("gfx/pause.lmp", true);
        DrawQ_Pic ((vid.conwidth - pic->width)/2, (vid.conheight - pic->height)/2, "gfx/pause.lmp", 0, 0, 1, 1, 1, 1, 0);
 }
 
        DrawQ_Pic ((vid.conwidth - pic->width)/2, (vid.conheight - pic->height)/2, "gfx/pause.lmp", 0, 0, 1, 1, 1, 1, 0);
 }
 
@@ -551,7 +551,7 @@ void DrawQ_SuperPic(float x, float y, char *picname, float width, float height,
        memset(&mesh, 0, sizeof(mesh));
        if (picname && picname[0])
        {
        memset(&mesh, 0, sizeof(mesh));
        if (picname && picname[0])
        {
-               pic = Draw_CachePic(picname);
+               pic = Draw_CachePic(picname, false);
                if (width == 0)
                        width = pic->width;
                if (height == 0)
                if (width == 0)
                        width = pic->width;
                if (height == 0)
diff --git a/draw.h b/draw.h
index bbf5a21be98e1155d633a4e416e8a483f1f2e899..4c507883b3b31ff02b495b93b4dbb69ab18e3aa3 100644 (file)
--- a/draw.h
+++ b/draw.h
@@ -39,7 +39,7 @@ typedef struct cachepic_s
 cachepic_t;
 
 void Draw_Init (void);
 cachepic_t;
 
 void Draw_Init (void);
-cachepic_t *Draw_CachePic (char *path);
+cachepic_t *Draw_CachePic (char *path, qboolean persistent);
 // create or update a pic's image
 cachepic_t *Draw_NewPic(char *picname, int width, int height, int alpha, qbyte *pixels);
 // free the texture memory used by a pic
 // create or update a pic's image
 cachepic_t *Draw_NewPic(char *picname, int width, int height, int alpha, qbyte *pixels);
 // free the texture memory used by a pic
index 15bf23f97edd1d5def8316ee9feb586fadd7c0bc..d56bc790671244933ba5a94e2aa94cf0fa6e9181 100644 (file)
@@ -1793,7 +1793,7 @@ void SCR_UpdateLoadingScreen (void)
        R_Mesh_Start();
        R_Mesh_Matrix(&r_identitymatrix);
        // draw the loading plaque
        R_Mesh_Start();
        R_Mesh_Matrix(&r_identitymatrix);
        // draw the loading plaque
-       pic = Draw_CachePic("gfx/loading.lmp");
+       pic = Draw_CachePic("gfx/loading.lmp", false);
        x = (vid_conwidth.integer - pic->width)/2;
        y = (vid_conheight.integer - pic->height)/2;
        GL_Color(1,1,1,1);
        x = (vid_conwidth.integer - pic->width)/2;
        y = (vid_conheight.integer - pic->height)/2;
        GL_Color(1,1,1,1);
index 0ab9c19d7920551f53f81998164008b92526dea3..f0b1d40508da475d8a9501ebbf6ced2a740b34a3 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -262,13 +262,14 @@ Draw_CachePic
 ================
 */
 // FIXME: move this to client somehow
 ================
 */
 // FIXME: move this to client somehow
-cachepic_t     *Draw_CachePic (char *path)
+cachepic_t     *Draw_CachePic (char *path, qboolean persistent)
 {
        int i, crc, hashkey;
        cachepic_t *pic;
        qpic_t *p;
 {
        int i, crc, hashkey;
        cachepic_t *pic;
        qpic_t *p;
+       int persistentflag;
 
 
-       if (!strncmp(CLVIDEOPREFIX, path, sizeof(CLVIDEOPREFIX) - 1)) {
+    if (!strncmp(CLVIDEOPREFIX, path, sizeof(CLVIDEOPREFIX) - 1)) {
                clvideo_t *video;
 
                video = CL_GetVideo(path);
                clvideo_t *video;
 
                video = CL_GetVideo(path);
@@ -276,6 +277,12 @@ cachepic_t *Draw_CachePic (char *path)
                        return &video->cpif;
        }
 
                        return &video->cpif;
        }
 
+       if (persistent) {
+               persistentflag = TEXF_PRECACHE;
+       } else {
+               persistentflag = 0;
+       }
+
        crc = CRC_Block(path, strlen(path));
        hashkey = ((crc >> 8) ^ crc) % CACHEPICHASHSIZE;
        for (pic = cachepichash[hashkey];pic;pic = pic->chain)
        crc = CRC_Block(path, strlen(path));
        hashkey = ((crc >> 8) ^ crc) % CACHEPICHASHSIZE;
        for (pic = cachepichash[hashkey];pic;pic = pic->chain)
@@ -291,11 +298,11 @@ cachepic_t        *Draw_CachePic (char *path)
        cachepichash[hashkey] = pic;
 
        // load the pic from disk
        cachepichash[hashkey] = pic;
 
        // load the pic from disk
-       pic->tex = loadtextureimage(drawtexturepool, path, 0, 0, false, TEXF_ALPHA | TEXF_PRECACHE);
+       pic->tex = loadtextureimage(drawtexturepool, path, 0, 0, false, TEXF_ALPHA | persistentflag);
        if (pic->tex == NULL && !strncmp(path, "gfx/", 4))
        {
                // compatibility with older versions
        if (pic->tex == NULL && !strncmp(path, "gfx/", 4))
        {
                // compatibility with older versions
-               pic->tex = loadtextureimage(drawtexturepool, path + 4, 0, 0, false, TEXF_ALPHA | TEXF_PRECACHE);
+               pic->tex = loadtextureimage(drawtexturepool, path + 4, 0, 0, false, TEXF_ALPHA | persistentflag);
                // failed to find gfx/whatever.tga or similar, try the wad
                if (pic->tex == NULL && (p = W_GetLumpName (path + 4)))
                {
                // failed to find gfx/whatever.tga or similar, try the wad
                if (pic->tex == NULL && (p = W_GetLumpName (path + 4)))
                {
@@ -307,10 +314,10 @@ cachepic_t        *Draw_CachePic (char *path)
                                for (i = 0;i < 128 * 128;i++)
                                        if (pix[i] == 0)
                                                pix[i] = 255;
                                for (i = 0;i < 128 * 128;i++)
                                        if (pix[i] == 0)
                                                pix[i] = 255;
-                               pic->tex = R_LoadTexture2D(drawtexturepool, path, 128, 128, pix, TEXTYPE_PALETTE, TEXF_ALPHA | TEXF_PRECACHE, palette_complete);
+                               pic->tex = R_LoadTexture2D(drawtexturepool, path, 128, 128, pix, TEXTYPE_PALETTE, TEXF_ALPHA | persistentflag, palette_complete);
                        }
                        else
                        }
                        else
-                               pic->tex = R_LoadTexture2D(drawtexturepool, path, p->width, p->height, p->data, TEXTYPE_PALETTE, TEXF_ALPHA | TEXF_PRECACHE, palette_complete);
+                               pic->tex = R_LoadTexture2D(drawtexturepool, path, p->width, p->height, p->data, TEXTYPE_PALETTE, TEXF_ALPHA | persistentflag, palette_complete);
                }
        }
 
                }
        }
 
@@ -416,7 +423,7 @@ static void gl_draw_start(void)
        numcachepics = 0;
        memset(cachepichash, 0, sizeof(cachepichash));
 
        numcachepics = 0;
        memset(cachepichash, 0, sizeof(cachepichash));
 
-       char_texture = Draw_CachePic("gfx/conchars")->tex;
+       char_texture = Draw_CachePic("gfx/conchars", true)->tex;
 }
 
 static void gl_draw_shutdown(void)
 }
 
 static void gl_draw_shutdown(void)
diff --git a/menu.c b/menu.c
index 3c84478b6ce6be7b673525ebd83367a21ef27895..591381750453dc3b9a3305b03e094443affdd319 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -413,7 +413,7 @@ void M_Main_Draw (void)
        if (gamemode == GAME_TRANSFUSION) {
                int y1, y2, y3;
                M_Background(640, 480);
        if (gamemode == GAME_TRANSFUSION) {
                int y1, y2, y3;
                M_Background(640, 480);
-               p = Draw_CachePic ("gfx/tb-transfusion");
+               p = Draw_CachePic ("gfx/tb-transfusion", false);
                M_DrawPic (640/2 - p->width/2, 40, "gfx/tb-transfusion");
                y2 = 120;
                // 8 rather than MAIN_ITEMS to skip a number and not miss the last option
                M_DrawPic (640/2 - p->width/2, 40, "gfx/tb-transfusion");
                y2 = 120;
                // 8 rather than MAIN_ITEMS to skip a number and not miss the last option
@@ -434,7 +434,7 @@ void M_Main_Draw (void)
 
        M_Background(320, 200);
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
 
        M_Background(320, 200);
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic ("gfx/ttl_main.lmp");
+       p = Draw_CachePic ("gfx/ttl_main.lmp", false);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_main.lmp");
 // Nehahra
        if (gamemode == GAME_NEHAHRA)
        M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_main.lmp");
 // Nehahra
        if (gamemode == GAME_NEHAHRA)
@@ -719,7 +719,7 @@ void M_SinglePlayer_Draw (void)
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic ("gfx/ttl_sgl.lmp");
+       p = Draw_CachePic ("gfx/ttl_sgl.lmp", false);
 
        // Some mods don't have a single player mode
        if (gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2 || gamemode == GAME_BATTLEMECH)
 
        // Some mods don't have a single player mode
        if (gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2 || gamemode == GAME_BATTLEMECH)
@@ -885,8 +885,8 @@ void M_Load_Draw (void)
 
        M_Background(320, 200);
 
 
        M_Background(320, 200);
 
-       p = Draw_CachePic ("gfx/p_load.lmp");
-       M_DrawPic ( (320-p->width)/2, 4, "gfx/p_load.lmp");
+       p = Draw_CachePic ("gfx/p_load.lmp", false);
+       M_DrawPic ( (320-p->width)/2, 4, "gfx/p_load.lmp" );
 
        for (i=0 ; i< MAX_SAVEGAMES; i++)
                M_Print(16, 32 + 8*i, m_filenames[i]);
 
        for (i=0 ; i< MAX_SAVEGAMES; i++)
                M_Print(16, 32 + 8*i, m_filenames[i]);
@@ -903,7 +903,7 @@ void M_Save_Draw (void)
 
        M_Background(320, 200);
 
 
        M_Background(320, 200);
 
-       p = Draw_CachePic ("gfx/p_save.lmp");
+       p = Draw_CachePic ("gfx/p_save.lmp", false);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_save.lmp");
 
        for (i=0 ; i<MAX_SAVEGAMES ; i++)
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_save.lmp");
 
        for (i=0 ; i<MAX_SAVEGAMES ; i++)
@@ -1009,7 +1009,7 @@ void M_Transfusion_Episode_Draw (void)
        cachepic_t *p;
        M_Background(640, 480);
 
        cachepic_t *p;
        M_Background(640, 480);
 
-       p = Draw_CachePic ("gfx/tb-episodes");
+       p = Draw_CachePic ("gfx/tb-episodes", false);
        M_DrawPic (640/2 - p->width/2, 40, "gfx/tb-episodes");
        for (y = 0; y < EPISODE_ITEMS; y++){
                M_DrawPic (0, 160 + y * 40, va("gfx/episode%i", y+1));
        M_DrawPic (640/2 - p->width/2, 40, "gfx/tb-episodes");
        for (y = 0; y < EPISODE_ITEMS; y++){
                M_DrawPic (0, 160 + y * 40, va("gfx/episode%i", y+1));
@@ -1066,7 +1066,7 @@ void M_Transfusion_Skill_Draw (void)
        cachepic_t      *p;
        M_Background(640, 480);
 
        cachepic_t      *p;
        M_Background(640, 480);
 
-       p = Draw_CachePic ("gfx/tb-difficulty");
+       p = Draw_CachePic ("gfx/tb-difficulty", false);
        M_DrawPic(640/2 - p->width/2, 40, "gfx/tb-difficulty");
 
        for (y = 0; y < SKILL_ITEMS; y++)
        M_DrawPic(640/2 - p->width/2, 40, "gfx/tb-difficulty");
 
        for (y = 0; y < SKILL_ITEMS; y++)
@@ -1170,7 +1170,7 @@ void M_MultiPlayer_Draw (void)
        if (gamemode == GAME_TRANSFUSION)
        {
                M_Background(640, 480);
        if (gamemode == GAME_TRANSFUSION)
        {
                M_Background(640, 480);
-               p = Draw_CachePic ("gfx/tb-online");
+               p = Draw_CachePic ("gfx/tb-online", false);
                M_DrawPic (640/2 - p->width/2, 140, "gfx/tb-online");
                for (f = 1; f <= MULTIPLAYER_ITEMS; f++)
                        M_DrawPic (0, 180 + f*40, va("gfx/online%i", f));
                M_DrawPic (640/2 - p->width/2, 140, "gfx/tb-online");
                for (f = 1; f <= MULTIPLAYER_ITEMS; f++)
                        M_DrawPic (0, 180 + f*40, va("gfx/online%i", f));
@@ -1180,7 +1180,7 @@ void M_MultiPlayer_Draw (void)
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic ("gfx/p_multi.lmp");
+       p = Draw_CachePic ("gfx/p_multi.lmp", false);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
        M_DrawPic (72, 32, "gfx/mp_menu.lmp");
 
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
        M_DrawPic (72, 32, "gfx/mp_menu.lmp");
 
@@ -1298,7 +1298,7 @@ void M_Setup_Draw (void)
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic ("gfx/p_multi.lmp");
+       p = Draw_CachePic ("gfx/p_multi.lmp", false);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
 
        M_Print(64, 40, "Your name");
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
 
        M_Print(64, 40, "Your name");
@@ -1648,7 +1648,7 @@ void M_Options_Draw (void)
        M_Background(320, bound(200, 32 + OPTIONS_ITEMS * 8, vid.conheight));
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
        M_Background(320, bound(200, 32 + OPTIONS_ITEMS * 8, vid.conheight));
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic("gfx/p_option.lmp");
+       p = Draw_CachePic("gfx/p_option.lmp", false);
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optnum = 0;
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optnum = 0;
@@ -1847,7 +1847,7 @@ void M_Options_Effects_Draw (void)
        M_Background(320, bound(200, 32 + OPTIONS_EFFECTS_ITEMS * 8, vid.conheight));
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
        M_Background(320, bound(200, 32 + OPTIONS_EFFECTS_ITEMS * 8, vid.conheight));
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic("gfx/p_option.lmp");
+       p = Draw_CachePic("gfx/p_option.lmp", false);
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optcursor = options_effects_cursor;
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optcursor = options_effects_cursor;
@@ -1986,7 +1986,7 @@ void M_Options_Graphics_Draw (void)
        M_Background(320, bound(200, 32 + OPTIONS_GRAPHICS_ITEMS * 8, vid.conheight));
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
        M_Background(320, bound(200, 32 + OPTIONS_GRAPHICS_ITEMS * 8, vid.conheight));
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic("gfx/p_option.lmp");
+       p = Draw_CachePic("gfx/p_option.lmp", false);
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optcursor = options_graphics_cursor;
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optcursor = options_graphics_cursor;
@@ -2169,7 +2169,7 @@ void M_Options_ColorControl_Draw (void)
        M_Background(320, 256);
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
        M_Background(320, 256);
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic("gfx/p_option.lmp");
+       p = Draw_CachePic("gfx/p_option.lmp", false);
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optcursor = options_colorcontrol_cursor;
        M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
 
        optcursor = options_colorcontrol_cursor;
@@ -2557,7 +2557,7 @@ void M_Keys_Draw (void)
 
        M_Background(320, 48 + 8 * numcommands);
 
 
        M_Background(320, 48 + 8 * numcommands);
 
-       p = Draw_CachePic ("gfx/ttl_cstm.lmp");
+       p = Draw_CachePic ("gfx/ttl_cstm.lmp", false);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_cstm.lmp");
 
        if (bind_grab)
        M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_cstm.lmp");
 
        if (bind_grab)
@@ -2768,7 +2768,7 @@ void M_Video_Draw (void)
        M_Background(320, 200);
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
        M_Background(320, 200);
 
        M_DrawPic(16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic("gfx/vidmodes.lmp");
+       p = Draw_CachePic("gfx/vidmodes.lmp", false);
        M_DrawPic((320-p->width)/2, 4, "gfx/vidmodes.lmp");
 
        // Resolution
        M_DrawPic((320-p->width)/2, 4, "gfx/vidmodes.lmp");
 
        // Resolution
@@ -3147,7 +3147,7 @@ void M_LanConfig_Draw (void)
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic ("gfx/p_multi.lmp");
+       p = Draw_CachePic ("gfx/p_multi.lmp", false);
        basex = (320-p->width)/2;
        M_DrawPic (basex, 4, "gfx/p_multi.lmp");
 
        basex = (320-p->width)/2;
        M_DrawPic (basex, 4, "gfx/p_multi.lmp");
 
@@ -3736,7 +3736,7 @@ void M_GameOptions_Draw (void)
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
        M_Background(320, 200);
 
        M_DrawPic (16, 4, "gfx/qplaque.lmp");
-       p = Draw_CachePic ("gfx/p_multi.lmp");
+       p = Draw_CachePic ("gfx/p_multi.lmp", false);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
 
        M_DrawTextBox (152, 32, 10, 1);
        M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
 
        M_DrawTextBox (152, 32, 10, 1);
@@ -4180,7 +4180,7 @@ void M_ServerList_Draw (void)
        start = bound(0, slist_cursor - (visible >> 1), serverlist_viewcount - visible);
        end = min(start + visible, serverlist_viewcount);
 
        start = bound(0, slist_cursor - (visible >> 1), serverlist_viewcount - visible);
        end = min(start + visible, serverlist_viewcount);
 
-       p = Draw_CachePic("gfx/p_multi.lmp");
+       p = Draw_CachePic("gfx/p_multi.lmp", false);
        M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi.lmp");
        if (end > start)
        {
        M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi.lmp");
        if (end > start)
        {
@@ -4444,7 +4444,7 @@ void M_Draw (void)
                        g = (int)(realtime * 64)%96;
                        scale_y_rate = (float)(g+1) / 96;
                        top_offset = (g+12)/12;
                        g = (int)(realtime * 64)%96;
                        scale_y_rate = (float)(g+1) / 96;
                        top_offset = (g+12)/12;
-                       p = Draw_CachePic (va("gfx/blooddrip%i", top_offset));
+                       p = Draw_CachePic (va("gfx/blooddrip%i", top_offset), false);
                        for (scale_x = 0; scale_x <= vid.conwidth; scale_x += p->width) {
                                for (scale_y = -scale_y_repeat; scale_y <= vid.conheight; scale_y += scale_y_repeat) {
                                        DrawQ_Pic (scale_x + 21, scale_y_repeat * .5 + scale_y + scale_y_rate * scale_y_repeat, "gfx/blooddrop3", 0, 0, 1, 1, 1, 1, 0);
                        for (scale_x = 0; scale_x <= vid.conwidth; scale_x += p->width) {
                                for (scale_y = -scale_y_repeat; scale_y <= vid.conheight; scale_y += scale_y_repeat) {
                                        DrawQ_Pic (scale_x + 21, scale_y_repeat * .5 + scale_y + scale_y_rate * scale_y_repeat, "gfx/blooddrop3", 0, 0, 1, 1, 1, 1, 0);
index c12d2babe790f2f26610dc9bf110cd65489875e6..d958db4ddca1ca34a71fdf929b122e340e882f53 100755 (executable)
--- a/netconn.h
+++ b/netconn.h
@@ -150,7 +150,7 @@ extern cvar_t developer_networking;
 extern char playername[];
 extern int playercolor;
 
 extern char playername[];
 extern int playercolor;
 
-#define SERVERLIST_TOTALSIZE                   2048
+#define SERVERLIST_TOTALSIZE           2048
 #define SERVERLIST_VIEWLISTSIZE                128
 #define SERVERLIST_ANDMASKCOUNT                5
 #define SERVERLIST_ORMASKCOUNT         5
 #define SERVERLIST_VIEWLISTSIZE                128
 #define SERVERLIST_ANDMASKCOUNT                5
 #define SERVERLIST_ORMASKCOUNT         5
index e306d917908b56cf06a93d154d02d187f3b6bb7b..82006d386ff27f5aa84b332cd5ba6657a1a12b7f 100644 (file)
@@ -2576,7 +2576,7 @@ void VM_precache_pic(void)
 
        VM_CheckEmptyString (s);
 
 
        VM_CheckEmptyString (s);
 
-       if(!Draw_CachePic(s))
+       if(!Draw_CachePic(s, false))
                PRVM_G_INT(OFS_RETURN) = PRVM_SetString("");
 }
 
                PRVM_G_INT(OFS_RETURN) = PRVM_SetString("");
 }
 
@@ -2842,7 +2842,7 @@ void VM_getimagesize(void)
 
        VM_CheckEmptyString (p);
 
 
        VM_CheckEmptyString (p);
 
-       pic = Draw_CachePic (p);
+       pic = Draw_CachePic (p, false);
 
        PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width;
        PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height;
 
        PRVM_G_VECTOR(OFS_RETURN)[0] = pic->width;
        PRVM_G_VECTOR(OFS_RETURN)[1] = pic->height;
index bf5018bb46cb7d35caa71d12a9282bd516f418b3..2b61af1001ad0c62f72f565edb4b4067a2665e97 100644 (file)
@@ -71,7 +71,7 @@ void R_DrawWorldCrosshair(void)
                return;
        if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
                return;
                return;
        if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
                return;
-       pic = Draw_CachePic(va("gfx/crosshair%i.tga", num));
+       pic = Draw_CachePic(va("gfx/crosshair%i.tga", num), true);
        if (!pic)
                return;
        R_GetCrosshairColor(color);
        if (!pic)
                return;
        R_GetCrosshairColor(color);
@@ -104,7 +104,7 @@ void R_Draw2DCrosshair(void)
                return;
        if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
                return;
                return;
        if (!cl.viewentity || !cl_entities[cl.viewentity].state_current.active)
                return;
-       pic = Draw_CachePic(va("gfx/crosshair%i.tga", num));
+       pic = Draw_CachePic(va("gfx/crosshair%i.tga", num), true);
        if (pic)
        {
                R_GetCrosshairColor(color);
        if (pic)
        {
                R_GetCrosshairColor(color);
index 1ff13a646276bcc546f154b5a00cf18735decd5a..49d09796784de776ffbbaeea55fffc61115e56a8 100644 (file)
@@ -3093,7 +3093,7 @@ void R_Shadow_DrawLightSprites(void)
        for (i = 0;i < 5;i++)
        {
                lighttextures[i] = NULL;
        for (i = 0;i < 5;i++)
        {
                lighttextures[i] = NULL;
-               if ((pic = Draw_CachePic(va("gfx/crosshair%i.tga", i + 1))))
+               if ((pic = Draw_CachePic(va("gfx/crosshair%i.tga", i + 1), true)))
                        lighttextures[i] = pic->tex;
        }
 
                        lighttextures[i] = pic->tex;
        }
 
diff --git a/sbar.c b/sbar.c
index bec97e7160ed057796baf8e6f0717dbcd788b387..e06e024f0016570d02b43cc743ea96ac37b4064d 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -35,7 +35,7 @@ static sbarpic_t *Sbar_NewPic(const char *name)
        strcpy(sbarpics[numsbarpics].name, name);
        // precache it
        // FIXME: precache on every renderer restart (or move this to client)
        strcpy(sbarpics[numsbarpics].name, name);
        // precache it
        // FIXME: precache on every renderer restart (or move this to client)
-       Draw_CachePic(sbarpics[numsbarpics].name);
+       Draw_CachePic(sbarpics[numsbarpics].name, true);
        return sbarpics + (numsbarpics++);
 }
 
        return sbarpics + (numsbarpics++);
 }
 
@@ -1175,7 +1175,7 @@ void Sbar_DeathmatchOverlay (void)
        int i, x, y;
        cachepic_t *pic;
 
        int i, x, y;
        cachepic_t *pic;
 
-       pic = Draw_CachePic ("gfx/ranking.lmp");
+       pic = Draw_CachePic ("gfx/ranking.lmp", true);
        DrawQ_Pic ((vid.conwidth - pic->width)/2, 8, "gfx/ranking.lmp", 0, 0, 1, 1, 1, 1 * sbar_alpha_fg.value, 0);
 
        // scores
        DrawQ_Pic ((vid.conwidth - pic->width)/2, 8, "gfx/ranking.lmp", 0, 0, 1, 1, 1, 1 * sbar_alpha_fg.value, 0);
 
        // scores
@@ -1284,7 +1284,7 @@ void Sbar_FinaleOverlay (void)
 {
        cachepic_t      *pic;
 
 {
        cachepic_t      *pic;
 
-       pic = Draw_CachePic ("gfx/finale.lmp");
+       pic = Draw_CachePic ("gfx/finale.lmp", true);
        DrawQ_Pic((vid.conwidth - pic->width)/2, 16, "gfx/finale.lmp", 0, 0, 1, 1, 1, 1 * sbar_alpha_fg.value, 0);
 }
 
        DrawQ_Pic((vid.conwidth - pic->width)/2, 16, "gfx/finale.lmp", 0, 0, 1, 1, 1, 1 * sbar_alpha_fg.value, 0);
 }