mail[Wesnoth-commits] r20751 - in /trunk: changelog players_changelog src/multiplayer_create.cpp src/settings.cpp src/settings.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on September 27, 2007 - 20:28:
Author: mordante
Date: Thu Sep 27 20:27:25 2007
New Revision: 20751

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20751&view=rev
Log:
Minimum number of turns reduced to 1, upon request of Mythological.

Modified:
    trunk/changelog
    trunk/players_changelog
    trunk/src/multiplayer_create.cpp
    trunk/src/settings.cpp
    trunk/src/settings.hpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=20751&r1=20750&r2=20751&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Thu Sep 27 20:27:25 2007
@@ -26,6 +26,7 @@
      * Charge to The Freelands
      * Meteor Lake to Fallenstar Lake
      * Triple Blitz to Alirok Marsh
+   * minimum number of turns reduced to 1
  * units:
    * balancing changes:
      * created undead variations for the 'bat' and 'gryphon' race

Modified: trunk/players_changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/players_changelog?rev=20751&r1=20750&r2=20751&view=diff
==============================================================================
--- trunk/players_changelog (original)
+++ trunk/players_changelog Thu Sep 27 20:27:25 2007
@@ -31,6 +31,7 @@
       * Charge to The Freelands
       * Meteor Lake to Fallenstar Lake
       * Triple Blitz to Alirok Marsh
+    * Minimum number of turns reduced to 1.
 
   * Unit changes and balancing
     * Created undead variations for the 'bat' and 'gryphon' race.

Modified: trunk/src/multiplayer_create.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_create.cpp?rev=20751&r1=20750&r2=20751&view=diff
==============================================================================
--- trunk/src/multiplayer_create.cpp (original)
+++ trunk/src/multiplayer_create.cpp Thu Sep 27 20:27:25 2007
@@ -119,8 +119,9 @@
                maps_menu_.move_selection(preferences::map());
        maps_menu_.set_numeric_keypress_selection(false);
 
-       turns_slider_.set_min(20);
-       turns_slider_.set_max(100);
+       turns_slider_.set_min(settings::turns_min);
+       turns_slider_.set_max(settings::turns_max);
+       turns_slider_.set_increment(settings::turns_step);
        turns_slider_.set_value(preferences::turns());
        turns_slider_.set_help_string(_("The maximum number of turns the game 
can last"));
 

Modified: trunk/src/settings.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/settings.cpp?rev=20751&r1=20750&r2=20751&view=diff
==============================================================================
--- trunk/src/settings.cpp (original)
+++ trunk/src/settings.cpp Thu Sep 27 20:27:25 2007
@@ -26,14 +26,15 @@
 
 int get_turns(const std::string& value)
 {
-       // Special case, -1 is also allowed, which are unlimited turns
+       // Special case, -1 is also allowed, which means unlimited turns
        int val = lexical_cast_default<int>(value);
 
        if(val == -1) {
-               return 100;
+               return turns_max;
        }
 
-       return lexical_cast_in_range<int>(value, 100, 20, 100);
+       return lexical_cast_in_range<int>
+               (value, turns_default, turns_min, turns_max);
 }
 
 int get_village_gold(const std::string& value)

Modified: trunk/src/settings.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/settings.hpp?rev=20751&r1=20750&r2=20751&view=diff
==============================================================================
--- trunk/src/settings.hpp (original)
+++ trunk/src/settings.hpp Thu Sep 27 20:27:25 2007
@@ -39,6 +39,10 @@
         *  @returns            the number of turns
         */
        int get_turns(const std::string& value);
+       const int turns_min = 1;                //< minimum number of turns
+       const int turns_max = 100;              //< maximum number of turns
+       const int turns_default = 100;  //< default number of turns
+       const int turns_step = 1;               //< slider step size for turns
 
        /**
         *  Gets the village gold.




Related Messages


Powered by MHonArc, Updated Thu Sep 27 22:00:59 2007