]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
New cvar scr_loadingscreen_picture to customize loading pic.
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Sep 2012 01:46:04 +0000 (01:46 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 18 Sep 2012 12:08:17 +0000 (14:08 +0200)
GAME_BLOODOMNICIDE: allow to load low quality version pics (ones used to get sizes) from locale/.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11841 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=139e1e457c2b0d1199200f56d59527719861d1ea

cl_screen.c
gl_draw.c

index 42b86ed7fd1dcc93510467f38b04f0cc17bd8481..69f71010847eb306f5f17fb129d431a3d1de2a2e 100644 (file)
@@ -38,6 +38,7 @@ cvar_t scr_loadingscreen_background = {0, "scr_loadingscreen_background","0", "s
 cvar_t scr_loadingscreen_scale = {0, "scr_loadingscreen_scale","1", "scale factor of the background"};
 cvar_t scr_loadingscreen_scale_base = {0, "scr_loadingscreen_scale_base","0", "0 = console pixels, 1 = video pixels"};
 cvar_t scr_loadingscreen_scale_limit = {0, "scr_loadingscreen_scale_limit","0", "0 = no limit, 1 = until first edge hits screen edge, 2 = until last edge hits screen edge, 3 = until width hits screen width, 4 = until height hits screen height"};
+cvar_t scr_loadingscreen_picture = {CVAR_SAVE, "scr_loadingscreen_picture", "gfx/loading", "picture shown during loading"};
 cvar_t scr_loadingscreen_count = {0, "scr_loadingscreen_count","1", "number of loading screen files to use randomly (named loading.tga, loading2.tga, loading3.tga, ...)"};
 cvar_t scr_loadingscreen_firstforstartup = {0, "scr_loadingscreen_firstforstartup","0", "remove loading.tga from random scr_loadingscreen_count selection and only display it on client startup, 0 = normal, 1 = firstforstartup"};
 cvar_t scr_loadingscreen_barcolor = {0, "scr_loadingscreen_barcolor", "0 0 1", "rgb color of loadingscreen progress bar"};
@@ -914,6 +915,7 @@ void CL_Screen_Init(void)
        Cvar_RegisterVariable (&scr_loadingscreen_scale);
        Cvar_RegisterVariable (&scr_loadingscreen_scale_base);
        Cvar_RegisterVariable (&scr_loadingscreen_scale_limit);
+       Cvar_RegisterVariable (&scr_loadingscreen_picture);
        Cvar_RegisterVariable (&scr_loadingscreen_count);
        Cvar_RegisterVariable (&scr_loadingscreen_firstforstartup);
        Cvar_RegisterVariable (&scr_loadingscreen_barcolor);
@@ -2047,7 +2049,7 @@ static void SCR_DrawLoadingScreen_SharedSetup (qboolean clear)
        R_Mesh_Start();
        R_EntityMatrix(&identitymatrix);
        // draw the loading plaque
-       loadingscreenpic = Draw_CachePic_Flags (loadingscreenpic_number ? va(vabuf, sizeof(vabuf), "gfx/loading%d", loadingscreenpic_number+1) : "gfx/loading", loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);
+       loadingscreenpic = Draw_CachePic_Flags (loadingscreenpic_number ? va(vabuf, sizeof(vabuf), "%s%d", scr_loadingscreen_picture.string, loadingscreenpic_number+1) : scr_loadingscreen_picture.string, loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);
 
        w = loadingscreenpic->width;
        h = loadingscreenpic->height;
index dab25100246b0f597060a34a5bce785b99aa4853..6569a92abe9eebb495c714d7d99c17c272ac4c58 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -446,7 +446,7 @@ reload:
        // show up the right size in the menu even if they were replaced with
        // higher or lower resolution versions
        dpsnprintf(lmpname, sizeof(lmpname), "%s.lmp", pic->name);
-       if (!strncmp(pic->name, "gfx/", 4) && (lmpdata = FS_LoadFile(lmpname, tempmempool, false, &lmpsize)))
+       if ((!strncmp(pic->name, "gfx/", 4) || (gamemode == GAME_BLOODOMNICIDE && !strncmp(pic->name, "locale/", 6))) && (lmpdata = FS_LoadFile(lmpname, tempmempool, false, &lmpsize)))
        {
                if (developer_loading.integer)
                        Con_Printf("loading lump \"%s\"\n", pic->name);