|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* $Id: multiwait.c,v 1.50 2004/10/20 19:27:31 stpohle Exp $
|
|
|
|
|
/* $Id: multiwait.c,v 1.51 2004/11/07 04:13:10 stpohle 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
|
|
|
|
|
*/
|
|
|
|
@ -12,25 +12,25 @@
|
|
|
|
|
#include "single.h"
|
|
|
|
|
#include "keyb.h"
|
|
|
|
|
|
|
|
|
|
/****************** prototype declaration */
|
|
|
|
|
static void mw_init ();
|
|
|
|
|
static void mw_shutdown ();
|
|
|
|
|
|
|
|
|
|
static void mw_keys_loop ();
|
|
|
|
|
static void mw_draw_all_player ();
|
|
|
|
|
static void mw_draw_all_teams ();
|
|
|
|
|
|
|
|
|
|
static int mw_team_is_used (int t_nr);
|
|
|
|
|
static int mw_check_players ();
|
|
|
|
|
static int mw_check_screenredraw ();
|
|
|
|
|
|
|
|
|
|
extern int UpdateRects_nr;
|
|
|
|
|
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+1];
|
|
|
|
|
|
|
|
|
|
// uncomment to sort by points
|
|
|
|
|
// #define SORT_BY_POINTS 1
|
|
|
|
|
#define MW_PLAYERSCR_X 310
|
|
|
|
|
#define MW_PLAYERSCR_Y 50
|
|
|
|
|
#define MW_TITLE_Y 50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* returns number of active players in a team */
|
|
|
|
|
int mw_team_is_used (int t_nr) {
|
|
|
|
|
static int mw_team_is_used (int t_nr) {
|
|
|
|
|
int i,j=0;
|
|
|
|
|
for(i=0;i<MAX_PLAYERS;i++)
|
|
|
|
|
if ((teams[t_nr].players[i]!=NULL) && (PS_IS_used(teams[t_nr].players[i]->state))) { j++;}
|
|
|
|
@ -39,89 +39,21 @@ int mw_team_is_used (int t_nr) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Calcs the position of all items on the screen */
|
|
|
|
|
|
|
|
|
|
int mw_calc_screen() {
|
|
|
|
|
int i,j,k=0,n=0,cy;
|
|
|
|
|
|
|
|
|
|
if (bman.updatestatusbar) {
|
|
|
|
|
if (bman.gametype==GT_team) {
|
|
|
|
|
/* team mode */
|
|
|
|
|
for(i=0;i<MAX_TEAMS;i++){
|
|
|
|
|
j=mw_team_is_used(i);
|
|
|
|
|
if (j>k) k=j;
|
|
|
|
|
if (j>0) n++;
|
|
|
|
|
}
|
|
|
|
|
mw_num_players_x=2;
|
|
|
|
|
mw_num_players_y=floorf(n/2)+n%2;
|
|
|
|
|
mw_num_players=n;
|
|
|
|
|
for(i=0;i<mw_num_players;i++) {
|
|
|
|
|
mw_pos[i].x=gfx.res.x/2/mw_num_players_x+(i%mw_num_players_x)*gfx.res.x/2-MW_PLAYERSCR_X/2;
|
|
|
|
|
mw_pos[i].y=ceil(i/2)*(55+k*15);
|
|
|
|
|
d_printf("mw_team_Position: x=%d, y=%d\n ",mw_pos[i].x,mw_pos[i].y);
|
|
|
|
|
}
|
|
|
|
|
cy=mw_num_players_y*(55+k*15)+20;
|
|
|
|
|
mw_pos[MAX_PLAYERS].x=8; // Pos of unassigned Players
|
|
|
|
|
mw_pos[MAX_PLAYERS].y=cy-15;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mw_num_players=0;
|
|
|
|
|
for (i=0;i<MAX_PLAYERS;i++) {
|
|
|
|
|
if (PS_IS_used (players[i].state)) mw_num_players++;
|
|
|
|
|
}
|
|
|
|
|
if (mw_num_players*2>MAX_PLAYERS) {
|
|
|
|
|
mw_num_players_x=2;
|
|
|
|
|
mw_num_players_y=floorf(mw_num_players/2)+mw_num_players%2;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
mw_num_players_x=1;
|
|
|
|
|
mw_num_players_y=mw_num_players;
|
|
|
|
|
}
|
|
|
|
|
for(i=0;i<mw_num_players;i++) {
|
|
|
|
|
mw_pos[i].x=gfx.res.x/2/mw_num_players_x+(i%mw_num_players_x)*gfx.res.x/2-MW_PLAYERSCR_X/2;
|
|
|
|
|
mw_pos[i].y=floorf(i/mw_num_players_x)*MW_PLAYERSCR_Y;
|
|
|
|
|
d_printf("mw_Position: x=%d, y=%d\n ",mw_pos[i].x,mw_pos[i].y);
|
|
|
|
|
}
|
|
|
|
|
cy=(mw_num_players_y)*MW_PLAYERSCR_Y+15;
|
|
|
|
|
}
|
|
|
|
|
draw_logo ();
|
|
|
|
|
d_printf ("mw_num_players_x : %d, mw_num_players_y : %d mw_players:%d\n", mw_num_players_x, mw_num_players_y,mw_num_players);
|
|
|
|
|
chat_show (8, cy, gfx.res.x - 16, gfx.res.y - (8 + cy));
|
|
|
|
|
chat.active = 1;
|
|
|
|
|
bman.updatestatusbar=0;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* this will load some graphics and so other stuff */
|
|
|
|
|
void
|
|
|
|
|
mw_init ()
|
|
|
|
|
static void mw_init ()
|
|
|
|
|
{
|
|
|
|
|
team_update ();
|
|
|
|
|
gfx_blitdraw ();
|
|
|
|
|
draw_logo ();
|
|
|
|
|
|
|
|
|
|
menu_displaytext ("Please Wait", "Loading GFX Data");
|
|
|
|
|
|
|
|
|
|
network_loop ();
|
|
|
|
|
mw_num_readyplayers = 0;
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
|
|
|
|
|
gfx_blitdraw ();
|
|
|
|
|
mw_num_players=-1;
|
|
|
|
|
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
d_playerdetail ("mw_init:\n");
|
|
|
|
|
SDL_Flip (gfx.screen);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* free all grafics */
|
|
|
|
|
void mw_shutdown () {
|
|
|
|
|
/* free all graphics */
|
|
|
|
|
static void mw_shutdown () {
|
|
|
|
|
chat_show (-1, -1, -1, -1);
|
|
|
|
|
gfx_blitdraw ();
|
|
|
|
|
draw_logo ();
|
|
|
|
@ -131,227 +63,30 @@ void mw_shutdown () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* check if the players are ready
|
|
|
|
|
* returns the number of players which are ready
|
|
|
|
|
*/
|
|
|
|
|
void mw_check_players () {
|
|
|
|
|
static int mw_check_players () {
|
|
|
|
|
int readyplayers = 0;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
mw_num_readyplayers = 0;
|
|
|
|
|
|
|
|
|
|
if (GT_MP_PTPS) /* only the master can start the game */
|
|
|
|
|
return;
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
|
|
|
|
if (players[i].gfx_nr >= 0 && players[i].gfx_nr < MAX_PLAYERS)
|
|
|
|
|
mw_num_readyplayers++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* draw only the given player
|
|
|
|
|
*/
|
|
|
|
|
void mw_draw_player (int p_nr, int pos) {
|
|
|
|
|
_player *player;
|
|
|
|
|
_point p;
|
|
|
|
|
char text[255];
|
|
|
|
|
SDL_Rect src;
|
|
|
|
|
SDL_Rect dest;
|
|
|
|
|
player=&players[p_nr];
|
|
|
|
|
p.x = mw_pos[pos].x;
|
|
|
|
|
p.y = mw_pos[pos].y;
|
|
|
|
|
|
|
|
|
|
if (PS_IS_used (player->state)) {
|
|
|
|
|
/*
|
|
|
|
|
* player is used
|
|
|
|
|
*/
|
|
|
|
|
if (player->gfx_nr >= 0 && player->gfx_nr < gfx.player_gfx_count) {
|
|
|
|
|
/* player is used and selected a gfx */
|
|
|
|
|
dest.x = p.x;
|
|
|
|
|
src.x = 0;
|
|
|
|
|
src.y = 0;
|
|
|
|
|
|
|
|
|
|
if (p_nr==bman.p_nr) {
|
|
|
|
|
/* player 1 */
|
|
|
|
|
dest.y = p.y;
|
|
|
|
|
src.w = dest.w = gfx.players[player->gfx_nr].menu_image->w;
|
|
|
|
|
src.h = dest.h = gfx.players[player->gfx_nr].menu_image->h;
|
|
|
|
|
gfx_blit (gfx.players[player->gfx_nr].menu_image, &src, gfx.screen, &dest, 10001);
|
|
|
|
|
|
|
|
|
|
} else if (p_nr==bman.p2_nr) {
|
|
|
|
|
/* player 2 */
|
|
|
|
|
dest.x=p.x+MW_PLAYERSCR_X-64;
|
|
|
|
|
dest.y = p.y;
|
|
|
|
|
src.w = dest.w = gfx.players[player->gfx_nr].menu_image->w;
|
|
|
|
|
src.h = dest.h = gfx.players[player->gfx_nr].menu_image->h;
|
|
|
|
|
gfx_blit (gfx.players[player->gfx_nr].menu_image, &src, gfx.screen, &dest, 10001);
|
|
|
|
|
} else {
|
|
|
|
|
/* net-player */
|
|
|
|
|
dest.x=p.x+35;
|
|
|
|
|
dest.y = p.y + 15;
|
|
|
|
|
src.w = dest.w = gfx.players[player->gfx_nr].small_image->w;
|
|
|
|
|
src.h = dest.h = gfx.players[player->gfx_nr].small_image->h;
|
|
|
|
|
gfx_blit (gfx.players[player->gfx_nr].small_image, &src, gfx.screen, &dest, 10001);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y, player->name, 1, COLOR_yellow, 10002);
|
|
|
|
|
sprintf (text,"Victorys:%2d(%d)", player->wins, player->points);
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y + font[2].size.y - 4, text, 0, COLOR_white, 10002);
|
|
|
|
|
if (debug && PS_IS_used (player->state)) {
|
|
|
|
|
sprintf (text, "%s:%s [%d]", player->net.addr.host, player->net.addr.port, player->state);
|
|
|
|
|
if (player->net.flags & NETF_firewall)
|
|
|
|
|
sprintf (text,"%s FW", text);
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y + font[0].size.y + font[2].size.y - 4, text, 0, COLOR_white, 10002);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
/*
|
|
|
|
|
* player is free
|
|
|
|
|
*/
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y, "No Player" , 0, COLOR_gray, 10002);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* draw all player informations
|
|
|
|
|
*/
|
|
|
|
|
void mw_draw_all_player () {
|
|
|
|
|
int i,j,h;
|
|
|
|
|
int n[MAX_PLAYERS];
|
|
|
|
|
for(i=0;i<MAX_PLAYERS;i++) n[i]=i;
|
|
|
|
|
for(i=0;i<MAX_PLAYERS;i++)
|
|
|
|
|
for(j=i;j<MAX_PLAYERS;j++)
|
|
|
|
|
#ifdef SORT_BY_POINTS
|
|
|
|
|
if (players[i].points>players[j].points) {
|
|
|
|
|
#else
|
|
|
|
|
if (players[i].wins>players[j].wins) {
|
|
|
|
|
#endif
|
|
|
|
|
h=n[i];n[i]=n[j];n[j]=h;
|
|
|
|
|
}
|
|
|
|
|
j=0;
|
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
|
|
|
|
if (PS_IS_used (players[n[i]].state)) {
|
|
|
|
|
mw_draw_player (n[i], j);
|
|
|
|
|
j++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gfx_blitdraw();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* draw only the given team
|
|
|
|
|
*/
|
|
|
|
|
void mw_draw_team (int t_nr, int pos) {
|
|
|
|
|
_player *player;
|
|
|
|
|
_team *team;
|
|
|
|
|
_point p;
|
|
|
|
|
int i,j=0;
|
|
|
|
|
char text[255];
|
|
|
|
|
SDL_Rect src;
|
|
|
|
|
SDL_Rect dest;
|
|
|
|
|
team=&teams[t_nr];
|
|
|
|
|
p.x = mw_pos[pos].x;
|
|
|
|
|
p.y = mw_pos[pos].y;
|
|
|
|
|
|
|
|
|
|
/* Find if there is any active player in that team */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (mw_team_is_used(t_nr)>0) {
|
|
|
|
|
/*
|
|
|
|
|
* team is used
|
|
|
|
|
*/
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y, team->name, 1, COLOR_yellow, 10002);
|
|
|
|
|
sprintf (text,"Victorys:%2d(%d)", team->wins, team->points);
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y + font[2].size.y - 4, text, 0, COLOR_white, 10002);
|
|
|
|
|
j=1;
|
|
|
|
|
for(i=0;i<MAX_PLAYERS;i++) {
|
|
|
|
|
if ((team->players[i]!=NULL) && (PS_IS_used(team->players[i]->state))) {
|
|
|
|
|
player=team->players[i];
|
|
|
|
|
if (player->gfx_nr >= 0 && player->gfx_nr < gfx.player_gfx_count) {
|
|
|
|
|
/* player is used and selected a gfx */
|
|
|
|
|
dest.x = p.x;
|
|
|
|
|
src.x = 0;
|
|
|
|
|
src.y = 0;
|
|
|
|
|
dest.x=p.x+35+20;
|
|
|
|
|
dest.y = p.y + 30+j*15;
|
|
|
|
|
src.w = dest.w = gfx.players[player->gfx_nr].small_image->w;
|
|
|
|
|
src.h = dest.h = gfx.players[player->gfx_nr].small_image->h;
|
|
|
|
|
gfx_blit (gfx.players[player->gfx_nr].small_image, &src, gfx.screen, &dest, 10001);
|
|
|
|
|
}
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE+20, p.y + 30+j*15, team->players[i]->name, 0, COLOR_white, 10002);
|
|
|
|
|
j++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
readyplayers++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
/*
|
|
|
|
|
* team is emty
|
|
|
|
|
*/
|
|
|
|
|
font_gfxdraw (p.x + GFX_IMGSIZE, p.y, "No TEAM" , 0, COLOR_gray, 10002);
|
|
|
|
|
return readyplayers;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Draw players which are not assigned to any team
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
void mw_draw_unassigned_players () {
|
|
|
|
|
int i,
|
|
|
|
|
n=0;
|
|
|
|
|
char text[255];
|
|
|
|
|
sprintf(text,"Unassigned Players: ");
|
|
|
|
|
for (i=0;i<MAX_PLAYERS;i++) {
|
|
|
|
|
if ((PS_IS_used (players[i].state))&&(players[i].team_nr<0)) {
|
|
|
|
|
sprintf(text,"%s %s ",text,players[i].name);
|
|
|
|
|
n++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
d_printf("mw_draw_unassigned: %d players\n",n);
|
|
|
|
|
if (n) font_gfxdraw (mw_pos[MAX_PLAYERS].x,mw_pos[MAX_PLAYERS].y, text, 0, COLOR_gray, 10002);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Draw all teams
|
|
|
|
|
*/
|
|
|
|
|
void mw_draw_all_teams () {
|
|
|
|
|
int i,j,h;
|
|
|
|
|
int n[MAX_TEAMS];
|
|
|
|
|
for(i=0;i<MAX_TEAMS;i++) n[i]=i;
|
|
|
|
|
for(i=0;i<MAX_TEAMS;i++)
|
|
|
|
|
for(j=i;j<MAX_TEAMS;j++)
|
|
|
|
|
#ifdef SORT_BY_POINTS
|
|
|
|
|
if (teams[i].points>teams[j].points) {
|
|
|
|
|
#else
|
|
|
|
|
if (teams[i].wins>teams[j].wins) {
|
|
|
|
|
#endif
|
|
|
|
|
h=n[i];n[i]=n[j];n[j]=h;
|
|
|
|
|
}
|
|
|
|
|
j=0;
|
|
|
|
|
for (i = 0; i < MAX_TEAMS; i++) {
|
|
|
|
|
if (mw_team_is_used(n[i])) {
|
|
|
|
|
mw_draw_team (n[i], j);
|
|
|
|
|
j++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
mw_draw_unassigned_players();
|
|
|
|
|
gfx_blitdraw();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* check if one key is pressed
|
|
|
|
|
*/
|
|
|
|
|
void mw_keys_loop () {
|
|
|
|
|
if (GT_MP_PTPM && mw_num_readyplayers >= 2 && keyb_gamekeys.state[BCK_pause] && !keyb_gamekeys.old[BCK_pause]) {
|
|
|
|
|
static void mw_keys_loop () {
|
|
|
|
|
if (GT_MP_PTPM && mw_check_players () >= 2 && keyb_gamekeys.state[BCK_pause] && !keyb_gamekeys.old[BCK_pause]) {
|
|
|
|
|
/* min 2 players are ready for the game and
|
|
|
|
|
* the start key has pressed */
|
|
|
|
|
bman.state = GS_ready;
|
|
|
|
@ -368,6 +103,7 @@ void mw_keys_loop () {
|
|
|
|
|
|
|
|
|
|
if (keyb_gamekeys.state[BCK_esc] && !keyb_gamekeys.old[BCK_esc]) {
|
|
|
|
|
/* ESCAPE key was pressed */
|
|
|
|
|
net_game_send_delplayer (bman.p_nr);
|
|
|
|
|
bman.state = GS_startup;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -375,7 +111,6 @@ void mw_keys_loop () {
|
|
|
|
|
|| ((!IS_LPLAYER2) && keyb_gamekeys.state[BCPK_max + BCPK_drop] && !keyb_gamekeys.old[BCPK_max + BCPK_drop])) {
|
|
|
|
|
/* player 1 want to select a new gfx */
|
|
|
|
|
playermenu_selgfx (bman.p_nr);
|
|
|
|
|
net_change_playerid (bman.p_nr, 1);
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
keyb_loop (NULL); // to reload the current keys
|
|
|
|
|
}
|
|
|
|
@ -383,7 +118,6 @@ void mw_keys_loop () {
|
|
|
|
|
if (IS_LPLAYER2 && keyb_gamekeys.state[BCPK_max + BCPK_drop] && !keyb_gamekeys.old[BCPK_max + BCPK_drop]) {
|
|
|
|
|
/* player 2 want to select a new gfx */
|
|
|
|
|
playermenu_selgfx (bman.p2_nr);
|
|
|
|
|
net_change_playerid (bman.p2_nr, 1);
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
keyb_loop (NULL); // to reload the current keys
|
|
|
|
|
}
|
|
|
|
@ -404,14 +138,44 @@ void mw_keys_loop () {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* return 1 if we have to redraw the screen or 0 if everything is still normal
|
|
|
|
|
*/
|
|
|
|
|
static int mw_check_screenredraw () {
|
|
|
|
|
static int old_gametype = -1;
|
|
|
|
|
int ret = 0;
|
|
|
|
|
|
|
|
|
|
if (old_gametype != bman.gametype || bman.updatestatusbar)
|
|
|
|
|
ret = 1;
|
|
|
|
|
|
|
|
|
|
bman.updatestatusbar = 0;
|
|
|
|
|
old_gametype = bman.gametype;
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* draw all player informations
|
|
|
|
|
*/
|
|
|
|
|
static void mw_draw_all_player () {
|
|
|
|
|
game_showresultnormal ();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* draw all team informations
|
|
|
|
|
*/
|
|
|
|
|
static void mw_draw_all_teams () {
|
|
|
|
|
game_showresultteam ();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* the loop itself */
|
|
|
|
|
void wait_for_players () {
|
|
|
|
|
SDL_Event event;
|
|
|
|
|
|
|
|
|
|
mw_init ();
|
|
|
|
|
mw_calc_screen();
|
|
|
|
|
if (bman.gametype==GT_team) mw_draw_all_teams(); else mw_draw_all_player ();
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
|
if (SDL_PollEvent (&event) != 0)
|
|
|
|
@ -424,14 +188,17 @@ void wait_for_players () {
|
|
|
|
|
/*
|
|
|
|
|
* check some little things and do the network stuff
|
|
|
|
|
*/
|
|
|
|
|
mw_check_players ();
|
|
|
|
|
network_loop ();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* the drawing stuff
|
|
|
|
|
*/
|
|
|
|
|
if (mw_calc_screen()) {
|
|
|
|
|
if (bman.gametype==GT_team) mw_draw_all_teams(); else mw_draw_all_player ();
|
|
|
|
|
if (mw_check_screenredraw()) {
|
|
|
|
|
d_printf ("Draw Status\n");
|
|
|
|
|
gfx_blitdraw ();
|
|
|
|
|
draw_logo ();
|
|
|
|
|
if (bman.gametype==GT_team) mw_draw_all_teams();
|
|
|
|
|
else mw_draw_all_player ();
|
|
|
|
|
}
|
|
|
|
|
gfx_blitdraw ();
|
|
|
|
|
|
|
|
|
|