Scoreboard

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1410 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-11-04 15:16:19 +00:00
parent fe528cd1da
commit 88befd7e9a
2 changed files with 10 additions and 13 deletions
+2 -6
View File
@@ -55,7 +55,7 @@ void drawmenubg(int x1, int y1, int x2, int y2, bool border)
blendbox(x1, y1, x2, y2, border, tex->id);
}
#define MAXMENU 17
#define MAXMENU 34
bool menuvisible()
{
@@ -121,11 +121,7 @@ void rendermenu()
loopj(cdisp)
{
color *c = m.items[offset+j].bgcolor;
if(c)
{
int bh = y+(m.menusel%pagesize)*step;
blendbox(x-FONTH, bh-FONTH/6, x+w+FONTH, bh+FONTH+FONTH/6, false, -1, c);
}
if(c) blendbox(x-FONTH, y-FONTH/6, x+w+FONTH, y+FONTH+FONTH/6, false, -1, c);
draw_text(m.items[offset+j].text, x, y);
y += step;
}
+8 -7
View File
@@ -122,21 +122,23 @@ void renderscores(void *menu, bool init)
if(multiplayer(false))
{
serverinfo *s = getconnectedserverinfo();
if(s) s_sprintf(serverline)("%s:%d -- %s", s->name, s->port, s->sdesc);
if(s) s_sprintf(serverline)("%s:%d\t%s", s->name, s->port, s->sdesc);
}
if(m_teammode)
{
teamscore teamscores[2] = { teamscore(0), teamscore(1) };
teamscores[team_int(player1->team)].addscore(player1);
teamscore teamscores[2] = { teamscore(TEAM_CLA), teamscore(TEAM_RVSF) };
loopv(players)
{
if(!players[i]) continue;
teamscores[team_int(players[i]->team)].addscore(players[i]);
}
loopi(2) renderteamscore(menu, &teamscores[i]);
teamscores[team_int(player1->team)].addscore(player1);
int sort = teamscorecmp(&teamscores[TEAM_CLA], &teamscores[TEAM_RVSF]);
loopi(2) renderteamscore(menu, &teamscores[sort < 0 ? i : (i+1)&1]);
}
else
else
{
loopv(scores) renderscore(menu, scores[i]);
}
@@ -145,5 +147,4 @@ void renderscores(void *menu, bool init)
menuheader(menu, modeline, serverline);
refreshservers(NULL, init); // update server stats
}
}