From 8dd337ba74248f317d90c137697bab8412b467cd Mon Sep 17 00:00:00 2001 From: patty21 Date: Sat, 25 Sep 2004 11:17:38 +0000 Subject: [PATCH] First part of new multi selection screen --- src/multiwait.c | 69 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/src/multiwait.c b/src/multiwait.c index 3145395..2bf3409 100644 --- a/src/multiwait.c +++ b/src/multiwait.c @@ -1,4 +1,4 @@ -/* $Id: multiwait.c,v 1.45 2004/09/25 10:57:51 stpohle Exp $ +/* $Id: multiwait.c,v 1.46 2004/09/25 11:17:38 patty21 Exp $ multiwait.c - this manages only the network screen where everyone have to select it's players and where even the basic chat is inside */ @@ -18,15 +18,62 @@ extern int blitdb_nr; static int mw_num_readyplayers; // number of players who are ready static int mw_num_players_x; // number of players in the x static int mw_num_players_y; // number of players in the y +static int mw_num_players; +_point mw_pos[MAX_PLAYERS]; #define MW_PLAYERSCR_X 250 #define MW_PLAYERSCR_Y 64 #define MW_TITLE_Y 50 +/* Calcs the position of all items on the screen */ + +int mw_calc_screen() { + int i,cy, + plnum=0; + + for (i = 0; i < MAX_PLAYERS; i++) { + if (PS_IS_used (players[i].state)) plnum++; + } + + if (plnum!=mw_num_players) { + if (bman.gametype==GT_team) { + mw_num_players_x=2; + mw_num_players_y=2; // needs to be fixed (calculated separately) + cy=gfx.res.y/2; + } + else + { + if (mw_num_players*2>MAX_PLAYERS) { + mw_num_players_x=2; + } + else + { + mw_num_players_x=1; + } + mw_num_players_y=ceil(mw_num_players/mw_num_players_x); + for(i=0;istate)) { /*