Author: timotei
Date: Sat Jun 11 18:26:08 2011
New Revision: 49843

URL: http://svn.gna.org/viewcvs/wesnoth?rev=49843&view=rev
Log:
Put back the default campaign difficulty to -1(none), and update
the help for the command line option to reflect that

Modified:
    trunk/src/commandline_options.cpp
    trunk/src/game_controller.cpp

Modified: trunk/src/commandline_options.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/commandline_options.cpp?rev=49843&r1=49842&r2=49843&view=diff
==============================================================================
--- trunk/src/commandline_options.cpp (original)
+++ trunk/src/commandline_options.cpp Sat Jun 11 18:26:08 2011
@@ -149,9 +149,9 @@
 
        po::options_description campaign_opts("Campaign options");
        campaign_opts.add_options()
-               ("campaign,c", 
po::value<std::string>()->implicit_value(std::string()), "goes directly to the 
campaign with id <arg>. A selection menu will appear if no id was specified")
-               ("campaign-difficulty", po::value<int>(), "the difficulty of 
the specified campaign (1 to max - default is 1)")
-               ("campaign-scenario", po::value<std::string>(),"the id of the 
scenario from the specified campaign")
+               ("campaign,c", 
po::value<std::string>()->implicit_value(std::string()), "goes directly to the 
campaign with id <arg>. A selection menu will appear if no id was specified.")
+               ("campaign-difficulty", po::value<int>(), "The difficulty of 
the specified campaign (1 to max). If none specified, the campaign difficulty 
selection widget will appear.")
+               ("campaign-scenario", po::value<std::string>(),"The id of the 
scenario from the specified campaign. The default is the first scenario.")
                ;
 
        po::options_description display_opts("Display options");

Modified: trunk/src/game_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_controller.cpp?rev=49843&r1=49842&r2=49843&view=diff
==============================================================================
--- trunk/src/game_controller.cpp (original)
+++ trunk/src/game_controller.cpp Sat Jun 11 18:26:08 2011
@@ -85,9 +85,9 @@
        state_(),
        multiplayer_server_(),
        jump_to_multiplayer_(false),
-       jump_to_campaign_(false,-1,"","")
-        ,jump_to_editor_(false)
-       ,cache_(game_config::config_cache::instance())
+       jump_to_campaign_(false, -1, "", ""),
+       jump_to_editor_(false),
+       cache_(game_config::config_cache::instance())
 {
        bool no_music = false;
        bool no_sound = false;
@@ -109,21 +109,21 @@
        const std::string app_basename = file_name(appname);
        jump_to_editor_ = app_basename.find("editor") != std::string::npos;
 
-       if (cmdline_opts_.campaign)
-       {
+       if (cmdline_opts_.campaign)     {
                jump_to_campaign_.jump_ = true;
                jump_to_campaign_.campaign_id_ = *cmdline_opts_.campaign;
-               std::cerr<<"selected campaign id: 
["<<jump_to_campaign_.campaign_id_<<"]\n";
-               if (cmdline_opts_.campaign_difficulty)
+               std::cerr << "selected campaign id: [" << 
jump_to_campaign_.campaign_id_ << "]\n";
+
+               if (cmdline_opts_.campaign_difficulty) {
                        jump_to_campaign_.difficulty_ = 
*cmdline_opts_.campaign_difficulty;
+                       std::cerr << "selected difficulty: [" << 
jump_to_campaign_.difficulty_ << "]\n";
+               }
                else
-                       jump_to_campaign_.difficulty_ = 1; // it's the default
-               std::cerr<<"selected difficulty: 
["<<jump_to_campaign_.difficulty_<<"]\n";
-
-               if (cmdline_opts_.campaign_scenario)
-               {
+                       jump_to_campaign_.difficulty_ = -1; // let the user 
choose the difficulty
+
+               if (cmdline_opts_.campaign_scenario) {
                        jump_to_campaign_.scenario_id_ = 
*cmdline_opts_.campaign_scenario;
-                       std::cerr<<"selected scenario id: 
["<<jump_to_campaign_.scenario_id_<<"]\n";
+                       std::cerr << "selected scenario id: [" << 
jump_to_campaign_.scenario_id_ << "]\n";
                }
        }
        if (cmdline_opts_.clock)


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to