/* ================= SCR_DrawKills ================= */ void SCR_DrawKills( void ) { if (cl.snap.ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cl.snap.ps.pm_type > 4 || cl_paused->value || !cl_drawKills->integer || cl.snap.ps.clientNum != clc.clientNum || !Cvar_VariableIntegerValue("cg_draw2d")) return; char killStr[12]; int x = 53; int y = 458; if (Cvar_VariableValue("cg_crosshairNamesType") == 0) { y = 448; } if (cl_drawKills->integer == 1 || cl_drawKills->integer == 3) { Com_sprintf(killStr, 12, "K:^2%i", cl.currentKills); SCR_DrawCondensedString(x, y, 8, killStr, g_color_table[7], qfalse ); } int spacing = 2; int size = 16; int width; int i; y = 440; if (cl_drawKills->integer > 1) { if (cl.currentKills < 6) { width = size * cl.currentKills + spacing * (cl.currentKills - 1); x = 320 - width / 2; for (i = 0; i < cl.currentKills; i++) { SCR_DrawNamedPic(x, 450, size, size, "skull.tga"); x += spacing + size; } } else { SCR_DrawNamedPic(304, 450, size, size, "skull.tga"); SCR_DrawCondensedString(321, 456, 8, va("x%i", cl.currentKills), g_color_table[7], qfalse); } } }
/* ================= SCR_DrawClock ================= */ void SCR_DrawClock(void) { int color, fontsize, posx, posy, hour; char string[16]; qtime_t myTime; color = cl_drawclockcolor->integer; fontsize = cl_drawclockfontsize->integer; posx = cl_drawclockposx->integer; posy = cl_drawclockposy->integer; if (cl_drawclock->integer) { Com_RealTime(&myTime); hour = myTime.tm_hour; if (cl_drawclock12->integer) hour = hourTo12(hour); Com_sprintf(string, sizeof(string), "%02i:%02i", hour, myTime.tm_min); SCR_DrawCondensedString(posx * 10, posy * 10, fontsize, string, g_color_table[color], qtrue); } }
/* ================= SCR_DrawKills ================= */ void SCR_DrawKills( void ) { if (cl.snap.ps.persistant[PERS_TEAM] == TEAM_SPECTATOR || cl.snap.ps.pm_type > 4 || cl_paused->value || !cl_drawKills->integer || cl.snap.ps.clientNum != clc.clientNum || !Cvar_VariableIntegerValue("cg_draw2d") || clc.g_gametype == 9) return; char killStr[12]; int x = 50; if (cl_drawKills->integer == 1 || cl_drawKills->integer == 3) { Com_sprintf(killStr, 12, "K:^2%i", cl.currentKills); SCR_DrawFontText(x, cl_hky->integer, cl_size->value, g_color_table[7], killStr, ITEM_TEXTSTYLE_SHADOWED); } int spacing = 2; int size = 16; int width; int i; if (cl_drawKills->integer > 1) { if (cl.currentKills < 6) { width = size * cl.currentKills + spacing * (cl.currentKills - 1); x = 320 - width / 2; for (i = 0; i < cl.currentKills; i++) { SCR_DrawNamedPic(x, 450, size, size, "skull.tga"); x += spacing + size; } } else { SCR_DrawNamedPic(304, 450, size, size, "skull.tga"); SCR_DrawCondensedString(321, 456, 8, va("x%i", cl.currentKills), g_color_table[7], qfalse); } } }