new command -L,-U,-n line options for network

This commit is contained in:
johns 2000-04-23 23:18:03 +00:00
parent 8c4be78ea5
commit 8625a630d1

View file

@ -191,7 +191,6 @@ global void FreeCraftInit(void)
break; break;
} }
LoadRGB(GlobalPalette, PalettePath); LoadRGB(GlobalPalette, PalettePath);
// GlobalPalette=(typeof(GlobalPalette))PalettePNG);
VideoCreatePalette(GlobalPalette); VideoCreatePalette(GlobalPalette);
@ -528,6 +527,9 @@ local void Usage(void)
\t-h\t\tHelp shows this page\n\ \t-h\t\tHelp shows this page\n\
\t-l\t\tEnable command log to \"command.log\"\n\ \t-l\t\tEnable command log to \"command.log\"\n\
\t-p players\tNumber of players\n\ \t-p players\tNumber of players\n\
\t-n host[:port]\tNetwork argument (port default 6660)\n\
\t-L lag\t\tNetwork lag in # frames\n\
\t-U update\tNetwork update frequence in # frames\n\
\t-s sleep\tNumber of frames for the AI to sleep before they starts\n\ \t-s sleep\tNumber of frames for the AI to sleep before they starts\n\
\t-t factor\tComputer units built time factor\n\ \t-t factor\tComputer units built time factor\n\
\t-v mode\t\tVideo mode (0=default,1=640x480,2=800x600,\n\ \t-v mode\t\tVideo mode (0=default,1=640x480,2=800x600,\n\
@ -570,7 +572,7 @@ global int main(int argc,char** argv)
// Parse commandline // Parse commandline
// //
for( ;; ) { for( ;; ) {
switch( getopt(argc,argv,"c:d:f:hlp:s:t:v:D:FW?") ) { switch( getopt(argc,argv,"c:d:f:hln:p:s:t:v:D:FL:U:W?") ) {
#if defined(USE_CCL) || defined(USE_CCL2) #if defined(USE_CCL) || defined(USE_CCL2)
case 'c': case 'c':
CclStartFile=optarg; CclStartFile=optarg;
@ -588,6 +590,9 @@ global int main(int argc,char** argv)
case 'p': case 'p':
NetPlayers=atoi(optarg); NetPlayers=atoi(optarg);
continue; continue;
case 'n':
NetworkArg=strdup(optarg);
continue;
case 's': case 's':
AiSleep=atoi(optarg); AiSleep=atoi(optarg);
continue; continue;
@ -620,6 +625,13 @@ global int main(int argc,char** argv)
} }
continue; continue;
case 'L':
NetworkLag=atoi(optarg);
continue;
case 'U':
NetworkUpdates=atoi(optarg);
continue;
case 'F': case 'F':
VideoFullScreen=1; VideoFullScreen=1;
continue; continue;