]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make use of DRAW_CACHEPIC_MIPMAP
authorRudolf Polzer <divverent@alientrap.org>
Tue, 24 Jan 2012 21:47:38 +0000 (22:47 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 24 Jan 2012 21:47:38 +0000 (22:47 +0100)
qcsrc/dpdefs/csprogsdefs.qc
qcsrc/dpdefs/menudefs.qc
qcsrc/menu/draw.qc
qcsrc/menu/draw.qh
qcsrc/menu/xonotic/gametypelist.c

index d3348bc50930a311790987ebd3291733c0bb1438..2d376d4fe41cf0f16832856850e3239cda1b72f5 100644 (file)
@@ -1083,7 +1083,6 @@ float MOVETYPE_FLY_WORLDONLY = 33;
 //constant definitions:
 float PRECACHE_PIC_FROMWAD = 1; // this one actually is part of EXT_CSQC
 float PRECACHE_PIC_NOTPERSISTENT = 2; // picture may get deallocated when unused
-float PRECACHE_PIC_NOCLAMP = 4; // do not clamp to edge
 float PRECACHE_PIC_MIPMAP = 8; // mipmap the texture for possibly better downscaling at memory expense
 //notes: these constants are given as optional second argument to precache_pic()
 
index bf22931940562b04d47685c940b405142f8ca1b4..ad8666ed3548786759d2faeb6b9c59dcd5711377 100644 (file)
@@ -410,7 +410,6 @@ float(string s1, string s2, float len) strncasecmp = #230;
 //constant definitions:
 float PRECACHE_PIC_FROMWAD = 1; // this one actually is part of EXT_CSQC
 float PRECACHE_PIC_NOTPERSISTENT = 2; // picture may get deallocated when unused
-float PRECACHE_PIC_NOCLAMP = 4; // do not clamp to edge
 float PRECACHE_PIC_MIPMAP = 8; // mipmap the texture for possibly better downscaling at memory expense
 //notes: these constants are given as optional second argument to precache_pic()
 
index 7fe4aea3bdc38e57c99eb976b90326f8658198ca..1f223f281affc2bc9ba5a42e90c1b3b3160f8981 100644 (file)
@@ -59,6 +59,12 @@ string draw_PreloadPicture(string pic)
        return precache_pic(pic);
 }
 
+string draw_PreloadPictureWithFlags(string pic, float f)
+{
+       pic = draw_UseSkinFor(pic);
+       return precache_pic(pic, f);
+}
+
 void draw_Picture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha)
 {
        if(theSize_x == 0 || theSize_y <= 0) // no default sizing please
index 0f5811713d6f3c1b66f3f38ae2742d3bb2b810ed..301a5f440f80fbf768c77182b3f24e2207c64f5a 100644 (file)
@@ -15,6 +15,7 @@ void draw_setMousePointer(string pic, vector theSize, vector theOffset);
 void draw_drawMousePointer(vector where);
 
 string draw_PreloadPicture(string pic);
+string draw_PreloadPictureWithFlags(string pic, float f);
 void draw_ButtonPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha);
 void draw_VertButtonPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha);
 void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha, vector theBorderSize);
index dbb9c3eff1fd4659f2f300e613efcf64faf5a136..531c761f637d124dccf7b46f0cc24605b2a9d2f5 100644 (file)
@@ -30,9 +30,15 @@ entity makeXonoticGametypeList(void)
 }
 void XonoticGametypeList_configureXonoticGametypeList(entity me)
 {
-       me.loadCvars(me);
+       float i;
        me.configureXonoticListBox(me);
        me.nItems = GameType_GetCount();
+
+       // we want the pics mipmapped
+       for(i = 0; i < GameType_GetCount(); ++i)
+               draw_PreloadPictureWithFlags(GameType_GetIcon(i), PRECACHE_PIC_MIPMAP);
+
+       me.loadCvars(me);
 }
 void XonoticGametypeList_setSelected(entity me, float i)
 {