| version 1.21 | | version 1.22 |
|---|
| | |
| * main() for Inferno | | * main() for Inferno |
| * | | * |
| * $Log$ | | * $Log$ |
| | | * Revision 1.22 2000/02/07 10:26:05 donut |
| | | * new ipx code structure reduces some redundancy and gives all arches multi netcode ability |
| | | * |
| * Revision 1.21 2000/01/17 07:39:17 donut | | * Revision 1.21 2000/01/17 07:39:17 donut |
| * switched to SUPPORTS_NICEFPS and added -hudlog_multi switch | | * switched to SUPPORTS_NICEFPS and added -hudlog_multi switch |
| * | | * |
| | |
| } | | } |
| | | |
| #ifdef NETWORK | | #ifdef NETWORK |
| if (!FindArg( "-nonetwork" )) { | | |
| int socket=0, showaddress=0; | | |
| int ipx_error; | | |
| if (Inferno_verbose) printf( "\n%s ", TXT_INITIALIZING_NETWORK); | | |
| if ((t=FindArg("-socket"))) | | |
| socket = atoi( Args[t+1] ); | | |
| | | |
| if ((t=FindArg("-pps")) && (t = atoi(Args[t+1])) && (t >= 2) && (t <= 20)) { | | |
| Network_initial_pps = t; | | |
| } | | |
| if ( FindArg("-shortpackets") ) | | |
| Network_initial_shortpackets = 1; | | |
| | | |
| if ( FindArg("-showaddress") ) showaddress=1; | | |
| if ((ipx_error=ipx_init(IPX_DEFAULT_SOCKET+socket,showaddress))==0) { | | |
| if (Inferno_verbose) printf( "%s %d.\n", TXT_IPX_CHANNEL, socket ); | | |
| Network_active = 1; | | |
| } else { | | |
| switch( ipx_error ) { | | |
| case 3: if (Inferno_verbose) printf( "%s\n", TXT_NO_NETWORK); break; | | |
| case -2: if (Inferno_verbose) printf( "%s 0x%x.\n", TXT_SOCKET_ERROR, IPX_DEFAULT_SOCKET+socket); break; | | |
| case -4: if (Inferno_verbose) printf( "%s\n", TXT_MEMORY_IPX ); break; | | |
| default: | | |
| if (Inferno_verbose) printf( "%s %d", TXT_ERROR_IPX, ipx_error ); | | |
| } | | |
| if (Inferno_verbose) printf( "%s\n",TXT_NETWORK_DISABLED); | | |
| Network_active = 0; // Assume no network | | |
| } | | |
| ipx_read_user_file( "descent.usr" ); | | |
| ipx_read_network_file( "descent.net" ); | | |
| //if ( FindArg( "-dynamicsockets" )) | | |
| // Network_allow_socket_changes = 1; | | |
| //else | | |
| // Network_allow_socket_changes = 0; | | |
| } else { | | |
| if (Inferno_verbose) printf( "%s\n", TXT_NETWORK_DISABLED); | | |
| Network_active = 0; // Assume no network | | |
| } | | |
| | | |
| if (!FindArg("-noserial")) | | if (!FindArg("-noserial")) |
| { | | { |