1 var float(string text, float handleColors, vector fontSize) stringwidth;
8 // check for pending announcement, play it and remove it
11 sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
12 strunzone(announce_snd);
17 void restartAnnouncer_Think() {
18 float countdown_rounded, countdown;
19 countdown = getstatf(STAT_GAMESTARTTIME) - time;
20 countdown_rounded = floor(0.5 + countdown);
22 if (!spectatee_status) //do cprint only for players
23 centerprint(_("^1Begin!"));
25 sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
26 //reset maptime announcers now as well
27 announcer_5min = announcer_1min = FALSE;
33 if (!spectatee_status) //do cprint only for players
34 centerprint(sprintf(_("^1Game starts in %d seconds"), countdown_rounded));
36 if(countdown_rounded <= 3 && countdown_rounded >= 1) {
37 sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
40 self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1);
45 * Plays the 1minute or 5 minutes (of maptime) remaining sound, if client wants it
47 void maptimeAnnouncer() {
49 timelimit = getstatf(STAT_TIMELIMIT);
51 timeleft = max(0, timelimit * 60 + getstatf(STAT_GAMESTARTTIME) - time);
56 warmuplimit = autocvar_g_warmup_limit;
58 warmuptimeleft = max(0, warmuplimit + getstatf(STAT_GAMESTARTTIME) - time);
63 if (autocvar_cl_sound_maptime_warning >= 2) {
64 //make sure that after connect (and e.g. 4 minutes left) we will not get a wrong sound
67 if(((!warmup_stage || warmuplimit == 0) && timeleft > 300) || (warmup_stage && warmuplimit > 0 && warmuptimeleft > 300))
68 announcer_5min = FALSE;
70 else if (((!warmup_stage || warmuplimit == 0) && timelimit > 0 && timeleft < 300 && timeleft > 299) || (warmup_stage && warmuplimit > 0 && warmuptimeleft < 300 && warmuptimeleft > 299))
71 //if we're in warmup mode, check whether there's a warmup timelimit
72 if not (warmuplimit == -1 && warmup_stage) {
73 announcer_5min = TRUE;
74 sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
79 if (autocvar_cl_sound_maptime_warning == 1 || autocvar_cl_sound_maptime_warning == 3) {
82 if(((!warmup_stage || warmuplimit == 0) && timeleft > 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft > 60))
83 announcer_1min = FALSE;
85 else if (((!warmup_stage || warmuplimit == 0) && timelimit > 0 && timeleft < 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft < 60))
86 //if we're in warmup mode, check whether there's a warmup timelimit
87 if not (warmuplimit == -1 && warmup_stage) {
88 announcer_1min = TRUE;
89 sound(world, CHAN_AUTO, strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
95 * Announce carried items (e.g. flags in CTF).
99 void carrierAnnouncer() {
100 float stat_items, redflag, blueflag;
104 if not(autocvar_cl_notify_carried_items)
107 stat_items = getstati(STAT_ITEMS);
109 redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3;
110 blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
112 if (redflag == 3 && redflag != redflag_prev) {
113 item = _("^1RED^7 flag");
114 pickup = (redflag_prev == 2);
117 if (blueflag == 3 && blueflag != blueflag_prev) {
118 item = _("^4BLUE^7 flag");
119 pickup = (blueflag_prev == 2);
125 if (autocvar_cl_notify_carried_items & 2)
126 centerprint(sprintf(_("You picked up the %s!"), item));
129 if (autocvar_cl_notify_carried_items & 1)
130 centerprint(sprintf(_("You got the %s!"), item));
134 blueflag_prev = blueflag;
135 redflag_prev = redflag;
139 * Add all future announcer sounds precaches here.
140 * TODO: announcer queues
142 void Announcer_Precache () {
143 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav"));
144 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"));
146 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/electrobitch.wav"));
147 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/airshot.wav"));
148 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/03kills.wav"));
149 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/05kills.wav"));
150 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/10kills.wav"));
151 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/15kills.wav"));
152 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/20kills.wav"));
153 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/25kills.wav"));
154 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/30kills.wav"));
155 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/botlike.wav"));
156 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/yoda.wav"));
157 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/amazing.wav"));
158 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/awesome.wav"));
159 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/headshot.wav"));
160 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/impressive.wav"));
162 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"));
163 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/begin.wav"));
164 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/timeoutcalled.wav"));
165 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1fragleft.wav"));
166 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/2fragsleft.wav"));
167 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/3fragsleft.wav"));
168 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/terminated.wav"));
170 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/1.wav"));
171 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/2.wav"));
172 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/3.wav"));
173 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/4.wav"));
174 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/5.wav"));
175 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/6.wav"));
176 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/7.wav"));
177 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/8.wav"));
178 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/9.wav"));
179 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/10.wav"));
181 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/lastsecond.wav"));
182 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/narrowly.wav"));
184 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/voteaccept.wav"));
185 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/votecall.wav"));
186 precache_sound (strcat("announcer/", autocvar_cl_announcer, "/votefail.wav"));
195 for(e = prev.sort_next; e; prev = e, e = e.sort_next)
197 if(prev != e.sort_prev)
198 error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
202 for(e = prev.sort_next; e; prev = e, e = e.sort_next)
204 if(prev != e.sort_prev)
205 error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
210 float RegisterPlayer(entity player)
214 for(pl = players.sort_next; pl; pl = pl.sort_next)
216 error("Player already registered!");
217 player.sort_next = players.sort_next;
218 player.sort_prev = players;
219 if(players.sort_next)
220 players.sort_next.sort_prev = player;
221 players.sort_next = player;
226 void RemovePlayer(entity player)
231 for(pl = players.sort_next; pl && pl != player; pl = pl.sort_next)
236 error("Trying to remove a player which is not in the playerlist!");
239 parent.sort_next = player.sort_next;
241 player.sort_next.sort_prev = parent;
245 void MoveToLast(entity e)
257 float RegisterTeam(entity Team)
261 for(tm = teams.sort_next; tm; tm = tm.sort_next)
263 error("Team already registered!");
264 Team.sort_next = teams.sort_next;
265 Team.sort_prev = teams;
267 teams.sort_next.sort_prev = Team;
268 teams.sort_next = Team;
273 void RemoveTeam(entity Team)
278 for(tm = teams.sort_next; tm && tm != Team; tm = tm.sort_next)
283 print(_("Trying to remove a team which is not in the teamlist!"));
286 parent.sort_next = Team.sort_next;
288 Team.sort_next.sort_prev = parent;
292 entity GetTeam(float Team, float add)
296 num = (Team == COLOR_SPECTATOR) ? 16 : Team;
298 return teamslots[num];
308 vector HUD_GetFontsize(string cvarname)
311 v = stov(cvar_string(cvarname));
320 float PreviewExists(string name)
325 if(autocvar_cl_readpicture_force)
328 file = strcat(name, ".tga");
329 f = fopen(file, FILE_READ);
335 file = strcat(name, ".png");
336 f = fopen(file, FILE_READ);
342 file = strcat(name, ".jpg");
343 f = fopen(file, FILE_READ);
349 file = strcat(name, ".pcx");
350 f = fopen(file, FILE_READ);
359 vector rotate(vector v, float a)
362 // FTEQCC SUCKS AGAIN
363 w_x = v_x * cos(a) + v_y * sin(a);
364 w_y = -1 * v_x * sin(a) + v_y * cos(a);
368 float ColorTranslateMode;
370 string ColorTranslateRGB(string s)
372 if(ColorTranslateMode & 1)
373 return strdecolorize(s);
378 string Team_ColorCode(float teamid)
380 if (teamid == COLOR_TEAM1)
382 else if (teamid == COLOR_TEAM2)
384 else if (teamid == COLOR_TEAM3)
386 else if (teamid == COLOR_TEAM4)
392 // decolorizes and team colors the player name when needed
393 string playername(string thename, float teamid)
398 t = Team_ColorCode(teamid);
399 return strcat(t, strdecolorize(thename));
402 return strdecolorize(thename);
405 float cvar_or(string cv, float v)
415 vector project_3d_to_2d(vector vec)
417 vec = cs_project(vec);
418 if(cs_project_is_b0rked > 0)
420 vec_x *= vid_conwidth / vid_width;
421 vec_y *= vid_conheight / vid_height;
426 void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8)
430 float expandingbox_sizefactor_from_fadelerp(float fadelerp)
432 return 1.2 / (1.2 - fadelerp);
435 vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor)
437 boxsize_x *= boxxsizefactor; // easier interface for text
438 return boxsize * (0.5 * (1 - sz));
441 void drawborderlines(float thickness, vector pos, vector dim, vector color, float alpha, float drawflag)
445 // left and right lines
447 line_dim_x = thickness;
449 drawfill(pos, line_dim, color, alpha, drawflag);
450 drawfill(pos + (dim_x + thickness) * '1 0 0', line_dim, color, alpha, drawflag);
452 // upper and lower lines
454 line_dim_x = dim_x + thickness * 2; // make upper and lower lines longer
455 line_dim_y = thickness;
456 drawfill(pos, line_dim, color, alpha, drawflag);
457 drawfill(pos + (dim_y + thickness) * '0 1 0', line_dim, color, alpha, drawflag);
460 void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float alpha, float drawflag)
462 vector current_pos, end_pos, new_size, ratio;
463 end_pos = pos + area;
465 current_pos_y = pos_y;
466 while (current_pos_y < end_pos_y)
468 current_pos_x = pos_x;
469 while (current_pos_x < end_pos_x)
471 new_size_x = min(sz_x, end_pos_x - current_pos_x);
472 new_size_y = min(sz_y, end_pos_y - current_pos_y);
473 ratio_x = new_size_x / sz_x;
474 ratio_y = new_size_y / sz_y;
475 drawsubpic(current_pos, new_size, pic, '0 0 0', ratio, color, alpha, drawflag);
476 current_pos_x += sz_x;
478 current_pos_y += sz_y;
482 // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
483 var float _drawpic_imgaspect;
484 var vector _drawpic_imgsize;
485 var vector _drawpic_sz;
486 var float _drawpic_oldsz;
487 var string _drawpic_picpath;
488 #define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\
490 _drawpic_imgsize = drawgetimagesize(pic);\
491 _drawpic_imgaspect = _drawpic_imgsize_x/_drawpic_imgsize_y;\
492 _drawpic_sz = mySize;\
493 if(_drawpic_sz_x/_drawpic_sz_y > _drawpic_imgaspect) {\
494 _drawpic_oldsz = _drawpic_sz_x;\
495 _drawpic_sz_x = _drawpic_sz_y * _drawpic_imgaspect;\
496 drawpic(pos + eX * (_drawpic_oldsz - _drawpic_sz_x) * 0.5, pic, _drawpic_sz, color, alpha, drawflag);\
498 _drawpic_oldsz = _drawpic_sz_y;\
499 _drawpic_sz_y = _drawpic_sz_x / _drawpic_imgaspect;\
500 drawpic(pos + eY * (_drawpic_oldsz - _drawpic_sz_y) * 0.5, pic, _drawpic_sz, color, alpha, drawflag);\
504 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
505 #define drawpic_aspect_skin(pos,pic,sz,color,alpha,drawflag)\
507 _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
508 if(precache_pic(_drawpic_picpath) == "") {\
509 _drawpic_picpath = strcat("gfx/hud/default/", pic);\
511 drawpic_aspect(pos, _drawpic_picpath, sz, color, alpha, drawflag);\
512 _drawpic_picpath = string_null;\
515 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
516 #define drawpic_skin(pos,pic,sz,color,alpha,drawflag)\
518 _drawpic_picpath = strcat(hud_skin_path, "/", pic);\
519 if(precache_pic(_drawpic_picpath) == "") {\
520 _drawpic_picpath = strcat("gfx/hud/default/", pic);\
522 drawpic(pos, _drawpic_picpath, sz, color, alpha, drawflag);\
523 _drawpic_picpath = string_null;\
526 void drawpic_aspect_skin_expanding(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
529 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
531 drawpic_aspect_skin(position + expandingbox_resize_centered_box_offset(sz, scale, 1), pic, scale * sz, rgb, alpha * (1 - fadelerp), flag);
534 void drawpic_aspect_skin_expanding_two(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
536 drawpic_aspect_skin_expanding(position, pic, scale, rgb, alpha, flag, fadelerp);
537 drawpic_skin(position, pic, scale, rgb, alpha * fadelerp, flag);
539 #define SET_POS_AND_SZ_Y_ASPECT(allow_colors)\
540 float textaspect, oldsz;\
541 textaspect = stringwidth(text, allow_colors, '1 1 1' * sz_y) / sz_y;\
542 if(sz_x/sz_y > textaspect) {\
544 sz_x = sz_y * textaspect;\
545 pos_x += (oldsz - sz_x) * 0.5;\
548 sz_y = sz_x / textaspect; \
549 pos_y += (oldsz - sz_y) * 0.5;\
552 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
553 void drawstring_aspect(vector pos, string text, vector sz, vector color, float alpha, float drawflag) {
554 SET_POS_AND_SZ_Y_ASPECT(FALSE)
555 drawstring(pos, text, '1 1 0' * sz_y, color, alpha, drawflag);
558 // drawstring wrapper to draw a colorcodedstring as large as possible with preserved aspect ratio into a box
559 void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float alpha, float drawflag) {
560 SET_POS_AND_SZ_Y_ASPECT(TRUE)
561 drawcolorcodedstring(pos, text, '1 1 0' * sz_y, alpha, drawflag);
564 vector drawfontscale;
565 void drawstring_expanding(vector position, string text, vector scale, vector rgb, float alpha, float flag, float fadelerp)
568 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
570 drawfontscale = sz * '1 1 0';
571 dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
572 drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), rgb, alpha * (1 - fadelerp), flag);
574 // (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
576 drawfontscale = '1 1 0';
579 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
580 void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float alpha, float drawflag, float fadelerp) {
581 SET_POS_AND_SZ_Y_ASPECT(FALSE)
582 drawstring_expanding(pos, text, '1 1 0' * sz_y, color, alpha, drawflag, fadelerp);
585 void drawcolorcodedstring_expanding(vector position, string text, vector scale, float alpha, float flag, float fadelerp)
588 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
590 drawfontscale = sz * '1 1 0';
591 dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
592 drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), alpha * (1 - fadelerp), flag);
593 drawfontscale = '1 1 0';
596 void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float alpha, float drawflag, float fadelerp) {
597 SET_POS_AND_SZ_Y_ASPECT(TRUE)
598 drawcolorcodedstring_expanding(pos, text, '1 1 0' * sz_y, alpha, drawflag, fadelerp);
601 // this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
602 float PolyDrawModelSurface(entity e, float i_s)
608 tex = getsurfacetexture(e, i_s);
610 return 0; // this is beyond the last one
611 n_t = getsurfacenumtriangles(e, i_s);
612 for(i_t = 0; i_t < n_t; ++i_t)
614 tri = getsurfacetriangle(e, i_s, i_t);
615 R_BeginPolygon(tex, 0);
616 R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1);
617 R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1);
618 R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1);
623 void PolyDrawModel(entity e)
626 for(i_s = 0; ; ++i_s)
627 if(!PolyDrawModelSurface(e, i_s))
631 void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag)
634 vector ringsize, v, t;
635 ringsize = radius * '1 1 0';
637 x = cos(f * 2 * M_PI);
638 y = sin(f * 2 * M_PI);
639 q = fabs(x) + fabs(y);
645 // draw full rectangle
646 R_BeginPolygon(pic, drawflag);
647 v = centre; t = '0.5 0.5 0';
648 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
649 R_PolygonVertex(v, t, rgb, a);
651 v = centre; t = '0.5 0.5 0';
652 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
653 R_PolygonVertex(v, t, rgb, a);
655 v = centre; t = '0.5 0.5 0';
656 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
657 R_PolygonVertex(v, t, rgb, a);
659 v = centre; t = '0.5 0.5 0';
660 v_y -= 0.5 * ringsize_y; t -= '0.5 -0.5 0';
661 R_PolygonVertex(v, t, rgb, a);
667 R_BeginPolygon(pic, drawflag);
668 v = centre; t = '0.5 0.5 0';
669 R_PolygonVertex(v, t, rgb, a);
671 v = centre; t = '0.5 0.5 0';
672 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
673 R_PolygonVertex(v, t, rgb, a);
678 // draw upper and first triangle
679 R_BeginPolygon(pic, drawflag);
680 v = centre; t = '0.5 0.5 0';
681 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
682 R_PolygonVertex(v, t, rgb, a);
684 v = centre; t = '0.5 0.5 0';
685 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
686 R_PolygonVertex(v, t, rgb, a);
688 v = centre; t = '0.5 0.5 0';
689 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
690 R_PolygonVertex(v, t, rgb, a);
692 R_BeginPolygon(pic, drawflag);
693 v = centre; t = '0.5 0.5 0';
694 R_PolygonVertex(v, t, rgb, a);
696 v = centre; t = '0.5 0.5 0';
697 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
698 R_PolygonVertex(v, t, rgb, a);
700 v = centre; t = '0.5 0.5 0';
701 v_y -= 0.5 * ringsize_y; t -= '0.5 -0.5 0';
702 R_PolygonVertex(v, t, rgb, a);
710 // draw upper triangle
711 R_BeginPolygon(pic, drawflag);
712 v = centre; t = '0.5 0.5 0';
713 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
714 R_PolygonVertex(v, t, rgb, a);
716 v = centre; t = '0.5 0.5 0';
717 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
718 R_PolygonVertex(v, t, rgb, a);
720 v = centre; t = '0.5 0.5 0';
721 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
722 R_PolygonVertex(v, t, rgb, a);
728 R_BeginPolygon(pic, drawflag);
729 v = centre; t = '0.5 0.5 0';
730 R_PolygonVertex(v, t, rgb, a);
732 v = centre; t = '0.5 0.5 0';
733 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
734 R_PolygonVertex(v, t, rgb, a);
739 // draw first triangle
740 R_BeginPolygon(pic, drawflag);
741 v = centre; t = '0.5 0.5 0';
742 R_PolygonVertex(v, t, rgb, a);
744 v = centre; t = '0.5 0.5 0';
745 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
746 R_PolygonVertex(v, t, rgb, a);
748 v = centre; t = '0.5 0.5 0';
749 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
750 R_PolygonVertex(v, t, rgb, a);
761 R_BeginPolygon(pic, drawflag);
762 v = centre; t = '0.5 0.5 0';
763 R_PolygonVertex(v, t, rgb, a);
765 v = centre; t = '0.5 0.5 0';
766 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
767 R_PolygonVertex(v, t, rgb, a);
773 v = centre; t = '0.5 0.5 0';
774 v_x += x * 0.5 * ringsize_x; t += x * '0.5 0.5 0';
775 v_y += y * 0.5 * ringsize_y; t += y * '0.5 -0.5 0';
776 R_PolygonVertex(v, t, rgb, a);