Author: shadowmaster
Date: Tue Jun 17 22:15:05 2008
New Revision: 27268

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27268&view=rev
Log:
* Allow titlescreen startup effect to be disabled in adv. preferences

Modified:
    trunk/data/_main.cfg
    trunk/src/game_preferences.cpp
    trunk/src/game_preferences.hpp
    trunk/src/titlescreen.cpp

Modified: trunk/data/_main.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/_main.cfg?rev=27268&r1=27267&r2=27268&view=diff
==============================================================================
--- trunk/data/_main.cfg (original)
+++ trunk/data/_main.cfg Tue Jun 17 22:15:05 2008
@@ -68,6 +68,13 @@
 [advanced_preference]
     field=animate_map
     name=_"Animate Map"
+    type=boolean
+    default=yes
+[/advanced_preference]
+
+[advanced_preference]
+    field=startup_effect
+    name=_"Show Titlescreen Animation"
     type=boolean
     default=yes
 [/advanced_preference]

Modified: trunk/src/game_preferences.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_preferences.cpp?rev=27268&r1=27267&r2=27268&view=diff
==============================================================================
--- trunk/src/game_preferences.cpp (original)
+++ trunk/src/game_preferences.cpp Tue Jun 17 22:15:05 2008
@@ -682,6 +682,11 @@
        return utils::string_bool(preferences::get("compress_saves"), true);
 }
 
+bool startup_effect()
+{
+       return utils::string_bool(preferences::get("startup_effect"), true);
+}
+
 std::string get_chat_timestamp(const time_t& t) {
        if (chat_timestamping()) {
                return lg::get_timestamp(t, clock_format()) + " ";

Modified: trunk/src/game_preferences.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_preferences.hpp?rev=27268&r1=27267&r2=27268&view=diff
==============================================================================
--- trunk/src/game_preferences.hpp (original)
+++ trunk/src/game_preferences.hpp Tue Jun 17 22:15:05 2008
@@ -174,6 +174,8 @@
 
        bool compress_saves();
 
+       bool startup_effect();
+
        std::set<std::string> &encountered_units();
        std::set<t_translation::t_terrain> &encountered_terrains();
 

Modified: trunk/src/titlescreen.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=27268&r1=27267&r2=27268&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Tue Jun 17 22:15:05 2008
@@ -27,6 +27,7 @@
 #include "construct_dialog.hpp"
 #include "cursor.hpp"
 #include "game_display.hpp"
+#include "game_preferences.hpp"
 #include "events.hpp"
 #include "filesystem.hpp"
 #include "game_config.hpp"
@@ -83,8 +84,9 @@
                return true;
        }
 
-       // Only once, when the game is first started, the logo fades in
-       static bool faded_in = false;
+       // Only once, when the game is first started, the logo fades in unless
+       // it was disabled in adv. preferences
+       static bool faded_in = !preferences::startup_effect();
 //     static bool faded_in = true;    // for faster startup: mark logo as 
'has already faded in'
 
        CKey key;


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

Reply via email to