From: Rudolf Polzer Date: Tue, 24 Jan 2012 21:47:38 +0000 (+0100) Subject: make use of DRAW_CACHEPIC_MIPMAP X-Git-Tag: xonotic-v0.6.0~101 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f2d3dbd9f77224351dbcee57c24235841ba6735;p=xonotic%2Fxonotic-data.pk3dir.git make use of DRAW_CACHEPIC_MIPMAP --- diff --git a/qcsrc/dpdefs/csprogsdefs.qc b/qcsrc/dpdefs/csprogsdefs.qc index d3348bc50..2d376d4fe 100644 --- a/qcsrc/dpdefs/csprogsdefs.qc +++ b/qcsrc/dpdefs/csprogsdefs.qc @@ -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() diff --git a/qcsrc/dpdefs/menudefs.qc b/qcsrc/dpdefs/menudefs.qc index bf2293194..ad8666ed3 100644 --- a/qcsrc/dpdefs/menudefs.qc +++ b/qcsrc/dpdefs/menudefs.qc @@ -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() diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index 7fe4aea3b..1f223f281 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -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 diff --git a/qcsrc/menu/draw.qh b/qcsrc/menu/draw.qh index 0f5811713..301a5f440 100644 --- a/qcsrc/menu/draw.qh +++ b/qcsrc/menu/draw.qh @@ -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); diff --git a/qcsrc/menu/xonotic/gametypelist.c b/qcsrc/menu/xonotic/gametypelist.c index dbb9c3eff..531c761f6 100644 --- a/qcsrc/menu/xonotic/gametypelist.c +++ b/qcsrc/menu/xonotic/gametypelist.c @@ -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) {