return colorfade_current;\r
}\r
\r
+string Sbar_GetTexture(string img)\r
+{\r
+ string path = cvar_string("hud_style");\r
+ return strcat("gfx/hud/", path, "/", img);\r
+}\r
+\r
float xmin, xmax, ymin, ymax, sbwidth;\r
float sbar_fixscoreboardcolumnwidth_len;\r
float sbar_fixscoreboardcolumnwidth_iconlen;\r
drawcolorcodedstring(pos, textShortenToWidth("self", sz_x, font_sz, stringwidth_colors), font_sz, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
else\r
{\r
- drawpic(pos, "gfx/hud/sb_health", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_health"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
pos_x = position_x + dimensions_x * cvar("hud_item_preylist_health_text_location");\r
sz_x = dimensions_x * cvar("hud_item_preylist_health_text_length");\r
tmp_y = 1.25 * sbar_fontsize_y;\r
\r
// rounded header\r
- drawpic(pos, "gfx/hud/sb_scoreboard_tableheader", tmp, (rgb * sbar_color_bg_team) + '0.5 0.5 0.5', sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_scoreboard_tableheader"), tmp, (rgb * sbar_color_bg_team) + '0.5 0.5 0.5', sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
\r
// table border\r
tmp_y += sbar_border_thickness;\r
\r
// table background\r
tmp_y = body_table_height;\r
- drawpic_tiled(pos, "gfx/hud/sb_scoreboard_bg", bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic_tiled(pos, Sbar_GetTexture("sb_scoreboard_bg"), bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
\r
// anyway, apply some color\r
//drawfill(pos, tmp + '2 0 0', rgb, 0.1, DRAWFLAG_NORMAL);\r
tmp_x = sbwidth;\r
tmp_y = height * rows;\r
\r
- drawpic_tiled(pos, "gfx/hud/sb_scoreboard_bg", bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic_tiled(pos, Sbar_GetTexture("sb_scoreboard_bg"), bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
drawborderlines(sbar_accuracy_border_thickness, pos, tmp, '0 0 0', sbar_scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);\r
\r
// column highlighting\r
weapon_alpha = 0.2 * sbar_scoreboard_alpha_fg;\r
\r
// weapon icon\r
- drawpic(pos, strcat("gfx/hud/inv_weapon", self.netname), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture(strcat("inv_weapon", self.netname)), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);\r
// the accuracy\r
if(weapon_damage) {\r
weapons_with_stats += 1;\r
tmp_x = sbwidth;\r
tmp_y = sbar_fontsize_y * RANKINGS_RECEIVED_CNT;\r
\r
- drawpic_tiled(pos, "gfx/hud/sb_scoreboard_bg", bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic_tiled(pos, Sbar_GetTexture("sb_scoreboard_bg"), bg_size, tmp, rgb * sbar_color_bg_team, sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);\r
drawborderlines(sbar_border_thickness, pos, tmp, '0 0 0', sbar_scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);\r
\r
// row highlighting\r
\r
// Draw the scoreboard\r
vector bg_size;\r
- bg_size = drawgetimagesize("gfx/hud/sb_scoreboard_bg");\r
+ bg_size = drawgetimagesize(Sbar_GetTexture("sb_scoreboard_bg"));\r
\r
if(teamplay)\r
{\r
{\r
case 0:\r
if(getstati(STAT_ITEMS) & IT_FUEL_REGEN)\r
- return "gfx/hud/sb_fuel_regen";\r
+ return Sbar_GetTexture("sb_fuel_regen");\r
else\r
- return "gfx/hud/sb_fuel";\r
+ return Sbar_GetTexture("sb_fuel");\r
default:\r
return "";\r
}\r
rankname = race_PlaceName(rank);\r
\r
if(race_status == 0)\r
- drawpic(pos, "gfx/hud/race/newfail", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("race/newfail"), '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
else if(race_status == 1) {\r
- drawpic(pos, "gfx/hud/race/newtime", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL); \r
+ drawpic(pos, Sbar_GetTexture("race/newtime"), '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL); \r
drawcolorcodedstring(pos + '40 80 0' - '1 0 0' * stringwidth(s, TRUE, '5 0 0'), s, '10 10 0', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
drawstring(pos + '40 20 0' - '1 0 0' * stringwidth(rankname, TRUE, '7 0 0'), rankname, '14 14 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
} else if(race_status == 2) {\r
if(race_status_name == GetPlayerName(player_localentnum -1) || !race_myrank || race_myrank < rank)\r
- drawpic(pos, "gfx/hud/race/newrankgreen", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("race/newrankgreen"), '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
else\r
- drawpic(pos, "gfx/hud/race/newrankyellow", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("race/newrankyellow"), '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
drawcolorcodedstring(pos + '40 80 0' - '1 0 0' * stringwidth(s, TRUE, '5 0 0'), s, '10 10 0', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
drawstring(pos + '40 20 0' - '1 0 0' * stringwidth(rankname, TRUE, '7 0 0'), rankname, '14 14 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
} else if(race_status == 3) {\r
- drawpic(pos, "gfx/hud/race/newrecordserver", '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("race/newrecordserver"), '80 80 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
drawcolorcodedstring(pos + '40 80 0' - '1 0 0' * stringwidth(s, TRUE, '5 0 0'), s, '10 10 0', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
drawstring(pos + '40 20 0' - '1 0 0' * stringwidth(rankname, TRUE, '7 0 0'), rankname, '14 14 0', '1 1 1', sbar_alpha_fg * a, DRAWFLAG_NORMAL);\r
}\r
x = armor;\r
if (x > 0)\r
{\r
- Sbar_DrawPic("gfx/hud/sb_armor", stov(cvar_string("hud_item_armor_icon_position")), stov(cvar_string("hud_item_armor_icon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture("sb_armor"), stov(cvar_string("hud_item_armor_icon_position")), stov(cvar_string("hud_item_armor_icon_scale")), FALSE);\r
Sbar_DrawXNum(stov(cvar_string("hud_item_armor_text_position")), x, 3, 0, cvar("hud_item_armor_text_scale"), Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
// health\r
x = health;\r
- Sbar_DrawPic("gfx/hud/sb_health", stov(cvar_string("hud_item_health_icon_position")), stov(cvar_string("hud_item_health_icon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture("sb_health"), stov(cvar_string("hud_item_health_icon_position")), stov(cvar_string("hud_item_health_icon_scale")), FALSE);\r
Sbar_DrawXNum(stov(cvar_string("hud_item_health_text_position")), x, 3, 0, cvar("hud_item_health_text_scale"), Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
// if we are dead, we can skip the HUD from here\r
entity e;\r
e = get_weaponinfo(activeweapon);\r
if (e && e.netname != "" && e.netname != "N/A")\r
- Sbar_DrawPic(strcat("gfx/hud/sb_activeweapon_", e.netname), stov(cvar_string("hud_item_weapon_position")), stov(cvar_string("hud_item_weapon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture(strcat("sb_activeweapon_", e.netname)), stov(cvar_string("hud_item_weapon_position")), stov(cvar_string("hud_item_weapon_scale")), FALSE);\r
}\r
\r
void Sbar_Timer()\r
seconds = secondsLeft;\r
}\r
\r
- Sbar_DrawPic("gfx/hud/sb_time", stov(cvar_string("hud_item_timer_icon_position")), stov(cvar_string("hud_item_timer_icon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture("sb_time"), stov(cvar_string("hud_item_timer_icon_position")), stov(cvar_string("hud_item_timer_icon_scale")), FALSE);\r
\r
finaltime = strcat(ftos(minutes), ":");\r
if(seconds < 10)\r
\r
if(text1_msg != "" && cvar("sbar_ring1"))\r
{\r
- DrawCircleClippedPic(ring_pos, ring1_size, "gfx/hud/sb_ring.tga", ring1_clip, ring1_color, ring1_alpha, DRAWFLAG_ADDITIVE);\r
+ DrawCircleClippedPic(ring_pos, ring1_size, Sbar_GetTexture("sb_ring.tga"), ring1_clip, ring1_color, ring1_alpha, DRAWFLAG_ADDITIVE);\r
text_pos_x = ring_pos_x - stringwidth(text1_msg, FALSE, text1_size) / 2;\r
text_pos_y = ring_pos_y - ring1_size / 2;\r
drawstring(text_pos, text1_msg, text1_size, ring1_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
if(text2_msg != "" && cvar("sbar_ring2"))\r
{\r
- DrawCircleClippedPic(ring_pos, ring2_size, "gfx/hud/sb_ring.tga", ring2_clip, ring2_color, ring2_alpha, DRAWFLAG_ADDITIVE);\r
+ DrawCircleClippedPic(ring_pos, ring2_size, Sbar_GetTexture("sb_ring.tga"), ring2_clip, ring2_color, ring2_alpha, DRAWFLAG_ADDITIVE);\r
text_pos_x = ring_pos_x - stringwidth(text2_msg, FALSE, text2_size) / 2;\r
text_pos_y = ring_pos_y + ring1_size / 2;\r
drawstring(text_pos, text2_msg, text2_size, ring2_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
{\r
if(dt < 5)\r
{\r
- drawpic_expanding_two(pos, "gfx/hud/sb_str", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding_two(pos, Sbar_GetTexture("sb_str"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, (ceil(dt) - dt) / 0.5, 1));\r
}\r
else\r
{\r
- drawpic(pos, "gfx/hud/sb_str", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+ drawpic(pos, Sbar_GetTexture("sb_str"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
}\r
Sbar_DrawXNum(stov(cvar_string("hud_item_strength_text_position")), ceil(dt), 2, 0, cvar("hud_item_strength_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(dt > -1)\r
{\r
- drawpic_expanding(pos, "gfx/hud/sb_str", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding(pos, Sbar_GetTexture("sb_str"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, -dt / 0.5, 1));\r
}\r
}\r
{\r
if(dt < 5)\r
{\r
- drawpic_expanding_two(pos, "gfx/hud/sb_invinc", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding_two(pos, Sbar_GetTexture("sb_invinc"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, (ceil(dt) - dt) / 0.5, 1));\r
}\r
else\r
{\r
- drawpic(pos, "gfx/hud/sb_invinc", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+ drawpic(pos, Sbar_GetTexture("sb_invinc"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
}\r
Sbar_DrawXNum(stov(cvar_string("hud_item_invincible_text_position")), ceil(dt), 2, 0, cvar("hud_item_invincible_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(dt > -1)\r
{\r
- drawpic_expanding(pos, "gfx/hud/sb_invinc", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding(pos, Sbar_GetTexture("sb_invinc"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, -dt / 0.5, 1));\r
}\r
}\r
pos -= '-15 -6 0'; // adjust to the origin of these numbers\r
\r
pressedkeys = getstatf(STAT_PRESSED_KEYS);\r
- drawpic(pos + '-15 -6 0', "gfx/hud/keys/key_bg.tga", bgsize, '1 1 1', 0.1 * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos + ' 83.5 9 0', ((pressedkeys & KEY_CROUCH) ? "gfx/hud/keys/key_crouch_inv.tga" : "gfx/hud/keys/key_crouch.tga"), ' 24 24 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos + ' 32 -1.5 0', ((pressedkeys & KEY_FORWARD) ? "gfx/hud/keys/key_forward_inv.tga" : "gfx/hud/keys/key_forward.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos + '-11.5 9 0', ((pressedkeys & KEY_JUMP) ? "gfx/hud/keys/key_jump_inv.tga" : "gfx/hud/keys/key_jump.tga"), ' 24 24 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos + ' -1 32 0', ((pressedkeys & KEY_LEFT) ? "gfx/hud/keys/key_left_inv.tga" : "gfx/hud/keys/key_left.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos + ' 32 32 0', ((pressedkeys & KEY_BACKWARD) ? "gfx/hud/keys/key_backward_inv.tga" : "gfx/hud/keys/key_backward.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos + ' 65 32 0', ((pressedkeys & KEY_RIGHT) ? "gfx/hud/keys/key_right_inv.tga" : "gfx/hud/keys/key_right.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + '-15 -6 0', Sbar_GetTexture("keys/key_bg.tga"), bgsize, '1 1 1', 0.1 * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + ' 83.5 9 0', Sbar_GetTexture((pressedkeys & KEY_CROUCH) ? "keys/key_crouch_inv.tga" : "keys/key_crouch.tga"), ' 24 24 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + ' 32 -1.5 0', Sbar_GetTexture((pressedkeys & KEY_FORWARD) ? "keys/key_forward_inv.tga" : "keys/key_forward.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + '-11.5 9 0', Sbar_GetTexture((pressedkeys & KEY_JUMP) ? "keys/key_jump_inv.tga" : "keys/key_jump.tga"), ' 24 24 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + ' -1 32 0', Sbar_GetTexture((pressedkeys & KEY_LEFT) ? "keys/key_left_inv.tga" : "keys/key_left.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + ' 32 32 0', Sbar_GetTexture((pressedkeys & KEY_BACKWARD) ? "keys/key_backward_inv.tga" : "keys/key_backward.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + ' 65 32 0', Sbar_GetTexture((pressedkeys & KEY_RIGHT) ? "keys/key_right_inv.tga" : "keys/key_right.tga"), ' 32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
void Sbar_ShowSpeed(void)\r
}\r
\r
if (acceleration > 0)\r
- drawpic(pos, "gfx/hud/accelerometer_gradient", acceleration * scale * '40 0 0' + sz * '0 1 0', rgb, alpha * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("accelerometer_gradient"), acceleration * scale * '40 0 0' + sz * '0 1 0', rgb, alpha * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
else if (acceleration < 0)\r
- drawpic(pos + acceleration * scale * '40 0 0', "gfx/hud/accelerometer_gradient", -acceleration * scale * '40 0 0' + sz * '0 1 0', rgb, alpha * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos + acceleration * scale * '40 0 0', Sbar_GetTexture("accelerometer_gradient"), -acceleration * scale * '40 0 0' + sz * '0 1 0', rgb, alpha * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
void Sbar_DrawAccuracyStats_Description_Hitscan(vector position)\r
pos_y = top_border_splash + row_splash * (fill_size_y + row_margin);\r
\r
// background\r
- drawpic(pos, "gfx/hud/sb_accuracy", fill_size , fill_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_accuracy"), fill_size , fill_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
drawborderlines(sbar_border_thickness, pos, fill_size, border_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
\r
// the weapon\r
- drawpic(pos, strcat("gfx/hud/inv_weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("inv_weapon"), self.netname), '1 0.5 0' * fill_size_x , '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
// the amount of shots fired or max damage\r
drawstringright(pos + '4.5 0 0' * sbar_fontsize_x + '0 3 0' * sbar_fontsize_y, ftos(weapon_damage), sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
pos_y = top_border_hitscan + row_hitscan * (fill_size_y + row_margin);\r
\r
// background\r
- drawpic(pos, "gfx/hud/sb_accuracy", fill_size , fill_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_accuracy"), fill_size , fill_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
drawborderlines(sbar_border_thickness, pos, fill_size, border_colour, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
\r
// the weapon\r
- drawpic(pos, strcat("gfx/hud/inv_weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture(strcat("inv_weapon", self.netname)), '1 0.5 0' * fill_size_x , '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
// the amount of shots fired or max damage\r
drawstringright(pos + '4.5 0 0' * sbar_fontsize_x + '0 3 0' * sbar_fontsize_y, ftos(weapon_damage), sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
vector voteorigin = bottomright - '290 135 0';\r
vector votesize = '280 70 0';\r
- drawpic(voteorigin, "gfx/hud/voteprogress_back", votesize, color, a * sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic(voteorigin, Sbar_GetTexture("voteprogress_back"), votesize, color, a * sbar_alpha_bg, DRAWFLAG_NORMAL);\r
\r
s = "A vote has been called for: ";\r
drawstring(voteorigin + '0.5 0 0' * votesize_x + '0 0.1 0' * votesize_y - '1 0 0' * stringwidth(s, FALSE, '6 0 0'), s, '12 12 0', '1 1 1', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
// draw the progress bars\r
drawsetcliparea(voteorigin_x, voteorigin_y, votesize_x * 0.5 * (vote_yescount/vote_needed), votesize_y);\r
- drawpic(voteorigin, "gfx/hud/voteprogress_prog", votesize, '0 1 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(voteorigin, Sbar_GetTexture("voteprogress_prog"), votesize, '0 1 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
drawsetcliparea(voteorigin_x + votesize_x - votesize_x * 0.5 * (vote_nocount/vote_needed), voteorigin_y, votesize_x * 0.5, votesize_y);\r
- drawpic(voteorigin, "gfx/hud/voteprogress_prog", votesize, '1 0 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(voteorigin, Sbar_GetTexture("voteprogress_prog"), votesize, '1 0 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
// draw the highlights\r
if(vote_highlighted == 1) {\r
drawsetcliparea(voteorigin_x, voteorigin_y, votesize_x * 0.5, votesize_y);\r
- drawpic(voteorigin, "gfx/hud/voteprogress_voted", votesize, '0 1 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(voteorigin, Sbar_GetTexture("voteprogress_voted"), votesize, '0 1 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(vote_highlighted == 2) {\r
drawsetcliparea(voteorigin_x + 0.5 * votesize_x, voteorigin_y, votesize_x * 0.5, votesize_y);\r
- drawpic(voteorigin, "gfx/hud/voteprogress_voted", votesize, '1 0 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(voteorigin, Sbar_GetTexture("voteprogress_voted"), votesize, '1 0 0', a * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
drawresetcliparea();\r
if(getstati(STAT_ARMOR) < g_power)\r
{\r
// subsystems are down\r
- drawpic(warn_pos - '128 0 0', "gfx/hud/sb_power_fail", '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(warn_pos - '16 0 0' + '0 150 0', "gfx/hud/sb_power_fail_icon", '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
+ drawpic(warn_pos - '128 0 0', Sbar_GetTexture("sb_power_fail"), '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(warn_pos - '16 0 0' + '0 150 0', Sbar_GetTexture("sb_power_fail_icon"), '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
power_boot = time + g_power_reboot;\r
Sbar_Portrait(); // draw the portrait still\r
return; // skip drawing the HUD\r
else if(time <= power_boot)\r
{\r
// subsystems are rebooting\r
- drawpic(warn_pos - '128 0 0', "gfx/hud/sb_power_reboot", '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(warn_pos - '16 0 0' + '0 150 0', "gfx/hud/sb_power_reboot_icon", '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
+ drawpic(warn_pos - '128 0 0', Sbar_GetTexture("sb_power_reboot"), '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(warn_pos - '16 0 0' + '0 150 0', Sbar_GetTexture("sb_power_reboot_icon"), '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
Sbar_Portrait(); // draw the portrait still\r
return; // skip drawing the HUD\r
}\r
Sbar_DrawString(status_text, status_pos, status_size);\r
\r
if(getstati(STAT_VORE_DIGESTING)) // we are currently digesting\r
- Sbar_DrawPic("gfx/hud/sb_digestion_active", stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture("sb_digestion_active"), stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
else if(stomach_load) // we can digest at this time\r
- Sbar_DrawPic("gfx/hud/sb_digestion_possible", stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture("sb_digestion_possible"), stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
else // we cannot digest at this time\r
- Sbar_DrawPic("gfx/hud/sb_digestion_impossible", stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
+ Sbar_DrawPic(Sbar_GetTexture("sb_digestion_impossible"), stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
\r
// draw the stomach board player list\r
entity pl, pred;\r
float red_alpha, red_alpha_prevstatus;\r
red_alpha = red_alpha_prevstatus = 1;\r
switch(redflag) {\r
- case 1: red_icon = "gfx/hud/sb_flag_red_taken"; break;\r
- case 2: red_icon = "gfx/hud/sb_flag_red_lost"; break;\r
- case 3: red_icon = "gfx/hud/sb_flag_red_carrying"; red_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
+ case 1: red_icon = Sbar_GetTexture("sb_flag_red_taken"); break;\r
+ case 2: red_icon = Sbar_GetTexture("sb_flag_red_lost"); break;\r
+ case 3: red_icon = Sbar_GetTexture("sb_flag_red_carrying"); red_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
default:\r
if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM2))\r
- red_icon = "gfx/hud/sb_flag_red_shielded";\r
+ red_icon = Sbar_GetTexture("sb_flag_red_shielded");\r
else\r
red_icon = string_null;\r
break;\r
}\r
switch(redflag_prevstatus) {\r
- case 1: red_icon_prevstatus = "gfx/hud/sb_flag_red_taken"; break;\r
- case 2: red_icon_prevstatus = "gfx/hud/sb_flag_red_lost"; break;\r
- case 3: red_icon_prevstatus = "gfx/hud/sb_flag_red_carrying"; red_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
+ case 1: red_icon_prevstatus = Sbar_GetTexture("sb_flag_red_taken"); break;\r
+ case 2: red_icon_prevstatus = Sbar_GetTexture("sb_flag_red_lost"); break;\r
+ case 3: red_icon_prevstatus = Sbar_GetTexture("sb_flag_red_carrying"); red_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
default:\r
if(redflag == 3)\r
- red_icon_prevstatus = "gfx/hud/sb_flag_red_carrying"; // make it more visible\r
+ red_icon_prevstatus = Sbar_GetTexture("sb_flag_red_carrying"); // make it more visible\r
else if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM2))\r
- red_icon_prevstatus = "gfx/hud/sb_flag_red_shielded";\r
+ red_icon_prevstatus = Sbar_GetTexture("sb_flag_red_shielded");\r
else\r
red_icon_prevstatus = string_null;\r
break;\r
float blue_alpha, blue_alpha_prevstatus;\r
blue_alpha = blue_alpha_prevstatus = 1;\r
switch(blueflag) {\r
- case 1: blue_icon = "gfx/hud/sb_flag_blue_taken"; break;\r
- case 2: blue_icon = "gfx/hud/sb_flag_blue_lost"; break;\r
- case 3: blue_icon = "gfx/hud/sb_flag_blue_carrying"; blue_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
+ case 1: blue_icon = Sbar_GetTexture("sb_flag_blue_taken"); break;\r
+ case 2: blue_icon = Sbar_GetTexture("sb_flag_blue_lost"); break;\r
+ case 3: blue_icon = Sbar_GetTexture("sb_flag_blue_carrying"); blue_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
default:\r
if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM1))\r
- blue_icon = "gfx/hud/sb_flag_blue_shielded";\r
+ blue_icon = Sbar_GetTexture("sb_flag_blue_shielded");\r
else\r
blue_icon = string_null;\r
break;\r
}\r
switch(blueflag_prevstatus) {\r
- case 1: blue_icon_prevstatus = "gfx/hud/sb_flag_blue_taken"; break;\r
- case 2: blue_icon_prevstatus = "gfx/hud/sb_flag_blue_lost"; break;\r
- case 3: blue_icon_prevstatus = "gfx/hud/sb_flag_blue_carrying"; blue_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
+ case 1: blue_icon_prevstatus = Sbar_GetTexture("sb_flag_blue_taken"); break;\r
+ case 2: blue_icon_prevstatus = Sbar_GetTexture("sb_flag_blue_lost"); break;\r
+ case 3: blue_icon_prevstatus = Sbar_GetTexture("sb_flag_blue_carrying"); blue_alpha_prevstatus = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ); break;\r
default:\r
if(blueflag == 3)\r
- blue_icon_prevstatus = "gfx/hud/sb_flag_blue_carrying"; // make it more visible\r
+ blue_icon_prevstatus = Sbar_GetTexture("sb_flag_blue_carrying"); // make it more visible\r
else if((stat_items & IT_CTF_SHIELDED) && (myteam == COLOR_TEAM1))\r
- blue_icon_prevstatus = "gfx/hud/sb_flag_blue_shielded";\r
+ blue_icon_prevstatus = Sbar_GetTexture("sb_flag_blue_shielded");\r
else\r
blue_icon_prevstatus = string_null;\r
break;\r
switch(keyteam)\r
{\r
case COLOR_TEAM1:\r
- drawpic (pa, "gfx/hud/sb_kh_redarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (pa, Sbar_GetTexture("sb_kh_redarrow"), kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
case COLOR_TEAM2:\r
- drawpic (pa, "gfx/hud/sb_kh_bluearrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (pa, Sbar_GetTexture("sb_kh_bluearrow"), kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
case COLOR_TEAM3:\r
- drawpic (pa, "gfx/hud/sb_kh_yellowarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (pa, Sbar_GetTexture("sb_kh_yellowarrow"), kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
case COLOR_TEAM4:\r
- drawpic (pa, "gfx/hud/sb_kh_pinkarrow", kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (pa, Sbar_GetTexture("sb_kh_pinkarrow"), kh_asize, '1 1 1', aa, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
default:\r
break;\r
switch(i) // YAY! switch(i) inside a for loop for i. DailyWTF, here we come!\r
{\r
case 0:\r
- drawpic (p, "gfx/hud/sb_kh_red", kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (p, Sbar_GetTexture("sb_kh_red"), kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
case 1:\r
- drawpic (p, "gfx/hud/sb_kh_blue", kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (p, Sbar_GetTexture("sb_kh_blue"), kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
case 2:\r
- drawpic (p, "gfx/hud/sb_kh_yellow", kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (p, Sbar_GetTexture("sb_kh_yellow"), kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
case 3:\r
- drawpic (p, "gfx/hud/sb_kh_pink", kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
+ drawpic (p, Sbar_GetTexture("sb_kh_pink"), kh_size, '1 1 1', a, DRAWFLAG_NORMAL); // show 30% alpha key\r
break;\r
}\r
}\r