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/", cvar_string("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/", cvar_string("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(strcat("^1Game starts in ", ftos(countdown_rounded), " seconds"));
36 if(countdown_rounded <= 3 && countdown_rounded >= 1) {
37 sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("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 = cvar("g_warmup_limit");
58 warmuptimeleft = max(0, warmuplimit + getstatf(STAT_GAMESTARTTIME) - time);
63 if (cvar("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 //dprint("i will play the sound, I promise!\n");
75 sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
80 if (cvar("cl_sound_maptime_warning") == 1 || cvar("cl_sound_maptime_warning") == 3) {
83 if(((!warmup_stage || warmuplimit == 0) && timeleft > 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft > 60))
84 announcer_1min = FALSE;
86 else if (((!warmup_stage || warmuplimit == 0) && timelimit > 0 && timeleft < 60) || (warmup_stage && warmuplimit > 0 && warmuptimeleft < 60))
87 //if we're in warmup mode, check whether there's a warmup timelimit
88 if not (warmuplimit == -1 && warmup_stage) {
89 announcer_1min = TRUE;
90 sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
96 * Announce carried items (e.g. flags in CTF).
100 void carrierAnnouncer() {
101 float stat_items, redflag, blueflag;
105 if not(cvar("cl_notify_carried_items"))
108 stat_items = getstati(STAT_ITEMS);
110 redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3;
111 blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
113 if (redflag == 3 && redflag != redflag_prev) {
114 item = "^1RED^7 flag";
115 pickup = (redflag_prev == 2);
118 if (blueflag == 3 && blueflag != blueflag_prev) {
119 item = "^4BLUE^7 flag";
120 pickup = (blueflag_prev == 2);
126 if (cvar("cl_notify_carried_items") & 2)
127 centerprint(strcat("You picked up the ", item, "!"));
130 if (cvar("cl_notify_carried_items") & 1)
131 centerprint(strcat("You got the ", item, "!"));
135 blueflag_prev = blueflag;
136 redflag_prev = redflag;
140 * Add all future announcer sounds precaches here.
141 * TODO: announcer queues
143 void Announcer_Precache () {
144 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"));
145 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"));
147 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/electrobitch.wav"));
148 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/airshot.wav"));
149 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/03kills.wav"));
150 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/05kills.wav"));
151 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/10kills.wav"));
152 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/15kills.wav"));
153 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/20kills.wav"));
154 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/25kills.wav"));
155 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/30kills.wav"));
156 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/botlike.wav"));
157 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/yoda.wav"));
158 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/amazing.wav"));
159 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/awesome.wav"));
160 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/headshot.wav"));
161 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/impressive.wav"));
163 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"));
164 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"));
165 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/timeoutcalled.wav"));
166 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1fragleft.wav"));
167 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/2fragsleft.wav"));
168 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/3fragsleft.wav"));
169 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/terminated.wav"));
171 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/1.wav"));
172 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/2.wav"));
173 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/3.wav"));
174 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/4.wav"));
175 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/5.wav"));
176 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/6.wav"));
177 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/7.wav"));
178 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/8.wav"));
179 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/9.wav"));
180 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/10.wav"));
182 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/lastsecond.wav"));
183 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/narrowly.wav"));
185 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/voteaccept.wav"));
186 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/votecall.wav"));
187 precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/votefail.wav"));
196 for(e = prev.sort_next; e; prev = e, e = e.sort_next)
198 if(prev != e.sort_prev)
199 error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
203 for(e = prev.sort_next; e; prev = e, e = e.sort_next)
205 if(prev != e.sort_prev)
206 error(strcat("sort list chain error\nplease submit the output of 'prvm_edicts client' to the developers"));
211 float RegisterPlayer(entity player)
215 for(pl = players.sort_next; pl; pl = pl.sort_next)
217 error("Player already registered!");
218 player.sort_next = players.sort_next;
219 player.sort_prev = players;
220 if(players.sort_next)
221 players.sort_next.sort_prev = player;
222 players.sort_next = player;
227 void RemovePlayer(entity player)
232 for(pl = players.sort_next; pl && pl != player; pl = pl.sort_next)
237 error("Trying to remove a player which is not in the playerlist!");
240 parent.sort_next = player.sort_next;
242 player.sort_next.sort_prev = parent;
246 void MoveToLast(entity e)
258 float RegisterTeam(entity Team)
262 for(tm = teams.sort_next; tm; tm = tm.sort_next)
264 error("Team already registered!");
265 Team.sort_next = teams.sort_next;
266 Team.sort_prev = teams;
268 teams.sort_next.sort_prev = Team;
269 teams.sort_next = Team;
274 void RemoveTeam(entity Team)
279 for(tm = teams.sort_next; tm && tm != Team; tm = tm.sort_next)
284 print("Trying to remove a team which is not in the teamlist!");
287 parent.sort_next = Team.sort_next;
289 Team.sort_next.sort_prev = parent;
293 entity GetTeam(float Team, float add)
297 num = (Team == COLOR_SPECTATOR) ? 16 : Team;
299 return teamslots[num];
309 void CSQC_CheckEngine()
311 hud_font = FONT_USER+1;
312 hud_bigfont = FONT_USER+2;
315 vector HUD_GetFontsize(string cvarname)
318 v = stov(cvar_string(cvarname));
327 float PreviewExists(string name)
332 if(cvar("cl_readpicture_force"))
335 file = strcat(name, ".tga");
336 f = fopen(file, FILE_READ);
342 file = strcat(name, ".png");
343 f = fopen(file, FILE_READ);
349 file = strcat(name, ".jpg");
350 f = fopen(file, FILE_READ);
356 file = strcat(name, ".pcx");
357 f = fopen(file, FILE_READ);
366 vector rotate(vector v, float a)
369 // FTEQCC SUCKS AGAIN
370 w_x = v_x * cos(a) + v_y * sin(a);
371 w_y = -1 * v_x * sin(a) + v_y * cos(a);
375 float ColorTranslateMode;
377 string ColorTranslateRGB(string s)
379 if(ColorTranslateMode & 1)
380 return strdecolorize(s);
385 float cvar_or(string cv, float v)
395 vector project_3d_to_2d(vector vec)
397 vec = cs_project(vec);
398 if(cs_project_is_b0rked > 0)
400 vec_x *= vid_conwidth / vid_width;
401 vec_y *= vid_conheight / vid_height;
406 void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8)
410 float expandingbox_sizefactor_from_fadelerp(float fadelerp)
412 return 1.2 / (1.2 - fadelerp);
415 vector expandingbox_resize_centered_box_offset(float sz, vector boxsize, float boxxsizefactor)
417 boxsize_x *= boxxsizefactor; // easier interface for text
418 return boxsize * (0.5 * (1 - sz));
421 void drawborderlines(float thickness, vector pos, vector dim, vector color, float alpha, float drawflag)
425 // left and right lines
427 line_dim_x = thickness;
429 drawfill(pos, line_dim, color, alpha, drawflag);
430 drawfill(pos + (dim_x + thickness) * '1 0 0', line_dim, color, alpha, drawflag);
432 // upper and lower lines
434 line_dim_x = dim_x + thickness * 2; // make upper and lower lines longer
435 line_dim_y = thickness;
436 drawfill(pos, line_dim, color, alpha, drawflag);
437 drawfill(pos + (dim_y + thickness) * '0 1 0', line_dim, color, alpha, drawflag);
440 void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float alpha, float drawflag)
442 vector current_pos, end_pos, new_size, ratio;
443 end_pos = pos + area;
445 current_pos_y = pos_y;
446 while (current_pos_y < end_pos_y)
448 current_pos_x = pos_x;
449 while (current_pos_x < end_pos_x)
451 new_size_x = min(sz_x, end_pos_x - current_pos_x);
452 new_size_y = min(sz_y, end_pos_y - current_pos_y);
453 ratio_x = new_size_x / sz_x;
454 ratio_y = new_size_y / sz_y;
455 drawsubpic(current_pos, new_size, pic, '0 0 0', ratio, color, alpha, drawflag);
456 current_pos_x += sz_x;
458 current_pos_y += sz_y;
462 // drawpic wrapper to draw an image as large as possible with preserved aspect ratio into a box
465 #define drawpic_aspect(pos,pic,mySize,color,alpha,drawflag)\
468 imgsize = drawgetimagesize(pic);\
469 imgaspect = imgsize_x/imgsize_y;\
471 oldsz = sz = mySize;\
473 if(aspect > imgaspect) {\
474 sz_x = sz_y * imgaspect;\
475 drawpic(pos + eX * (oldsz_x - sz_x) * 0.5, pic, sz, color, alpha, drawflag);\
477 sz_y = sz_x / imgaspect;\
478 drawpic(pos + eY * (oldsz_y - sz_y) * 0.5, pic, sz, color, alpha, drawflag);\
482 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
483 #define drawpic_aspect_skin(pos,pic,sz,color,alpha,drawflag)\
485 picpath = strcat(hud_skin_path, "/", pic);\
486 if(precache_pic(picpath) == "") {\
487 picpath = strcat("gfx/hud/default/", pic);\
489 drawpic_aspect(pos, picpath, sz, color, alpha, drawflag);\
492 // draw HUD element with image from gfx/hud/hud_skin/foo.tga if it exists, otherwise gfx/hud/default/foo.tga
493 #define drawpic_skin(pos,pic,sz,color,alpha,drawflag)\
495 picpath = strcat(hud_skin_path, "/", pic);\
496 if(precache_pic(picpath) == "") {\
497 picpath = strcat("gfx/hud/default/", pic);\
499 drawpic(pos, picpath, sz, color, alpha, drawflag);\
502 void drawpic_aspect_skin_expanding(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
505 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
507 drawpic_skin(position + expandingbox_resize_centered_box_offset(sz, scale, 1), pic, scale * sz, rgb, alpha * (1 - fadelerp), flag);
510 void drawpic_aspect_skin_expanding_two(vector position, string pic, vector scale, vector rgb, float alpha, float flag, float fadelerp)
512 drawpic_aspect_skin_expanding(position, pic, scale, rgb, alpha, flag, fadelerp);
513 drawpic_skin(position, pic, scale, rgb, alpha * fadelerp, flag);
516 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
517 void drawstring_aspect(vector pos, string text, vector sz, vector color, float alpha, float drawflag) {
519 textsize = eX * stringwidth(text, FALSE, '1 1 1' * sz_y) + eY * sz_y;
522 textaspect = textsize_x/textsize_y;
529 if(aspect > textaspect) {
530 sz_x = sz_y * textaspect;
531 drawstring(pos + eX * (oldsz_x - sz_x) * 0.5, text, '1 1 0' * sz_y, color, alpha, drawflag);
533 sz_y = sz_x / textaspect;
534 drawstring(pos + eY * (oldsz_y - sz_y) * 0.5, text, '1 1 0' * sz_y, color, alpha, drawflag);
538 // drawstring wrapper to draw a colorcodedstring as large as possible with preserved aspect ratio into a box
539 void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float alpha, float drawflag) {
541 textsize = eX * stringwidth(text, TRUE, '1 1 1' * sz_y) + eY * sz_y;
544 textaspect = textsize_x/textsize_y;
551 if(aspect > textaspect) {
552 sz_x = sz_y * textaspect;
553 drawcolorcodedstring(pos + eX * (oldsz_x - sz_x) * 0.5, text, '1 1 0' * sz_y, alpha, drawflag);
555 sz_y = sz_x / textaspect;
556 drawcolorcodedstring(pos + eY * (oldsz_y - sz_y) * 0.5, text, '1 1 0' * sz_y, alpha, drawflag);
560 vector drawfontscale;
561 void drawstring_expanding(vector position, string text, vector scale, vector rgb, float alpha, float flag, float fadelerp)
564 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
566 drawfontscale = sz * '1 1 0';
567 dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
568 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);
570 // (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
572 drawfontscale = '1 1 0';
575 // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box
576 void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float alpha, float drawflag, float fadelerp) {
578 textsize = eX * stringwidth(text, FALSE, '1 1 1' * sz_y) + eY * sz_y;
581 textaspect = textsize_x/textsize_y;
588 if(aspect > textaspect) {
589 sz_x = sz_y * textaspect;
590 drawstring_expanding(pos + eX * (oldsz_x - sz_x) * 0.5, text, '1 1 0' * sz_y, color, alpha, drawflag, fadelerp);
592 sz_y = sz_x / textaspect;
593 drawstring_expanding(pos + eY * (oldsz_y - sz_y) * 0.5, text, '1 1 0' * sz_y, color, alpha, drawflag, fadelerp);
597 void drawcolorcodedstring_expanding(vector position, string text, vector scale, float alpha, float flag, float fadelerp)
600 sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
602 drawfontscale = sz * '1 1 0';
603 dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
604 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);
605 drawfontscale = '1 1 0';
608 void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float alpha, float drawflag, float fadelerp) {
610 textsize = eX * stringwidth(text, TRUE, '1 1 1' * sz_y) + eY * sz_y;
613 textaspect = textsize_x/textsize_y;
620 if(aspect > textaspect) {
621 sz_x = sz_y * textaspect;
622 drawcolorcodedstring_expanding(pos + eX * (oldsz_x - sz_x) * 0.5, text, '1 1 0' * sz_y, alpha, drawflag, fadelerp);
624 sz_y = sz_x / textaspect;
625 drawcolorcodedstring_expanding(pos + eY * (oldsz_y - sz_y) * 0.5, text, '1 1 0' * sz_y, alpha, drawflag, fadelerp);
629 // this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
630 void PolyDrawModel(entity e)
636 for(i_s = 0; ; ++i_s)
638 tex = getsurfacetexture(e, i_s);
640 break; // this is beyond the last one
641 n_t = getsurfacenumtriangles(e, i_s);
642 for(i_t = 0; i_t < n_t; ++i_t)
644 tri = getsurfacetriangle(e, i_s, i_t);
645 R_BeginPolygon(tex, 0);
646 R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1);
647 R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1);
648 R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1);
654 void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag)
657 vector ringsize, v, t;
658 ringsize = radius * '1 1 0';
660 x = cos(f * 2 * M_PI);
661 y = sin(f * 2 * M_PI);
662 q = fabs(x) + fabs(y);
668 // draw full rectangle
669 R_BeginPolygon(pic, drawflag);
670 v = centre; t = '0.5 0.5 0';
671 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
672 R_PolygonVertex(v, t, rgb, a);
674 v = centre; t = '0.5 0.5 0';
675 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
676 R_PolygonVertex(v, t, rgb, a);
678 v = centre; t = '0.5 0.5 0';
679 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
680 R_PolygonVertex(v, t, rgb, a);
682 v = centre; t = '0.5 0.5 0';
683 v_y -= 0.5 * ringsize_y; t -= '0.5 -0.5 0';
684 R_PolygonVertex(v, t, rgb, a);
690 R_BeginPolygon(pic, drawflag);
691 v = centre; t = '0.5 0.5 0';
692 R_PolygonVertex(v, t, rgb, a);
694 v = centre; t = '0.5 0.5 0';
695 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
696 R_PolygonVertex(v, t, rgb, a);
701 // draw upper and first triangle
702 R_BeginPolygon(pic, drawflag);
703 v = centre; t = '0.5 0.5 0';
704 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
705 R_PolygonVertex(v, t, rgb, a);
707 v = centre; t = '0.5 0.5 0';
708 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
709 R_PolygonVertex(v, t, rgb, a);
711 v = centre; t = '0.5 0.5 0';
712 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
713 R_PolygonVertex(v, t, rgb, a);
715 R_BeginPolygon(pic, drawflag);
716 v = centre; t = '0.5 0.5 0';
717 R_PolygonVertex(v, t, rgb, a);
719 v = centre; t = '0.5 0.5 0';
720 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
721 R_PolygonVertex(v, t, rgb, a);
723 v = centre; t = '0.5 0.5 0';
724 v_y -= 0.5 * ringsize_y; t -= '0.5 -0.5 0';
725 R_PolygonVertex(v, t, rgb, a);
733 // draw upper triangle
734 R_BeginPolygon(pic, drawflag);
735 v = centre; t = '0.5 0.5 0';
736 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
737 R_PolygonVertex(v, t, rgb, a);
739 v = centre; t = '0.5 0.5 0';
740 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
741 R_PolygonVertex(v, t, rgb, a);
743 v = centre; t = '0.5 0.5 0';
744 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
745 R_PolygonVertex(v, t, rgb, a);
751 R_BeginPolygon(pic, drawflag);
752 v = centre; t = '0.5 0.5 0';
753 R_PolygonVertex(v, t, rgb, a);
755 v = centre; t = '0.5 0.5 0';
756 v_x -= 0.5 * ringsize_x; t -= '0.5 0.5 0';
757 R_PolygonVertex(v, t, rgb, a);
762 // draw first triangle
763 R_BeginPolygon(pic, drawflag);
764 v = centre; t = '0.5 0.5 0';
765 R_PolygonVertex(v, t, rgb, a);
767 v = centre; t = '0.5 0.5 0';
768 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
769 R_PolygonVertex(v, t, rgb, a);
771 v = centre; t = '0.5 0.5 0';
772 v_y += 0.5 * ringsize_y; t += '0.5 -0.5 0';
773 R_PolygonVertex(v, t, rgb, a);
784 R_BeginPolygon(pic, drawflag);
785 v = centre; t = '0.5 0.5 0';
786 R_PolygonVertex(v, t, rgb, a);
788 v = centre; t = '0.5 0.5 0';
789 v_x += 0.5 * ringsize_x; t += '0.5 0.5 0';
790 R_PolygonVertex(v, t, rgb, a);
796 v = centre; t = '0.5 0.5 0';
797 v_x += x * 0.5 * ringsize_x; t += x * '0.5 0.5 0';
798 v_y += y * 0.5 * ringsize_y; t += y * '0.5 -0.5 0';
799 R_PolygonVertex(v, t, rgb, a);