From: Severin Meyer Date: Sun, 26 Jul 2015 11:22:40 +0000 (+0200) Subject: Draw menu serverlist icons consistently without mipmap, fix images that would get... X-Git-Tag: xonotic-v0.8.1~34^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b783de702aa4d5150911a7efd48d0e4a438d201;p=xonotic%2Fxonotic-data.pk3dir.git Draw menu serverlist icons consistently without mipmap, fix images that would get too aliased --- diff --git a/gfx/menu/luminos/icon_ipv4.tga b/gfx/menu/luminos/icon_ipv4.tga index a0484f4e3..74b441399 100644 Binary files a/gfx/menu/luminos/icon_ipv4.tga and b/gfx/menu/luminos/icon_ipv4.tga differ diff --git a/gfx/menu/luminos/icon_ipv6.tga b/gfx/menu/luminos/icon_ipv6.tga index d3fdc03ee..fe1227cb0 100644 Binary files a/gfx/menu/luminos/icon_ipv6.tga and b/gfx/menu/luminos/icon_ipv6.tga differ diff --git a/gfx/menu/luminos/icon_mod_.tga b/gfx/menu/luminos/icon_mod_.tga index 0b31a343d..63738cbcf 100644 Binary files a/gfx/menu/luminos/icon_mod_.tga and b/gfx/menu/luminos/icon_mod_.tga differ diff --git a/gfx/menu/luminos/icon_mod_MinstaGib.tga b/gfx/menu/luminos/icon_mod_MinstaGib.tga index 518fd7964..065b84424 100644 Binary files a/gfx/menu/luminos/icon_mod_MinstaGib.tga and b/gfx/menu/luminos/icon_mod_MinstaGib.tga differ diff --git a/gfx/menu/luminos/icon_mod_NewToys.tga b/gfx/menu/luminos/icon_mod_NewToys.tga index cf88f7703..00acb7117 100644 Binary files a/gfx/menu/luminos/icon_mod_NewToys.tga and b/gfx/menu/luminos/icon_mod_NewToys.tga differ diff --git a/gfx/menu/luminos/icon_mod_Overkill.tga b/gfx/menu/luminos/icon_mod_Overkill.tga index 743722ea1..42e92c68c 100644 Binary files a/gfx/menu/luminos/icon_mod_Overkill.tga and b/gfx/menu/luminos/icon_mod_Overkill.tga differ diff --git a/gfx/menu/luminos/icon_mod_instagib.tga b/gfx/menu/luminos/icon_mod_instagib.tga index 518fd7964..065b84424 100644 Binary files a/gfx/menu/luminos/icon_mod_instagib.tga and b/gfx/menu/luminos/icon_mod_instagib.tga differ diff --git a/gfx/menu/luminos/icon_pure1.tga b/gfx/menu/luminos/icon_pure1.tga index 62980d257..7f7a13029 100644 Binary files a/gfx/menu/luminos/icon_pure1.tga and b/gfx/menu/luminos/icon_pure1.tga differ diff --git a/gfx/menu/wickedx/icon_ipv4.tga b/gfx/menu/wickedx/icon_ipv4.tga index a0484f4e3..74b441399 100644 Binary files a/gfx/menu/wickedx/icon_ipv4.tga and b/gfx/menu/wickedx/icon_ipv4.tga differ diff --git a/gfx/menu/wickedx/icon_ipv6.tga b/gfx/menu/wickedx/icon_ipv6.tga index d3fdc03ee..fe1227cb0 100644 Binary files a/gfx/menu/wickedx/icon_ipv6.tga and b/gfx/menu/wickedx/icon_ipv6.tga differ diff --git a/gfx/menu/wickedx/icon_mod_.tga b/gfx/menu/wickedx/icon_mod_.tga index 0b31a343d..63738cbcf 100644 Binary files a/gfx/menu/wickedx/icon_mod_.tga and b/gfx/menu/wickedx/icon_mod_.tga differ diff --git a/gfx/menu/wickedx/icon_mod_MinstaGib.tga b/gfx/menu/wickedx/icon_mod_MinstaGib.tga index 518fd7964..065b84424 100644 Binary files a/gfx/menu/wickedx/icon_mod_MinstaGib.tga and b/gfx/menu/wickedx/icon_mod_MinstaGib.tga differ diff --git a/gfx/menu/wickedx/icon_mod_NewToys.tga b/gfx/menu/wickedx/icon_mod_NewToys.tga index cf88f7703..00acb7117 100644 Binary files a/gfx/menu/wickedx/icon_mod_NewToys.tga and b/gfx/menu/wickedx/icon_mod_NewToys.tga differ diff --git a/gfx/menu/wickedx/icon_mod_Overkill.tga b/gfx/menu/wickedx/icon_mod_Overkill.tga index 743722ea1..42e92c68c 100644 Binary files a/gfx/menu/wickedx/icon_mod_Overkill.tga and b/gfx/menu/wickedx/icon_mod_Overkill.tga differ diff --git a/gfx/menu/wickedx/icon_mod_instagib.tga b/gfx/menu/wickedx/icon_mod_instagib.tga index 518fd7964..065b84424 100644 Binary files a/gfx/menu/wickedx/icon_mod_instagib.tga and b/gfx/menu/wickedx/icon_mod_instagib.tga differ diff --git a/gfx/menu/wickedx/icon_pure1.tga b/gfx/menu/wickedx/icon_pure1.tga index 62980d257..7f7a13029 100644 Binary files a/gfx/menu/wickedx/icon_pure1.tga and b/gfx/menu/wickedx/icon_pure1.tga differ diff --git a/gfx/menu/xaw/icon_ipv4.tga b/gfx/menu/xaw/icon_ipv4.tga index a0484f4e3..74b441399 100644 Binary files a/gfx/menu/xaw/icon_ipv4.tga and b/gfx/menu/xaw/icon_ipv4.tga differ diff --git a/gfx/menu/xaw/icon_ipv6.tga b/gfx/menu/xaw/icon_ipv6.tga index d3fdc03ee..fe1227cb0 100644 Binary files a/gfx/menu/xaw/icon_ipv6.tga and b/gfx/menu/xaw/icon_ipv6.tga differ diff --git a/gfx/menu/xaw/icon_mod_.tga b/gfx/menu/xaw/icon_mod_.tga index 0b31a343d..63738cbcf 100644 Binary files a/gfx/menu/xaw/icon_mod_.tga and b/gfx/menu/xaw/icon_mod_.tga differ diff --git a/gfx/menu/xaw/icon_mod_MinstaGib.tga b/gfx/menu/xaw/icon_mod_MinstaGib.tga index 518fd7964..065b84424 100644 Binary files a/gfx/menu/xaw/icon_mod_MinstaGib.tga and b/gfx/menu/xaw/icon_mod_MinstaGib.tga differ diff --git a/gfx/menu/xaw/icon_mod_NewToys.tga b/gfx/menu/xaw/icon_mod_NewToys.tga index cf88f7703..00acb7117 100644 Binary files a/gfx/menu/xaw/icon_mod_NewToys.tga and b/gfx/menu/xaw/icon_mod_NewToys.tga differ diff --git a/gfx/menu/xaw/icon_mod_Overkill.tga b/gfx/menu/xaw/icon_mod_Overkill.tga index 743722ea1..42e92c68c 100644 Binary files a/gfx/menu/xaw/icon_mod_Overkill.tga and b/gfx/menu/xaw/icon_mod_Overkill.tga differ diff --git a/gfx/menu/xaw/icon_mod_instagib.tga b/gfx/menu/xaw/icon_mod_instagib.tga index 518fd7964..065b84424 100644 Binary files a/gfx/menu/xaw/icon_mod_instagib.tga and b/gfx/menu/xaw/icon_mod_instagib.tga differ diff --git a/gfx/menu/xaw/icon_pure1.tga b/gfx/menu/xaw/icon_pure1.tga index 62980d257..7f7a13029 100644 Binary files a/gfx/menu/xaw/icon_pure1.tga and b/gfx/menu/xaw/icon_pure1.tga differ diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 8bf70cc33..585bfcd5d 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -1160,57 +1160,46 @@ void XonoticServerList_drawListBoxItem(entity me, int i, vector absSize, bool is iconPos_x = (me.columnIconsSize - 3 * iconSize.x) * 0.5; iconPos_y = (1 - iconSize.y) * 0.5; - string n; - - if (!(me.seenIPv4 && me.seenIPv6)) - { - iconPos.x += iconSize.x * 0.5; - } - else if(me.seenIPv4 && me.seenIPv6) + // IP + if(me.seenIPv4 && me.seenIPv6) { - n = string_null; if(isv6) - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), 0); // PRECACHE_PIC_MIPMAP + draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), iconSize, '1 1 1', 1); else if(isv4) - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), 0); // PRECACHE_PIC_MIPMAP - if(n) - draw_Picture(iconPos, n, iconSize, '1 1 1', 1); - iconPos.x += iconSize.x; + draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), iconSize, '1 1 1', 1); } + iconPos.x += iconSize.x; + + // AES if(q > 0) - { - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), 0); // PRECACHE_PIC_MIPMAP - draw_Picture(iconPos, n, iconSize, '1 1 1', 1); - } + draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1); + iconPos.x += iconSize.x; + // Mod if(modname == "Xonotic") { if(pure == 0) - { - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), PRECACHE_PIC_MIPMAP); - draw_Picture(iconPos, n, iconSize, '1 1 1', 1); - } + draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), iconSize, '1 1 1', 1); } else { - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_", modname), PRECACHE_PIC_MIPMAP); - if(draw_PictureSize(n) == '0 0 0') - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_"), PRECACHE_PIC_MIPMAP); + string icon = strcat(SKINGFX_SERVERLIST_ICON, "_mod_", modname); + if(draw_PictureSize(icon) == '0 0 0') + icon = strcat(SKINGFX_SERVERLIST_ICON, "_mod_"); + if(pure == 0) - draw_Picture(iconPos, n, iconSize, '1 1 1', 1); + draw_Picture(iconPos, icon, iconSize, '1 1 1', 1); else - draw_Picture(iconPos, n, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE); + draw_Picture(iconPos, icon, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE); } + iconPos.x += iconSize.x; + // Stats if(sflags >= 0 && (sflags & SERVERFLAG_PLAYERSTATS)) - { - draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_stats1"), 0); // PRECACHE_PIC_MIPMAP - draw_Picture(iconPos, n, iconSize, '1 1 1', 1); - } - iconPos.x += iconSize.x; + draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_stats1"), iconSize, '1 1 1', 1); // -------------- // RENDER TEXT