return rgb;\r
}\r
\r
-void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, float lettersize, vector rgb, float highlighted, float stroke, float alpha, float dflags)\r
+void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, float lettersize, vector rgb, float alpha, float dflags)\r
{\r
float l, i;\r
string str, tmp, l_length;\r
float minus, plus;\r
- vector vsize, num_color;\r
+ vector vsize;\r
\r
vsize_x = vsize_y = lettersize;\r
vsize_z = 0;\r
l = strlen(str);\r
}\r
\r
- if (highlighted == 1) {\r
- vector hl_size;\r
- hl_size_x = vsize_x * l;\r
- hl_size_y = vsize_y * 1.1;\r
- hl_size_z = 0;\r
- if(minus)\r
- hl_size_x = hl_size_x + vsize_x;\r
-\r
- vector hl_pos;\r
- hl_pos_x = pos_x - lettersize / 10;\r
- hl_pos_y = pos_y - lettersize / 20;\r
- hl_pos_z = 0;\r
-\r
- //drawpic(hl_pos, strcat("gfx/hud/sb_highlight_", l_length), hl_size, '1 1 1', alpha, dflags);\r
- }\r
-\r
- if (stroke == 1)\r
- num_color = '1 1 1';\r
- else\r
- num_color = rgb;\r
-\r
if(minus)\r
{\r
- if (stroke == 1)\r
- drawstring(pos, "-", vsize, rgb, alpha, dflags);\r
- drawstring(pos, "-", vsize, num_color, alpha, dflags);\r
+ drawstring(pos, "-", vsize, rgb, alpha, dflags);\r
pos_x += lettersize / 2;\r
} else if(plus)\r
{\r
- if (stroke == 1)\r
- drawstring(pos, "+", vsize, rgb, alpha, dflags);\r
- drawstring(pos, "+", vsize, num_color, alpha, dflags);\r
+ drawstring(pos, "+", vsize, rgb, alpha, dflags);\r
pos_x += lettersize / 2;\r
}\r
\r
- if (stroke == 1)\r
- drawstring(pos, str, vsize, rgb, alpha, dflags);\r
- drawstring(pos, str, vsize, num_color, alpha, dflags);\r
+ drawstring(pos, str, vsize, rgb, alpha, dflags);\r
}\r
\r
void Sbar_DrawXNum_Colored (vector pos, float x, float lettersize, float alpha)\r
color_y = 0;\r
color_z = 0;\r
}\r
- Sbar_DrawXNum(pos, x, 3, 0, lettersize, color, 0, 0, alpha, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos, x, 3, 0, lettersize, color, alpha, DRAWFLAG_NORMAL);\r
}\r
\r
void Cmd_Sbar_SetFields(float argc);\r
continue;\r
\r
rgb = GetTeamRGB(tm.team);\r
- Sbar_DrawXNum(pos - '9.5 0 0' * sbar_fontsize_y + '0 1 0' * sbar_fontsize_y, tm.(teamscores[ts_primary]), 6, 0, sbar_fontsize_y * 1.5, rgb, 0, 1, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '9.5 0 0' * sbar_fontsize_y + '0 1 0' * sbar_fontsize_y, tm.(teamscores[ts_primary]), 6, 0, sbar_fontsize_y * 1.5, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
\r
if(ts_primary != ts_secondary)\r
- Sbar_DrawXNum(pos - '7.5 0 0' * sbar_fontsize_y + '0 2.5 0' * sbar_fontsize_y, tm.(teamscores[ts_secondary]), 6, 0, sbar_fontsize_y * 1, rgb, 0, 1, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '7.5 0 0' * sbar_fontsize_y + '0 2.5 0' * sbar_fontsize_y, tm.(teamscores[ts_secondary]), 6, 0, sbar_fontsize_y * 1, rgb, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
\r
pos = Sbar_Scoreboard_MakeTable(pos, tm, rgb, bg_size);\r
}\r
distribution_color = '1 0 0';\r
minusplus = 2; // minusplus 1: always prefix with plus sign\r
}\r
- Sbar_DrawXNum(score_pos + '212 -4 0' - '16 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(score_pos + '212 12 0' - '16 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos + '212 -4 0' - '16 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos + '212 12 0' - '16 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
// race record display\r
if (distribution <= 0 || distribution == score) // draw the highlight background behind the timer if we have the lead\r
drawpic(score_pos + '173 0 0' - '32 0 0' * (4 + TIME_DECIMALS), "gfx/hud/sb_highlight_4", '0 28 0' + '32 0 0' * (4 + TIME_DECIMALS), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
- Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0', racemsec, -TIME_DECIMALS, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '66 0 0', racesec, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0', racemsec, -TIME_DECIMALS, 0, 30, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '66 0 0', racesec, -2, 0, 30, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawstring(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '21 0 0', ".", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
\r
- Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '132 0 0', racemin, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '132 0 0', racemin, -2, 0, 30, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawstring(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '88 0 0', ":", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
\r
} else if (!teamplay) { // non-teamgames, except race/cts\r
else\r
distribution_color = '1 0 0';\r
\r
- Sbar_DrawXNum(secondary_score_pos, distribution, 6, 0, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, leader, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(secondary_score_pos, distribution, 6, 0, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
} else { // teamgames\r
float max_fragcount;\r
max_fragcount = -999;\r
if(tm.team == myteam) {\r
if (max_fragcount == score)\r
leader = 1;\r
- Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team) * 0.8, leader, 1, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team) * 0.8, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
} else {\r
if (max_fragcount == score)\r
leader = 1;\r
- Sbar_DrawXNum(secondary_score_pos, score, 6, 0, 16, GetTeamRGB(tm.team) * 0.8, leader, 1, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(secondary_score_pos, score, 6, 0, 16, GetTeamRGB(tm.team) * 0.8, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
secondary_score_pos = secondary_score_pos + '0 16 0';\r
}\r
}\r
}\r
\r
if(minutesLeft >= 1 || cvar("sbar_increment_maptime") || timelimit == 0 || warmup_stage) {\r
- Sbar_DrawXNum(topright - ('44 -2 0' - '0 2 0') - (strlen(ftos(minutes)) * 18 * scale * '0.5 0 0'), minutes, 3, 0, 18 * scale, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(topright - ('44 -2 0' - '0 2 0') - (strlen(ftos(minutes)) * 18 * scale * '0.5 0 0'), minutes, 3, 0, 18 * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawstring(topright - ('42 -2 0' - '0 1 0'), ":", '18 18 0' * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
- Sbar_DrawXNum(topright - ('31 -2 0' + '3 0 0' - '0 2 0'), seconds, -2, 0, 18 * scale, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(topright - ('31 -2 0' + '3 0 0' - '0 2 0'), seconds, -2, 0, 18 * scale, timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
void CSQC_Strength_Timer() {\r
{\r
drawpic(pos, "gfx/hud/sb_str", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
}\r
- Sbar_DrawXNum(pos - '20 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '20 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(dt > -1)\r
{\r
{\r
drawpic(pos - '0 -22 0', "gfx/hud/sb_invinc", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
}\r
- Sbar_DrawXNum(pos - '20 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '20 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(dt > -1)\r
{\r
float stomach_load;\r
stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
\r
- Sbar_DrawXNum(bottomleft - '-26 171 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(bottomleft - '-26 171 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawstring(bottomleft - '-41 171 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(bottomleft - '-50 171 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(bottomleft - '-50 171 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
if(getstati(STAT_VORE_DIGESTING))\r
drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
{\r
a = getstati(GetAmmoStat(0)); // how much fuel do we have?\r
drawpic(pos - '98 18 0', GetAmmoPicture(0), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(pos - '128 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '128 16 0', a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else\r
{\r
if(weapon_clipload < 0) // we're reloading\r
drawstring(pos - '128 23 0', "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
else\r
- Sbar_DrawXNum(pos - '128 23 0', weapon_clipload, 2, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(pos - '128 7 0', a, 3, 0, 12, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '128 23 0', weapon_clipload, 2, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '128 7 0', a, 3, 0, 12, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else\r
- Sbar_DrawXNum(pos - '128 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '128 16 0', a, 3, 0, 16, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
}\r