11 void Draw_CylindricLine(
vector from,
vector to,
float thickness,
string texture,
float aspect,
float shift,
vector rgb,
float theAlpha,
float drawflag,
vector vieworg)
16 vector axis, thickdir, A, B, C, D;
20 length_tex = aspect *
vlen(to - from) / thickness;
25 A = from - thickdir * (thickness / 2);
26 B = from + thickdir * (thickness / 2);
27 C = to + thickdir * (thickness / 2);
28 D = to - thickdir * (thickness / 2);
30 R_BeginPolygon(texture, drawflag,
false);
31 R_PolygonVertex(A,
'0 0 0' + shift *
'1 0 0', rgb, theAlpha);
32 R_PolygonVertex(B,
'0 1 0' + shift *
'1 0 0', rgb, theAlpha);
33 R_PolygonVertex(C,
'0 1 0' + (shift + length_tex) *
'1 0 0', rgb, theAlpha);
34 R_PolygonVertex(D,
'0 0 0' + (shift + length_tex) *
'1 0 0', rgb, theAlpha);
48 if (theBorderSize.x < 0 && theBorderSize.y < 0)
50 drawpic_builtin(theOrigin, pic, theSize, theColor, theAlpha, 0);
53 if (theBorderSize.x == 0 && theBorderSize.y == 0)
56 drawsubpic(theOrigin, theSize, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
64 width =
eX * theSize.x;
65 height =
eY * theSize.y;
66 if (theSize.x <= theBorderSize.x * 2)
69 bW =
eX * (0.25 * theSize.x / (theBorderSize.x * 2));
70 if (theSize.y <= theBorderSize.y * 2)
73 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
74 drawsubpic(theOrigin, width * 0.5 + height * 0.5, pic,
'0 0 0', bW + bH, theColor, theAlpha, 0);
75 drawsubpic(theOrigin + width * 0.5, width * 0.5 + height * 0.5, pic,
eX - bW, bW + bH, theColor, theAlpha, 0);
76 drawsubpic(theOrigin + height * 0.5, width * 0.5 + height * 0.5, pic,
eY - bH, bW + bH, theColor, theAlpha, 0);
77 drawsubpic(theOrigin + theSize * 0.5, width * 0.5 + height * 0.5, pic,
eX +
eY - bW - bH, bW + bH, theColor, theAlpha, 0);
81 dY = theBorderSize.x *
eY;
82 drawsubpic(theOrigin, width * 0.5 + dY, pic,
'0 0 0',
'0 0.25 0' + bW, theColor, theAlpha, 0);
83 drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic,
'0 0 0' +
eX - bW,
'0 0.25 0' + bW, theColor, theAlpha, 0);
84 drawsubpic(theOrigin + dY, width * 0.5 + height - 2 * dY, pic,
'0 0.25 0',
'0 0.5 0' + bW, theColor, theAlpha, 0);
85 drawsubpic(theOrigin + width * 0.5 + dY, width * 0.5 + height - 2 * dY, pic,
'0 0.25 0' +
eX - bW,
'0 0.5 0' + bW, theColor, theAlpha, 0);
86 drawsubpic(theOrigin + height - dY, width * 0.5 + dY, pic,
'0 0.75 0',
'0 0.25 0' + bW, theColor, theAlpha, 0);
87 drawsubpic(theOrigin + width * 0.5 + height - dY, width * 0.5 + dY, pic,
'0 0.75 0' +
eX - bW,
'0 0.25 0' + bW, theColor, theAlpha, 0);
92 if (theSize.y <= theBorderSize.y * 2)
95 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
96 dX = theBorderSize.x *
eX;
97 drawsubpic(theOrigin, dX + height * 0.5, pic,
'0 0 0',
'0.25 0 0' + bH, theColor, theAlpha, 0);
98 drawsubpic(theOrigin + dX, width - 2 * dX + height * 0.5, pic,
'0.25 0 0',
'0.5 0 0' + bH, theColor, theAlpha, 0);
99 drawsubpic(theOrigin + width - dX, dX + height * 0.5, pic,
'0.75 0 0',
'0.25 0 0' + bH, theColor, theAlpha, 0);
100 drawsubpic(theOrigin + height * 0.5, dX + height * 0.5, pic,
'0 0 0' +
eY - bH,
'0.25 0 0' + bH, theColor, theAlpha, 0);
101 drawsubpic(theOrigin + dX + height * 0.5, width - 2 * dX + height * 0.5, pic,
'0.25 0 0' +
eY - bH,
'0.5 0 0' + bH, theColor, theAlpha, 0);
102 drawsubpic(theOrigin + width - dX + height * 0.5, dX + height * 0.5, pic,
'0.75 0 0' +
eY - bH,
'0.25 0 0' + bH, theColor, theAlpha, 0);
106 dX = theBorderSize.x *
eX;
107 dY = theBorderSize.x *
eY;
108 drawsubpic(theOrigin, dX + dY, pic,
'0 0 0',
'0.25 0.25 0', theColor, theAlpha, 0);
109 drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic,
'0.25 0 0',
'0.5 0.25 0', theColor, theAlpha, 0);
110 drawsubpic(theOrigin + width - dX, dX + dY, pic,
'0.75 0 0',
'0.25 0.25 0', theColor, theAlpha, 0);
111 drawsubpic(theOrigin + dY, dX + height - 2 * dY, pic,
'0 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
112 drawsubpic(theOrigin + dY + dX, width - 2 * dX + height - 2 * dY, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
113 drawsubpic(theOrigin + dY + width - dX, dX + height - 2 * dY, pic,
'0.75 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
114 drawsubpic(theOrigin + height - dY, dX + dY, pic,
'0 0.75 0',
'0.25 0.25 0', theColor, theAlpha, 0);
115 drawsubpic(theOrigin + height - dY + dX, width - 2 * dX + dY, pic,
'0.25 0.75 0',
'0.5 0.25 0', theColor, theAlpha, 0);
116 drawsubpic(theOrigin + height - dY + width - dX, dX + dY, pic,
'0.75 0.75 0',
'0.25 0.25 0', theColor, theAlpha, 0);
122 void drawstringright(
vector position,
string text,
vector theScale,
vector rgb,
float theAlpha,
int flag)
124 position.x -= 2 / 3 *
strlen(text) * theScale.x;
125 drawstring_builtin(position, text, theScale, rgb, theAlpha, flag);
129 void drawstringcenter(
vector position,
string text,
vector theScale,
vector rgb,
float theAlpha,
int flag)
132 drawstring_builtin(position, text, theScale, rgb, theAlpha, flag);
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float drawsubpic(vector position, vector size, string pic, vector srcPosition, vector srcSize, vector rgb, float alpha, float flag)