version 1.11 | | version 1.12 |
---|
| | |
| | |
#include "d_delay.h" //for SUPPORTS_NICEFPS | | #include "d_delay.h" //for SUPPORTS_NICEFPS |
| | |
| | #include "ipx.h" |
| | |
| | |
#ifdef EDITOR | | #ifdef EDITOR |
#include "editor/editor.h" | | #include "editor/editor.h" |
#endif | | #endif |
| | |
void do_option(int select); | | void do_option(int select); |
void do_detail_level_menu_custom(void); | | void do_detail_level_menu_custom(void); |
void do_multi_player_menu(); | | void do_multi_player_menu(); |
| | void do_ipx_multi_player_menu(); |
| | void do_kali_multi_player_menu(); |
| | void do_ip_multi_player_menu(); |
| | void do_ip_manual_join_menu(); |
| | void do_ip_serv_connect_menu(); |
void do_new_game_menu(); | | void do_new_game_menu(); |
void do_load_game_menu(); | | void do_load_game_menu(); |
| | |
| | |
#define MENU_SHOW_CREDITS 23 | | #define MENU_SHOW_CREDITS 23 |
#define MENU_ORDER_INFO 24 | | #define MENU_ORDER_INFO 24 |
#define MENU_PLAY_SONG 25 | | #define MENU_PLAY_SONG 25 |
| | #define MENU_IPX_MULTIPLAYER 26 |
| | #define MENU_KALI_MULTIPLAYER 27 |
| | #define MENU_IP_MULTIPLAYER 28 |
| | #define MENU_IP_SERV_CONNECT 29 |
| | #define MENU_MANUAL_IP_JOIN 30 |
| | |
//ADD_ITEM("Start netgame...", MENU_START_NETGAME, -1 ); | | //ADD_ITEM("Start netgame...", MENU_START_NETGAME, -1 ); |
//ADD_ITEM("Send net message...", MENU_SEND_NET_MESSAGE, -1 ); | | //ADD_ITEM("Send net message...", MENU_SEND_NET_MESSAGE, -1 ); |
| | |
network_join_game(); | | network_join_game(); |
#endif | | #endif |
break; | | break; |
| | case MENU_IPX_MULTIPLAYER: |
| | do_ipx_multi_player_menu(); |
| | break; |
| | case MENU_KALI_MULTIPLAYER: |
| | do_kali_multi_player_menu(); |
| | break; |
| | #ifdef SUPPORTS_NET_IP |
| | case MENU_IP_MULTIPLAYER: |
| | do_ip_multi_player_menu(); |
| | break; |
| | case MENU_IP_SERV_CONNECT: |
| | do_ip_serv_connect_menu(); |
| | break; |
| | case MENU_MANUAL_IP_JOIN: |
| | do_ip_manual_join_menu(); |
| | break; |
| | #endif |
case MENU_START_SERIAL: | | case MENU_START_SERIAL: |
#ifdef NETWORK | | #ifdef NETWORK |
com_main_menu(); | | com_main_menu(); |
| | |
| | |
void do_multi_player_menu() | | void do_multi_player_menu() |
{ | | { |
| | int menu_choice[4]; |
| | newmenu_item m[4]; |
| | int choice = 0, num_options = 0; |
| | int old_game_mode; |
| | |
| | do { |
| | old_game_mode = Game_mode; |
| | num_options = 0; |
| | |
| | ADD_ITEM("IPX", MENU_IPX_MULTIPLAYER, -1 ); |
| | #ifdef SUPPORTS_NET_IP |
| | ADD_ITEM("udp/ip", MENU_IP_MULTIPLAYER, -1 ); |
| | #endif |
| | #ifdef __LINUX__ |
| | ADD_ITEM("Kalinix", MENU_KALI_MULTIPLAYER, -1 ); |
| | #endif |
| | ADD_ITEM(TXT_MODEM_GAME, MENU_START_SERIAL, -1); |
| | |
| | choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); |
| | |
| | if ( choice > -1 ) |
| | do_option(menu_choice[choice]); |
| | |
| | if (old_game_mode != Game_mode) |
| | break; // leave menu |
| | |
| | } while( choice > -1 ); |
| | |
| | } |
| | void do_ipx_multi_player_menu() |
| | { |
| | int menu_choice[3]; |
| | newmenu_item m[3]; |
| | int choice = 0, num_options = 0; |
| | int old_game_mode; |
| | |
| | if (ipx_set_driver("ipx")) return; |
| | |
| | do { |
| | old_game_mode = Game_mode; |
| | num_options = 0; |
| | |
| | ADD_ITEM(TXT_START_NET_GAME, MENU_START_NETGAME, -1 ); |
| | ADD_ITEM(TXT_JOIN_NET_GAME, MENU_JOIN_NETGAME, -1 ); |
| | |
| | choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); |
| | |
| | if ( choice > -1 ) |
| | do_option(menu_choice[choice]); |
| | |
| | if (old_game_mode != Game_mode) |
| | break; // leave menu |
| | |
| | } while( choice > -1 ); |
| | |
| | } |
| | void do_kali_multi_player_menu() |
| | { |
| | #ifdef __LINUX__ |
int menu_choice[3]; | | int menu_choice[3]; |
newmenu_item m[3]; | | newmenu_item m[3]; |
int choice = 0, num_options = 0; | | int choice = 0, num_options = 0; |
int old_game_mode; | | int old_game_mode; |
| | |
| | if (ipx_set_driver("kali"))return; |
| | |
do { | | do { |
old_game_mode = Game_mode; | | old_game_mode = Game_mode; |
num_options = 0; | | num_options = 0; |
| | |
ADD_ITEM(TXT_START_NET_GAME, MENU_START_NETGAME, -1 ); | | ADD_ITEM(TXT_START_NET_GAME, MENU_START_NETGAME, -1 ); |
ADD_ITEM(TXT_JOIN_NET_GAME, MENU_JOIN_NETGAME, -1 ); | | ADD_ITEM(TXT_JOIN_NET_GAME, MENU_JOIN_NETGAME, -1 ); |
ADD_ITEM(TXT_MODEM_GAME, MENU_START_SERIAL, -1); | | |
| | choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); |
| | |
| | if ( choice > -1 ) |
| | do_option(menu_choice[choice]); |
| | |
| | if (old_game_mode != Game_mode) |
| | break; // leave menu |
| | |
| | } while( choice > -1 ); |
| | #endif |
| | } |
| | |
| | #ifdef SUPPORTS_NET_IP |
| | |
| | int ip_connect_manual(char *addr); |
| | void do_ip_manual_join_menu() |
| | { |
| | int menu_choice[3]; |
| | newmenu_item m[3]; |
| | int choice = 0, num_options = 0; |
| | int old_game_mode; |
| | char buf[128]=""; |
| | |
| | do { |
| | old_game_mode = Game_mode; |
| | num_options = 0; |
| | |
| | m[num_options].type = NM_TYPE_INPUT; m[num_options].text=buf; m[num_options].text_len=128;menu_choice[num_options]=-1; num_options++; |
| | |
| | choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); |
| | |
| | if ( choice > -1 ){ |
| | ip_connect_manual(buf); |
| | // do_option(menu_choice[choice]); |
| | } |
| | |
| | if (old_game_mode != Game_mode) |
| | break; // leave menu |
| | } while( choice > -1 ); |
| | } |
| | |
| | void do_ip_serv_connect_menu() |
| | { |
| | int menu_choice[3]; |
| | newmenu_item m[3]; |
| | int choice = 0, num_options = 0; |
| | int old_game_mode; |
| | |
| | return; |
| | do { |
| | old_game_mode = Game_mode; |
| | num_options = 0; |
| | |
| | ADD_ITEM("Connect to game list server",MENU_IP_SERV_CONNECT, -1 ); |
| | ADD_ITEM(TXT_START_NET_GAME, MENU_START_NETGAME, -1 ); |
| | ADD_ITEM(TXT_JOIN_NET_GAME, MENU_MANUAL_IP_JOIN, -1 ); |
| | |
choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); | | choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); |
| | |
| | |
} while( choice > -1 ); | | } while( choice > -1 ); |
| | |
} | | } |
| | |
| | void do_ip_multi_player_menu() |
| | { |
| | int menu_choice[3]; |
| | newmenu_item m[3]; |
| | int choice = 0, num_options = 0; |
| | int old_game_mode; |
| | |
| | if (ipx_set_driver("ip"))return; |
| | |
| | do { |
| | old_game_mode = Game_mode; |
| | num_options = 0; |
| | |
| | ADD_ITEM("Connect to game list server",MENU_IP_SERV_CONNECT, -1 ); |
| | ADD_ITEM(TXT_START_NET_GAME, MENU_START_NETGAME, -1 ); |
| | ADD_ITEM(TXT_JOIN_NET_GAME, MENU_MANUAL_IP_JOIN, -1 ); |
| | |
| | choice = newmenu_do1( NULL, TXT_MULTIPLAYER, num_options, m, NULL, choice ); |
| | |
| | if ( choice > -1 ) |
| | do_option(menu_choice[choice]); |
| | |
| | if (old_game_mode != Game_mode) |
| | break; // leave menu |
| | |
| | } while( choice > -1 ); |
| | |
| | } |
| | #endif |