diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1e66c2ffa..3f0ca2f1f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D1X-Rebirth Changelog -------- include/3d.h, main/game.h, main/gamerend.c, main/gauges.c, main/multi.c, main/multi.h, main/net_udp.c: Introducing new BOUNTY Multiplayer game mode by Matt "1360" Vandermeulen ; Fit show_HUD_names code to be more similar to D2X - names display still client-decided tho main/gauges.c, main/multi.c: Fix for showing bounty target in kill list - was not actually checking if player_num == Bounty_target; When Bounty_target player leaves game host must select a new target so the game can proceed; Made Bounty sound play a bit louder +main/gamerend.c, main/multi.c, main/multi.h, main/net_ipx.c, main/net_udp.c, main/text.h: On NETGAMES list Bounty mode was not shown since MODE_NAMES define was not adjusted - so in the end introduced GMNames and GMNamesShrt Arrays in multi.c for globally displaying full or short Multiplayer game mode names 20110118 -------- diff --git a/main/gamerend.c b/main/gamerend.c index 23ce10ba0..e5af97c3c 100644 --- a/main/gamerend.c +++ b/main/gamerend.c @@ -140,7 +140,6 @@ void show_framerate() void show_netplayerinfo() { int x=0, y=0, i=0, color=0; - char *NetworkModeNames[]={"Anarchy","Team Anarchy","Robo Anarchy","Cooperative","Unknown","","","Bounty"}; gr_set_current_canvas(NULL); gr_set_curfont(GAME_FONT); @@ -164,7 +163,7 @@ void show_netplayerinfo() x+=FSPACX(8); y+=LINE_SPACING*2; - gr_printf(x,y,"game mode: %s",NetworkModeNames[Netgame.gamemode]); + gr_printf(x,y,"game mode: %s",GMNames[Netgame.gamemode]); y+=LINE_SPACING; gr_printf(x,y,"difficulty: %s",MENU_DIFFICULTY_TEXT(Netgame.difficulty)); y+=LINE_SPACING; diff --git a/main/multi.c b/main/multi.c index 39898a732..ff2b6c5d5 100644 --- a/main/multi.c +++ b/main/multi.c @@ -127,6 +127,8 @@ int multi_goto_secret = 0; short team_kills[2]; int multi_quit_game = 0; int PacketUrgent = 0; +char *GMNames[8]={"Anarchy","Team Anarchy","Robo Anarchy","Cooperative","Unknown","","","Bounty"}; +char *GMNamesShrt[8]={"ANRCHY","TEAM","ROBO","COOP","UNKNOWN","","","BOUNTY"}; // For rejoin object syncing (used here and all protocols - globally) diff --git a/main/multi.h b/main/multi.h index 1bb4ba110..6891aa8a1 100644 --- a/main/multi.h +++ b/main/multi.h @@ -273,6 +273,8 @@ extern short kill_matrix[MAX_NUM_NET_PLAYERS][MAX_NUM_NET_PLAYERS]; extern short team_kills[2]; extern int multi_goto_secret; +extern char *GMNames[8]; +extern char *GMNamesShrt[8]; extern ushort my_segments_checksum; diff --git a/main/net_ipx.c b/main/net_ipx.c index 67a95a732..097e4a60a 100644 --- a/main/net_ipx.c +++ b/main/net_ipx.c @@ -3014,7 +3014,7 @@ void net_ipx_join_listen(newmenu *menu) if (game_status == NETSTAT_STARTING) { sprintf (menus[i+2].text,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s", - i+1,GameName,MODE_NAMES(Active_ipx_games[i].gamemode),nplayers, + i+1,GameName,GMNamesShrt[Active_ipx_games[i].gamemode],nplayers, Active_ipx_games[i].max_numplayers,MissName,levelname,"Forming"); } else if (game_status == NETSTAT_PLAYING) @@ -3023,25 +3023,25 @@ void net_ipx_join_listen(newmenu *menu) if (join_status==1) sprintf (menus[i+2].text,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s", - i+1,GameName,MODE_NAMES(Active_ipx_games[i].gamemode),nplayers, + i+1,GameName,GMNamesShrt[Active_ipx_games[i].gamemode],nplayers, Active_ipx_games[i].max_numplayers,MissName,levelname,"Open"); else if (join_status==2) sprintf (menus[i+2].text,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s", - i+1,GameName,MODE_NAMES(Active_ipx_games[i].gamemode),nplayers, + i+1,GameName,GMNamesShrt[Active_ipx_games[i].gamemode],nplayers, Active_ipx_games[i].max_numplayers,MissName,levelname,"Full"); else if (join_status==3) sprintf (menus[i+2].text,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s", - i+1,GameName,MODE_NAMES(Active_ipx_games[i].gamemode),nplayers, + i+1,GameName,GMNamesShrt[Active_ipx_games[i].gamemode],nplayers, Active_ipx_games[i].max_numplayers,MissName,levelname,"Restrict"); else sprintf (menus[i+2].text,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s", - i+1,GameName,MODE_NAMES(Active_ipx_games[i].gamemode),nplayers, + i+1,GameName,GMNamesShrt[Active_ipx_games[i].gamemode],nplayers, Active_ipx_games[i].max_numplayers,MissName,levelname,"Closed"); } else sprintf (menus[i+2].text,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s", - i+1,GameName,MODE_NAMES(Active_ipx_games[i].gamemode),nplayers, + i+1,GameName,GMNamesShrt[Active_ipx_games[i].gamemode],nplayers, Active_ipx_games[i].max_numplayers,MissName,levelname,"Between"); @@ -3942,7 +3942,6 @@ static int show_game_info_handler(newmenu *menu, d_event *event, netgame_info *n int net_ipx_show_game_stats(int choice) { char rinfo[512],*info=rinfo; - char *NetworkModeNames[]={"Anarchy","Team Anarchy","Robo Anarchy","Cooperative","Unknown"}; int c; netgame_info *netgame = &Active_ipx_games[choice]; @@ -3965,7 +3964,7 @@ int net_ipx_show_game_stats(int choice) } info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty)); - info+=sprintf (info,"\nGame Mode: %s",NetworkModeNames[netgame->gamemode]); + info+=sprintf (info,"\nGame Mode: %s",GMNames[netgame->gamemode]); info+=sprintf (info,"\nPlayers: %i/%i",netgame->numplayers,netgame->max_numplayers); c=nm_messagebox1("WELCOME", (int (*)(newmenu *, d_event *, void *))show_game_info_handler, netgame, 2, "JOIN GAME", "GAME INFO", rinfo); diff --git a/main/net_udp.c b/main/net_udp.c index 2ff3fffe6..ae5576519 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -691,7 +691,7 @@ int net_udp_list_join_poll( newmenu *menu, d_event *event, direct_join *dj ) else snprintf(status, sizeof(status), "BETWEEN "); - snprintf (menus[i+2].text,sizeof(char)*74,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s",(i+(NLPage*UDP_NETGAMES_PPAGE))+1,GameName,MODE_NAMES(Active_udp_games[(i+(NLPage*UDP_NETGAMES_PPAGE))].gamemode),nplayers, Active_udp_games[(i+(NLPage*UDP_NETGAMES_PPAGE))].max_numplayers,MissName,levelname,status); + snprintf (menus[i+2].text,sizeof(char)*74,"%d.\t%s \t%s \t %d/%d \t%s \t %s \t%s",(i+(NLPage*UDP_NETGAMES_PPAGE))+1,GameName,GMNamesShrt[Active_udp_games[(i+(NLPage*UDP_NETGAMES_PPAGE))].gamemode],nplayers, Active_udp_games[(i+(NLPage*UDP_NETGAMES_PPAGE))].max_numplayers,MissName,levelname,status); Assert(strlen(menus[i+2].text) < 75); } @@ -4704,7 +4704,6 @@ static int show_game_info_handler(newmenu *menu, d_event *event, netgame_info *n int net_udp_show_game_info() { char rinfo[512],*info=rinfo; - char *NetworkModeNames[]={"Anarchy","Team Anarchy","Robo Anarchy","Cooperative","Unknown","","","Bounty"}; int c; netgame_info *netgame = &Netgame; @@ -4727,7 +4726,7 @@ int net_udp_show_game_info() } info+=sprintf (info,"\n\nDifficulty: %s",MENU_DIFFICULTY_TEXT(netgame->difficulty)); - info+=sprintf (info,"\nGame Mode: %s",NetworkModeNames[netgame->gamemode]); + info+=sprintf (info,"\nGame Mode: %s",GMNames[netgame->gamemode]); info+=sprintf (info,"\nPlayers: %i/%i",netgame->numplayers,netgame->max_numplayers); c=nm_messagebox1("WELCOME", (int (*)(newmenu *, d_event *, void *))show_game_info_handler, netgame, 2, "JOIN GAME", "GAME INFO", rinfo); diff --git a/main/text.h b/main/text.h index 309f9c11f..14ed84759 100644 --- a/main/text.h +++ b/main/text.h @@ -749,8 +749,6 @@ extern char *Text_string[]; #define CONNECT_STATES(state_num) (*(&TXT_NET_DISCONNECTED + (state_num))) // Network dump strings #define NET_DUMP_STRINGS(dump_num) (*(&TXT_NET_GAME_CLOSED + (dump_num))) -#define MODE_NAMES(mode_num) (*(&TXT_ANARCHY + (mode_num))) -#define MODEM_ERROR_MESS(error_num) (*(&TXT_NO_DIAL_TONE + (error_num))) #define MENU_DIFFICULTY_TEXT(difficulty) (*(&TXT_DIFFICULTY_1 + (difficulty))) #define MENU_DETAIL_TEXT(detail) (*(&TXT_DETAIL_1 + (detail)))