From 6c660aae1a385f51627ec377ec35190c2a962f0d Mon Sep 17 00:00:00 2001 From: stpohle Date: Thu, 28 Oct 2004 18:15:17 +0000 Subject: [PATCH] in games the teams will have diffrent colors --- src/configuration.c | 3 ++- src/game.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/configuration.c b/src/configuration.c index 05903b0..a902270 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -1,4 +1,4 @@ -/* $Id: configuration.c,v 1.66 2004/10/06 17:43:28 stpohle Exp $ +/* $Id: configuration.c,v 1.67 2004/10/28 18:15:17 stpohle Exp $ * configuration */ #include @@ -62,6 +62,7 @@ config_init (int argc, char **argv) srand (((int) time (NULL))); // initialize randomgenerator for (i = 0; i < MAX_TEAMS; i++) { + teams[i].col = i; sprintf (teams[i].name, "Team %d", i+1); for (j = 0; j < MAX_PLAYERS; j++) teams[i].players[j] = NULL; diff --git a/src/game.c b/src/game.c index 448abb1..c30fc6d 100644 --- a/src/game.c +++ b/src/game.c @@ -1,4 +1,4 @@ -/* $Id: game.c,v 1.99 2004/10/18 20:20:22 stpohle Exp $ +/* $Id: game.c,v 1.100 2004/10/28 18:15:18 stpohle Exp $ game.c - procedures for the game. */ #include @@ -71,7 +71,10 @@ game_draw_info () col = 3; } else { // player is alife - col = 0; + if (bman.gametype == GT_team) + col = teams[players[i].team_nr].col; + else + col = 0; } font_draw (x, j, scrtext, 0, col);