void Sbar_MiniDeathmatchOverlay (void);
void Sbar_DeathmatchOverlay (void);
+void Sbar_IntermissionOverlay (void);
+void Sbar_FinaleOverlay (void);
+
/*
===============
}
-
/*
===============
Sbar_SoloScoreboard
{
if (showfps.integer)
{
- static double currtime, frametimes[32];
- double newtime, total;
+ int calc;
char temp[32];
- int calc, count, i;
- static int framecycle = 0;
float fps_x, fps_y, fps_scalex, fps_scaley;
-
- newtime = Sys_DoubleTime();
- frametimes[framecycle] = newtime - currtime;
- total = 0;
- count = 0;
- while(total < 0.2 && count < 32 && frametimes[i = (framecycle - count) & 31])
+ if (showfps.integer > 1)
{
- total += frametimes[i];
- count++;
+ static double currtime, frametimes[32];
+ double newtime, total;
+ int count, i;
+ static int framecycle = 0;
+
+ newtime = Sys_DoubleTime();
+ frametimes[framecycle] = newtime - currtime;
+ total = 0;
+ count = 0;
+ while(total < 0.2 && count < 32 && frametimes[i = (framecycle - count) & 31])
+ {
+ total += frametimes[i];
+ count++;
+ }
+ framecycle++;
+ framecycle &= 31;
+ if (showfps.integer == 2)
+ calc = (int) (((double) count / total) + 0.5);
+ else // showfps 3, rapid update
+ calc = (int) ((1.0 / (newtime - currtime)) + 0.5);
+ currtime = newtime;
+ }
+ else
+ {
+ static double nexttime = 0, lasttime = 0;
+ static int framerate = 0, framecount = 0;
+ double newtime;
+ newtime = Sys_DoubleTime();
+ if (newtime < nexttime)
+ framecount++;
+ else
+ {
+ framerate = (int) (framecount / (newtime - lasttime) + 0.5);
+ lasttime = newtime;
+ nexttime = lasttime + 0.2;
+ framecount = 1;
+ }
+ calc = framerate;
}
- framecycle++;
- framecycle &= 31;
- if (showfps.integer == 1)
- calc = (int) (((double) count / total) + 0.5);
- else // showfps 2, rapid update
- calc = (int) ((1.0 / (newtime - currtime)) + 0.5);
sprintf(temp, "%4i", calc);
- currtime = newtime;
fps_scalex = 12;
fps_scaley = 12;
fps_x = vid.conwidth - (fps_scalex * strlen(temp));
Sbar_Draw
===============
*/
-void DrawCrosshair(int num);
+//void DrawCrosshair(int num);
void Sbar_Draw (void)
{
if (scr_con_current == vid.conheight)
if (vid.conwidth > 320 && cl.gametype == GAME_DEATHMATCH)
Sbar_MiniDeathmatchOverlay ();
- if (crosshair.integer >= 1)
- DrawCrosshair(crosshair.integer - 1);
+// if (crosshair.integer >= 1)
+// DrawCrosshair(crosshair.integer - 1);
if (cl.intermission == 1)
Sbar_IntermissionOverlay();
// draw the text
l = scoreboardlines;
- x = ((vid.conwidth - 320)>>1) - 140;
+ x = (vid.conwidth - 280)>>1;
y = 40;
for (i = 0;i < l;i++)
{
// draw background
c = (qbyte *)&d_8to24table[(s->colors & 0xf0) + 8];
- DrawQ_Fill ( x, y+1, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
+ DrawQ_Fill ( x + 8, y+1, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
c = (qbyte *)&d_8to24table[((s->colors & 15)<<4) + 8];
- DrawQ_Fill ( x, y+4, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
+ DrawQ_Fill ( x + 8, y+4, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
total = cl.time - s->entertime;
minutes = (int)total/60;
// put it together
sprintf (num, "%c %4i:%4i %4i:%c%c %s", k == cl.viewentity - 1 ? 12 : ' ', (int) s->frags, fph, minutes, tens, units, s->name);
- DrawQ_String(x - 8, y, num, 0, 8, 8, 1, 1, 1, 1, 0);
+ DrawQ_String(x, y, num, 0, 8, 8, 1, 1, 1, 1, 0);
y += 8;
}
return;
}
- sbar_x = 0;
- sbar_y = 0;
+ sbar_x = (vid.conwidth - 320) >> 1;
+ sbar_y = (vid.conheight - 200) >> 1;
- DrawQ_Pic (64, 24, "gfx/complete.lmp", 0, 0, 1, 1, 1, 1, 0);
- DrawQ_Pic (0, 56, "gfx/inter.lmp", 0, 0, 1, 1, 1, 1, 0);
+ DrawQ_Pic (sbar_x + 64, sbar_y + 24, "gfx/complete.lmp", 0, 0, 1, 1, 1, 1, 0);
+ DrawQ_Pic (sbar_x + 0, sbar_y + 56, "gfx/inter.lmp", 0, 0, 1, 1, 1, 1, 0);
// time
dig = cl.completed_time/60;
pic = Draw_CachePic ("gfx/finale.lmp");
DrawQ_Pic((vid.conwidth - pic->width)/2, 16, "gfx/finale.lmp", 0, 0, 1, 1, 1, 1, 0);
}
+