2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/Cmdline/cmdline.cpp $
16 * Revision 1.5 2003/05/06 07:20:14 taylor
17 * implement command line options
19 * Revision 1.4 2002/06/21 03:34:05 relnev
20 * implemented a stub and fixed a path
22 * Revision 1.3 2002/06/09 04:41:15 relnev
23 * added copyright header
25 * Revision 1.2 2002/05/07 03:16:43 theoddone33
26 * The Great Newline Fix
28 * Revision 1.1.1.1 2002/05/03 03:28:08 root
32 * 8 8/26/99 8:51p Dave
33 * Gave multiplayer TvT messaging a heavy dose of sanity. Cheat codes.
35 * 7 7/15/99 3:07p Dave
36 * 32 bit detection support. Mouse coord commandline.
38 * 6 7/13/99 1:15p Dave
39 * 32 bit support. Whee!
41 * 5 6/22/99 9:37p Dave
44 * 4 1/12/99 5:45p Dave
45 * Moved weapon pipeline in multiplayer to almost exclusively client side.
46 * Very good results. Bandwidth goes down, playability goes up for crappy
47 * connections. Fixed object update problem for ship subsystems.
49 * 3 11/17/98 11:12a Dave
50 * Removed player identification by address. Now assign explicit id #'s.
52 * 2 10/07/98 10:52a Dave
55 * 1 10/07/98 10:48a Dave
57 * 38 10/02/98 3:22p Allender
58 * fix up the -connect option and fix the -port option
60 * 37 9/15/98 4:04p Allender
61 * added back in the -ip_addr command line switch because it needs to be
62 * in the standalone server only executable
64 * 36 9/14/98 11:52a Allender
67 * 35 9/14/98 11:28a Allender
68 * support for server bashing of address when received from client. Added
69 * a cmdline.cfg file to process command line arguments from a file
71 * 34 9/08/98 2:20p Allender
72 * temporary code to force IP address to a specific value.
74 * 33 8/20/98 5:30p Dave
75 * Put in handy multiplayer logfile system. Now need to put in useful
76 * applications of it all over the code.
78 * 32 8/07/98 10:39a Allender
79 * fixed debug standalone problem where stats would continually get sent
80 * to tracker. more debug code to help find stats problem
82 * 31 7/24/98 11:14a Allender
83 * start of new command line options for version 1.04
85 * 30 5/21/98 1:50a Dave
86 * Remove obsolete command line functions. Reduce shield explosion packets
87 * drastically. Tweak PXO screen even more. Fix file xfer system so that
88 * we can guarantee file uniqueness.
90 * 29 5/18/98 9:10p Dave
91 * Put in many new PXO features. Fixed skill level bashing in multiplayer.
92 * Removed several old command line options. Put in network config files.
94 * 28 5/09/98 7:16p Dave
95 * Put in CD checking. Put in standalone host password. Made pilot into
98 * 27 4/23/98 8:27p Allender
99 * basic support for cutscene playback. Into movie code in place. Tech
100 * room can view cutscenes stored in CDROM_dir variable
102 * 26 4/09/98 5:43p Dave
103 * Remove all command line processing from the demo. Began work fixing up
104 * the new multi host options screen.
106 * 25 4/02/98 11:40a Lawrance
107 * check for #ifdef DEMO instead of #ifdef DEMO_RELEASE
109 * 24 4/01/98 5:56p Dave
110 * Fixed a messaging bug which caused msg_all mode in multiplayer not to
111 * work. Compile out a host of multiplayer options not available in the
114 * 23 3/14/98 2:48p Dave
115 * Cleaned up observer joining code. Put in support for file xfers to
116 * ingame joiners (observers or not). Revamped and reinstalled pseudo
119 * 22 2/22/98 12:19p John
120 * Externalized some strings
122 * 21 1/31/98 4:32p Dave
123 * Put in new support for VMT player validation, game logging in and game
126 * 20 12/10/97 4:45p Dave
127 * Added in more detailed support for multiplayer packet lag/loss. Fixed
128 * some multiplayer stuff. Added some controls to the standalone.
130 * 19 12/09/97 6:14p Lawrance
133 * 18 12/01/97 5:10p Dave
134 * Fixed a syntax bug.
136 * 17 12/01/97 4:59p Dave
137 * Synchronized multiplayer debris objects. Put in pilot popup in main
138 * hall. Optimized simulated multiplayer lag module. Fixed a potential
141 * 16 11/28/97 7:04p Dave
142 * Emergency checkin due to big system crash.
144 * 15 11/28/97 5:06p Dave
145 * Put in facilities for simulating multiplayer lag.
147 * 14 11/24/97 5:42p Dave
148 * Fixed a file xfer buffer free/malloc problem. Lengthened command line
149 * switch string parse length.
151 * 13 11/12/97 4:39p Dave
152 * Put in multiplayer campaign support parsing, loading and saving. Made
153 * command-line variables better named. Changed some things on the initial
154 * pilot select screen.
156 * 12 11/11/97 4:54p Dave
157 * Put in support for single vs. multiplayer pilots. Put in initial player
158 * selection screen (no command line option yet). Started work on
159 * multiplayer campaign file save gaming.
161 * 11 11/11/97 11:55a Allender
162 * initialize network at beginning of application. create new call to set
163 * which network protocol to use
165 * 10 9/18/97 10:12p Dave
166 * Added -gimmemedals, which gives the current pilot all the medals in the
169 * 9 9/18/97 9:20a Dave
170 * Minor modifications
172 * 8 9/15/97 11:40p Lawrance
173 * remove demo granularity switch
175 * 7 9/09/97 3:39p Sandeep
176 * warning level 4 bugs
178 * 6 9/03/97 5:03p Lawrance
179 * add support for -nosound command line parm
181 * 5 8/22/97 8:52a Dave
182 * Removed a return statement which would have broken the parser out too
185 * 4 8/21/97 4:55p Dave
186 * Added a switch for multiplayer chat streaming. Added a section for
187 * global command line vars.
189 * 3 8/06/97 2:26p Dave
190 * Made the command line parse more robust. Made it easier to add and
191 * process new command-line switches.
193 * 2 8/04/97 3:13p Dave
194 * Added command line functions. See cmdline.cpp for directions on adding
197 * 1 8/04/97 9:58a Dave
205 #include "linklist.h"
206 #include "systemvars.h"
210 #include "osregistry.h"
216 cmdline_parm *next, *prev;
217 char *name; // name of parameter, must start with '-' char
218 char *help; // help text for this parameter
219 char *args; // string value for parameter arguements (NULL if no arguements)
220 int name_found; // true if parameter on command line, otherwise false
222 cmdline_parm(char *name, char *help);
230 // here are the command line parameters that we will be using for FreeSpace
232 cmdline_parm standalone_arg("-standalone", NULL);
233 cmdline_parm nosound_arg("-nosound", NULL);
234 cmdline_parm nomusic_arg("-nomusic", NULL);
235 cmdline_parm startgame_arg("-startgame", NULL);
236 cmdline_parm gamename_arg("-gamename", NULL);
237 cmdline_parm gamepassword_arg("-password", NULL);
238 cmdline_parm gameclosed_arg("-closed", NULL);
239 cmdline_parm gamerestricted_arg("-restricted", NULL);
240 cmdline_parm allowabove_arg("-allowabove", NULL);
241 cmdline_parm allowbelow_arg("-allowbelow", NULL);
242 cmdline_parm port_arg("-port", NULL);
243 cmdline_parm connect_arg("-connect", NULL);
244 cmdline_parm multilog_arg("-multilog", NULL);
245 cmdline_parm server_firing_arg("-oldfire", NULL);
246 cmdline_parm client_dodamage("-clientdamage", NULL);
247 cmdline_parm pof_spew("-pofspew", NULL);
248 cmdline_parm d3d_32bit("-32bit", NULL);
249 cmdline_parm mouse_coords("-coords", NULL);
250 cmdline_parm timeout("-timeout", NULL);
251 cmdline_parm d3d_window("-window", NULL);
253 // double hyphens on Unix options
254 cmdline_parm standalone_arg("--standalone", NULL);
255 cmdline_parm nosound_arg("--nosound", NULL);
256 cmdline_parm nomusic_arg("--nomusic", NULL);
257 cmdline_parm startgame_arg("--startgame", NULL);
258 cmdline_parm gamename_arg("--gamename", NULL);
259 cmdline_parm gamepassword_arg("--password", NULL);
260 cmdline_parm gameclosed_arg("--closed", NULL);
261 cmdline_parm gamerestricted_arg("--restricted", NULL);
262 cmdline_parm allowabove_arg("--allowabove", NULL);
263 cmdline_parm allowbelow_arg("--allowbelow", NULL);
264 cmdline_parm port_arg("--port", NULL);
265 cmdline_parm connect_arg("--connect", NULL);
266 cmdline_parm multilog_arg("--multilog", NULL);
267 cmdline_parm server_firing_arg("--oldfire", NULL);
268 cmdline_parm client_dodamage("--clientdamage", NULL);
269 cmdline_parm pof_spew("--pofspew", NULL);
270 cmdline_parm mouse_coords("--coords", NULL);
271 cmdline_parm timeout("--timeout", NULL);
272 cmdline_parm d3d_window("--window", NULL);
273 cmdline_parm d3d_fullscreen("--fullscreen", NULL);
274 cmdline_parm help("--help", NULL);
275 cmdline_parm no_grab("--nograb", NULL);
276 cmdline_parm fs_version("--version", NULL);
277 cmdline_parm no_movies("--nomovies", NULL);
279 // single letter version of above options
280 cmdline_parm standalone_arg_s("-d", NULL);
281 cmdline_parm nosound_arg_s("-s", NULL);
282 cmdline_parm startgame_arg_s("-S", NULL);
283 cmdline_parm gamename_arg_s("-N", NULL);
284 cmdline_parm gamepassword_arg_s("-p", NULL);
285 cmdline_parm gameclosed_arg_s("-c", NULL);
286 cmdline_parm gamerestricted_arg_s("-r", NULL);
287 cmdline_parm allowabove_arg_s("-a", NULL);
288 cmdline_parm allowbelow_arg_s("-b", NULL);
289 cmdline_parm port_arg_s("-o", NULL);
290 cmdline_parm connect_arg_s("-C", NULL);
291 cmdline_parm multilog_arg_s("-m", NULL);
292 cmdline_parm server_firing_arg_s("-F", NULL);
293 cmdline_parm client_dodamage_s("-D", NULL);
294 cmdline_parm pof_spew_s("-P", NULL);
295 cmdline_parm mouse_coords_s("-M", NULL);
296 cmdline_parm timeout_s("-t", NULL);
297 cmdline_parm d3d_window_s("-w", NULL);
298 cmdline_parm d3d_fullscreen_s("-f", NULL);
299 cmdline_parm help_s("-h", NULL);
300 cmdline_parm no_grab_s("-g", NULL);
301 cmdline_parm fs_version_s("-v", NULL);
302 cmdline_parm no_movies_s("-n", NULL);
305 int Cmdline_multi_stream_chat_to_file = 0;
306 int Cmdline_freespace_no_sound = 0;
307 int Cmdline_freespace_no_music = 0;
308 int Cmdline_gimme_all_medals = 0;
309 int Cmdline_use_last_pilot = 0;
310 int Cmdline_multi_protocol = -1;
311 int Cmdline_cd_check = 1;
312 int Cmdline_start_netgame = 0;
313 int Cmdline_closed_game = 0;
314 int Cmdline_restricted_game = 0;
315 int Cmdline_network_port = -1;
316 char *Cmdline_game_name = NULL;
317 char *Cmdline_game_password = NULL;
318 char *Cmdline_rank_above= NULL;
319 char *Cmdline_rank_below = NULL;
320 char *Cmdline_connect_addr = NULL;
321 int Cmdline_multi_log = 0;
322 int Cmdline_server_firing = 0;
323 int Cmdline_client_dodamage = 0;
324 int Cmdline_spew_pof_info = 0;
325 int Cmdline_force_32bit = 0;
326 int Cmdline_mouse_coords = 0;
327 int Cmdline_timeout = -1;
329 int Cmdline_no_grab = 0;
330 int Cmdline_play_movies = 1;
331 int Cmdline_fullscreen = 0;
334 int Cmdline_window = 0;
336 static cmdline_parm Parm_list(NULL, NULL);
337 static int Parm_list_inited = 0;
340 void print_instructions();
343 // Return true if this character is an extra char (white space and quotes)
344 int is_extra_space(char ch)
346 return ((ch == ' ') || (ch == '\t') || (ch == 0x0a) || (ch == '\'') || (ch == '\"'));
350 // eliminates all leading and trailing extra chars from a string. Returns pointer passed in.
351 char *drop_extra_chars(char *str)
356 while (str[s] && is_extra_space(str[s]))
361 if (!is_extra_space(str[e])){
369 memmove(str, str + s, e - s + 1);
377 // internal function - copy the value for a parameter agruement into the cmdline_parm arg field
378 void parm_stuff_args(cmdline_parm *parm, char *cmdline)
381 memset(buffer, 0, 1024);
384 cmdline += strlen(parm->name);
386 while ((*cmdline != 0) && (*cmdline != '-')) {
387 *dest++ = *cmdline++;
390 drop_extra_chars(buffer);
392 // mwa 9/14/98 -- made it so that newer command line arguments found will overwrite
394 // Assert(parm->args == NULL);
395 if ( parm->args != NULL ) {
396 delete( parm->args );
400 int size = strlen(buffer) + 1;
402 parm->args = new char[size];
403 memset(parm->args, 0, size);
404 strcpy(parm->args, buffer);
409 // internal function - parse the command line, extracting parameter arguements if they exist
410 // cmdline - command line string passed to the application
411 void os_parse_parms(char *cmdline)
413 // locate command line parameters
415 char *cmdline_offset;
417 for (parmp = GET_FIRST(&Parm_list); parmp !=END_OF_LIST(&Parm_list); parmp = GET_NEXT(parmp) ) {
418 cmdline_offset = strstr(cmdline, parmp->name);
420 // verify that one hyphen and two hypen options don't collide
421 if (cmdline_offset && (*(cmdline_offset-1) != '-')) {
423 if (cmdline_offset) {
425 parmp->name_found = 1;
426 parm_stuff_args(parmp, cmdline_offset);
432 // validate the command line parameters. Display an error if an unrecognized parameter is located.
433 void os_validate_parms(char *cmdline)
436 char seps[] = " ,\t\n";
440 token = strtok(cmdline, seps);
441 while(token != NULL) {
443 // make sure double hypens are checked first to avoid clashing with single args
444 if (token[0] == '-' && token[1] == '-') {
446 for (parmp = GET_FIRST(&Parm_list); parmp !=END_OF_LIST(&Parm_list); parmp = GET_NEXT(parmp) ) {
447 if (!stricmp(parmp->name, token)) {
453 if (parm_found == 0) {
454 print_instructions();
456 } else if (token[0] == '-' && token[1] != '-') {
458 if (token[0] == '-') {
461 for (parmp = GET_FIRST(&Parm_list); parmp !=END_OF_LIST(&Parm_list); parmp = GET_NEXT(parmp) ) {
462 if (!stricmp(parmp->name, token)) {
468 if (parm_found == 0) {
470 Error(LOCATION,"Unrecogzined command line parameter %s", token);
472 print_instructions();
477 token = strtok(NULL, seps);
482 // Call once to initialize the command line system
484 // cmdline - command line string passed to the application
485 void os_init_cmdline(char *cmdline)
489 // read the cmdline.cfg file from the data folder, and pass the command line arguments to
490 // the the parse_parms and validate_parms line. Read these first so anything actually on
491 // the command line will take precedence
493 char cmdname[MAX_FILENAME_LENGTH];
495 snprintf(cmdname, MAX_FILENAME_LENGTH, "%s/%s/Data/cmdline.cfg", detect_home(), Osreg_user_dir);
496 fp = fopen(cmdname, "rt");
499 // if not already found check exec directory
500 fp = fopen("Data/cmdline.cfg", "rt");
503 fp = fopen("data\\cmdline.cfg", "rt");
506 // if the file exists, get a single line, and deal with it
510 fgets(buf, 1024, fp);
512 // replace the newline character with a NUL:
513 if ( (p = strrchr(buf, '\n')) != NULL ) {
518 os_validate_parms(buf);
524 os_parse_parms(cmdline);
525 os_validate_parms(cmdline);
530 // help for available cmdline options
531 void print_instructions()
533 printf("http://icculus.org/freespace2\n");
534 printf("Support - FAQ: http://icculus.org/lgfaq\n");
535 printf(" Web: http://bugzilla.icculus.org\n\n");
537 printf("Usage: freespace2 [options]\n");
538 printf(" [-h | --help] Show this help message\n");
539 printf(" [-v | --version] Show game version\n");
540 printf(" [-s | --nosound] Do no access the sound card\n");
541 printf(" [-f | --fullscreen] Run the game fullscreen\n");
542 printf(" [-w | --window] Run the game in a window\n");
543 printf(" [-g | --nograb] Do not automatically grab mouse\n");
544 printf(" [-n | --nomovies] Do not play movies\n");
545 printf(" [-d | --standalone] Run as a dedicated server\n");
546 printf(" [-S | --startgame] Start a multiplayer game\n");
547 printf(" [-N | --gamename] Name of the multiplayer game\n");
548 printf(" [-p | --password] Use this password to connect\n");
549 printf(" [-c | --closed] Closed multiplayer game\n");
550 printf(" [-r | --restricted] Restricted multiplayer game\n");
551 printf(" [-a | --allowabove] Only allow above certain rank\n");
552 printf(" [-b | --allowbelow] Only allow below certain rank\n");
553 printf(" [-o | --port] Port to use for multiplayer games\n");
554 printf(" [-C | --connect] Connect to particular IP address\n");
555 printf(" [-m | --multilog] Log multiplayer events\n");
556 printf(" [-F | --oldfire] Server side firing\n");
557 printf(" [-D | --clientdamage] Client does damage\n");
558 printf(" [-t | --timeout] Multiplayer game timeout\n");
559 printf(" [-P | --pofspew] Save model info to pofspew.txt\n");
560 printf(" [-M | --coords] Show coordinates of the mouse cursor\n\n");
562 printf("Freespace 2 v%d.%02d -- Linux Client v%d.%02d\n\n", FS_VERSION_MAJOR, FS_VERSION_MINOR, FS_UNIX_VERSION_MAJOR, FS_UNIX_VERSION_MINOR);
569 // name_ - name of the parameter, must start with '-' character
570 // help_ - help text for this parameter
571 cmdline_parm::cmdline_parm(char *name_, char *help_)
578 if (Parm_list_inited == 0) {
579 list_init(&Parm_list);
580 Parm_list_inited = 1;
584 list_append(&Parm_list, this);
589 // destructor - frees any allocated memory
590 cmdline_parm::~cmdline_parm()
599 // returns - true if the parameter exists on the command line, otherwise false
600 int cmdline_parm::found()
606 // returns - the interger representation for the parameter arguement
607 int cmdline_parm::get_int()
614 // returns - the float representation for the parameter arguement
615 float cmdline_parm::get_float()
618 return (float)atof(args);
622 // returns - the string value for the parameter arguement
623 char *cmdline_parm::str()
629 // external entry point into this modules
630 int parse_cmdline(char *cmdline)
632 os_init_cmdline(cmdline);
634 // is this a standalone server??
636 if (standalone_arg.found() || standalone_arg_s.found()) {
638 if (standalone_arg.found()) {
645 if ( nosound_arg.found() || nosound_arg_s.found() ) {
647 if ( nosound_arg.found() ) {
649 Cmdline_freespace_no_sound = 1;
653 if ( nomusic_arg.found() ) {
654 Cmdline_freespace_no_music = 1;
657 // should we start a network game
659 if ( startgame_arg.found() || startgame_arg_s.found() ) {
661 if ( startgame_arg.found() ) {
663 Cmdline_use_last_pilot = 1;
664 Cmdline_start_netgame = 1;
667 // closed network game
669 if ( gameclosed_arg.found() || gameclosed_arg_s.found() ) {
671 if ( gameclosed_arg.found() ) {
673 Cmdline_closed_game = 1;
676 // restircted network game
678 if ( gamerestricted_arg.found() || gamerestricted_arg_s.found() ) {
680 if ( gamerestricted_arg.found() ) {
682 Cmdline_restricted_game = 1;
685 // get the name of the network game
687 if ( gamename_arg.found() || gamename_arg_s.found() ) {
688 // be sure both options get checked if needed
689 if ( gamename_arg.found() ) {
690 Cmdline_game_name = gamename_arg.str();
692 Cmdline_game_name = gamename_arg_s.str();
695 if ( gamename_arg.found() ) {
696 Cmdline_game_name = gamename_arg.str();
700 // if there wasn't an argument then complain and exit
701 if ( !(strlen(Cmdline_game_name) > 0) ) {
702 fprintf(stderr, "ERROR: The --gamename (-N) option requires an additional argument!\n");
707 // be sure that this string fits in our limits
708 if ( strlen(Cmdline_game_name) > MAX_GAMENAME_LEN ) {
709 Cmdline_game_name[MAX_GAMENAME_LEN-1] = '\0';
713 // get the password for a pssword game
715 if ( gamepassword_arg.found() || gamepassword_arg_s.found() ) {
716 // be sure both options get checked if needed
717 if ( gamepassword_arg.found() ) {
718 Cmdline_game_password = gamepassword_arg.str();
720 Cmdline_game_password = gamepassword_arg_s.str();
723 if ( gamepassword_arg.found() ) {
724 Cmdline_game_password = gamepassword_arg.str();
728 // if there wasn't an argument then complain and exit
729 if ( !(strlen(Cmdline_game_password) > 0) ) {
730 fprintf(stderr, "ERROR: The --password (-p) option requires an additional argument!\n");
735 // be sure that this string fits in our limits
736 if ( strlen(Cmdline_game_password) > MAX_PASSWD_LEN ) {
737 Cmdline_game_password[MAX_PASSWD_LEN-1] = '\0';
741 // set the rank above/below arguments
743 if ( allowabove_arg.found() || allowabove_arg_s.found() ) {
744 Cmdline_rank_above = allowabove_arg.str();
746 if ( allowbelow_arg.found() || allowbelow_arg_s.found() ) {
747 Cmdline_rank_below = allowbelow_arg.str();
750 if ( allowabove_arg.found() ) {
751 Cmdline_rank_above = allowabove_arg.str();
753 if ( allowbelow_arg.found() ) {
754 Cmdline_rank_below = allowbelow_arg.str();
758 // get the port number for games
760 if ( port_arg.found() || port_arg_s.found() ) {
761 // be sure both options get checked if needed
762 if ( port_arg.found() ) {
763 Cmdline_network_port = port_arg.get_int();
765 Cmdline_network_port = port_arg_s.get_int();
768 if ( port_arg.found() ) {
769 Cmdline_network_port = port_arg.get_int();
773 // if there wasn't an argument then complain and exit
774 if ( !Cmdline_network_port ) {
775 fprintf(stderr, "ERROR: The --port (-P) option requires an additional argument!\n");
781 // the connect argument specifies to join a game at this particular address
783 if ( connect_arg.found() || connect_arg_s.found() ) {
784 Cmdline_use_last_pilot = 1;
785 // be sure both options get checked it needed
786 if ( connect_arg.found() ) {
787 Cmdline_connect_addr = connect_arg.str();
789 Cmdline_connect_addr = connect_arg_s.str();
792 if ( connect_arg.found() ) {
793 Cmdline_use_last_pilot = 1;
794 Cmdline_connect_addr = connect_arg.str();
798 // if there wasn't an argument then complain and exit
799 if ( !(strlen(Cmdline_connect_addr) > 0) ) {
800 fprintf(stderr, "ERROR: The --connect (-C) option requires an additional argument!\n");
806 // see if the multilog flag was set
808 if ( multilog_arg.found() || multilog_arg_s.found() ){
810 if ( multilog_arg.found() ){
812 Cmdline_multi_log = 1;
815 // maybe use old-school server-side firing
817 if (server_firing_arg.found() || server_firing_arg_s.found() ){
819 if (server_firing_arg.found() ){
821 Cmdline_server_firing = 1;
824 // maybe use old-school client damage
826 if(client_dodamage.found() || client_dodamage_s.found()){
828 if(client_dodamage.found()){
830 Cmdline_client_dodamage = 1;
835 if(pof_spew.found() || pof_spew_s.found()){
837 if(pof_spew.found()){
839 Cmdline_spew_pof_info = 1;
844 if(d3d_32bit.found()){
845 Cmdline_force_32bit = 1;
851 if(mouse_coords.found() || mouse_coords_s.found()){
853 if(mouse_coords.found()){
855 Cmdline_mouse_coords = 1;
860 if(timeout.found() || timeout_s.found()){
864 Cmdline_timeout = timeout.get_int();
869 if(d3d_window.found() || d3d_window_s.found()){
871 if(d3d_window.found()){
878 if(d3d_fullscreen.found() || d3d_fullscreen_s.found()){
879 Cmdline_fullscreen = 1;
883 if(help.found() || help_s.found()){
884 print_instructions();
888 if(no_grab.found() || no_grab_s.found()){
893 if(no_movies.found() || no_movies_s.found()){
894 Cmdline_play_movies = 0;
897 // display game version
898 if(fs_version.found() || fs_version_s.found()){
899 printf("Freespace 2 version: %d.%02d\n", FS_VERSION_MAJOR, FS_VERSION_MINOR);
900 printf("Linux client version: %d.%02d\n", FS_UNIX_VERSION_MAJOR, FS_UNIX_VERSION_MINOR);