[opendemo-cvs] CVS: opendemo/tools/odcut odcut.pl,1.48,1.49
Status: Beta
Brought to you by:
girlich
From: Uwe G. <gi...@us...> - 2004-10-31 22:32:13
|
Update of /cvsroot/opendemo/opendemo/tools/odcut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4889 Modified Files: odcut.pl Log Message: Add documentation for some configuration values. It would be better to derive the documentation more directly from the code (variable definitions). Use compressed syntax for warning, logging, output_file setting. Combine config object creation and variable definition into one API call. Index: odcut.pl =================================================================== RCS file: /cvsroot/opendemo/opendemo/tools/odcut/odcut.pl,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** odcut.pl 31 Oct 2004 21:50:40 -0000 1.48 --- odcut.pl 31 Oct 2004 22:32:03 -0000 1.49 *************** *** 38,53 **** # Create configuration object. ! my $config = AppConfig->new({ ! CASE => 1, ! GLOBAL => { ! ARGCOUNT => ARGCOUNT_ONE, ! ARGS => "=s", ! EXPAND => EXPAND_ALL, ! } ! }); ! ! ! # Create the configuration variables. ! $config->define( "game_dir", { DEFAULT => "/home/uwe/games/q3a/game/linuxq3apoint-1.32b-2", --- 38,50 ---- # Create configuration object. ! my $config = AppConfig->new( ! { ! CASE => 1, ! GLOBAL => { ! ARGCOUNT => ARGCOUNT_ONE, ! ARGS => "=s", ! EXPAND => EXPAND_ALL, ! } ! }, "game_dir", { DEFAULT => "/home/uwe/games/q3a/game/linuxq3apoint-1.32b-2", *************** *** 1050,1054 **** if ($command->get_arg(0) ne $self->{"config"}->output_file) { $self->close_output(); ! $self->{"config"}->set("output_file",$command->get_arg(0)); $result = $self->{"config"}->output_file; } --- 1047,1051 ---- if ($command->get_arg(0) ne $self->{"config"}->output_file) { $self->close_output(); ! $self->{"config"}->output_file($command->get_arg(0)); $result = $self->{"config"}->output_file; } *************** *** 1179,1183 **** elsif ($command->get_code() eq "l") { if ($command->get_argc()>=1) { ! $config->set("logging",$command->get_arg(0)); } main::logging 0, "LOGGING %d\n", $config->logging; --- 1176,1180 ---- elsif ($command->get_code() eq "l") { if ($command->get_argc()>=1) { ! $config->logging($command->get_arg(0)); } main::logging 0, "LOGGING %d\n", $config->logging; *************** *** 1185,1189 **** elsif ($command->get_code() eq "w") { if ($command->get_argc()>=1) { ! $config->set("warning",$command->get_arg(0)); } main::logging 0, "WARNING %d\n", $config->warning; --- 1182,1186 ---- elsif ($command->get_code() eq "w") { if ($command->get_argc()>=1) { ! $config->warning($command->get_arg(0)); } main::logging 0, "WARNING %d\n", $config->warning; *************** *** 1562,1565 **** --- 1559,1592 ---- "File/Save Log as" menu point. + =head1 CONFIGURATION FILE + + In the configuration file, some global variables can be set in a very simple + way. The general syntax is line based with name=value pairs on every line. + Comments (#) and empty lines will be ignored. + + =head2 game_dir + + This configuration value defines the base directory, where the game installed. + The default is (from my private disk) + /home/uwe/games/q3a/game/linuxq3apoint-1.32b-2. + + =head2 game_opendemo + + This configuration value defines the directory name for the OpenDemo + modification. It is given as a relative path and should be a sub-directory of + game_dir (on Windows machines) or of the private directory (in the home + directory) on UNIX machines. The default is "od". + + =head2 game_password + + To communicate with a running game, the remote console (rcon) feature will be + used. This requires a password, which will be set with this configuration + variable. The default is "odcut". + + =head2 game_executable + + This configuration variable defines the full executable file name for the + external game to start. The default is <game_dir>/quake3.x86. + =head1 SEE ALSO |