X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qh;h=5641215ae950cdee1d5a0fe8c31c4851a601743e;hp=3397ab7059133106f8f8a2008a44c619ac7dbafe;hb=7069dc3f41678554d089db582ccf16da1f8874a5;hpb=d464b8e24227e71a33447c76220f5bf169047154 diff --git a/qcsrc/client/miscfunctions.qh b/qcsrc/client/miscfunctions.qh index 3397ab7059..5641215ae9 100644 --- a/qcsrc/client/miscfunctions.qh +++ b/qcsrc/client/miscfunctions.qh @@ -158,23 +158,6 @@ void drawpic_aspect_skin_expanding(vector position, string pic, vector theScale, void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp); -#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) MACRO_BEGIN \ - float textaspect, oldsz; \ - vector dfs = drawfontscale; \ - drawfontscale = '1 1 0'; \ - textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y; \ - drawfontscale = dfs; \ - if(sz.x/sz.y > textaspect) { \ - oldsz = sz.x; \ - sz.x = sz.y * textaspect; \ - pos.x += (oldsz - sz.x) * 0.5; \ - } else { \ - oldsz = sz.y; \ - sz.y = sz.x / textaspect; \ - pos.y += (oldsz - sz.y) * 0.5; \ - } \ -MACRO_END - // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag);