playerdetails changed

origin
stpohle 21 years ago
parent 8edb72fb8f
commit 36db940628

@ -1,4 +1,4 @@
/* $Id: player.h,v 1.3 2004/09/12 20:54:24 stpohle Exp $ /* $Id: player.h,v 1.4 2004/09/23 14:06:45 stpohle Exp $
* playerinclude file * playerinclude file
*/ */
@ -160,6 +160,7 @@ extern inline void playerinput_keyb_read (int pk_offset, int pl_nr);
/* playermenu.c */ /* playermenu.c */
extern void playermenu (); extern void playermenu ();
extern int playermenu_selgfx (int pl_nr); extern int playermenu_selgfx (int pl_nr);
extern void playermenu_getflags (char *text, _player *player);
extern void teammenu (); extern void teammenu ();

@ -1,4 +1,4 @@
/* $Id: playermenu.c,v 1.5 2004/09/23 13:31:51 stpohle Exp $ /* $Id: playermenu.c,v 1.6 2004/09/23 14:06:48 stpohle Exp $
* *
*/ */
@ -209,6 +209,8 @@ void playermenu () {
sprintf (detail_Addr->label, "%-32s:%s",players[pl_nr].net.addr.host, players[pl_nr].net.addr.port); sprintf (detail_Addr->label, "%-32s:%s",players[pl_nr].net.addr.host, players[pl_nr].net.addr.port);
sprintf (detail_Flags->label, "FIX ME"); sprintf (detail_Flags->label, "FIX ME");
playermenu_getflags (detail_Flags->label, &players[pl_nr]);
sel_pl_nr = pl_nr; sel_pl_nr = pl_nr;
} }
@ -269,6 +271,22 @@ void playermenu () {
}; };
/*
* put all flags into the givin text like:
* NET_FW, NET_2P, AI...
*/
void playermenu_getflags (char *text, _player *player) {
text[0] = 0;
if (player->net.flags & NETF_firewall)
sprintf (text, "%sNET_FW ", text);
if (player->net.flags & NETF_local2)
sprintf (text, "%sNET_2P ", text);
if (player->state & PSF_net)
sprintf (text, "%sPSF_NET ", text);
if (player->state & PSF_ai)
sprintf (text, "%sPSF_AI ", text);
};
/* /*
* draw a small menu where the player has to select his gfx * draw a small menu where the player has to select his gfx

Loading…
Cancel
Save