11 line_dim.x = thickness;
13 drawfill(pos, line_dim, color, theAlpha, drawflag);
14 drawfill(pos + (dim.x + thickness) *
'1 0 0', line_dim, color, theAlpha, drawflag);
18 line_dim.x = dim.x + thickness * 2;
19 line_dim.y = thickness;
20 drawfill(pos, line_dim, color, theAlpha, drawflag);
21 drawfill(pos + (dim.y + thickness) *
'0 1 0', line_dim, color, theAlpha, drawflag);
30 vector current_pos =
'0 0 0', end_pos, new_size =
'0 0 0', ratio =
'0 0 0';
33 current_pos.y = pos.y;
34 while (current_pos.y < end_pos.y)
36 current_pos.x = pos.x;
37 while (current_pos.x < end_pos.x)
39 new_size.x =
min(sz.x, end_pos.x - current_pos.x);
40 new_size.y =
min(sz.y, end_pos.y - current_pos.y);
41 ratio.x = new_size.x / sz.x;
42 ratio.y = new_size.y / sz.y;
43 drawsubpic(current_pos, new_size, pic,
'0 0 0', ratio, color, theAlpha, drawflag);
44 current_pos.x += sz.x;
46 current_pos.y += sz.y;
52 return 1.2 / (1.2 - fadelerp);
57 boxsize.x *= boxxsizefactor;
58 return boxsize * (0.5 * (1 - sz));
72 drawpic_skin(position, pic, theScale, rgb, theAlpha * fadelerp, flag);
79 float r = stringwidth_builtin(text, handleColors, sz);
84 #define SET_POS_AND_SZ_Y_ASPECT(allow_colors) MACRO_BEGIN \ 85 float textaspect, oldsz; \ 86 vector dfs = drawfontscale; \ 87 drawfontscale = '1 1 0'; \ 88 textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y; \ 89 drawfontscale = dfs; \ 90 if(sz.x/sz.y > textaspect) { \ 92 sz.x = sz.y * textaspect; \ 93 pos.x += (oldsz - sz.x) * 0.5; \ 96 sz.y = sz.x / textaspect; \ 97 pos.y += (oldsz - sz.y) * 0.5; \ 104 drawstring(pos, text,
'1 1 0' * sz.y, color, theAlpha, drawflag);
121 float textaspect = stringwidth_builtin(text,
false, theScale * (sz /
drawfontscale.x)) / (theScale.x * sz);
159 tex = getsurfacetexture(e, i_s);
162 n_t = getsurfacenumtriangles(e, i_s);
163 for(i_t = 0; i_t < n_t; ++i_t)
165 tri = getsurfacetriangle(e, i_s, i_t);
166 R_BeginPolygon(tex, 0,
false);
167 R_PolygonVertex(getsurfacepoint(e, i_s, tri.x), getsurfacepointattribute(e, i_s, tri.x,
SPA_TEXCOORDS0),
'1 1 1', 1);
168 R_PolygonVertex(getsurfacepoint(e, i_s, tri.y), getsurfacepointattribute(e, i_s, tri.y,
SPA_TEXCOORDS0),
'1 1 1', 1);
169 R_PolygonVertex(getsurfacepoint(e, i_s, tri.z), getsurfacepointattribute(e, i_s, tri.z,
SPA_TEXCOORDS0),
'1 1 1', 1);
177 for(i_s = 0; ; ++i_s)
185 ringsize = radi *
'1 1 0';
192 R_BeginPolygon(pic, drawflag,
true);
193 v = centre; t =
'0.5 0.5 0';
194 v.x += 0.5 * ringsize.x; t +=
'0.5 0.5 0';
195 R_PolygonVertex(v, t, rgb, a);
197 v = centre; t =
'0.5 0.5 0';
198 v.y += 0.5 * ringsize.y; t +=
'0.5 -0.5 0';
199 R_PolygonVertex(v, t, rgb, a);
201 v = centre; t =
'0.5 0.5 0';
202 v.x -= 0.5 * ringsize.x; t -=
'0.5 0.5 0';
203 R_PolygonVertex(v, t, rgb, a);
205 v = centre; t =
'0.5 0.5 0';
206 v.y -= 0.5 * ringsize.y; t -=
'0.5 -0.5 0';
207 R_PolygonVertex(v, t, rgb, a);
213 float si =
sin(f * 2 * M_PI);
221 R_BeginPolygon(pic, drawflag,
true);
222 v = centre; t =
'0.5 0.5 0';
223 v.x += 0.5 * ringsize.x; t +=
'0.5 0.5 0';
224 R_PolygonVertex(v, t, rgb, a);
226 v = centre; t =
'0.5 0.5 0';
227 v.y += 0.5 * ringsize.y; t +=
'0.5 -0.5 0';
228 R_PolygonVertex(v, t, rgb, a);
230 v = centre; t =
'0.5 0.5 0';
231 v.x -= 0.5 * ringsize.x; t -=
'0.5 0.5 0';
232 R_PolygonVertex(v, t, rgb, a);
235 R_BeginPolygon(pic, drawflag,
true);
236 v = centre; t =
'0.5 0.5 0';
237 R_PolygonVertex(v, t, rgb, a);
239 v = centre; t =
'0.5 0.5 0';
240 v.x -= 0.5 * ringsize.x; t -=
'0.5 0.5 0';
241 R_PolygonVertex(v, t, rgb, a);
243 v = centre; t =
'0.5 0.5 0';
244 v.y -= 0.5 * ringsize.y; t -=
'0.5 -0.5 0';
245 R_PolygonVertex(v, t, rgb, a);
250 R_BeginPolygon(pic, drawflag,
true);
251 v = centre; t =
'0.5 0.5 0';
252 v.x += 0.5 * ringsize.x; t +=
'0.5 0.5 0';
253 R_PolygonVertex(v, t, rgb, a);
255 v = centre; t =
'0.5 0.5 0';
256 v.y += 0.5 * ringsize.y; t +=
'0.5 -0.5 0';
257 R_PolygonVertex(v, t, rgb, a);
259 v = centre; t =
'0.5 0.5 0';
260 v.x -= 0.5 * ringsize.x; t -=
'0.5 0.5 0';
261 R_PolygonVertex(v, t, rgb, a);
264 R_BeginPolygon(pic, drawflag,
true);
265 v = centre; t =
'0.5 0.5 0';
266 R_PolygonVertex(v, t, rgb, a);
268 v = centre; t =
'0.5 0.5 0';
269 v.x -= 0.5 * ringsize.x; t -=
'0.5 0.5 0';
270 R_PolygonVertex(v, t, rgb, a);
275 R_BeginPolygon(pic, drawflag,
true);
276 v = centre; t =
'0.5 0.5 0';
277 R_PolygonVertex(v, t, rgb, a);
279 v = centre; t =
'0.5 0.5 0';
280 v.x += 0.5 * ringsize.x; t +=
'0.5 0.5 0';
281 R_PolygonVertex(v, t, rgb, a);
283 v = centre; t =
'0.5 0.5 0';
284 v.y += 0.5 * ringsize.y; t +=
'0.5 -0.5 0';
285 R_PolygonVertex(v, t, rgb, a);
290 R_BeginPolygon(pic, drawflag,
true);
291 v = centre; t =
'0.5 0.5 0';
292 R_PolygonVertex(v, t, rgb, a);
294 v = centre; t =
'0.5 0.5 0';
295 v.x += 0.5 * ringsize.x; t +=
'0.5 0.5 0';
296 R_PolygonVertex(v, t, rgb, a);
305 v = centre; t =
'0.5 0.5 0';
306 v.x += co * 0.5 * ringsize.x; t += co *
'0.5 0.5 0';
307 v.y += si * 0.5 * ringsize.y; t += si *
'0.5 -0.5 0';
308 R_PolygonVertex(v, t, rgb, a);
vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor)
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector rgb, float a, float drawflag)
float stringwidth(string text, float handleColors, vector sz)
void PolyDrawModel(entity e)
void drawcolorcodedstring_expanding(vector position, string text, vector theScale, float theAlpha, float flag, float fadelerp)
#define drawpic_aspect_skin(pos, pic, sz, color, theAlpha, drawflag)
vector HUD_Shift(vector v)
void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag, float fadelerp)
void drawpic_aspect_skin_expanding(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAlpha, float drawflag)
void drawstring_expanding(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
vector HUD_Scale(vector v)
#define drawpic_skin(pos, pic, sz, color, theAlpha, drawflag)
float PolyDrawModelSurface(entity e, float i_s)
#define SET_POS_AND_SZ_Y_ASPECT(allow_colors)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void drawborderlines(float thickness, vector pos, vector dim, vector color, float theAlpha, float drawflag)
float expandingbox_sizefactor_from_fadelerp(float fadelerp)
float drawsubpic(vector position, vector size, string pic, vector srcPosition, vector srcSize, vector rgb, float alpha, float flag)
void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag)
void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float theAlpha, float drawflag, float fadelerp)